# Tag Info

0

m does not mean centre vertically in the space finally allocated to the cell, it means "put the reference point of the contents in its vertical centre. l',c,rcolumns (that you do not have here) have their reference point on their baseline.pcolumns have their reference point on the baseline of their top row, and if you had abcolumn its reference point ...

1

m column type aligns at the middle (vertical) and you used m type in third column. That particular cell has more content that wraps in to second line. As a result the vertical center point is aligned. If you use p column for third, we get: \documentclass[]{article} \usepackage{longtable} \usepackage{array} \usepackage{booktabs} \begin{document} ...

6

the hyphenation patterns for English do not help here. That's the problem seqsplit is trying to fix, but you are not using it in all the cell. Note it is unrelated to longtable you would get the same behavior in a paragraph on the main page. \documentclass{report} \usepackage[left=65pt,top=28pt,right=65pt,bottom=65pt]{geometry}% ...

0

I have no idea what is going on here. But I've reduced it to the following It seems to be longtable related. I'll retag the question. \documentclass[a4paper,twoside,11pt]{article} \usepackage{longtable} \usepackage{lipsum} \usepackage[demo]{graphicx} \begin{document} \lipsum[2] \begin{longtable}{ l } A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\A\\ \end{longtable} ...

1

Reducing the value of \tabcolsep -- the parameter that governs the amount of intercolumn whitespace -- from the default value of 6pt to 2pt, combined with eliminating the whitespace entirely to the left of the first column and to the right of the final column, succeeds in fitting the table into the available space. Two additional comments: (i) You should ...

1

If you don't want to manually add spaces in the text to define points where you can break lines you can adapt the solution from How to wrap text in a table when there are no spaces at which to break the line? to define a comma as a breakable character: Notes: The showframe package was used just to show the page margins. It is not needed in your actual ...

0

longtable was written in a way to emulate a regular table environment, just without the floating capability, but supplementing that loss with the (great) ability to break across the page. So you don't have to do anything special for a longtable's \caption to end up in the List of Tables (LoT). That leaves only the insertion of Table in front of the LoT ...

0

You can centre the images with a simple \raisebox{-0.5\height}{…}. As the vertical spacing in tables is very tight, you can introduce some more with the cellspace package: it ensures a minimal spacing between a cell and the above and below cells in columns that have an S prespecifier. Here is an example, using one of my favourite images. In order to have a ...

2

The tex model of table layout doesn't really allow for vertically centering within the space of a cell, each cell has a base reference point and these are aligned. l, c, r columns it is the baseline of the text p columns it is the baseline of the top row. and for m columns it is that cell's centre and b it is that cells bottom line. The baseline of an ...

1

Type \usepackage[export]{adjustbox} to your document preamble immediately above \usepackage{graphicx}. Then include your images as \includegraphics[scale=0.7,valign=t]{\visualizadordeperfil apontador.png} This will shift the picture vertically, so that its height is just like the height of a line of text. Here's an example, I used \fbox around ...

3

You can use \pdfsavepos to see where the table foot landed and and generate an appropriate number of blank rows. It may take a few runs to stabilise... \documentclass{article} \usepackage{longtable} \usepackage{tabu} \makeatletter \let\xwrite\write \def\foo#1#2{\noalign{\gdef\tmp{}\xfoo{#1}{#2}\aftergroup\tmp}} \def\xfoo#1#2{% \ifnum#1>\z@ ...

4

Finish the header with \endhead rather than \\ Also remove the center environment (it has no effect on longtable) and place the caption within the table. (texdoc longtable should show several examples)

3

tabu unfortunately makes lots of definitions that make it incompatible with other packages. The underlying longtable code works without error on your example file. \documentclass[man]{apa6} \usepackage{longtable} \usepackage{threeparttablex} \usepackage{lscape} \usepackage{tabu} \begin{document} \shorttitle{zz} \begin{landscape} \begin{longtable}{ccc} ...

1

The code will be simpler with the makecell package, as it allows for line breaks inside cells, so that you don't have to specify colum widths: \documentclass[a4paper]{article} \usepackage{lscape} \usepackage{longtable, multirow} \usepackage{makecell} \renewcommand\cellalign{lc} \usepackage[math]{cellspace} \setlength\cellspacetoplimit{4pt} ...

2

