Tag Info

Hot answers tagged

10

The schemata package is designed to handle simple and complex schemas of just this kind. If you are not using mathematical content, one advantage of this approach is that it is primarily designed for typesetting textual schemas. (Though no doubt you could use it with mathematical content if you wished.) For example: \documentclass{article} ...


6

Is that what you want? I played with the (lr) argument for \cmidrule, and required a (negative, here) trim on the right, calculated from the column width, which is known thanks to the minipage. If not known, we would have to use the eqparbox package. \documentclass{article} \usepackage{booktabs} \begin{document} \begin{tabular}{@{}ll@{}} XXXXXXX & ...


5

The following might be a start for you: \documentclass{article} \usepackage{array} \begin{document} \begin{center} \begin{tabular}{ m{5em} @{} m{11em} } Main $\left\{\rule{0pt}{\dimexpr2\normalbaselineskip+.5\bigskipamount}\right.$ & \begin{tabular}{@{}l@{}} $\mbox{Option A }\left\{\begin{tabular}{@{~}l@{}} Option ...


5

An alternate process might be to use the amsmath cases environment. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} $\text{main} \begin{cases} \text{Case a} \begin{cases} \text{case 1} \\ \text{case 2} \end{cases} \\ \text{Case B} \begin{cases} \text{case 1} \\ \text{case 2} \end{cases} \end{cases}$ \end{document} which yields the ...


5

The array package documentation, on pages 2 and 3 has the explanations: Additional explanation To answer your specific question: \newcolumntype{Y}{>{\small\raggedright\arraybackslash}X} defines a new type of column called Y based on a X column (this column type is defined by the tabularx package and it is basically a p{ <width>} column, ...


4

\documentclass{article} \begin{document} \sffamily \begin{tabular}{|l|l|} \hline Sample header & Sample header \\ \hline\hline Key & Value \\ Key 2 & Value 2\\ \hline \end{tabular} \end{document} Since you didn't give any column specifications, I wrote a simple tabular.


4

The \footnotemark does increase the value of the footnote counter, but this will get out of sync when \footnotetext is used. One has to reset the footnote counter after the tabular environment to the state before. This can be done either manually, but might become tedious, if the values change or it's done with a dummy counter, which holds the footnote ...


4

If you want to consider using a table environment, the tablefootnote package solves your problem: \documentclass[colorlinks]{article}% \usepackage{footnotebackref} \usepackage{tablefootnote} \begin{document} \mbox{}\vfill A first footnote\footnote{First} \begin{table}[htbp] \renewcommand\arraystretch{1.5} \begin{tabular}{|r|l|} \hline First ...


4

A rule with an arbitrary length can be specified with \rule{length}{width}, however, this would be placed in the table cell. To spread over the cells, use \noalign{\noindent\rule{7.75cm}{2pt}} (change the dimensions at will) (Thanks to @touhami for the hint with \noindent) \noalign prevents the aligning in cells, all content is then basically set as if no ...


3

This code works. I took the opportunity to improve your table: I don't think you really need a tabularx environment, so I replaced the Y column with a plain l. I also made column head two lined when I thought it necessary, with the makecell package: \documentclass[fontsize=10pt, paper=letter, headings=small, bibliography=totoc, DIV=9, headsepline=true, ...


3

You have two options. You want your caption label in LTR (english). In this case simply use \caption{\rl{الگوریتم شماره دو}} MWE: \documentclass[a4paper,12pt]{report} \usepackage{xepersian} \settextfont[Scale=1.3]{B Nazanin} \begin{document} \begin{latin} \begin{table}[h!] \large \centering \begin{tabular}{|l|} \hline \textbf{Proximal ...


3

Just to show the application of \multicolumn. \documentclass{article} \begin{document} \begin{tabular}{|*{6}{c|}*{3}{l|}} \hline \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{5} & \multicolumn{1}{c}{6} & 7 & 8 & 9 \tabularnewline \hline Vector Indicator ...


3

Just shift the | to the first \multicolumn like & A & \multicolumn{2}{c|}{B} & \multicolumn{2}{c}{C} \\ BTW, siunitx has nothing to do with this alignment. Place | carefully while using \multicolumn.


3

Since you are using knitr, the simplest thing is to add \\ every tenth row using add.to.row parameter of print.xtable. This is a very rough code; in the general case you need also to check that MatrixData has more than 10 rows. \documentclass{article} \usepackage{longtable} \begin{document} \listoftables << label=LongTable, results='asis', echo ...


3

use \newcommand\tabitem{\makebox[1em][r]{\textbullet~}}


3

Presumably because ~ is stretchable and your columns are attempting to to keep a straight right edge. Probably better to use \documentclass{beamer} \usepackage{booktabs,array}% http://ctan.org/pkg/booktabs \newcommand{\tabitem}{~~\llap{\textbullet}~~} \begin{document} \begin{frame}{Symbolic Math Toolbox} \begin{itemize} \item Don't do nasty calculations ...


3

This answer is similar in spirit to the one by @daleif. The difference is that I use the macro \RaggedRight (from the ragged2e package) instead of the basic \raggedright directive; the difference is that \RaggedRight permits hyphenation. I also use a \newcolumntype instruction to set up a new column type called "P" that sets in contents automatically in ...


2

Would this example work for you? \begin{tabular}{|c|c|c|c|} \hline a&b&c&d\\\hline 1&2&3&4\\ 5&6&7&8\\\hline \end{tabular} vs. \begin{tabular}{|c|c|c|c|} \hline\multicolumn{1}{|c}{a}&\multicolumn{1}{c}{b}& \multicolumn{1}{c}{c}&\multicolumn{1}{c|}{d}\\\hline 1&2&3&4\\ ...


2

I do not know this package ctable, but you can centre tables by putting them in a \begin{center}\end{center} or inside a floating table environment together with \centering. For centring inside the columns you have to use the c qualifier. Or you use the nice S column of siunitx. % arara: pdflatex \documentclass{article} \usepackage{booktabs} ...


2

You can try something like this (all horizontal and vertical rules only for explanation and can be removed): \documentclass{article} \usepackage{array,tabularx} \begin{document} \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} \newcolumntype{N}{>{\centering\arraybackslash}X} \begin{tabularx}{\linewidth}{|R{5cm}|N|m{5cm}|} \hline Lorem ipsum ...


2

The threeparttablex is done for that: bringing the functionalities of threeparttable to longtable. It defines a ThreePartTable and a TableNotes environments. The latter must be declared at the beginning of the ThreePartTable environment, before longtable. It is inserted with an \insertTableNotes command, wherever you want.The tablenotes can be referred to. ...


2

Here's a solution that preserves the use of tabularx. It uses S[table-format[5.0] as the main column type for columns 2 and 3 of the tabularx environment. In addition, it uses \multicolumn{1}{C}{...} directives for the header cells -- where C is a centered version of the X column type that comes with the tabularx package -- in order to let LaTeX figure out ...


1

Only with reducing text size a little (\small) and reasonably shrinking space between columns (\renewcommand{\tabcolsep}{4pt}), both changes are relatively unnoticeable. \documentclass[12pt]{report} \usepackage{threeparttable,booktabs,multirow,lscape} \usepackage[letterpaper,margin=1in]{geometry} \begin{document} \renewcommand{\tabcolsep}{4pt} ...


1

\documentclass[a4paper,oneside,abstracton]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[english]{babel} \usepackage{threeparttable} \usepackage{longtable} \usepackage[a4paper,bottom=3.1cm]{geometry} \usepackage{booktabs} \begin{document} %\begin{table}[!htb] %\centering %\tiny \small % ...


1

You're almost there: You simply need to (i) declare the tabular environment to have four rather than just two columns and (ii) use \multicolumn}{4}{|c|}{...} for the first header, as it needs to span all four columns. \documentclass{article} \begin{document} \begin{tabular}{ |c|c|c|c| } \hline \multicolumn{4}{|c|}{Participation Factor Analysis} \\ \hline ...


1

You can always put a tabular inside a tabular: \documentclass{article} \begin{document} \begin {table}[h] \begin{center} \begin{tabular}{|l|l|l|l|} \hline $i$ & Degree $\phi_i$ & $\cos(\phi_i)$ &\begin{tabular}{@{}l} Product of $\cos(\phi_i)$\\$ K=\prod K_i=\prod\cos(\phi_i)$ \end{tabular} \\ \end{tabular} ...


1

I suggest using the makecell package. It allows for a common formatting in column heads and line breaks in cells. Also your table will look better without vertical lines. The booktabs package defines horizontal rules with variable thickness and some vertical padding around these rules. I replaced the center environment (which adds vertical spacing around the ...


1

This is a 'dirty' trick: Write \newlabel explicitly to the .aux file with a prefix for a new label, say stored:: and use \nameref* from hyperref to get the label content. The {}{} and {} arguments can be empty here, as they are not important for this approach. However, expansion will be an issue. If the caption content itself holds commands that are ...


1

The \xyR macro requires an argument, the desired spacing between rows. Here's how you should use it, with also a simpler approach: if you follow \xymatrix with @R=<dimen>, the given length will be used as the space between rows; you can also use \xymatrix@R+<dimen> \xymatrix@R-<dimen> that respectively add or subtract the given length ...


1

This is a bug introduced into forest v1.09. It is fixed in v1.0.10, which is available on ctan. The bug is due to a leftover debugging statement, which issues a \typeout command, whose argument contains (after expansion) a \\ in the above non-working example. Now, this is normally not a problem: having \typeout{\\} in the main body of a document is just ...



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