Tag Info

New answers tagged

3

In addition to the major issue you've indentified, there are two further (and minor) issues that should also be fixed. The major issue is, of course, the spurious blank line above the hyphenated word "Wave-length". It arises because (a) there's a space between \hspace{0pt} and the word "Wavelength" and (b) the column is just narrow enough to permit "Wave-" ...


0

The dotted lines are made with \dotfill. A table with tabularx could be: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabularx}{\textwidth}{ccX@{}l} test1 & test & test \dotfill & [A] \\ test2 & test & test \dotfill & [V] \\ \end{tabularx} \end{document} To change the spacing of the dots you can ...


1

\documentclass{article} \usepackage{tabularx} \makeatletter \newcommand*{\tocdotfill}{% \leaders\hbox{% $\m@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$% }\hfill\kern\z@ } \makeatother \begin{document} \noindent \begin{tabularx}{\linewidth}{lXr} A & Hello world \dotfill & 1\\ B & Foobar \tocdotfill & 2\\ \end{tabularx} ...


0

I think that "\ [6pt]" works only inside of \begin{align}-\end{align} and \begin{eqnarray}-\end{eqnarray}. There shouldn't use "$ $".


0

Instead of using a tabular environment, I would like to suggest you use a tabularx environment, and column types that automatically wrap the contents of "long" cells. \documentclass{article} \usepackage[letterpaper,margin=1in]{geometry} % set text block parameters \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[portuguese]{babel} ...


2

You could use the minipage environment coupled with the mdframed package. Of course, there's also the listings package for the code. This example answer is tweaked for margins of 1.5cm on each. If you increase the margin (reducing the available space for the content) you should also fix the \textwidths of the minipages. Since the minipage on the right is ...


2

You have to take into account the column separations and the width of the rules. With the following code, the width are as specified if measured from the middle of the rules. \documentclass{article} \usepackage{geometry} \geometry{paper=a4paper, landscape, textwidth=24cm, vmargin=20mm} \begin{document} \noindent \begin{tabular}{ ...


0

A variant using makecell to have vertically centred cells with line breaks, and cellspace to have less tight vertical spacing between rows: \documentclass{article} \usepackage{array,booktabs} \usepackage{tabularx} \usepackage{ragged2e} \usepackage{hhline} \newcolumntype{x}[1] {>{\raggedright}m{#1}} \newcolumntype{z}[1] {>{\centering}m{#1}} ...


2

\Centering tries to be kind and avoids redefining \\ so \\ is safe to use in the first column but not the second. this just tells \Centering not to worry about the tabular version of \\. Unrelated, but don't use [h!]. \documentclass{article} \usepackage{array,booktabs} \usepackage{tabularx} \usepackage{ragged2e} \usepackage{hhline} \newcolumntype{x}[1] ...


2

This is the best I can think of for such a hige table. First reduce the \tabcolsep to, say 3pt. Then use a landscape page and reduce the font size to \footnotesize (change as suitable). To add some gap between rows use cellspace package and use Sc instead of c column. But it is still big (Sigh) ...


1

For the sake of variety, here's a solution that uses one tabular and two array environments. The second array environment is set up to get the spacing around symbols of type mathbin and mathrel right. \documentclass{article} \usepackage{array,cancel} \begin{document} \[ \begin{tabular}{c} \\ text here text here \\ \\ \\ \end{tabular} ...


2

This is close. \documentclass{article} \usepackage{mathtools,cancel} \begin{document} Add m.t.m $\ \begin{cases} \begin{aligned} 21x - \cancel{6y} &= 24\\ 4x + \cancel{6y}& =26 \\[\jot] \hline 25x &=50\\ x &=2 \end{aligned} \end{cases} $ \end{document} With lot of arrays, you can do this: ...


1

you should read how multirow works \begin{table*} \centering \newcolumntype{C}{>{\centering\arraybackslash}X} \begin{tabularx}{\linewidth}{|l|C|C|C|C|C|C|} \hline \textbf{} & \multirow{2}{*}{\textbf{Value}} & \multirow{2}{*}{\textbf{Value}} & \textbf{Some Value} & \textbf{ome Value} & \multirow{2}{*}{\textbf{ome Value}} & ...


0

The code with makecell package, is very simple: it allows for line breaks in the \makecell and thead commands. Note thdefault alignment is vertically and horizontally aligned. \documentclass{article} \usepackage{tabularx} \usepackage{makecell} \renewcommand\cellalign{lc} \begin{document} \begin{table}[h] \begin{tabularx}{\linewidth}{ m{4cm} X} ...


0

I wouldn't use \newline the way you did to create the larger cell to center in. I'd use three separate rows with multirow: \documentclass{article} \usepackage{tabularx} \usepackage{multirow} \begin{document} \begin{table}[h] \begin{tabularx}{\textwidth}{ m{4cm} X } & Derivations \\ \multirow{3}{4cm}{$v=v_0+at$} ...


1

I think this has come up before, it's a "feature" of amsmath, but you can hide the environment in {} \documentclass{article} \usepackage{amsmath,tabularx} \begin{document} \begin{table}[htp]% never just [h] \begin{tabularx}{0.75\textwidth}{ m{4cm} X } & \textbf{Derivations} \\ $v=v_0+at$ & line 1\hrule \\ ...


0

One solution is to use \hfil to both sides of the equation \documentclass{article} \usepackage{tabularx} \begin{document} \begin{table}[h] \begin{tabularx}{\textwidth}{ m{4cm} X } & Derivations \\ \hfil$v=v_0+at$\hfil & test \newline test \newline test \\ \hfil$x=x_0+v_0t+┬Żat^2$\hfil & a\\ ...


2

I would remove one column from the table entirely, and I would restructure the header so as to make clear to the reader how the report's tests are organized. I would also use the dcolumn package to align the numeric entries on the respective decimal points. To make the tabular material span the width of the text block, consider using a tabular* environment. ...


2

For a table with numeric data, I recommend using siunitx. There's no need to artificially widen the table to cover all the textwidth (but you can use the tabular* form if you really need this). The only tricky setting is in the third column, where a format -2.2 seems better (a minus sign is wider than a digit). The syntax is easy: - means a minus sign is ...


6

Don't use tabularx for numeric tables, it is designed to set the target width for line breaking within a cell. If you just use tabular and r it all fits, you could improve with c for headings and other small improvements, but simply not using my code is the main improvement you need here, \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} ...



Top 50 recent answers are included