# Tag Info

0

what should i do when I have footnotes? this approach puts the figure below the footnotes. for example in ieee.cls, the author affiliations are put in the footnote of the 1st page. So how to put the figure above it?

0

I can't get this to work for man but it works for doc. The tables and figures are still displayed after the reference list even if i add "flotsintext". Anyone have any idea why this might be? Do i need to define a "float" environment in addition to the "table" and "figure" environments?

0

I have often wondered whether it is possible to achieve such a layout with LaTeX, and somehow, I always thought the answer was "no, this is not possible". However, I recently learned that it is possible, and surprisingly convenient, with the pullquote package by Stephan Lehmke, advertised (for example) here. The solution for your desired layout would then ...

2

Another way is to specify manually the skip you want after each row substituting \\ with \\[skip]. In this way you can even differentiate the skip for each row. For example, in the following MWE, I've given 5ex after each white row and 7ex after each grey row: \documentclass[a4paper]{exam} \usepackage{multicol, setspace} \usepackage{textcomp, ...

5

You can use \renewcommand{\arraystretch}{2}. Change 2 as you want for example 3. \documentclass[a4paper]{exam} \usepackage{multicol, setspace} \usepackage{textcomp, booktabs,colortbl} \usepackage[table]{xcolor} \setlength\columnsep{10pt} \onehalfspacing \begin{document} \begin{center} \fbox{\fbox{\parbox{5.5in}{\centering ...

4

You should use tabular and \multicolumn{17}{l}{...} for the entries spanning columns: \documentclass[12pt]{report} \usepackage{booktabs} \usepackage{caption} \begin{document} \begin{table}[htbp] \centering \caption{Yearly membership growth for different time periods} \label{tab:addlabel} \scriptsize \addtolength{\tabcolsep}{-1.8pt} ...

4

the later columns are all left aligned, but the first column is very wide due to \textbf{a. Time period 1886 - 1892:} which forces the width of the column. perhaps you intended to use \multicolumn so that spanned all the columns rather than forcing the first column to be wide? tabulary (and tabularx) are unsuited to this kind of table, they work by ...

3

Here's a solution that uses (a) the S column type of the siunitx to align the numerical entries on the decimal markers, (b) the \si macro (also of the siunitx package) to format the units, and (c) the tabularx package (and a modified form of that package's X column type for 6 of the 8 subheaders) to force the table to occupy the full width (and no more!) of ...

6

\documentclass{standalone} \begin{document} \begin{tabular}{cc} \refstepcounter{enumi}\theenumi&\roman{enumi}\\ \refstepcounter{enumi}\theenumi&\roman{enumi}\\ \refstepcounter{enumi}\theenumi&\roman{enumi}\\ \refstepcounter{enumi}\theenumi&\roman{enumi}\\ \refstepcounter{enumi}\theenumi&\roman{enumi}\\ ...

5

still a fraction over-full but... \documentclass[fleqn,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{dcolumn,booktabs} \begin{document} \begin{table}\centering \begin{tabular}{ *{2}{D..{2.0} D..{4.1} D..{4.1} D..{1.2}}} \toprule & \multicolumn{3}{c}{Yellow conidia}& \multicolumn{3}{c}{Black conidia} \\ \midrule ...

0

You can play with the width of the \floatbox (optional argument of \ttabbox) and the value of the float separator. This will require manual adjustment. You also should be aware of a risk of overlapping captions for contiguous tables. Here is a way to go. For the captions you give, I had to change the document horizontal margins: ...

0

You might want something like this, which labels each subtable and then adds a labelled explanation in the main table caption. Clearly, the captions have to be outside the tables if they are going to be wider than those tables. Moreover, they will then need labels to indicate which caption goes with which table. Hence, the table-subtable / caption-subcaption ...

5

You can use \hangindent=1em\hangafter=1 and put this and \ttfamily (which I found more suitable for this case over \bfseries) in the column specifiers themselves using array package. \documentclass{book} \usepackage{booktabs,array} \begin{document} \begin{table} \caption{A summary of the default Rails directory structure. ...

3

You can try the cellspace package, that defines minimal vertical spacing above and below cells in columns with specifier prefixed with the letter S. If one uses the siunitx package which also uses the letter S, the prefix is replaced with the letter C: %%%%%%%%%% \documentclass{article} \usepackage{graphicx} \usepackage[sc]{mathpazo} ...

4

Your approach here (in terms of horizontal rules) matches that of what is suggested by booktabs. Here's what I would use: \documentclass{article} \usepackage[sc]{mathpazo} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage[labelfont=sf,hypcap=false,format=hang,width=\columnwidth]{caption} ...

7

Here's a possible solution. Note also the usage of siunitx for the numeric tables. \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{subcaption} \usepackage{booktabs} % nice rules \usepackage{adjustbox} % adjusting table (too wide) \usepackage{rotating} % sidewaytables \usepackage{siunitx} \begin{document} \begin{table}[p] \centering ...

5

This uses \rotatebox to rotate the minipages and using stacking to place the subcaptions under the tables. \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{booktabs} % nice rules \usepackage{adjustbox} % adjusting table (too wide) \usepackage{rotating} % sidewaytables \usepackage{array} \usepackage{stackengine} \begin{document} ...

5

Here is an attempt using swiss army knife aka tikz \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{capt-of} \usepackage{booktabs} % nice rules \usepackage{tikzpagenodes} % adjusting table (too wide) \usepackage{array} \usetikzlibrary{positioning} \begin{document} \begin{table}[htb] \begin{tikzpicture}[remember picture] ...

5

Please always post complete documents showing all packages used. Your code had several commands not defined by the packages I guessed so I deleted them here. The main problem was that you over-rode the L specifier with c which does not allow line breaking so forced all the entries to be too wide. \documentclass[a4paper]{article} \usepackage{tabulary} ...

2

Here's an expansion upon prettygully's answer that lets you have line breaks and defines a new command for it: \newcommand\multibrace[3]{\rdelim\}{#1}{3mm}[\pbox{#2}{#3}]} \begin{table}[h!] \centering \begin{tabularx}{0.75\textwidth}{>{$}l<{$} l l} \text{Complexity} & Growth rate \\ \cline{1-2} O(1) & None\\ O(log ...

4

If you want to have all columns with the same width and use the maximum width of your text, you should go with tabularx here: % arara: pdflatex \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[english]{babel} \usepackage{caption} \usepackage{booktabs, tabularx, threeparttable} ...

4

The problem is that you are declaring theorem twice, first \newtheorem{theorem}[thm]{Theorem} and then \newtheorem{theorem}[table]{Theorem} I wouldn't also mix declarations made with \declaretheorem and with \newtheorem. In your case, I think that the following should do what you want: \newtheorem{theorem}[table]{Theorem} ...

1

Because the real problem will be in documents with \chapter, there are some modifications of you code. Relevant one is marked PS. \documentclass{report} %\usepackage{amsmath,amsthm,thmtools,float,cleveref} \usepackage{amsmath,amsthm,float,cleveref} %\declaretheorem[name=Theorem,numberwithin=section]{thm} %\newtheorem{theorem}[thm]{Theorem} ...

2

Here is a solution. I removed all vertical lines, and used the booktabs, makecell and ltablex packages (the latter combines the functionalities of longtable and tabularx, and introduced some itemize inside cells environments and a few other modifications to the table layout: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{geometry} ...

3

A slightly modified version of Harish Kumar's answer. Code: \documentclass[a4paper,11pt,oneside]{article} \usepackage[protrusion=true,expansion=true]{microtype} \usepackage[left=3.0cm,right=3.0cm,top=3.0cm,bottom=3.0cm]{geometry} \usepackage{array} \usepackage{booktabs,threeparttable,multirow,graphicx} \newcommand\mc[1]{\multicolumn{1}{@{}c@{}}{#1}} % ...

1

Here's a solution that re-organizes the material in the second header row to make it conform to the form of the first column. It also uses the S column type (of the siunitx package) to align the numeric data points in columns 2 thru 6 on the decimal marker. (I've changed some of the numbers, so that they have either two or three digits after the decimal ...

6

I don't know your purpose exactly, but this is a very bad table design. \documentclass[a4paper,11pt,oneside]{article} \usepackage[protrusion=true,expansion=true]{microtype} \usepackage[left=3.0cm,right=3.0cm,top=3.0cm,bottom=3.0cm]{geometry} \usepackage{array} \usepackage{booktabs,threeparttable,multirow,graphicx} ...

1

Don't reinvent the wheel: the makecell package: its \thead and \makecell commands allows for linebreaks in cells and a common formatting. It also defines \rothead and \rotcell commands if you load the rotating package. Demo: \documentclass{report} \usepackage{booktabs} \usepackage{array} \usepackage{rotating} \usepackage{makecell} ...

1

In addition to David Carlisle's solution, I would rather suppress all vertical lines, and use the booktabs and cellspace package. This package ensures minimal vertical spacings at the top and bottom of cells in columns with a specifier prefixed with S. I also used a table environment, and a\caption` command, so that you can have cross references to this ...

4

\documentclass[]{article} \usepackage{graphicx} \usepackage{color} \begin{document} \begin {table}\centering \begin {tabular}{| l | l | l | l | l | l |} \cline{2-6} \multicolumn{1}{c|}{}&\multicolumn{5}{c| }{$\eta_{\infty}$} \\ \cline{2-6} \multicolumn{1}{c|}{}& i=1,f=6 & i=1,f=3 & i=3,f=5& i=4,f=2& i=6,f=3 \\ \hline $k,l=0,0$ ...

5

Juts for comparison. How to do this table in plain TeX. But it works in LaTeX (without any loaded package) too. \def\toprule{\noalign{\medskip\hrule height .8pt\medskip}} \def\midrule{\noalign{\medskip\hrule\medskip}} \let\bottomrule=\toprule \def\specialcell#1{\vcenter{\halign{\hfil##\hfil\strut\cr#1\cr}}} \def\x{\phantom{\%}}\def\h{\hfill\null} ...

10

Since the whole outer cell, which contains \specialcell should be bold, \bfseries can be specified in the outer cell, right before \specialcell: ... & \bfseries\specialcell{...} & ... This can also be put into a macro \specialcellbold, see the following example: \documentclass{report} \usepackage{booktabs} \usepackage{array} ...

6

What you gave doesn't qualify as a MWE. You have to use p type columns as for the given table D column is useless. \documentclass[a4paper,11pt,oneside]{article} \usepackage[protrusion=true,expansion=true]{microtype} \usepackage[left=3.0cm,right=3.0cm,top=3.0cm,bottom=3.0cm]{geometry} \usepackage{array} \usepackage{booktabs,threeparttable} ...

0

This should work: \documentclass[12pt,letterpaper]{article} \usepackage[margin=1in ]{geometry} \usepackage{fancyhdr} \usepackage[flushleft]{threeparttable} \setlength{\headheight}{15.2pt} \pagestyle{fancy} \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi} \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi} \begin{document} Text ...

3

It looks like surrounding the English text in the xepersian package's latin environment is the solution. Disclaimer: I don't know this language, but I copied the text below from the first page of the xepersian documentation. I used the Nazli font because it is freely available through my Debian distribution. \documentclass{article} \usepackage{xepersian} ...

3

Use \iffloatpage from fancyhdr: \documentclass[12pt,letterpaper]{article} \usepackage[margin=1in,headheight=15.2pt]{geometry} \usepackage{fancyhdr} \usepackage[flushleft]{threeparttable} \pagestyle{fancy} \fancyfoot[C]{\iffloatpage{}{\thepage}} \usepackage{lipsum} \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi} \def\sym#1{\ifmmode^{#1}\else$$^{#1}$$\fi} ...

3

latex doesn't really support this. This makes float pages have an empty foot, so it does just affect the page the table lands on, not the page before or after. It will affect all other float pages unless you set it back ie restore the original definition without the marked line. \documentclass[12pt,letterpaper]{article} \usepackage[margin=1in ]{geometry} ...

1

This is not the most elegant solution but I added \pagenumbering{gobble} which removes the page number and then reset it with \pagenumbering{arabic}(depending on your preferred style) and \setcounter{page}{2}. There is probably some automatic way to reset the counter without referring to the specific page. EDIT: So the page clearing/breaking I did between ...

1

The following seems to achieve what was intended. \documentclass{beamer} \begin{document} \begin{frame} \begin{overprint} \onslide*<1>{ \begin{table}[h] \begin{tabular}{cc} %column specs f & f%first table \end{tabular} \caption{1} %some caption \end{table} } % \onslide*<2>{ \begin{table}[h] \begin{tabular}{cc} %column ...

2

p columns allow line breaking so the macro is not needed at all, just use \begin{longtable}{p{4cm}p{1.5cm}p{1.2cm}p{1.2cm}p{1.2cm}p{\dimexpr\columnwidth-9.1cm-12\tabcolsep\relax}} \toprule Title 1 & Title 2 & Title 3 & Title 4 & Title 5 & Title 6 \\ \midrule a & b & c & d & e & This is a ...

5

longtable does \vspace{\LTPre} before a table and \vspace{\LTpost} after a table, both of which are by default \bigskipammount. Most latex display environments use \addvspace to add their vertical offsets, so that adjacent spaces combine (\addvspace just adds the maximum of any space currently on the vertical list and the space requested) but longtable ...

2

This works, but as I mentioned in comment, your geometry settings are not optimal: \documentclass[10pt]{article} \usepackage{geometry,array} \usepackage{calc} \geometry{verbose,tmargin=40pt,bmargin=40pt,lmargin=30pt, rmargin=30pt} \usepackage{showframe} % shows you the cut-off side margin \begin{document} \noindent % If the table stands alone, as ...

0

Here is a way. I use the makecell and rotating packagesz, plus hhline (the ordinary horizontal last line and vertical first line do not join well) and caption (for a correct vertical spacing between caption and table): \documentclass{article}% \usepackage{graphicx} \usepackage[ margin = 2.5cm]{geometry} \usepackage{tabularx, booktabs, array, rotating, ...

2

Here is a solution using the ltablex package (adds the functionalities of longtable to tabularx. The use of tabularx allows for slighly wider columns; I also loaded ragged2e (to have some hyphenation in a raggedright context), sinuitx fr a correct typesetting of units and numbers, with its \si, \SI and \num commands and the possibility to use abbreviations ...

1

The plain TeX solution follows. You can compare this with LaTeX solutions. {\parindent=0pt \everymath={\rm} \emergencystretch=2em \raggedright \def\midrule{\noalign{\smallskip\hrule\medskip}} \def\e{\unskip\vrule depth7pt width0pt} \def\dd{\vskip-2pt\relax} \halign{\quad\vtop{\hsize=3.2cm #\e}\quad&&\vtop{\hsize=1.8cm #\e}\quad\cr % \midrule ...

3

This is the best tool so far. You do not need to download anything. Totally online. http://www.tablesgenerator.com/#

1

Have you looked at CTAN? There is a package called bridge. Of course! In fact it is a .tex file from 1991 which still uses \documentstyle (LaTeX 2.09). I've downloaded in my computer, changed \documentstyle to \documentclass, compiled with pdflatex and got It looks like what you want. The figure is done with command \begin{quote} \crdima{N/None}{% ...

1

For each of the cells within the row you want to re-adjust, use \multicolumn{1}{p{<len>}}{\raggedright <stuff>} This will adjust the vertical alignment to the top and the horizontal alignment to \raggedright. A fixed-width p-column sets an anchor point at the top by default. ... \multicolumn{1}{p{3.2cm}}{Formation} & ...

3

Centering needs to be applied within the float, not around it. There was a spurious third column in the tabular and I scaled the two tikzpicture a bit so they fitted. \RequirePackage[l2tabu, orthodox]{nag} \documentclass[12pt]{article} \usepackage{amsmath, amsthm, amsfonts, amssymb, mathtools} ...

2

On line 62 you can replace \begin{tabular}[t]{ p{7em} p{7em} p{7em}} with \begin{tabular}[t]{ m{7em} m{7em} m{7em}}. And to draw a rectangle in tikz you can just do \draw (0,0) rectangle (1,1); ;) \documentclass[varwidth,border=50]{standalone} \usepackage{mathptmx} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} ...

Top 50 recent answers are included