# Tag Info

0

You could just align all numbers with their comma and add some extra space for the :1. This will look exactly like what you tried to do. Is the colon really the decimal marker? Or did you try to hack around here? % arara: pdflatex \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} ...

1

I think you should look into using a tabularx environment instead of the basic tabular environment to start organizing the table's structure. Start by setting the width of the tabularx environment to \textwidth. Next, because it looks like the terms in the left-hand column shouldn't suffer line breaks, use the l column type for it. For the right-hand column, ...

1

Add an additional column for the numbers after the : and connect them with the ::. Also you should use the package booktabs and its commands \toprule, \midrule and \bottomrule \documentclass[10pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{siunitx} ...

1

I shrank the column widths a bit, added a bit of space to keep text away from rules, allowed the table to bleed into the margin a bit, and used a ragged setting, TeX doesn't complain about this: \documentclass[a4paper]{article} \usepackage{array,pdflscape} \newcolumntype{R}{>{\raggedright\arraybackslash}p} \setlength\extrarowheight{2pt} \begin{document} ...

3

I am so basic in Latex but I tried and built your original table in Latex, which may also be useful to you. Of course, @LaRiFaRi's answer is better than mine. % pdflatex \documentclass[margin=2mm]{standalone} \usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor \def \pos {\cellcolor{green}} \def \non {\cellcolor{blue}} \def \neg {\cellcolor{red}} ...

5

You can retrieve the column sizes from the aux file where longtable stores them: You will need to delete the .aux initially to avoid picking up bad lengths from earlier attempts. \documentclass[a4paper,10pt]{article} \usepackage{array,tabularx,longtable,tabu} \usepackage{lipsum} \begin{document} \makeatletter \ifx\LT@i\@undefined \def\mcspec#1{} \else ...

7

If you want to stick to the typographical rules you find on this site, you should not use cell colours but some symbol or alike. Please see my example as a start for you. If you don't like the symbol, you might find pleasure in other possibilities I listed here. But I preferred to give a PDFLaTeX solution here. % arara: pdflatex \documentclass{article} ...

5

Just some improvements (in my opinion) to the preceding solution: I use the cases* environment (from mathtools), that makes the second column of a cases environment in text mode. The same package defines a \coloneqq command so that the colon is centred on the math axis. And finally I use the booktabs package to give some more vertical spacing to the rows, ...

4

$...$ introduces vertical space, as it effectively something like \begin{center} ...\end{center}, in math mode, however. so this has to be removed and changed to \centering $$....$$ I kept the second line as demo for both effects. \documentclass{article} \usepackage{amsmath} \usepackage{multirow} \begin{document} \begin{table} \begin{tabular}{l p{7cm} ...

2

If you want the logo in the table you can use \multirow: Notes: You should add a \noindent before the tabular environment. Code: \documentclass[a4paper,12pt]{article} \usepackage{graphicx} \usepackage{lastpage} \usepackage{multirow} \usepackage[hmargin=2cm,top=4cm,headheight=65pt,footskip=65pt]{geometry} \begin{document} \noindent ...

1

You don't need to use multirow simply move the image before the table. You can use adjustbox to vertically centre the image. Don't specify both height and width to \includegraphics unless you also use keepaspectratio or the image will be distorted. Size commands like \tiny to not take an {} argument. \cline numbers need to be in ascending order (but I ...

6

Don't engage in so much visual formatting. Instead, define some pertinent table parameters -- such as centering the column contents, the heights of the rows, etc -- beforehand, and then create a lean and reasonably easy to read table. In the example below, I've created a dummy definition of your \VTGN macro to make the code compilable. You'll notice a ...

2

You can do that with the tabularx package. To improve the tavle I also load cellspace , for a less tight vertical spacing of cell contents, and makecell for a common formatting of column heads and the possibility of line breaks in cells. I didn't understand what the empty last column is here for, but if you don't use it, you might as well delete it. That ...

3

Your table has only four real columns; the fifth is always empty and should thus be omitted entirely. If you remove the fifth column, you can also replace all \cline{1-4} instructions with the simpler \hline. The main problem with the table is, though, that it's much too wide for any normal page dimension unless you let the text in all four columns wrap. ...

1

Use @{}: \documentclass{article} \usepackage[showframe]{geometry} \begin{document} \noindent\begin{tabular}{@{}*5{l}} 1 & 2 & 3 & 4 & 5\\ A & B & C & D & E\\ \end{tabular} \end{document} For future reference, please make your code compilable and minimal. EDIT As John points out in his comment, you don't even need @{} if ...

1

\restylefloat causes the caption positioning problem and \label after \caption*{} is useless! \documentclass[12pt]{report} \linespread{} \usepackage{fancyhdr} \usepackage{amsmath,amssymb} \usepackage{relsize} \usepackage[font={small,it}]{caption} \usepackage{listings} \usepackage{color} \definecolor{mygreen}{RGB}{28,172,0} ...

4

Remove these two lines: \usepackage{float} \restylefloat{table} You are back in business.

1

Use \cellcolor, not \rowcolor: \begin{longtabu}{| >{\raggedright}m{1.75in} | >{\raggedright}m{1.5in} | >{\raggedright\arraybackslash}m{2.75i\$ \caption{This is the first page header} \label{Table:example}\\ \rowcolor{blue}\color{white}Column 1 & \color{white}Column 2 & \color{white}Column 3\\ \endfirsthead ...

2

The environment singlespace adds some whitespace. As does table and center. I suggest doing this: \documentclass[12pt]{article} \usepackage{lipsum} \usepackage{setspace} \begin{document} \begin{doublespace} \section{} \lipsum[1-2] \begin{table}[t] \singlespacing \centering \begin{tabular}{|c|c|} Left ...

2

The following uses the subcaption package: \documentclass{scrreprt} \usepackage{subcaption} \begin{document} \begin{table} \begin{subtable}[t]{.5\linewidth}% \centering% \begin{tabular}{cc} 0 & 1 \\ 2 & 3 \\ \end{tabular} \caption{table 1}\label{table1} \end{subtable}% \begin{subtable}[t]{.5\linewidth} ...

0

Since classicthesis is build on KOMAscript, you may try to use the build in environment addmargin. The syntax is \begin{addmargin}[left indentation ]{indentation } . . . \end{addmargin} Have a look at page 112--114 in the English KOMAscript-manual for further reference of it use.

4

you put the t on the wrong place (longtable doesn't take t anyway it takes l c r) You want it on the tabular in the third column so that entry is top aligned with the first two columns. I also added @{} so you do not get double cell padding from the outer and inner table. \documentclass{minimal} \usepackage{longtable} \usepackage{booktabs} ...

2

You can try other ways of exporting R objects to latex like xtable package. It has a lot more options and gives more control over the type of table exported. A small example : to specify the digits in the statistics reported, xtable(sumStats, digits = 2) and can specify floating environments like longtable etc. Please see documentation and gallery for ...

1

The difference between your example and the one you refer to from how-to-add-equation-with-cases-inside-the-table is that you are trying to put a displayed equation into a "centred" table cell whereas the example puts one inside a "paragraph" in a tabular environment. You either need to use a p-cell in your tabular environment: \begin{tabular}{p{5cm}} ...

4

I've applied the following two modifications to your code Change the R column type so that its contents are centered in the respective column Assign explicit table-format options to the 9 columns of type S. \documentclass{article} \usepackage{rotating} % rotating package loads graphicx package \usepackage{booktabs} \usepackage{array} ...

0

If you need the final two columns to have exactly equal widths and if they happen to be spanned by the string abcdefg fewfewfe, you could proceed as in the example below. \documentclass{article} \usepackage{array} \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} \newlength{\mylen} \settowidth\mylen{abcdefg fewfewfe} ...

2

A variant to have the first cell in last column vertically centred with respect to the first two rows. It uses the makecell package, which allows for multilines cells. It also has a \setcellgapes command that produces less tight vertical spacing in cells. I also load the caption package to have a correct vertical spacing between caption and table: ...

1

The entries in the first cell need to be in math and you need a & to get the second (empty) cell to carry the vertical rule Note the first L in your image is roman then you would have had an error message and TeX would have started math mode but never ended it so give another error message at the end of the cell. If you get error messages the pdf result ...

1

You have to set your \multirow as a \parbox{6cm} by specifying its width. I added some suggestions to improve your table, with the makecell and siunitx packages. \documentclass{article}%[preview]{standalone} \usepackage[utf8]{inputenc} \usepackage[x11names]{xcolor} \usepackage{colortbl} \colorlet{heading}{Thistle2!50} \colorlet{odd}{LightSteelBlue2} ...

3

With the * option the argument to multirow is put in an ordinary (h)box, so does not get line breaks. If you specify a concrete width then line breaks are allowed. As you are already using a p column with a given a width, you can use the same width for your multirows: \documentclass{article} \usepackage[ngerman]{babel} \usepackage{multirow} ...

0

Another option is to use the package units and then replace your \frac{a}{b} with \nicefrac{a}{b}. The numerator and denominator will be offset diagonally and they fit nicely into tables.

4

*10 is *{1}{0} so the 0 is taken as the column specifier repeated 1 time and generates ! Package array Error: Illegal pream-token (0): c' used. use *{10} Since you are forcing the width anyway you could use tabular rather than tabular* which causes you to be a fraction under due to rounding error Underfull \hbox (badness 10000) in alignment at ...

1

Sorry, this is too long for a comment. As requested by FireFly3000, an example with booktabs with only a few rules: In this type of table diagbox have no utility, so you can put "Interface" in a multicolumn in a previous row, and left only "Enhed" in the cell, or if you prefer this label vertically centered, use the multirow package: ...

1

I solved the problem by using \resizebox from the graphicx package as follows: \resizebox{\textwidth}{!}{ \begin{tabular}{...} ... \end{tabular} } The result was as follows: Just what I wanted.

1

You can have a simpler code using   tabularx. To improve the table, I use the S qualifier from the siunitx package for the Code columns, booktabs to have a better vertical spacing around horizontal rules and makecell for a common formatting of column heads. Also, it's better to have the Industry columns left-aligned, but that may be changed if you prefer ...

3

Your input is way too complicated. The problem is that you never let LaTeX add the extracolsep, because you're always overriding the template with \multicolumn. \documentclass[twoside,12pt]{article} \usepackage{lscape} \begin{document} \begin{landscape} \footnotesize\centering \begin{tabular*}{\columnwidth}{ @{\extracolsep{\fill}} ...

5

m columns and [..] argument to \\ work in well specified ways, but they don't work well together or how people always expect. I'd avoid both here: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{array,pifont,xcolor} \newcolumntype{C}[3]{@{\hspace*{#1}}>{\centering\arraybackslash}p{#2}@{\hspace*{#3}}} ...

3

note that \center is the internal implementation of \begin{center} and not intended to be used as a command form (and if it is used, should be paired with \endcenter) \centering is the intended command form. Spacing and alignment could be adjusted to requirements, but something like: \documentclass{book} \usepackage{booktabs,multicol} \begin{document} ...

2

Is this what you're looking for? It's an INCREDIBLY static solution but it seems to do what you ask for..... Also, the code is practical rather than elegant. \documentclass{article} \usepackage{longtable,array,xcolor} \renewcommand*\arraystretch{10} \newcounter{counter} \pagenumbering{gobble}% the number is already shown on the flashcard, no need for ...

1

something like this but it is still squeezed, perhaps set it landscape? I removed the diaghead as I couldn't get it to fit in any reasonable way, perhaps the table caption could be adjusted so that the column/row label isn't needed. The usual advice here is to use booktabs and avoid vertical rules, but hard to suggest that layout if you really have so many ...

1

I'm not sure the multi-page table packages are helping here, you can simply force the column widths and break by hand: \documentclass[11pt]{article} \usepackage[left=0.25in,right=0.25in,top=0.25in,bottom=0.25in]{geometry} \geometry{letterpaper} \usepackage{helvet} \renewcommand{\familydefault}{\sfdefault} \usepackage{colortbl} \newenvironment{zz} ...

2

probably you should be able to use the caption package hooks, but since you are patching \@caption may as well patch the LT version too: \documentclass[a4paper,12pt]{scrreprt} \usepackage[greek, english]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{booktabs} \usepackage{tabularx} \usepackage[labelfont=bf, font=small ]{caption} ...

2

Here are two ways you can do this: Large Brace: You can specify a larger braces as per About big parenthesis larger than Bigg to achieve: This does however require manual intervention to select the size of the brace. \tikzmark: Alternatively, you can use tikzmark to mark the important points of the brace and then use tikz to draw the brace. This is ...

1

I'am using toks register \tabdata for such purposes where the \halign preamble is created step by step. The advatage of this is that the macro \table can create arbitrary \halign preamble according to special language offered to user. The algorithm can scan such language and it can create \halign preamble using \addtabdata macro. \newif\ifright ...

2

If you want to convince your boss to start using LaTeX, you can show him/her Excel-to-LaTeX or an online version to ex­ports the cur­rent se­lec­tion of tables in Excel to LaTeX. I don't think migrating from Microsoft Word to Microsoft Excel would cause any trouble for someone who has used Microsoft for a long time.

2

I guess this kind of document have some consistent layout that could be defined in a custom template and the informations are stored in some kind of database? In the company where I work (small company that makes instruments for veterinary diagnostics) the people in production, lab technicians and sales&marketing use LaTeX without knowing for CoAs, ...

4

You can have thick \hlines with the makecell package and its \Xhline{width} and \Xcline{col1-col2}{width} commands. You can replace the vertical spacing added by booktabs around horizontal rules (that's responsible for non joining vertical rules) with the cellspace package; it lets you define minimal vertical spacingabove and below cells of a given column, ...

4

I would never do what I did in the first table, but it is your choice, not mine. I just offer a much nicer alternative. However, please: Do not use \it and \bf: Does it matter if I use \textit or \it, \bfseries or \bf, etc Do not manually modify the size of the table nor the style of the caption, it's not semantic. What if you later decide that the ...

9

You can pretend to have two # in the template by using a macro: \newif\ifright \def\table{% \halign{% \def\temp{##}\ifright\hfil\temp\else\temp\hfil\fi\cr Bla-bla\cr aaaaaaaaaaaaaaaaaaa\cr }% } % \rightfalse \table \righttrue \table \bye Alternatively, use \span \newif\ifright \def\table{% \halign{% ...

7

No, it has to be a single token, but you can (although it's a secret) use arbitrary command names not just letters \documentclass{article} \usepackage{array} \newcolumntype{\Pa}{p{5in}} \begin{document} \begin{tabular}{\Pa} text \end{tabular} \end{document}

Top 50 recent answers are included