[Tex/LaTex] Fixed right margin of longtable

longtable

I have several equations in my paper, with variables explained below in the form of longtable (so it can be split into two pages). I want my table to be as wide as the text. I try to use \LTright but it doesnt work (\LTleft works fine)…(why???) I can define the width of the last column with p{xcm} but thanks to second column every table differs in the width and I dont want to test the width for every single table. I want to have the margin between table and right edge of the paper fixed.

\documentclass[a4paper, 12pt,titlepage]{report}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[czech]{babel}
\usepackage{fullpage}
\usepackage{listings}
\usepackage{palatino, url, multicol}
\usepackage{graphicx}
\setlength{\parindent}{1cm}
\usepackage{indentfirst}
\setcounter{secnumdepth}{3}
\usepackage{mdframed}
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{light-gray}{gray}{0.85}
\setcounter{tocdepth}{3}
\usepackage{titlesec}
\titleformat{\chapter}[display]   
  {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}  
\titlespacing*{\chapter}{0pt}{-20pt}{40pt}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{enumerate}
\usepackage{here}
\usepackage{longtable}
\usepackage[bottom]{footmisc}
\usepackage[font={small,it}]{caption}
\usepackage{ctable}

\usepackage[left=3.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}

\begin{equation}
  EVA = NOPAT - WACC \cdot Capital
\end{equation}

\setlength\LTleft{-0.2cm}
\setlength\LTright{-10cm} %I want 2.5 cm of the margin
\begin{longtable}{llll}
  kde:  & NOPAT &=& Zisk z operativní činnosti podniku po dani (ang. "net operating profit after taxes") \\
   & WACC &=& Průměrné vážené náklady kapitálu \\
   & Capital &=& Aktiva potřebná k hlavnímu provozu podniku   \\
\end{longtable}
\setlength{\parindent}{1cm}

\lipsum[1]

\end{document}

Best Answer

You need some flexibility somewhere if you want to stretch the line to be full width.

 \begin{longtable}{@{\extracolsep{\fill}}llll@{}}

Is the easiest way: adding stretchable glue between each column (and removing the fixed glue before the first column and after the last)

Related Question