# Tag Info

54

Here is the third revision of my approach to programmatically create such diagrams, using TiKZ. Sample code Preamble and definitions follow below: this code is meant to demonstrate the interface to the environments/macros which I define. \begin{document} \begin{assessmentTable}{% \newcommand\ItemTitle {L\"osungsvariante (Lv) eintragen:} ...

27

\documentclass{article} \usepackage{array,graphicx} \setlength\extrarowheight{2pt} \begin{document} \noindent \begin{tabular}{|*{13}{>{\centering\arraybackslash}p{10pt}|}} \hline \multicolumn{2}{|c|}{}& \multicolumn{7}{p{75pt}|}{\raggedright Stuff\\ \textbf{MORE STUFF}\\[4pt] (+) yes\\ ($-$) no\\ (?) who knows\\ (!) Run!}& ...

8

\documentclass{article} \begin{document} $\begin{array}{c|cccc} & 3 & 2 & -5 & -10 \\ & & & & \\ \hline & & & \multicolumn{1}{c|}{} & \end{array}$ \end{document} If you want it to be thick, \documentclass{article} \usepackage{array} \begin{document} ...

7

You're missing the fact that \foreach executes each cycle in a group, so when finishing it the change to \@tabtoks is undone. Add \global in the relevant places (and also \arraybackslash in the specification for the last column, but this is another problem). \documentclass[10pt,a4paper]{article} \usepackage{tabularx} \usepackage{tikz} ...

7

The binary numbers in the second column are centered with table-format=8.0. Also the overfull \hbox warnings are gone: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{siunitx} \usepackage{booktabs} \begin{document} \sisetup{math-rm=\mathtt, group-digits=false, ...

7

Here's a solution that also fixes the issue with the item numbers: \documentclass{article} \usepackage{xparse} \usepackage{environ} \usepackage{lipsum} \usepackage{tabularx} \ExplSyntaxOn \NewEnviron{problemset}[1]{\jermer_pset:Vn \BODY {#1}} \seq_new:N \l_jermer_items_seq \int_new:N \l_jermer_ncol_int \int_new:N \l_jermer_ctr_int \tl_new:N ...

6

Don't blame me! :-) The issue isn't loading tabularx it is loading array (used by tabularx) and array prevents premature expansion of the tabular preamble (so that macros in @ or >{...}` are expanded when used in the cell, not while building the preamble. So you need to expand your macro one level when calling the table, either using latex3 utilities, or ...

6

The tap macros could be used to typeset this table: \input tap \input trans \beginanchtable \begintableformat & \center \endtableformat %\B|+ | | | | | | | | \E| \diagstroke \trth DOWN {0 0 0 1} a \B"- " " " " \kern16mm " " " " \E" \- \B|: @3 Header | @4 Second header | @2 Last \E| \- \B|: | @4 Info | @4 Info 2 \E| \B|- | @4 \- | " " " \E| \uranchor8a ...

6

A rather simple workaround can be constructed using plain TeX/LaTeX boxes handling; since LaTeX's cell vertical space takes no account for the command \displaystyle, one solution is to avoid it "a priori" by inserting the equation inside a parbox environment: \parbox[<alignment>][<height>][<arrangement>]{<width>}{<contents>} ...

6

You could place the theorem and the picture in separate, side-by=side minipage environments: \RequirePackage[demo]{graphicx} % just for this example \documentclass{beamer} \begin{document} \begin{frame}{A theorem and a picture, side-by-side} \begin{minipage}{0.48\textwidth} \begin{theorem}theorem here\end{theorem} \end{minipage} \hspace*{\fill} % spacing ...

6

Please always include a complete small document not just a fragment. Within a minpage footnotes are for that mini page and come at the bottom of there. That is the only function minipage is serving there. Get rid of \begin{table}[H] and \begin{minipage} and just have the \tabularx then the footnote will work as intended,

6

Your file, as posted, has quite a few problems that render it uncompilable. Among them are The instruction \textquoteblleft is misspelled (about 18 instances) -- it should be \textquotedblleft. There should also be a space following this instruction, i.e., don't join it up to the the next word. The instruction \textquoteblright is also misspelled (again ...

6

A possible solution. I suggest not using the vertical lines, but rather the booktabs package. For horizontal alignment of 20 you can exploit the multirow package, while for vertically alignment you can compute the width of the largest entry of the first columns via the calc package. \documentclass{article} \usepackage{booktabs,calc,multirow} ...

6

If the width of the contents of a spanned cell produced using \multicolumn is larger then the width of the contents of the individual cells, the extra space is added to the last spanned column, as you have experienced and this example shows even clearer: \documentclass{article} \begin{document} \noindent\begin{tabular}{|c|c|c|c|} \hline A & ...

5

If you must combine tabularx and longtable, I prefer ltxtable to ltablex: \documentclass[11pt]{article} \usepackage{booktabs} \usepackage{ltxtable} \begin{document} \LTXtable{\textwidth}{t1.tex} \end{document} where t1.tex is \begin{longtable}{@{}cX@{}} \toprule \textbf{Column 1} & \textbf{Column 2} \\[6pt] \midrule \endhead $R$ & 1This ...

5

Just for fun, a macro that also computes the coefficients (only integers allowed). \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \NewDocumentCommand{\horner}{smm} { \IfBooleanTF{#1} { \bool_set_false:N \l_silke_show_bool } { \bool_set_true:N \l_silke_show_bool } \silke_horner:nn { #2 } { #3 } } \bool_new:N \l_silke_show_bool ...

5

Perhaps you want an expandable macro, which one can use inside an \edef? Here is a way to do it using \xintiloop of xinttools. And expandability also means one writes primes to the log as simply as \typeout {\PrimeList {0}{10000}}. And it also facilitates building up tables, as is examplified in this update. The update has a slightly different way to ...

5

Presumably you are doing this because you want the rows of the table to depend on the counter in the loop. In this case you will need a way to add expanded objects to the list of tokens. Here I add an \eaddtabtoks macro in addition to egreg's corrections to the global assignments. \documentclass[10pt,a4paper]{article} \usepackage{tabularx,etoolbox} ...

4

An automatic solution for all tables. Here you need not change font inside all tables by yourself every time. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[margin=1in]{geometry} \usepackage{chngcntr} \counterwithin{table}{section} \usepackage{tabularx} \usepackage[T1]{fontenc}% T1 is a much better choice of encoding than ...

4

You can, in fact, use a \multicolumn and \addlinespace from the booktabs package: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{table}[htbp]\centering \caption{Dependent Variable: Enrollment} \begin{tabular}{c c c c} \toprule \textbf{Variable} & \textbf{Model 1} & \textbf{Model 2} & \textbf{Model 3}\\ \midrule frl ...

4

If you'd like to stick with a tabular, you can do so by using a paragraphy style column: \begin{tabular}{p{.5\textwidth}c} Here's a complete MWE. % arara: pdflatex \documentclass{beamer} \begin{document} \begin{frame} \begin{tabular}{p{.5\textwidth}c} \begin{theorem}theorem here \end{theorem} & picture here \end{tabular} ...

4

The use of \pm requires math-mode, so you should use $\pm 5$. Here is a full alternative view on your table using booktabs (for pizzaz...), caption (for caption formatting) and mhchem (for Chemistry formula setting): \documentclass{article} \usepackage{booktabs,caption,mhchem} \captionsetup{labelfont=bf, textfont=normalfont} \begin{document} ...

4

The problem is the line: \cols=\expandafter{\the\cols \arabic{i}} \cols is a token register, thus \arabic{i} does not get expanded. Using an additional \expandafter and printing the counter value instead of \arabic helps: \cols=\expandafter{\the\expandafter\cols\the\value{i}} Complete example: \documentclass{article} \newtoks\cols \newcounter{i} ...

4

If you must use a vertical rule in your table, I would suggest you also insert "struts" to get better vertical spacing above and below the horizontal lines drawn by \hline. In general, though, I find it preferable to construct tables without vertical rules and to use the booktabs package to get well-spaced horizontal lines drawn by \toprule, \midrule, etc. ...

4

The point of those markers is to be able to move easily from cell to cell, which you can do with Edit --> Bullet --> Next/previous bullet. The default keyboard shortcuts are Ctrl + Alt + Left arrow/Right arrow But if you don't need these markers: In the bottom left of the wizard window there is a checkbox for Insert bullet. Uncheck this, and Kile will not ...

3

Try \rotatebox from the graphicx package, as suggested in most of the related questions: \documentclass{article} \usepackage{multirow} \usepackage{bigdelim} \usepackage{graphicx} \begin{document} \begin{tabular}{l|l|l|r} \hline $a$ & $b$ & x&\\ \hline $cccccc$ & $dddddd$ & x& \multirow{3}{*}{} ...

3

Simplest way would be to just use two lines. To place the single line heading in the center of the row you can use \multirow from the multirow package: Code: \documentclass{article} \usepackage{multirow} \begin{document} \begin{table*}[htbp] \centering \caption{Add caption} \begin{tabular}{c|ccccc} \hline \multirow{2}{*}{\textbf{\#}} ...

3

The problem is that the table environment is a float, and float placement is handled in a very particular way by LaTeX. You can use the package float, which gives a float placement option, H, that essentially causes the float to no longer be treated as a float. (Shameless self promotion: see my answer to Is there any way to shift two \includegraphics ...

3

This document has 144 tables without problems. \documentclass{article} \usepackage{capt-of} \begin{document} \centering \section{foo} \captionof{table}{hmmm}\begin{tabular}{ll}a\\b\\c\\d\end{tabular} \captionof{table}{hmmm}\begin{tabular}{ll}a\\b\\c\\d\end{tabular} \captionof{table}{hmmm}\begin{tabular}{ll}a\\b\\c\\d\end{tabular} ...

3

What about a simple \colorbox? \documentclass[xcolor=table]{beamer} \newcommand\y[1]{% \colorbox{green!10}{$#1$}% } \begin{document} \[ \bordermatrix{ & X_1 & X_2 & X_3 \cr & 1 & \y{2} & 3 \cr & 1 & 2 & 3 \cr & 1 & 2 & 3 \cr & 1 & 2 & 3 \cr & 1 & ...

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