Graphics, Figures & Tables ⇒ longtable overwrites bottom margin
-
- Posts: 4
- Joined: Fri Jun 19, 2015 10:35 am
longtable overwrites bottom margin
Hi all,
I'm a newer Latex programmer.
I'm working on an existing project (I must fix some problems) and I have a problem with a longtable.
It overwrites the bottom margin and i lose one rows (in this case 1.14).
Please, could you help me with this issue?
Thanks.
Best regards,
Giuseppe
I'm a newer Latex programmer.
I'm working on an existing project (I must fix some problems) and I have a problem with a longtable.
It overwrites the bottom margin and i lose one rows (in this case 1.14).
Please, could you help me with this issue?
Thanks.
Best regards,
Giuseppe
- Attachments
-
- 001_Preview_Step_di_Produzione_29042015-105323.tex
- main file
- (263 Bytes) Downloaded 198 times
-
- 000_Setup.tex
- setup
- (2.91 KiB) Downloaded 221 times
-
- 020_Header.tex
- header
- (883 Bytes) Downloaded 206 times
-
- 060_Step_Produzione.tex
- longtable
- (5.85 KiB) Downloaded 212 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
longtable overwrites bottom margin
Hi and welcome,
you need to do many things here.
Your head is too high, you get a warning, instead of setting the length manually, give it as option to geometry. There is other stuff going on, i tried to fix it.
you need to do many things here.
Your head is too high, you get a warning, instead of setting the length manually, give it as option to geometry. There is other stuff going on, i tried to fix it.
Code: Select all
Code, edit and compile here:
\documentclass[a4paper,12pt,landscape,pagesize]{scrartcl}\usepackage[a4paper,landscape]{geometry}\geometry{top=1.5cm,bottom=1.5cm,left=2.0cm,headheight=95pt,includehead,right=1.5cm,}\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}% my editor uses the modern utf8 encoding\usepackage[table]{xcolor}\usepackage{longtable}\usepackage{tabularx}\usepackage{multirow}\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}m{#1}}\newcolumntype{L}[1]{>{\raggedright\arraybackslash}m{#1}}\usepackage{booktabs}\usepackage{scrlayer-scrpage}\clearpairofpagestyles\chead{\begin{tabularx}{\textwidth}{l>{\centering\arraybackslash}Xr}\topruleXXXXXXX & \textbf{TEST} &\begin{tabular}[c]{@{}l@{}}XXXXX\\{Pagina: \thepage \hspace{1pt} di \pageref{LastPage}}\\\end{tabular}\\\hline\multicolumn{3}{|@{}X@{}|}{\begin{tabularx} {\textwidth} { L{4cm} L{5cm} L{2.7cm} L{5cm} L{2.7cm} >{\raggedright\arraybackslash}X }\textbf{XXXXX} & XXXXX & \textbf{XXXXX} & XXXXX & \textbf{XXXXX} & XXXXX \\\textbf{XXXXX} & XXXXX & \textbf{XXXXX} & XXXXX & & \\\textbf{XXXXX} & XXXXX & \textbf{XXXXX} & & & \\
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 4
- Joined: Fri Jun 19, 2015 10:35 am
Re: longtable overwrites bottom margin
Hi Johannes_B,
thank you so much for your reply.
Unfortunately the page header and table header can't be modified
.
Furthermore width of the table header must be the same of the table.
Have you other ideas?
Now I'm studying your attachment to find some indications.
Best regards,
Giuseppe
thank you so much for your reply.
Unfortunately the page header and table header can't be modified

Furthermore width of the table header must be the same of the table.
Have you other ideas?
Now I'm studying your attachment to find some indications.
Best regards,
Giuseppe
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
longtable overwrites bottom margin
You need to set the headheight correct, otherwise the document will not come out directly. Period.
All other changes i made are optional.
Crosspost to TeX.SX
All other changes i made are optional.
Crosspost to TeX.SX
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 4
- Joined: Fri Jun 19, 2015 10:35 am
Re: longtable overwrites bottom margin
It works!!!
I have added only "headheight=95pt,includehead" in \geometry options.
Thanks thanks thanks.
Now I hope that the remaining parts of document don't change
Bye and thanks,
Giuseppe



I have added only "headheight=95pt,includehead" in \geometry options.
Thanks thanks thanks.
Now I hope that the remaining parts of document don't change

Bye and thanks,
Giuseppe
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: longtable overwrites bottom margin
the 95 pt was the value needed for my example, your needed value should be a bit larger, as the table in the header is larger. Have a look at the log-file, the real value will be reported in there.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 4
- Joined: Fri Jun 19, 2015 10:35 am
longtable overwrites bottom margin
Should be 110pt.
I've another question for you. is "\newgeometry{} ... \restoregeometry" a good option to use?
Because the final document is compose by more "\input" that use the same "000_Setup.tex".
For example:
I've another question for you. is "\newgeometry{} ... \restoregeometry" a good option to use?
Because the final document is compose by more "\input" that use the same "000_Setup.tex".
For example:
Code: Select all
*********************************\input{000_Setup.tex}\begin{document}\pagenumbering{arabic}\pagestyle{empty}% HEADER STAMP\setlength{\headheight}{110pt}\pagestyle{fancy}% HEADER STAMP\invisiblesection{Cover}\input{AggTemp/Cover.tex}\newpage\tableofcontents\section{XXX}\input{AggTemp/XXX.tex}\newpage\section{YYY}\input{AggTemp/YYY.tex}\newpage\section{ZZZ}\input{AggTemp/ZZZ.tex}\newpage\section{KKK}\input{AggTemp/KKK.tex}\newpage\end{document}******************************
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
longtable overwrites bottom margin
That is not enough information to say something useful. PLease open another topic, and add some explanations, best also to include a compilable minimal working example.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.