Tag Info

0

Here is a solution using forest. It makes no sense to use a float in this context, so the tabulars cannot benefit from the automatic numbering of the table environment. However, you could use one of the methods for getting captions outside float environments if you would prefer the tables to be numbered automatically. (There are a bunch of questions ...

0

Below I've overlaid the repetition using a \colorbox with white background. Two example show how things will look with booktabs and without, as well as with an even/odd number of rows: \documentclass{article} \usepackage{xcolor,booktabs} \begin{document} \begin{tabular}{lc|cl} \hline A & && 3.45 \\ B & && 6.12 \\ C & ...

0

In English and other , the ditto mark is a double prime(U+2033), often replaced with a double quote. In French and Swiss German it's a right guillemot. You also can use an emdash. Here is a way of doing in four ways (including what you ask): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{array} ...

1

I have a solution you might find helpful, though it throws off the table formatting slightly. Here you go: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{tabular}{lcl} \hline A & $\Big|$ & 3.45\\ B & $\Big|$ & 6.12\\ C & $2$ & 7.93\\ D & $\Big|$ & 0.31\\ ...

2

Here's a quick Tikz answer: I created two new commands called \upbar and \downbar that connect to each other so that the spacing to the top of the table, the text, and the bottom of the table remains correct. If the bars were to connect to the top and bottoms of the table, it would look like a vertical rule, which isn't what you want. ...

5

you have told dcolumn that you only have one decimal place in the numbers so it only leaves room for one digit after the . Also please always post complete documents not fragments with bits removed. The 2.4 leaves enough room for a minus sign and a digit to the left of the . and 4 digits after. \documentclass[a4paper,12pt,icelandic]{report} ...

2

I think the problem is your ... in the second-to-last row in your table. I was able to use the siunitx package by replacing ... with \dots. Also, have a look at the mhchem package. I've replaced your first equation using the \ce{} command provided by mhchem. \documentclass[a4paper,12pt]{report} \usepackage[icelandic]{babel} \usepackage{dcolumn} ...

3

Here is an implementation that doesn't use bigdelim; rather an array that is vertically aligned on the math axis: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{tabular}{c c} \toprule Sample values: each line contains one entire beat \\ \midrule \left.\kern-\nulldelimiterspace \begin{array}{ *{9}{r} } 68.1 & 72.8 ... 5 You can do it with the collcell package: \documentclass{article} \usepackage{collcell} \newcolumntype{F}[1]{>{\collectcell\fillempty}#1<{\endcollectcell}} \newcommand{\fillempty}[1]{% \if\relax\detokenize{#1}\relax 0% \else #1% \fi } \begin{document} \begin{tabular}{ *{4}{F{l}} } 1 & 2 & 3 & 4 \\ & x & x & ... 1 With KOMA-Script If you use package babel together with KOMA-Script (to be correct, package scrbase, which is called in the KOMA-Script classes scrartcl, scrreprt, scrbook and scrlttr2 and in the KOMA-Script package scrextend) it is better to use the mechanism of KOMA-Script instead of babels because KOMA-Script has a better verification. KOMA-Script ... 2 You can either use the functionality of multirow, or merely raise/lower the contents into place, making sure you also remove any vertical height as a result of the movement. Below, \vertcenter does exactly that, moving the contents up by half of the regular baseline skip (.5\normalbaselineskip): \documentclass{article} \usepackage{booktabs,multirow} ... 5 You can also adapt the solution from Braces for cases in tabular environment which allows you to mark the top and bottom using \tikzmark and then do the drawing afterwards: Code: \documentclass{book} \usepackage{multirow,bigdelim,dcolumn,booktabs} \usepackage{xparse} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathreplacing} ... 5 Maybe just: \documentclass{book} \usepackage{multirow,bigdelim} \begin{document} \begin{tabular}{cc} \hline Sample values: each line contains one entire beat)\tabularnewline \hline 68.1 72.8 78.4 85.6 93.6 98.1 95.3 91.2 91.1 ... & \rdelim\}{3}{3mm}[variable length] \tabularnewline 74.4 79.2 85.6 92.8 100.8 108.8 115.2 121.6 ... 2 tabu's way of doing this is to use \tabulinesep. From manual: Applying to your code (with some huge space for demo) \documentclass[12pt]{article} \usepackage{tabu} \begin{document} \[\tabulinesep=1cm %<--------------------------adjust 1cm \begin{tabu} {c | c c c c c c} \firsthline f & a_{11} & a_{12} & a_{21} & ... 5 I'd probably use array for this but in any case the same \extrarowheight parameter can be used: \documentclass[12pt]{article} \usepackage{tabu} \begin{document} a \[ \begin{tabu} {c | c c c c c c} \firsthline f & a_{11} & a_{12} & a_{21} & a_{22} & b_1 & b_2 \\ \hline 1 & a_{11}^1 & a_{12}^1 & ... 0 You can have something neater than your image using the makecell package (allows for linebreaks inside cells, and common formatting of column heads), booktabs and siunitx for the formatting of columns with numerical values \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage[showframe, nomarginpar]{geometry} ... 0 You can use multirow package. Note, that the first argument to the \multirow represents the height of the generated cell in displayed lines-it does not have to correspond to the amount of logical lines (those that you end with \\ in the source). Second argument is the width of the generated column or * to calculate it automatically. ... 0 You should not try to split the colums rather than merging the headline cell: \begin{table} \centering \begin{tabular}{|c|c|c|c|c|c|} \toprule \multicolumn{2}{c}{Variables} & Statement & Inverse & Converse & Contrapositive\\ \midrule \textit{p} & \textit{q} & & & \\ \bottomrule \end{tabular} \end{table} 2 I used equation inside a minipage. \documentclass{article} \usepackage[table]{xcolor} \usepackage{amsmath} \begin{document} \begin{tabular}{p{0.5\textwidth}} \cellcolor{yellow}\begin{minipage}{.5\textwidth}$$S = \pi r ^2$$\end{minipage}\\ \end{tabular} \end{document} Edited After see David´s comment to use without ... 4 This possibly does the right thing. \documentclass{article} \usepackage{amsmath} \usepackage{colortbl} \begin{document} \begin{tabular}{p{0.5\textwidth}} {\makeatletter\CT@everycr{\the\everycr}\begin{align} S &= \pi r ^2 \end{align}} \end{tabular} \end{document} 5 The following provides the desired layout of the table (without colour): \documentclass{article} \usepackage[margin=1in]{geometry}% Just for this example \usepackage{tabularx,array,booktabs} \newcolumntype{N}{@{}>{\stepcounter{enumi}\theenumi.~}l@{}} \newcolumntype{M}{@{}>{\stepcounter{enumi}\theenumi.~}p{\linewidth}@{}} \newenvironment{listenv} ... 3 If you color the cells, you need no rule. And you never need vertical rules in tables (nor double rules). \documentclass{article} \usepackage{xcolor} \usepackage{colortbl} \begin{document} \begin{tabular}{l *{5}{>{\columncolor{blue!20}}l} l} \rowcolor{white}% & 1 & 2 & 3 & 4 & 5 & 6\\ 1 & 1 & 1 & 1 & 1 & 1 ... 2 Manual Solution: You can apply \rowcolor and selectively color in white the cells which should not have color \ColorBlock{<start row>}{<end row>}{<color>} Using collcell package we can define a macro which specifies which rows of the table to color. This applies only to columns with the L alignment defined in the MWE. Code: ... 2 The makecell package is done for that: it allows for linebreaks in cells, and common formatting for column heads. Also you shouldn't use \esizebox as it also scales the text in a tabular. I used the tabulars environment instead, with a table total width of 16 cm.. Although one should not use \multicolumns that come across X type columns, it seems to be ... 3 You can achieve all this with David Carlisle's tabularx package. I thought to provide 2 different solutions, since manual breaks can be done inside a tabular environment, but that does not solve your problem properly IMO. Column width is fixed within tabularx preamble: >{\centering\arraybackslash}X means "centered-text (>{\centering\arraybackslash}), ... 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 ... 3 Use of adjustwidth from changepage package. Within an adjustwidth environment the left and right margins can be adjusted. The environment takes two required length arguments: \begin{adjustwidth}{<leftmargin>}{<rightmargin>} ... \end{adjustwidth} A positive length value will increase the relevant margin (shortening the text lines) while a ... 2 You can apply a \hspace*{<length>} with a negative length value: Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Code: \documentclass[fontsize=11pt]{scrartcl} \usepackage{amsmath,amssymb,amsfonts,amsthm,url,hyperref} \usepackage{showframe} \begin{document} \hspace*{-2.0cm}% ... 0 I am not entirely sure what you want since you say "It doesn't make sense to use \indent or \noindent either, because that would only make it stay the same or move it to the right." If you just want to move the tablular environment to the left then the easiest way is probably to use kern: \documentclass{article} \usepackage[showframe]{geometry} ... 1 You can use a box: \documentclass{scrartcl} \usepackage{lipsum,showframe} \begin{document} \lipsum[1] \noindent \makebox[\textwidth][c]{% %<------------- \begin{tabular}{ | p{3cm} | p{3cm} | p{3cm} | p{2cm} | p{2cm} | p{2cm} | } \hline abcdabcd abcd & abcdabcd abcd & abcdabcd abcd & abcdabcd & abcdabcd & abcdabcd \\ \hline ... 1 If a table or figure should be placed as desired and not float away, it's better to drop the table or figure environment and use \captionof{table}{Title} to generate the legend for the table of figure. This will generate the correct numbering and a \label{} command can be used to refer to the entity as well. \documentclass{article} \usepackage{caption} ... 4 \documentclass{article} \usepackage{array} \begin{document} \begin{table} \setlength\extrarowheight{2pt} \begin{tabular}{|c|c|c|}\hline Col. A & Col. B & Col. C \\ \hline Val. 1&\begin{array}{@{}cccc@{}} & a & b & c \\ b & 2 & & \\ c & 2 & 3 & \\ d & 2 & 3 & 4 ...

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

The \Convert command is not fully expandable, despite being defined with \DeclareExpandableDocumentCommand (which is an error in the package). There's a simpler way using a built-in function in expl3: \documentclass{article} \usepackage{siunitx} % \usepackage{xparse} % already loaded by siunitx \ExplSyntaxOn ...

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@ ...

2

As commented by egreg, it seems the command is supposed to be used in vertical mode. Additionally, it seems you would like to center the table. Here is one way to achieve this: \input fontch \input knuth  \eightpoint \vcenter{\halign{\tabskip=1em $#\hfil$& $#\hfil$\cr \omit Item One\hfil& \omit Item Two\hfil\cr ...

3

Your example produces where you can see || makes a double rule, but \hline is always unbroken and cuts through it, perhaps you want \documentclass{article} \usepackage{hhline} \begin{document} \begin{tabular}{|c||c|}\hhline{|-||-|} head1 & head2 \\\hhline{|=::=|} cel1 & cel2 \\\hhline{|-||-|} cel3 & cel4 \\\hhline{|-||-|} ...

2

Define 6 columns and change \tabcolsep to 1em \documentclass[11pt,a4paper]{article} \usepackage{blindtext} \usepackage{mathtools} \DeclareMathOperator{\sgn}{sgn} \begin{document} \begin{center} \setlength{\tabcolsep}{1em} \begin{tabular}{*{6}{c}} Family 1 & Family 2 & Family 3\\ Particle & Mass & Particle & Mass & Particle & ...

4

Like this may be... \documentclass{article} \usepackage{array} \usepackage{tabularx} \usepackage{showframe} \begin{document} \noindent \begin{tabular*}{\textwidth}{rl@{\extracolsep{\fill}}l} %% @{\extracolsep{\fill}} is redundant IMO (S) 10 & \% (w/v) & 1,4-butanediol \\ \end{tabular*} \bigskip \noindent ...

3

Here's a minimised example: \documentclass{article} \usepackage{array,tabularx} \begin{document} \begin{tabularx}{\linewidth}{>{\hsize=.01\hsize\raggedleft\arraybackslash}X>{\hsize=.01\hsize}X>{\hsize=2.98\hsize}X} (S) 10 & \% (w/v) & 1,4-butanediol \\ \end{tabularx} \end{document} This does what you asked but it looks ...

1

One way is to use tikz to position the text you want to be aligned with the words in the paragraphs. In the MWE below you mark the text with \Annotate{annotation}{text}, and I have highlighted the marked text in red to make it easier to see and the annotation is shown in blue.. The data is created using a tabular which makes it easy to create the vertical ...

3

You can also rotate the caption: \documentclass{article} \usepackage{graphicx,caption,varwidth} \begin{document} \section{My Table} \paragraph{} Please print my table on this page! \begin{table}[htbp] \centering \captionsetup{justification=centering} \rotatebox{90}{\begin{varwidth}{\textheight}\centering \parbox{8cm}{\caption{My Table ...

0

I've solved my problem so far: \begin{document} \section{My Table} \paragraph{} Please print my table on this page! \begin{table}[htbp] \centering \captionsetup{justification=centering} \caption{My Table} \rotatebox{90}{ \begin{tabular}{p{2.3cm}|p{2.3cm}p{2.3cm}} \hline A & B & C \\ ...

0

Therotatingpackage documentation says that sidewaystable creates a page-sized float. If I understand you correctly you want the text above the table also rotated 90 degrees, right? For this you could use the lscapepackage. Check this post: How to change certain pages into landscape/portrait mode.

5

\arraystretch is set to 3. That means also the descender part of the strut box is multiplied by 3. But the \includegraphics lines do not have a descender part, thus that part is filled with white space. The example does the opposite, setting \arraystretch to 0 and the vertical gap is set explicitly to 2\tabcolsep as the horizontal gap (adjust to your ...

2

This has nothing to do with geometry nor with your construction of the figure. Instead, it's the default space left above a bottom-placed caption. This length is controlled by \abovecaptionskip. Below I've dropped the use of a fixed-width tabular* but produced the same layout. Each image has width 0.3333\linewidth-1.3333\tabcolsep. The first part of the ...

3

I'm not familiar with XML, but the following approach may nevertheless work for you: Don't use the multirow package. Instead, set up a second, nested tabular for the rows of the right-hand column. I.e., something like this: \documentclass{memoir} \begin{document} \begin{tabular}{ll} Tall cell & \begin{tabular}{@{}l@{}} % "@{}" suppresses ...

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)

Top 50 recent answers are included