Tag Info

Hot answers tagged

5

It's a known problem: with \NewDocumentEnvironment{foo}, the macro \endfoo, that's internally used by LaTeX when \end{foo} is processed is “protected” and, because of this, LaTeX can't see that the alignment is to be ended until it has already started a new row. The situation is mostly similar to having \multicolumn not as the first item in a cell. What ...


5

As clarified in comments the problem is unrelated to floating environments. \documentclass{article} \usepackage{longtable} \begin{document} \paragraph{zz} \begin{longtable}{| c | c | c | c |} \hline 1 & 5 & 6 & 7 \\ \hline 1 & 5 & 6 & 7 \\ \hline 1 & 5 & 6 & 7 \\ \hline % and so on, many rows ...


4

If only one column needs to break that can be on the main vertical list with the other columns treated as parboxes hung to the side: \documentclass {article} \usepackage [utf8] {inputenc} \usepackage [latin] {babel} \usepackage{lipsum} \newenvironment{foo}[3] {\list{}{\leftmargin6cm\rightmargin3cm \itemindent0cm \labelsep0pt \labelwidth0cm}% ...


4

The longtable environment is not capable of breaking a table inside a cell, and I doubt it will ever be. The true problem is that your table is semantically not a table, it is a list of lists. Therefore I would use one of the list environments: \documentclass{article} \begin{document} \begin{description} \item[Case 1.] 1, 286, 484, 507, 790, 920. ...


3

How about ps. I do not think it is a good idea to post such a long url in the document. Use a small name and use that for the link. But if this is what you want: \documentclass[10pt,letterpaper]{article} \usepackage{hyperref} \usepackage{longtable} ...


3

(I realize your question appears to be about getting equal widths between the columns of a longtable. However, since the intercolumn whitespace is given by 2\tabcolsep, the intercolumn widths are already equal. I therefore interpret your question as being about getting the column widths to be equal.) In the present case, since you're already loading the ...


3

It's best (in any alignment) not to have columns that are always spanned. \documentclass[10pt]{report} \usepackage{longtable} \usepackage{tabu} \usepackage[letterpaper, top=0.5in, right=0.75in, bottom=0.5in, left=0.75in]{geometry} \begin{document} \begin{longtabu}{ X[4,l] X[2,r] X[1,c] X[2,r] X[1,c] } \textbf{Description} & ...


2

Here is a solution that consists in fixing experimentally the width of the caption. The default for \LTcaptionwidth is 4in, I use captionsetup inside the table, just before \caption. I also suppressed vertical lines, as it is bad typographical practice, and used booktabs. Here is the code: \documentclass[landscape]{article} \usepackage[utf8]{inputenc} ...


2

For Unicode characters the routine to be used is more complex. This seems to work, at least for the characters you need. Please, don't use utf8x. \documentclass[6pt]{extarticle} %%%%%%%%%%%%%%%%%%%%%% % Package Inclusions % %%%%%%%%%%%%%%%%%%%%%% \usepackage{longtable, tabu} \usepackage{xparse} % used for \ExplSyntaxOn %used to print Spanish characters ...


1

The documentation (338 kb) says (p. 4, beginning of chapter 3) that one shall replace the \\ by \endhead resp. \endfirsthead. % arara: pdflatex \documentclass{scrartcl} \usepackage{longtable} \begin{document} \section{My awesome section} \vspace{175mm} With some really awesome Text ;) \begin{longtable}{|c|c|c|} \caption{The first table header}\\ ...


1

Thanks for posting the code of your longtable environment. It would appear that the main problem is that whereas you intend to have three columns (each allowing text to wrap), you're currently specifying a total of six columns, alternating l and p types. In addition to specifying just three columns (and removing the hard line breaks), I'd like to suggest ...


1

You can put your headline and description inside a separate tabular inside the same row of longtable. You can even make a macro for it like: \newcommand{\benchmark}[2]{% \begin{tabular}{@{}p{\linewidth}@{}} #1 \\ \midrule #2 \end{tabular}% } The full code: \documentclass{article} \usepackage{longtable,booktabs} \usepackage[textheight=3cm]{geometry} ...


1

You need p{5cm} the same as in tabular to specify a cell that works like \parbox. 6cm and the default inter-column space made a table wider than the page, so I reduced both. Also don't put longtable in a center environment. If you edit a longtable (including changing c to p) it can take a few runs for all parts of the table to line up, which may account for ...



Only top voted, non community-wiki answers of a minimum length are eligible