# Tag Info

0

The command is error for your \resizebox. Should be \resizebox{xxcm}{!} { % ! keep the aspectratio with xx width, no need to use width=xx. \begin{tabular}... \end{tabular} } Also \scalebox from graphicx works too. \scalebox{0.7}{ \begin{tabular}... \end{tabular} } Code \documentclass{beamer} \usepackage{graphicx} ...

6

It's easy if you invert the input order and enter the data columnwise rather than row wise (and your data is fairly regular, large entries would mess up the alignment. I used c here but you could fix the column with with p{..} \documentclass{article} \newcommand\zcolumn[1]{% \begin{tabular}[b]{c}#1\end{tabular}\linebreak[0]\ignorespaces} \begin{document} ...

2

Just use \begin{tabular}{p{\the\MyLen}@{}p{\the\MyLenTwo}@{}p{\the\MyLenThree}@{}} First&Second&Third \\ \end{tabular} As there is no flexibility in the glue between columns, tabular* can not change the width in any way, so the width using tabular* will be as for tabular but then forced into a box of the specified size, so generating a warning if ...

1

Using the multicol package provides a more general solution which works even if the stuff you want in a single column is just text, for example. Your code wouldn't easily compile for me as I don't know what package defines the \ce macro of if this is a custom macro or whatever. So I changed that to maths just to demonstrate the idea. I also added some text ...

-1

Now I know what I should do. I just put a star on figure: \begin{figure*} and \end{figure*}. And of course, I have deleted the \onecolumn.

2

Following Christian's comment, I wrote the following code: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstabletypeset[outfile=output_table.tex, columns/AA/.style={string type, column type=c}, columns/B/.style={string type, column type=c}, create on use/AA/.style={% create col/assign/.code={% \getthisrow{A}\valueA ...

4

All \nopagebreak's are undesired: \documentclass{scrartcl} \usepackage{longtable} \usepackage{booktabs} \begin{document} \section{Table test} \begin{longtable}{llc} \hline & & \multicolumn{1}{c}{All} \\ \hline m & \rule{0pt}{1.7\normalbaselineskip}April & $1$ \\ & July & $1$ \\ & June & $1$ \\ l & ...

10