\documentclass{article} \usepackage[pdftex]{lscape} \usepackage{array,longtable} \begin{document} \begin{landscape} \renewcommand{\arraystretch}{1.5} \begin{longtable}{|p{3in}|p{4in}|l|} \hline \textbf{Conversion} & \textbf{Formulas} & \textbf{Restrictions} \\ \hline Cylindrical to rectangular: (r,\theta,z) \to ... 3 longtable wasn't really expecting to have to stitch tightly into the vertical list like this normally it's offset by some space or starts a new page. It could try harder, but currently you can correct for the depth of the previous paragraph (like most tabular longtable uses struts so its height and depth are known in reasonable cases. I extended the test ... 1 It's not clear why you'd want to do this as longtable doesn't have any specific formatting, it derives all its table formatting from the underlying tabular implementation. However if you put a longtable in a minipage it will not break. As the output routine is then not invoked you can not use the head and foot code of course but this makes a very long table ... 2 It's a bug in tabu. tabu makes many changes to LaTeX commands and does not restore them in the output routine, so things go wrong in headers and footers. Here it patches trivlist (so more or less all LaTeX display environments, including tabbing) adding \tabu@normalcrbackslash to its definition. So locally within the footer you need to redefine this ... 6 The problem goes if you lose this line %\parskip2ex plus1ex minus1ex or even just change it to \parskip2ex plus1ex %minus1ex Putting lots (or any) of shrink glue into the vertical list rather complicates the assessment of whether there is room... longtable could try harder to estimate the amount of glue that will really stretch/shrink but currently, ... 2 Don't use ~\\ for paragraph breaks (in the table or outside) \documentclass[11pt,table,a5paper]{article} \usepackage[top=2cm, bottom=2cm, outer=2.1cm, inner=1cm,twoside, headsep=26pt]{geometry} \usepackage{collcell} \usepackage{longtable} \usepackage{color} \usepackage{colortbl} \begin{document} \definecolor{textcol}{rgb}{.118, .565, 1.00} ... 2 longtable environments do not float, so the text placed after the table in the source will be typeset after the table. Also a center environment has no affect on longtable (which technically is always full width). As an alternative to just placing it after the table you can place it in a \multicolumn so it is aligned with the columns. ... 3 longtable lets you set the left and right margins but unfortunately the tabu wrapper around longtable always passes in an optional argument which sets the margins to 0pt or \fill depending on the lcr alignment. So for longtabu as well as setting the margins to -1in you need to patch tabu not to default c alignment (which would reset them back to \fill). ... 1 Looking at the datatool doc (section 5.4) you can have full control over the table column specification if you use \DTLforeach So if your third column needs to be text justified to lines broken to 5cm, you can do something like \begin{longtable}{llp{5cm}} \bfseries heading one & \bfseries heading two & \bfseries heading for long text column% ... 3 You can put groups of three consecutive entries on the same row without too much change to the markup. \documentclass[a4paper,fleqn,openbib,11pt]{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{array} \usepackage{appendix} \usepackage{booktabs} \usepackage{caption} \usepackage{dcolumn} \usepackage{float} \usepackage{graphicx} ... 1 Your table had several errors so would generate errors with any editor. I also increased row height to keep text away from the rules, and reduced the font size and added negative spacing to allow the table to steal space from the margins, finally I rotated the headings, so the table just about fits on the width of the page. \documentclass{article} ... 3 You need to use in the columns with mixed text/math (or alternatively make those math columns and use \text for the text) but the last column is just math so there you can add the \$ in the preamble. tabu unfortunately redefines the >{} <{} syntax in an incompatible way but for simple cases, as here, it still works as it should. All entries in the ...

0

The forced page break at the end is more or less required as otherwise it's hard to know what to do with text after the table (at the end of the table you need to finish two pages and you certainly don't want following text on both of them so not allowing it at all is simplest. It would possibly be possible to make \endlastfoot work again but not today. The ...

6

longtable takes the same column syntax astabular, it should never be in center (the environment has no effect on it as it is full with) The horizontal with inlandscape is linewidth not \textwidth \documentclass[a4paper, 12pt]{report} \usepackage{chapterbib} \usepackage{lmodern} \usepackage{blindtext} \usepackage[utf8]{inputenc} \usepackage[french]{babel} ...

4

You can add a \nobreak so linebreaking before the tabu cline is discouraged and add a \filbreak so linebreaking (and padding with space) after the line is encouraged. \documentclass{article} \usepackage{longtable} \usepackage{booktabs} \usepackage{tabu} \makeatletter \renewcommand*\tabucline{\noalign{\nobreak\ifnum0=`}\fi \tabu@cline} ...

3

As noted in How to prevent page break between section title and table You could use the needspace package to conditionally ad a \clearpage if the heading is near the bottom of the page. (The problem that is solving is slightly different, a page break happening before the table, after the heading, whereas you have a page break within the heading). In ...

3

As noted in comments you can specify the default font for a column using the > syntax but override the font for heading or any other cells by starting the cell with a command such as \footnotesize.

2

As @Sveinung has already observed in a comment, you need to load the threeparttablex package to get table notes along with longtable. Observe the use of uppercase letters in the words ThreePartTable and TableNotes as well as the use of the directive \insertTableNotes -- usually as the very last item before \endlastfoot -- to instruct LaTeX where to place the ...

1

You are trying to combine longtable and threeparttable. That will not work. Use the package threeparttablex instead. Remind the different syntax, and that the package require the environ-package installed.

3

The codes you put in the comment work to produce the effect that I think you want. This image shows the default hyphenated layout in a table and longtable then the same again after declaring captions should be justified with no hyphenation (which gives TeX no choice but to over-stretch the space between Table and the number.) \documentclass{article} ...

2

longtables do not float like table so in general they appear in the text stream where placed and text after the table is never set before. However you can use \afterpage to delay the table a certain amount, you could possibly include the whole table in the argument of \afterpage but if it is really long it's probably better to put it in an external file as ...

3

Rather than use the \every.. hooks it is simpler to use \mycr rather than \\ to end the table rows, defined as \newcommand\mycr{\\\hline}

Top 50 recent answers are included