# Tag Info

5

I'm more going towards what you're after than what you currently have... Specifying a fixed distance between columns is best done using the @{..} specification. So, for example, one could use l@{\hspace{1cm}}c to denote a 1cm gap between a left and centred column. \documentclass{article} \usepackage{booktabs}% http://ctan.org/pkg/booktabs ...

5

Another way to do this is to use the collcell package and define a new columntype for your Java code. As Jubobs points out in the comments, if a cell contains non-code the formatting will be incorrect. You will need to override its specification using \multicolumn. If you have a mix of code and non-code in the same column then a solution like his is ...

5

Either use (if needed at all) \multicolumn{1}{c}{A} etc. for the centered header cells or \multicolumn{1}{|c|}{0} etc. for the data cells, if \begin{tabular}{lcc} is used, i.e. without the vertical lines, but this would involve many cell entries to be changed. Restricting horizontal lines to particular columns can be done with \cline{2-3} for example ...

5

Use \begin{minipage}{0.49\textwidth} ... \end{[minipage}\hfill \begin{minipage}{0.49\textwidth} ... \end{[minipage} It must be less or equal to the current line width. But you had both with \textwidth

5

You have \textwidth wide minipages; however, in cases like these, it's better to use threeparttable, so the caption will be properly centered over the table. \documentclass{article} \usepackage{fullpage} \usepackage{threeparttable} \begin{document} \begin{table}[htbp]\centering \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi} \begin{minipage}{.45\textwidth} ...

4

Use t (top alignment) for the optional argument of tabularx: \documentclass[12pt]{report} \usepackage{amsmath, amssymb, amsthm} \usepackage{tikz} \usetikzlibrary{shadows} \newcommand*\squared[1]{\tikz[baseline=(char.base)]{\node[shape=rectangle, draw, inner color = white, drop shadow = {opaque, black}, inner sep=3pt, text justified] (char) {#1};}} ...

4

You can do this easily enough with tikz/PGF. What I have drawn is a little squarer than your diagram but you can scale it if you wish (using, for example, \begin{tikzpicture}[xscale=1.2]). Here's the latex code (the only slighty tricky bit is the triangle): \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} ...

4

For example: \documentclass{article} \usepackage{pdflscape, array, rotating, multirow} \begin{document} \begin{landscape} \begin{table} \begin{tabular}{|c|c|c|} \hline & First First & First Second\\ \cline{2-3} & First First & First Second\\ \cline{2-3} & First First & First Second\\ \cline{2-3} ...

3

Something like this. You need a \\ at the end of each line and then \hline. Use newcolumntype to define a new column C with equal width. Increase arraystretch to have a nice vertical padding. Code \documentclass{article} \usepackage{array} \renewcommand*{\arraystretch}{1.5} \newcolumntype{C}{>{\centering\arraybackslash}p{3em}} \begin{document} ...

3

The table is vertically too big for being rotated; a font size reduction is necessary anyway. I get a decent result with \documentclass[12pt]{report} \usepackage{graphicx,xcolor} \usepackage{caption} \usepackage[centertags]{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage[version = 3]{mhchem} \usepackage{rotating} ...

3

It's rather simple: \documentclass{article} \begin{document} \begin{tabular}{l|c|c|} \multicolumn{1}{c}{} & \multicolumn{1}{c}{A }& \multicolumn{1}{c}{B} \\ \cline{2-3} a & 0 & 1 \\ \cline{2-3} b & 10 & 11\\ \cline{2-3} c & 20 & 21\\ \cline{2-3} d & 30 & 31\\ \cline{2-3} \end{tabular} \end{document}

2

Something like this. Here the l column specifier is redefined to be L that has p(0.5\textwidth) for a paragraph style that is raggedright/left alignment. By the same idea, one can change the r column specifier to R that has raggedleft/right alignment for a paragraph style. Code \documentclass[letterpaper,11pt]{article} \usepackage[margin=10pt,paper ...

2

In the definition of \ressubheading, you may want to replace the tabular* environment and the l and r column types with a tabularx environment and raggedright and raggedleft variants of the X column type. Note that X-type columns are all equally wide by default; if you want to change that, say to make the left-hand column a bit wider than the right-hand ...

2

Here's a solution that adds the string "Existing solutions" via \multirow and \rotatebox instructions. The instruction \multirow is provided by the multirow package, while \rotatebox is provided by the graphicx package. (This package is loaded automatically by the rotating package, hence no need to load graphicx separately.) \documentclass{article} ...

2

The \multirow value gets overprinted by the row background color. Therefore \multirow should go in the last line and puts the text above (negative row number in the argument of \multirow): \documentclass[xcolor=table]{beamer} \usepackage{adjustbox} \usepackage{array} \usepackage{multirow} \begin{document} \begin{frame}{Financial Ind} \centering ...

2

The makecell package can be handy here, as it allows to have a common formatting for all coumn headers declared in preamble. It also defines a command for hlines of varying thickness. Consider also using the booktabs package: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[x11names]{xcolor} \usepackage{array, booktabs} ...

2

Something like this! Here only tikz package is used to assure that the return button is located at the same place on the explanation page. Every beamer page that has links should have a label (main, here, there in this example), then use the following command at proper locations. \hyperlink{destination label}{\beamerreturnbutton{Go or Back or any text}}; ...

2

Your example works without tablefootnotes, just use footnotes inside the sidewaystable. But I found no way to put the footnotes in one line, neither with bigfoot, manyfoot or eledmac. Except that one of the wizards here provides a solution, there is a quick and dirty solution: \documentclass[11pt]{article} \usepackage{rotating} % to rotate e.g. table ...

2

I'm not sure why (tabu is somewhat surprising, usually), but specifying the inner tabular environments with @{}c@{} instead of c seems to cure the problem. \documentclass {article} \usepackage [T2A] {fontenc} \usepackage [utf8] {inputenc} \usepackage [english,russian] {babel} \usepackage{longtable} \usepackage{array} \usepackage{tabu} \usepackage{lipsum} ...

1

Are you looking for something like this: \documentclass[authoryear,preprint,review,12pt]{elsarticle} \usepackage{graphicx} \usepackage{amssymb} \usepackage{amsthm} \usepackage{mathtools, array, textcomp} \begin{document} \begin{tabular}{*{4}{|p{2cm}}|p{2cm}|} \hline • & \multicolumn{4}{c|}{location} \\ \hline • & 1 & 2 & 3 & 4 \\ ...

1

Something like this. You defined a newcolumntype C but used a small c in the column specifiers is the main error. Also, you might want to consider extend the arraystretch a bit via \renewcommand*{\arraystretch}{1.5} % 1.5 can be adjusted to sue one's need. Code \documentclass{article} \usepackage{array,graphicx,multirow} \begin{document} ...

1

This happens when the spanning \multicolumn is wider than the collective widths of the spanned columns. In those cases, the last column stretches to fill the wider \multicolumn. The way around this is to stretch the columns to make room (you've already defined a C-column for this): \documentclass{article} \usepackage{array,multirow,booktabs} ...

1

Typesetting good tables requires some hand work. For numeric tables I'd recommend siunitx, which provides amazing features with its S columns. For the particular problem, increasing the \tabcolsep seems to give good results. \documentclass{article} \usepackage{siunitx,booktabs} \begin{document} \begin{table} \addtolength{\tabcolsep}{6pt} \begin{tabular}{ ...

1

Something like this may be a start though it needs tidying: \documentclass{beamer} \usepackage{multirow} \begin{document} \begin{frame} \begin{tabular}{|*{4}{c|}} \hline & & & \\\hline \multirow{3}*{\includegraphics[width=.2\textwidth]{example-image-golden-upright}} & \includegraphics[width=.2\textwidth]{example-image-a} ...

1

Something like this. matrix of nodes is used where a table style is defined then each node can have its own pattern given with coloring capability. A special pattern called mixed is defined as a macro taking two cell-position arguments Code \documentclass[border=10pt]{standalone}%{article} \usepackage{tikz,siunitx} ...

1

How about: \usepackage{multirow} \begin{document} \begin{table}[h] \begin{tabular}{|l|l|l|l|l|} \hline X & xx & x & x & x \\ \hline \multirow{4}{*}{A} & x & x & x & x \\ \cline{2-5} & x & x & x & x \\ \cline{2-5} & x & x & x & x \\ ...

1

Suggestions: use inline code instead of lstlisting environments, and, for convenience, use a one-character shorthand. \documentclass{article} \usepackage{listings} \lstMakeShortInline[language=Java,basicstyle=\ttfamily] \begin{document} \begin{tabular}{l|p{7cm}} private` & Only entities declared inside the class are allowed to refer to ...

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