I am writing a longtable that spread across 2 pages. But LaTeX always adds starts the table in a new page rather than the previous blank page.  Now I want my longtable starts in the previous blank page (like the pictuer bellow), how can I do that? Thank you.    Here is my *.tex：  \documentclass[12pt]{article} \usepackage{longtable} \usepackage{lipsum}  \begin{document} \lipsum[1-3]  \begin{center} \begin{longtable}{|p{2cm}|p{10cm}|} \hline \textbf{First} &amp; \textbf{Second entry}  \\ \hline \endfirsthead \hline \endhead \hline \endfoot \hline \endlastfoot  1   &amp;   \lipsum[1]  \\ \hline  2   &amp;   \lipsum[2]  \\ \hline \end{longtable} \end{center}  \end{document}
122192
I am editing a longtable. Some of my cells contain a lot of text. Page breaks seem to happen only where table rows end/begin. I'd like, however, for the rows to span pages; it's fine with me if, for example, the first few lines of a row are at the end of one page and the rest of the row's lines are on the next page.
45769
I want to have a longtable like this:  \begin{center} \begin{longtable}{|p{2cm}|p{3cm}|p{7cm}|p{3cm}|} \caption{my caption} \hline 1 &amp; 2 &amp; 3 &amp; 4\\  \hline  \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline . . . 1 &amp; 2 &amp; 3 &amp; 4\\ \hline  \label{variability_impl_mech} \end{longtable} \end{center}   but when I try to compile this, I get this error: !Misplaced \noalign  when I write the caption after the last \hline, it works fine. I want to have the caption on top of my table but this error appears.
88513
How to disable pagebreak on \hline in longtable?  This is an example illustrating my problem:  \documentclass[12pt,a4paper,oneside]{letter}  \usepackage{longtable}  \begin{document}  \begin{longtable}{ | p{5cm} | } \hline Table header\\* \hline Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat. Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere   cubilia Curae. \\ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat.  Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec    orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius.   Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere   cubilia Curae. \\ \hline Table header\\* \hline Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris pharetra porttitor turpis, id egestas neque congue in. Nam sed lorem lorem, ac    tristique tellus. Nunc ornare feugiat orci, a blandit turpis facilisis ut. Aenean pharetra ornare ante. Sed tempus leo in dolor eleifend placerat.    Integer at enim augue. Ut nisl tortor, interdum ac porttitor ac, sagittis  quis libero. Vivamus nibh metus, ornare vel pulvinar nec, fringilla nec    orci. Maecenas mollis nulla a nibh fringilla nec convallis augue varius.   Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere  cubilia Curae. \\ \hline \end{longtable}  \end{document}   I'd like to have second header on page 3. I do not control table contents, so I can not do page breaks manually.
32821
Is there a convenient way to place a figure* at the end of the current page instead of taking up the entire next page in the twocolumn environment? Placement modifiers [Hb] do not work.
11863
Since I have only little experience in Latex, I'm not sure how to create a specific table as shown in the example screenshot. Is such a table even possible with Latex and if yes, where do I need to start? Or is the layout maybe not the best choice and I should setup the layout of the table in another way?
78645
I am using longtable and I cannot find a way to adjust its column spacing. I want a table like this:    But I am getting this:    This is what I am doing for defining table size:   \begin{longtable}{p{.1\textwidth} p{.2\textwidth} p{.2\textwidth}p{.3\textwidth}}     xxxxx &amp; xxxxx &amp; xxx &amp; xxxxx\\     \end{longtable}
100709
I am using the following code.  \newpage \section*{Abstract} \addcontentsline{toc}{section}{Abstract}  \newpage \tableofcontents \addcontentsline{toc}{section}{Table of Contents}  \newpage \listoftables \addcontentsline{toc}{section}{List of Tables}  \newpage \listoffigures \addcontentsline{toc}{section}{List of Figures}    In my actual document, I have many sections, so the table of contents is actually two pages long.  Unfortunately, when I run my LaTeX file, the 'Table of Contents' section in the Table of Contents has the incorrect page number (while everything else seems to be in order).  It looks like the Table of Contents is using the page number of the second page, instead of the first page.    e.g.  In the Table of Contents, 'Table of Contents' is listed as being under page iii, when actually it starts on page ii.  Page iii is actually the second page of my Table of Contents.  Anybody know a quick fix for this?
85316
using the longtable package to typeset page spanning tables, I run into a nasty behaviour: only a dummy table head and the caption are put on the following page. The contents of the table is extracted from program sources. I don't have much influence here.  \documentclass[a4paper,twoside,DIV10,BCOR1.5cm]{scrbook} \usepackage{longtable} \newlength{\tablcol} \setlength{\tablcol}{4.7cm} \newlength{\tabrcol} \setlength{\tabrcol}{8.1cm} \itemsep0ex plus0.2ex % \begin{document} \begin{longtable}{p{\tablcol}p{\tabrcol}}% % \hline \multicolumn{1}{l}{{\bfseries Feld}} &amp; \multicolumn{1}{l}{{\bfseries Beschreibung}}\\ \hline \endfirsthead % \hline \multicolumn{2}{l}% {{\small\slshape Fortsetzung der vorherigen Seite}}\\ \hline \multicolumn{1}{l}{{\bfseries Feld}} &amp; \multicolumn{1}{l}{{\bfseries Beschreibung}}\\ \hline \endhead % \hline \multicolumn{2}{l}% {{\small\slshape Fortsetzung auf der n\"achsten Seite}}\\ \hline \endfoot % \hline \caption[show user output]{Beschreibung der Output-Struktur des show user Statements} \endlastfoot % \label{tucshowxuser}% {\scshape id} &amp; Die Nummer des Repository Objektes \\ {\scshape name} &amp; Der Name des Objektes \\ {\scshape creator} &amp; Name des Benutzers der dieses Objekt angelegt hat \\ {\scshape create\_time} &amp; Datum und Uhrzeit der Erstellung \\ {\scshape changer} &amp; Name des Benutzers der dieses Objekt zuletzt ge\"andert hat \\ {\scshape change\_time} &amp; Datum und Uhrzeit der letzten \"Anderung \\ {\scshape privs} &amp; Zeichenkette die K\"urzel f\"ur die Benutzerrechte auf dieses Objekt enth\"alt \\ {\scshape commenttype} &amp; Typ des Kommentars \\ {\scshape comment} &amp; Kommentar zum Objekt, wenn vorhanden \\ {\scshape id} &amp; Die Nummer des Repository Objektes \\ {\scshape name} &amp; Der Name des Objektes \\ {\scshape creator} &amp; Name des Benutzers der dieses Objekt angelegt hat \\ {\scshape create\_time} &amp; Datum und Uhrzeit der Erstellung \\ {\scshape changer} &amp; Name des Benutzers der dieses Objekt zuletzt ge\"andert hat \\ {\scshape change\_time} &amp; Datum und Uhrzeit der letzten \"Anderung \\ {\scshape privs} &amp; Zeichenkette die K\"urzel f\"ur die Benutzerrechte auf dieses Objekt enth\"alt \\ {\scshape commenttype} &amp; Typ des Kommentars \\ {\scshape comment} &amp; Kommentar zum Objekt, wenn vorhanden \\ {\scshape id} &amp; Die Nummer des Repository Objektes \\ {\scshape name} &amp; Der Name des Objektes \\ {\scshape creator} &amp; Name des Benutzers der dieses Objekt angelegt hat \\ {\scshape create\_time} &amp; Datum und Uhrzeit der Erstellung \\ {\scshape changer} &amp; Name des Benutzers der dieses Objekt zuletzt ge\"andert hat \\ {\scshape change\_time} &amp; Datum und Uhrzeit der letzten \"Anderung \\ {\scshape privs} &amp; Zeichenkette die K\"urzel f\"ur die Benutzerrechte auf dieses Objekt enth\"alt \\ {\scshape commenttype} &amp; Typ des Kommentars \\ {\scshape comment} &amp; Kommentar zum Objekt, wenn vorhanden \\ {\scshape id} &amp; Die Nummer des Repository Objektes \\ {\scshape name} &amp; Der Name des Objektes \\ {\scshape creator} &amp; Name des Benutzers der dieses Objekt angelegt hat \\ {\scshape create\_time} &amp; Datum und Uhrzeit der Erstellung \\ \end{longtable}  \end{document}   The problem is that I don't find a method to force a page break earlier. A page that isn't filled entirely, followed by a page with the last part of a table is better than this.  I tried to add "\needspace{someLength}" at the beginning or end of the rows, but that doesn't work either. It simply makes the rows someLength high instead of forcing a page break if there's no more than someLength room left on the page.  I'd be more than grateful for some solution or even a good hint.  TIA
62389
I am using longtable instead of tabular environment and noticed that it puts some additional whitespace at the top and at the bottom of the table. Is there some way to remove it (something less hacky than \vskip -\baselineskip before the table)?  Small piece of code for illustration:  \documentclass[12pt]{book} \usepackage{longtable}  \begin{document}  Linelineline  \begin{longtable}{l l} cell1 &amp; cell2 \end{longtable}  Linelineline  \begin{tabular}{l l} cell1 &amp; cell2 \end{tabular}  Linelineline  \end{document}   And that's what I am getting:    Common tabular environment does not have any additional margins, but longtable does.
100281
EDIT Like some comments below are remarking the table environment doesn't allow tables over more than one page. However the solution works fine  I need to make a table over more than one page. The standard approach seems to be to use the ltablex environment. However, it doesn't work; also I assume that the table environment may also be required for the thesis template I work on (e.g. suppose for the capture).   \documentclass[11pt]{article} \usepackage{booktabs} \usepackage{tabularx} \usepackage{ltablex}  \begin{document}  \begin{table} \caption{Example of an table} \label{tab:daypack}      \begin{tabularx}{\linewidth}{@{}cX@{}}   \toprule \textbf{Column 1} &amp; \textbf{Column 2} \\[6pt] \midrule \endhead $R$ &amp; 1This is an example sentence \\[6pt] $R$ &amp; 2As well as the line before \\[6pt] $A$ &amp; 3Also this is an example \\[6pt] $R$ &amp; 4This is an example sentence \\[6pt] $R$ &amp; 5As well as the line before \\[6pt] $A$ &amp; 6Also this is an example \\[6pt] $R$ &amp; 7This is an example sentence \\[6pt] $R$ &amp; 8As well as the line before \\[6pt] $A$ &amp; 9Also this is an example \\[6pt] $R$ &amp; 10This is an example sentence \\[6pt] $R$ &amp; 11As well as the line before \\[6pt] $A$ &amp; 12Also this is an example \\[6pt] $R$ &amp; 13This is an example sentence \\[6pt] $R$ &amp; 14As well as the line before \\[6pt] $A$ &amp; 15Also this is an example \\[6pt] $R$ &amp; 16This is an example sentence \\[6pt] $R$ &amp; 17As well as the line before \\[6pt] $A$ &amp; 18Also this is an example \\[6pt] $R$ &amp; 19This is an example sentence \\[6pt] $R$ &amp; 20As well as the line before \\[6pt] $A$ &amp; 21Also this is an example \\[6pt] $R$ &amp; 22This is an example sentence \\[6pt] $R$ &amp; 23As well as the line before \\[6pt] $A$ &amp; 24Also this is an example \\[6pt] $R$ &amp; 25This is an example sentence \\[6pt] $R$ &amp; 26As well as the line before \\[6pt] $A$ &amp; 27Also this is an example \\[6pt] $R$ &amp; 28This is an example sentence \\[6pt] $R$ &amp; 29As well as the line before \\[6pt] $A$ &amp; 30Also this is an example \\[6pt] $R$ &amp; 31This is an example sentence \\[6pt] $R$ &amp; 32As well as the line before \\[6pt] $A$ &amp; 33Also this is an example \\[6pt] $R$ &amp; 34This is an example sentence \\[6pt] $R$ &amp; 35As well as the line before \\[6pt] $A$ &amp; 36Also this is an example \\[6pt] $R$ &amp; 37This is an example sentence \\[6pt] \bottomrule \end{tabularx}    \end{table}      \end{document}
47848
I want to align two numbers in two different rows the decimal point.    I do see a link for that here:   However, I don't understand how to incorporate that into my code.  What follows is a reduced version of my code.  \documentclass[12pt,english]{article} \usepackage{longtable} \usepackage{fullpage} \usepackage{times} \usepackage[flushleft]{threeparttable} \usepackage[font=large,labelfont=bf,tableposition=top,textfont=bf]{caption} \usepackage{tabularx} \usepackage{booktabs} \newcolumntype{C}{&gt;{\centering\arraybackslash}X}  \begin{document}  \clearpage \newpage \begin{table}[!ht] \caption{Table Title} \def\arraystretch{1.05} \vspace{-0.2cm} \begin{threeparttable} \small \begin{tabularx}{\textwidth}{l*{10}{C}} \hline \hline \addlinespace &amp; (1)  \\   Variable Name &amp; 0.1234566  \\ &amp; (0.1234566) \\ \hline \hline \addlinespace  \end{tabularx} \begin{tablenotes} \vspace{0.1cm} \footnotesize{  \item \noindent \hspace{-1.8mm} Notes:    \noindent Sources:   } \end{tablenotes} \end{threeparttable} \end{table}  \end{document}
65871
The 'longtable' documentation says to use   \caption{Your caption here}   for captions, but I can't see where to specify the 'longtable' options in the example where pgfplotstabletypeset and longtable is used together.  MWE: You'll see currently the Table 1 text is just included, but that would mean it would be excluded from ToC and index of tables.  \documentclass{article}   % MWE from http://tex.stackexchange.com/questions/40411/import-files-with-pgfplotstable-and-split-tables-across-multiple-pages \usepackage{pgfplotstable} \usepackage{longtable} \usepackage{booktabs} \usepackage{array} \usepackage[a4paper,top=4in,bottom=4in,right=1in,left=1in]{geometry} %%% change the margins in your file suitably. \usepackage{filecontents}  \usepackage{pgfplotstable}  \usepackage{booktabs}  \usepackage{filecontents} \usepackage{longtable}  \begin{document} \begin{filecontents}{testdata.dat} Idx  Nam Dim Grd 1   Ady 53  F 2   Bar 72  C 3   Cor 83  B 4   Dar 58  D 5   Esa 68  C 6   Foo 67  C 7   Gar 74  C 8   Hur 65  D 9   Jaz 85  B 10  Ker 91  A 1   Ady 53  F 2   Bar 72  C 3   Cor 83  B \end{filecontents}  {\large Table 1}  \pgfplotstableset{ begin table=\begin{longtable}, end table=\end{longtable}, }  \pgfplotstabletypeset[col sep=space, header=true,     columns={Idx,Nam,Dim,Grd},      % display specified columns columns/Idx/.style={fixed,fixed zerofill,precision=0,column type=r}, columns/Nam/.style={column type=l,string type}, columns/Dim/.style={fixed,fixed zerofill,precision=1,column type=r}, columns/Grd/.style={column type=l,string type}, % requires booktabs to place horiz rules every head row/.style={before row=\toprule, after row=\midrule\endhead},  every last row/.style={after row=\bottomrule} ]{testdata.dat}  \end{document}   Would I put it in the \pgfplotstableset or \pgfplotstabletypeset sections, and with what syntax?
124181
I'm a beginer in Latex and I like to learn about it, as I'm user Mac, I installed LaTeXit, but I have multiple problems.  I begin to write in the editor area, but I just get the first page of the document, I don't know why.  Here an screenshoot: I don't see the second part, even when I export the document.  I just simply follow an tutorial, but that it doesn't work.    Here my config:  \documentclass[10pt]{article} \usepackage[utf8]{inputenc}  \title{First document} \author{User} \date{2017-01-01}   Preambles config.  And in the Body config, I have:  \begin{document} \end{document}
4250
I am working on a long document in LaTeX with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chapters, the page number is bottom-centered, on all other pages it's top-right).  I control the position of the page number with fancyhdr:  \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0pt}   Also, I don't know if the problem is related but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page.  The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related.
38203
In a document I'm writing, I'm using the familiar  option for my floating tables, and I  them. I'd like to avoid repeating that every time I'm creating a table. I assume it's easy to add something in my preamble that makes sure that these two options are used every time I begin a new table environment?  \documentclass{article} \begin{document} \begin{table}[hbt] \centering \begin{tabular}{*3{l}} 1 &amp; 2 &amp; 3\\ a &amp; b &amp; c\\ \end{tabular} \end{table} \end{document}
75876
In a longtable, I list items of several categories, including some data on them.  \documentclass{article}  \usepackage{longtable}  \begin{document}  \begin{longtable}{lll} \hline \textbf{These are some items} &amp; &amp;\\ \hline \endhead \hline \endfoot \textbf{These are items of type A} &amp; \textbf{Size} &amp; \textbf{Price}\\ \hline Item 1 &amp; 3 foot   &amp; 3.56\\ Item 2 &amp; 2 inches &amp; 2.56\\ Item 3 &amp; 5 inches &amp; 1.50\\ \hline \textbf{These are items of type B} &amp; \textbf{Weight} &amp; \textbf{Price}\\ \hline Item A &amp; 3 pounds &amp; 10.50\\ Item B &amp; 5 ounces &amp; 6.95\\ Item C &amp; 1 pound  &amp; 3.00\\ \end{longtable}  \end{document}   What I would like to get is to change the running head whenever a new category is begun, so that if e.g. there is a page break between Item B and Item C, the header on the next line would read the "These are items of type B" line (so the columns are properly labeled).  Can this be done with longtable or any other "long table" package? I couldn't find information on this. (My google-fu is weak today...)
94041
How do I set right alignment in a longtable column with a fixed width?  I have \begin{longtable}{p{3cm}p{8cm}}  and I'd like my first column to be aligned on the right.