Tag Info

Hot answers tagged

9

One option using TikZ; the fit library was used just to draw the outer frame; depending on the actual requirements, this can be done without the library (see second example code below): \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture}[ mytext/.style={ draw, text width=#1, align=center, minimum ...


5

You can use table-alignment=<choice> with some small kerning in between like @{\!}S[table-figures-decimal=1,table-space-text-pre=,table-alignment=left] Code: \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{array} \usepackage{siunitx} \begin{document} Areas:\par ...


5

You could put a strut in the first column. \documentclass{article} \begin{document} \begin{tabular}{p{4cm}p{4cm}} Lorem ipsum dolor sit amet consectetur\rule[-6pt]{0pt}{6pt} & adipisicing elit \\ sed do eiusmod tempor incididunt ut labore & et dolore magna aliqua.\\ \end{tabular} \end{document}


5

Give some vertical space substituting \tabularnewline with \\[1.25ex]. MWE: \documentclass{article} \usepackage{array,multirow,booktabs} \usepackage[demo]{graphicx} \begin{document} \begin{table}[!htb] \centering \begin{tabular}{m{1.5cm}c ccccc} \toprule & & $1024 \times 1024$ & $512 \times 512$ &$256 \times 256$ & $128 \times 128$ ...


5

Here's one option using tabularx: \documentclass{book} \usepackage{tabularx} \newcolumntype{C}{>{\centering\arraybackslash}X} \begin{document} \begin{table} \small \centering \begin{tabularx}{.7\linewidth}{|X|C|X|C|} \hline parameter & value & parameter & value \\ \hline blah blah & a & blah blah & 2 \\ blah blah ...


4

I'm not really sure you want to align the numbers to the decimal point. But here's how you can improve the table: \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{array,booktabs} \usepackage{siunitx} \begin{document} Areas:\par \renewcommand{\arraystretch}{1.5} \sisetup{table-figures-decimal=4,table-auto-round} \begin{tabular}{ @{} l ...


4

Using the adjustbox package: \documentclass{book} \usepackage{adjustbox} \begin{document} \begin{table} \centering \caption{combined caption for both rotated tables} \begin{adjustbox}{angle=90} \begin{tabular}{l} \hline text \\ text \\ text \\ \hline \end{tabular} \end{adjustbox}\quad \begin{adjustbox}{angle=90} \begin{tabular}{l} \hline text \\ text \\ ...


4

You can try gray!<percentage> syntax like gray!20 \documentclass{article} \usepackage{xcolor} \begin{document} \colorbox{gray!20}{gray!20}\color{gray!80} some text \end{document}


3

Neither table, tabular or minipage add something to the list of tables. This is done by \caption inside table or \captionof{table} (package caption or capt-of). Example: \documentclass{article} \usepackage{caption} \begin{document} \listoftables \newpage \begin{table} \caption{First table} \begin{tabular}{l} foo\\bar \end{tabular} ...


3

Will this do? \documentclass{article} \usepackage{graphicx} \begin{document} \begin{table}[htbp] \centering \caption{combined caption 1 and 2} \rotatebox[origin=c]{90}{% \begin{tabular}{ccc} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \\ \end{tabular}% }% \hfil %% just to demarkate \rotatebox[origin=c]{90}{% \begin{tabular}{ccc} 7 ...


3

Don't use \pbox. \documentclass[12pt,a4paper,oneside,openany]{book} \usepackage{fontspec,tabularx,amsmath} % For multiletter symbols \DeclareMathOperator\Real{Re} % cf plain TeX's \Re and Reynolds number \DeclareMathOperator\imag{Im} % cf plain TeX's \Im \newcommand{\constant}[1]{\mathit{#1}} \newcommand\Rey{\constant{Re}} % Reynolds number ...


3

You can simply use the standard command multicolumn to achieve this. Then you choose which of the columns of the top tables should span more than one column of the lower table. Then do this in each row of the top table. \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{2}{|l|}{ parameter } & value & \multicolumn{2}{l|}{ parameter } & value ...


3

You could use something like this but note that it does make the text of your table quite small. Note that I did this before David Carlisle edited your question and so my example is somewhat less minimal. I kept the font packages and page layout in case that affected the spacing but I could certainly have pared it down further. I've used rules and a couple ...


3

\documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage{hhline} \usepackage{colortbl} \usepackage{multicol} \begin{document} \begin{table} \begin{tabular}{|l|c|c|c|c|} \hline \multicolumn{5}{|c|}{Type} \\ \hline & A & B & C & D \\ \hline X & 53,2\% & 51,6\% & \cellcolor[gray]{0.9} ...


3

\documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \usepackage{multirow} \usepackage{booktabs} \begin{document} \small \begin{tabular}{lp{4cm}p{1.2cm}p{3.5cm}} \toprule \multirow{2}{*} & \multicolumn{3}{c}{Disability} \\ \cmidrule(r){2-4} & Regulatory Framework & ...


3

This is sort of hack that I have stolen from this answer. Note that you might better to go with minutes package as @strpeter have suggested. \documentclass{article} \usepackage{lipsum} \usepackage{calc} \begin{document} \begin{center} \begin{tabular}{ |p{3cm}||p{2cm}||p{3cm}||p{6cm}| } \hline \hline ...


3

The arguments to \cellcolor are just passed to \color internally so that it colours the panel of the specified colour so \cellcolor[gray]{0.8} just calls \color[gray]{0.8} and you may use that directly.


2

The simplest way is to just not draw full horizontal lines when you want to combine rows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{booktabs} \begin{document} \begin{table} \caption{Funções e conexões do conector X1} \centering \begin{tabular}{|c|l|l|} \hline \textbf{X1} ...


2

The additional space around columns in a table is usually \tabcolsep: \documentclass[article, 12pt, oneside]{memoir} \usepackage{tabu} \begin{document} \tabulinesep=2mm \begin{center} \begin{tabu} to \linewidth {p{5.5cm}X[l,p]} a & aa \\ b & bb \\ c & cc \\ \addlinespace[1cm] ...


2

I am not sure if this is what you want to achieve: \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} \noindent I can align a table to the left. \begin{enumerate} \item However, it stays as far left as the margin allows. \begin{enumerate} \item This looks pretty ugly. \begin{enumerate} \item The effect is compounded with indentations ...


2

I'm not sure it's one of these you expect, but you can have your tabular centred with respect to the (innermost) enumerate margin, or left aligned with the left margin of the innermost enumerate environment: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{float} \usepackage{caption} \usepackage{insbox} \begin{document} \noindent I can align ...


2

A first trial without equal widths, but I am not sure whether I understand the request correctly... ;-) \documentclass{scrbook} \begin{document} \begin{table}[ht] \small \centering \begin{tabular}{l|l|c|l|c|l} \cline{2-5} & parameter & value & parameter & value \\ \cline{2-5} & blah blah & a & blah blah & 2 \\ ...


2

Another layout with different types of "X" columns, and a better vertical spacing with the help of the cellspace package: \documentclass[a4paper, 11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{graphicx}%[draft] \usepackage{array, booktabs, multirow} \usepackage{tabularx} \newcolumntype{Y}{ ...


2

tabularx affects the setting of multiline cells, and the only column for which you had more than one line you were not using X. Also I removed some packages to make your example more minimal (they generate missing font errors as posted for me) This just used X and removes pbox: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% (UTF-8/XeLaTex) ...


2

You can use the cellspace package, that ensures a minimal vertical spacing between the top of a cell and the bottom of the above cell, and symmetrically between its bottom and the top of the below cell. It works with most column types but not with \multirow. To activate this feature it suffices to write an S before the type of one column ; I chose the text ...


2

The \\ mechanism can be used, but one has to account for the height of the \parbox, either manually or automatically. The other option, if all rows are to be adjusted, is to use the \extrarowheight parameter of the array package, or else \arraystretch as was mentioned in the comments. \documentclass{article} \usepackage{array} \begin{document} ORIGINAL ...


2

If you do not have vertical lines, then this can be solved by \noalign{\vspace{6pt}} Full example: \documentclass{article} \begin{document} \begin{tabular}{p{4cm}p{4cm}} Lorem ipsum dolor sit amet consectetur & adipisicing elit\\ \noalign{\vspace{6pt}}% sed do eiusmod tempor incididunt ut labore & et dolore magna aliqua.\\ ...


2

I don't know if this is what you want: \documentclass{article} \usepackage{gb4e} \usepackage{tipa} \usepackage{array} \let\ipa=\textipa \newcounter{example}[xnumi] \renewcommand{\theexample}{(\alph{example})} \makeatletter \renewcommand{\p@example}{\thexnumi-} \begin{document} \begin{exe} \ex ...


2

The last row misses the last &. The rightmost line is only set, if the last cell is used. An empty last cell will do: \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{multirow} \begin{document} \begin{table} \begin{tabular}{|l|c|c|c|c|} \hline \multicolumn{5}{|c|}{Type} \\ \hline & A & B & C & D \\ \hline X ...


2

you forgot a ''&'' \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{multirow} \begin{document} \begin{table} \begin{tabular}{|l|c|c|c|c|} \hline \multicolumn{5}{|c|}{Type} \\ \hline & A & B & C & D \\ \hline X & 53,2\% & 51,6\% & \multirow{2}{*}{49\%} & \multirow{2}{*}{49\%} \\ Y ...



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