Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I set \hline\endhead for longtable, that this line would overprint on \hline , when such present after \\ in row, which transmitted on next page?

When I just type \hline\endhead, I receive two \hlines one under other, which not looks good. Thanks.

This is code

\documentclass[a4paper,oneside]{book}
\usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true]{hyperref}
\usepackage[paper=a4paper, left=1.5cm, right=1cm, top=1.7cm, bottom=2.5cm]{geometry}
\usepackage{ltablex}
\usepackage{calc}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage{listings}
\usepackage{color}
\usepackage{tocloft}
\usepackage{colortbl}
\usepackage{everypage}
\usepackage{mylayout}

\arrayrulewidth=1pt

\begin{document}
\section{Section}
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text

Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text  
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text 
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text
\vskip10pt

\setlength{\newtblsparewidth}{\linewidth-2\tabcolsep-2\tabcolsep-2\tabcolsep-2\tabcolsep-2\tabcolsep}
\setlength{\newtblstarfactor}{\newtblsparewidth / \real{4}}

\begin{tabularx}{\linewidth}{l|l|l|X|}

\hline\endhead
\noalign{\vskip-\arrayrulewidth}\hline\endfoot

\multicolumn{1}{|m{0.13\newtblsparewidth}}{\multirow{9}{0.13\newtblsparewidth}{\textbf{tt}}} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{eadi=<gale\_smrvue>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{zhim=<zpayw>[,<cckd>][,<ssr>]} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{kcep=<btgzqgb>[,<klmxacfq>]} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{Fit

FvlB

FbmH,hrr

FlvV,cnhg

FaoBH,llu

FjvBV,ijen
} & \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{uvemlwsx=<gmjy>,<lfd>,<wc>,<id>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & \multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{faxjuwoz=osuwwayo|xwgvd|zxnb} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{oarfeqjem=<gakx>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur11>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4} 

\multicolumn{1}{|l}{} & \multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur22>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{} \\ \cline{2-4}

\multicolumn{1}{|l}{} & 
\multicolumn{1}{|m{0.35\newtblsparewidth}}{vajuwpzmk=<taur33>} & 
\multicolumn{1}{|m{0.15\newtblsparewidth}}{} & 
\multicolumn{1}{|m{0.37\newtblsparewidth}|}{
Id sqpvuv\{hdu\}, jvet aoi eadthy xvy skwlefrhyix tcsb ag nlbreq\{ajt, uqsr, mqjwn, vat, mi, ru,\} flx. ayn aemygedw aem qyadippy zm lvmehv(1/72 wcai). 

Oayvflulp xitky sanghd fhpq cc vkxrnxzowvt ah a qexom qy limrqp aw 100\% zyen. Tagi leaayban yw ggmaldb xua Ajdma Aubxsag/Rlatnt. Ie rudt uaqs, qx ydicegx aepaqqus nanzz gm slempx, Ahgpxad oablrfarpj hp ax:

V(kt)=V\(lysk\_fed\)\(aqi{}\)72.0/(qggx\_mwvpl)

Twb dbtsla{hmys\_fjqyu} wacaxmlnt sl fpgv ac wddqaw ‘Pprdbpwhznf/Patj Dirwuaf/Rpmqvcwqcz’ ngdadcsu (gukd bj Aqhdaap auw PDF-XCjazmw Vqhymy).
} \\ \hline

\end{tabularx}

\end{document}

Here pdf of this example http://web-engineering.com.ua/Main2.pdf

share|improve this question
1  
Please provide a little bit more information. Posting a minimum working example (MWE) that illustrates the problem you're trying to deal with would be especially helpful. –  Mico Feb 20 '12 at 15:42
1  
Can you please a Minimal compilable code snippet that demonstrates the essential problem? –  percusse Feb 20 '12 at 15:42
    
I have updated my question. As you can see in pdf line on second page looks not as I want: \hline printed under \cline. Can I offset hline in \endhead, that is overprint cline? –  Andrew Feb 20 '12 at 16:21
add comment

1 Answer

up vote 3 down vote accepted
\begin{longtable}{|l|l|l}
 \noalign{\vskip-\arrayrulewidth}
 \hline\endfoot

would make the rule in the foot overprint lines in the table at the cost of stealing a bit of space from rows that don't have rules.

EDIT: Or for the top as well:

\begin{longtable}{|l|l|l}
 \hline
 \noalign{\vskip-\arrayrulewidth}
 \endhead
 \noalign{\vskip-\arrayrulewidth}
 \hline\endfoot
share|improve this answer
    
Thanks David. In the foot everything fine, I can shift up line by setting negative vskip. How can do similar in head on next page? I mean shift line down for overprint cline. –  Andrew Feb 20 '12 at 16:25
    
edited answer for this case –  David Carlisle Feb 20 '12 at 16:31
    
This is exactly what I need. Thanks. –  Andrew Feb 20 '12 at 16:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.