In general it might be hard but here you are only using pgfmath for an inequality test which is a sledgehammer you can avoid: \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableset{symbol column/.style={column type=c, postproc cell content/.style={ /pgfplots/table/@cell content={}{% \ifdim##1pt <0.01pt ...

0

\documentclass{article} \usepackage{tabu} \usepackage{hyperref} % this line is added. \begin{document} \begin{tabu}{c} Cell \footnote{Footnote} \end{tabu} \end{document} As @cacamailg said in comment, "It works if you load hyperref after tabu". Thank you, @cacamailg.

1

The key to finding the solution was provided by @Werner, who suggested I use the \listfiles command to check the versions of my packages. I had assumed these would all be correct as I had recently done an update with Tex Live Utility. However it turns out that I had an old version of colortbl in my local folder and this took precedence over the TL 2013 ...

2

You defined a raggedright column type but didn't use it? \documentclass[11pt,a4paper]{article} \usepackage[francais]{babel} %\usepackage[latin1]{inputenc} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tabularx} \usepackage{array,multirow,makecell} \setcellgapes{1pt} \makegapedcells \usepackage[table]{xcolor} ...

5

The answer is: yes, it is possible. Under the assumption that your .tex files each consists in some code of the form \begin{table}\begin{tabular}{...} ... \end{tabular}\end{table}, you can locally redefine the table environment to do nothing, and input that code inside a subtable environment; such an environment uses minipage internally, which means you ...

2

I wouldn't use a second caption, but expand on the description in the title and or move some of the description in the body of the text. Also if you have long table headings, using bold for the label font, it generally looks better. Here is the code: \documentclass{article} \usepackage[labelfont={bf}]{caption} \usepackage{booktabs,lipsum} ...

3

If you can not save the files in UTF8 just tell LaTeX what encoding they are in, most likely latin1 (ISO-8859-1) so: {\inputencoding{latin1}\input{file.tex}}

5

Your definition (after a few expansions) has & at the top level so messes up the table cells, add {} to hide them: \newcommand*\listen[2]{{%% listen to the file named #1, but write out #2 \includemedia[ addresource=#1, transparent, flashvars={ source=#1 &autoPlay=true &hideBar=true }, ...

6

You have to specify the format of the input. In your case it's a file: \pgfplotstabletypeset[ignore chars={s},format=file]{heights.dat} The option is also explained at page 8 of the documentation

3

You can do this with the m{} column of array package. I have demonstrated two ways below. First one using m column and second one using tabularx with array package. egreg's answer comes handy here. Both m and X columns make the contents left anigned (they are just minipages). If you want them centered you can add >{\centering\arraybackslash} in their ...

2

As what I said in the comment, it is very very easy (as I have done this kind of table many times). :-) \documentclass[preview,border=12pt,12pt]{standalone} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{pstricks-add} \usepackage{array} \usepackage{booktabs} \newcolumntype{A}[3]{% ...

1

The effect is as a result of the default indentation of the document. Place \setlength{\parindent}{0pt} in the preamble if you want zero indentation or \noindent before each table to remove the indentation and the effect will be removed. \documentclass[ngerman]{scrartcl} \usepackage[german]{babel} \usepackage{booktabs, array} \usepackage{longtable} ...

5

You have to redefine \tabularxcolumn to use m placement; this can be done locally in the center environment, so it will affect only the tabularx in the same environment. \documentclass{article} \usepackage{array,tabularx} \begin{document} \begin{center} \renewcommand{\tabularxcolumn}[1]{m{#1}} \begin{tabularx}{\textwidth}{|m{4cm} X|} \hline Text that ...

3

Here is an implementation using environ and expl3. With environ we absorb the whole environment's contents and with l3regex we check whether the environment contains the tokens \label{table_ via the regular expression \c{label}\cB.table_ Where \c{<string>} matches the control sequence with name <string> and \cB. matches one open brace. ...

1

You can add \vspace{.5\baselineskip} soon after \parbox[t]{10cm}{. Adjust .5\baselineskip suitably. \documentclass[10pt,a4paper]{article} \usepackage{longtable} \begin{document} \begin{longtable}{| p{105 mm} |} \hline HEADER \\ \hline \parbox[t]{10cm}{ \vspace{.5\baselineskip} %% this line added \rule{100mm}{50mm} Fake caption \strut}\\ \hline ...

1

You can add the vertical space manually. For instance: \documentclass[10pt,a4paper]{article} \usepackage{longtable} \begin{document} \begin{longtable}{| p{105 mm} |} \hline HEADER \\ \hline\\[-5pt] \parbox[t]{10cm}{ \rule{100mm}{50mm} Fake caption \strut}\\ \hline \end{longtable} \end{document}

1

You can follow @werner 's suggestion which will effect every tabular environment. Or you can define a new length: \newlength{\mylength} \setlength{\mylength}{3ex} \begin{tabular}{cccc} col A & col B & col C & \\[\mylength] some & content & for & row 2 \end{tabular}

1

I think that the ConTeXt interface for handling multiple rows and columns is much nicer as it provides a clean separation of content and presentation. For example, without any styling, the above table can be typeset as (I simply copy pasted the data in the Exp(2) part). \starttext \bTABLE \bTR \bTD[nc=2] \eTD \bTD[nc=3] Cramér von Mises \eTD ...

3

Always supply a complete, but minimal document. Yours is missing \documentclass as well as \begin and \end document. It is also missing the loading of xcolor (for the color names like gray!25) and rotating (for the sideways environment). To color the whole multirow you need to color all three cells of it. Also, your use of \multirow is incorrect. If you want ...

2

Using the S column of siunitx gives you a much cleaner table, the table numbers are properly aligned. The \centering command changes the behaviour of the line ending \\. You need to restore it using arraybackslash. I just defined a new columntype P, so the code is cleaner. But I still think using siunitx gives a result much more pleasing to the eye. ...

2

For me it works (but it is looking bad, because of the code) You probably forgot \usepackage{booktabs} (but I can't be sure because of the missing MWE). \documentclass{article} \usepackage{booktabs} \usepackage{multirow} \begin{document} % Table generated by Excel2LaTeX from sheet 'Sheet1' \begin{table}[htbp] \centering \caption{Add caption} ...

5

As it says in the tabularx doc, the principal restriction on the \tabularx \endtabularx form is that \endtabularx is the first token in the end code. So the behaviour you see is documented feature, not a bug. However you could do: \documentclass{article} \usepackage{array} \usepackage{tabularx} \makeatletter \newenvironment{mytable}{% ...

0

Gnumeric is itself powerful enough to build a template and convert it into LaTeX tabular using concatenation of strings. Check out, for example, this gnumeric-table.xml created with Gnumeric Spreadsheet 1.10.17: <?xml version="1.0" encoding="UTF-8"?> <gnm:Workbook xmlns:gnm="http://www.gnumeric.org/v10.dtd" ...

10

The \midrule instruction generates a horizontal line that's (i) a bit thinner than either \toprule or \bottomrule and (ii) provides some extra vertical spacing both above and below the rule. As such, a \midrule is best used to separate a table's header row(s) from the body of the table, and a table's body from the footer material (if present, of course). If ...

8

As mentioned by percusse, this is easy with the package enumitem. Code \documentclass{article} \usepackage{enumitem} \setlist[description]{font=\ttfamily,leftmargin=2cm,style=nextline} \begin{document} \begin{description} \item[exception unhandled] An exception that was raised but it is not handled by the program. \item[assert] A failed Ada ...

0

Why Not partition your text into two rows just donot put the hline between the rows, something like this: \begin{table}[!h] \centering \begin{tabular}{|c|c|c|} \hline A & B &C\\ D & E &F\\ \hline G & H & I\\ \hline \end{tabular} \end{table}

3

You can use pgfplotstable or datatool which I think csvsimple comes from. Here is an example with pgfplotstable with default settings. \documentclass{standalone} \usepackage{pgfplotstable,filecontents} \pgfplotsset{compat=1.9}% supress warning \begin{filecontents*}{test.csv} Time (s),Zeroed time (s),Y Position in pixels,Zeroed Y Position in pixels,Y ...

3

The csvsimple manual describes it. This is an modified example from the manual. \documentclass{standalone} \usepackage{csvsimple} \begin{filecontents*}{grade.csv} name,givenname,matriculation,gender,grade Maier,Hans,12345,m,1.0 Huber,Anna,23456,f,2.3 Weisbaeck,Werner,34567,m,5.0 \end{filecontents*} \begin{document} \begin{tabular}{l|c}% ...

5

A common tabular environment seems not appropriate for this kind of table. This is an approach with »PGF/TikZ« that draws a matrix with arrows between nodes where desired. \documentclass[11pt,border=2pt]{standalone} \usepackage[T1]{fontenc} \usepackage{selinput} \SelectInputMappings{ adieresis={ä}, germandbls={ß} } \usepackage{tikz} ...

3

For the adaptive width just split the definition of the first two columns, keeping the m{2cm} column for the second and introducing a c column for the first. c, l, and r columns all take the natural width of text as width. For the vertical centering you can use the \multirow{<rows>}{<width>}{<content>} command from the multirow package. ...

1

More advanced scenario with tabu (not taboo). \documentclass[preview,border=12pt,varwidth]{standalone}% change it back to your own document class \usepackage[demo]{graphicx} % the option demo is used for the example, remove it \graphicspath{{../Img/05Core/}} \usepackage{tabu,mathtools,tikz} \begin{document} \begin{table}[hbtp] \centering ...

4

Try something like this: \documentclass{article} \usepackage[demo]{graphicx} % the option demo is used for the example, remove it \usepackage{tabu} \begin{document} \begin{table}[hbtp] \centering \tabulinesep=\tabcolsep \begin{tabu} to \textwidth {|X[4,c,m]|X[1,c,m]|X[0.75,c,m]|X[1.25,c,m]|} \hline \textbf{Motif} ...

4

The tabular environment is not really necessary for this. Also, you can use a \foreach loop to automate things a bit. Code \documentclass{beamer} \usepackage{pgffor} \usepackage{mwe} % provides images used in this example \begin{document} \begin{frame} Left to right \begin{center} \foreach \img[count=\i] in {a,b,c} { ...

7

you can specify the the pause numbers manually: \documentclass{beamer} \begin{document} \begin{frame} \begin{tabular}{ccccc} \includegraphics[width=.15\textwidth]{lion.jpg} & \pause \ \includegraphics[width=.15\textwidth]{lion.jpg} & \pause \ \includegraphics[width=.15\textwidth]{lion.jpg} & \pause \ ...

3

The S column specification is from siunitx, and expects columns of decimal numbers. If some of your entries in these columns are not decimals, then you need to sorround them with {...} to be correctly processed. Thus the direct fix of your code is: \documentclass{article} \usepackage[czech]{babel} \usepackage{booktabs} \usepackage{caption} ...

1

You forgot to use the caption command. You can use the following MWE: \documentclass[% ,jou ,draftfirst ,floatsintext ]{apa6} \usepackage{booktabs} \begin{document} \begin{table*} \begin{threeparttable} \caption{Caption} %%%%%%%%%%%%%%%%%%%%%%%%% \begin{tabular}{lllll} \toprule Blah ...

1

This should be more resistent to font changes (Try to set the '12pt' option and uncomment \usepackage{palatino}): \documentclass[11pt]{article} %\usepackage{palatino} \usepackage{tabularx} \newcommand{\frstCVcell}{2.5cm} \begin{document} \section*{WORK SECTION TITLE} \begin{tabularx}{\textwidth}{p{\frstCVcell}Xc} 2008-2010 & SOME PLACE I WORKED & ...

4

Probably this is what you want: Code: \documentclass[12pt,a4paper]{report} \usepackage{array} \newcolumntype{M}{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{1.5cm}} \begin{document} \begin{center} \begin{tabular}{|M|m{3cm}|M|M|M|M|} \hline \textbf{Q} & \textbf{Header one} & \textbf{Test \newline Text4} & \textbf{Test1 \newline ...

1

If I understand your question correctly, you're looking to create a column type that will wrap long lines while centering the contents of the column. One method for doing this, which makes use of the array package (a package that's included in all LaTeX distributions I know of), creates a new column type called "C" to do the job. You should, of course, set ...

2

A new verion, after clarification. No additional packages used. Each column is a separate table. $'s left, however rather unneeded. \documentclass{article} \begin{document} \def\barr{\begin{tabular}{l}} \def\earr{\end{tabular}} \begin{tabular}{|c|l|c|c|c|c|} \hline$\textbf{Q }$& \barr$\textbf{Header one}$\earr & \barr$\textbf{Test}\$\\ ...

0

Alternatively, \widthof from the calc package can be used. (This is what I actually had in mind when I mentioned "\phantom fiddling" in my question.) \documentclass{article} \usepackage{tabularx} \usepackage{calc} \begin{document} \begin{tabular}[t]{@{}l@{}} \begin{tabular}[t]{@{}l@{\qquad}p{5cm}@{}|>{\raggedleft}p{1.5cm}@{}} \textbf{Col1} & ...

3

\documentclass{article} \begin{document} \begin{tabular}[t]{@{}l|l@{}} \begin{tabular}[t]{@{}l@{\quad}p{5cm}@{}} \textbf{Col1} & \tabularnewline Text1 & Text1Description \tabularnewline VerylongText2 & Text2Description \tabularnewline Text3 & Text3Description ...

3

Here is one possible solution. See my input and corresponding output below. I made a couple of improvements, including the use of the booktabs package (for nicer-looking rules), and the siunitx package (for decimal alignment), as suggested by cmhughes. \documentclass{article} \usepackage[showframe]{geometry} % only to show the position ...

Top 50 recent answers are included