I am using tufte-latex book format for writing my thesis. I have a full width table which I can easily define within table* environment in tufte book. As far as I understood, the caption should also be full width. However, I still get it on the right margin. Any idea how to solve this issue? I also want the caption to be placed on the top of the table. Here is my MWE:  \documentclass[nols,a4paper,justified,marginals=auto]{tufte-book} \usepackage{makecell} \usepackage{booktabs} \usepackage{multirow} \renewcommand{\arraystretch}{1.2} \usepackage[flushleft]{threeparttable} \begin{document}   \begin{table*}[h!]   \centering   \begin{threeparttable}     \caption{here I have a long caption that I want it to be in the fullwidth format as the table but I get it in margin.\label{table3}}%     \begin{tabular}{llllllllllllllllllll}%       A&amp;B&amp;C&amp;D&amp;E&amp;F&amp;G&amp;H&amp;I&amp;J&amp;K&amp;L&amp;M&amp;N&amp;O&amp;P\\%      0.50&amp;$0.47^{a}$&amp;0.48&amp;0.50&amp;0.47&amp;0.48&amp;0.60&amp;0.39&amp;1.00&amp;\0.48&amp;0.50&amp;0.47&amp;0.48&amp;0.60&amp;0.39&amp;1.00\%     \end{tabular}%     \begin{tablenotes}        %\footnotesize        \item $^{a}$ some extra information about this number.     \end{tablenotes}   \end{threeparttable} \end{table*} \end{document}    Thanks in advance.
86139
I've tried to change the caption in a full-width float with tufte-book, but to no avail. I want the caption in this figure to be like more common LaTeX classes.  Here is a MWE and the result:  \documentclass[a4paper,nohyper]{tufte-book} %abstracton \usepackage{fontspec} \defaultfontfeatures{Ligatures={TeX}} \setmainfont[Numbers={OldStyle}]{Minion Pro} %or any other font \setsansfont{Myriad Pro} % or any other font \setmonofont[Scale=MatchLowercase]{Menlo} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{sidecap} \usepackage[dvipsnames]{xcolor} \usepackage{polyglossia} \setmainlanguage{brazil} \usepackage[bookmarks]{hyperref} %\usepackage[font=sf, labelfont={sf}, margin=1cm]{caption} \newfontfamily{\A}{Al Bayan}  \begin{document}  \begin{figure*} \centering \includegraphics[width=.9\textwidth]{./camp-scene} \caption{Cena de Acampamento. Mir Sayyid Ali, séc. XVII. 28,4 x 20 cm. Harvard University Art Museums, 1958.75. Os tecidos preenchiam a vida tanto dos nômades quanto dos habitantes das cidades, cobrindo o chão e definindo o espaço. O papel onipresente dos tecidos é visto numa pintura de um acampamento nômade, atribuído ao pintor persa do século XVI Mir Sayyid Ali.} \label{fig:camp-scene} \end{figure*}  \end{document}
24176
I tested a MWE given in question . Following the documentation (page 9) I used the class option border={left right bottom top} with left=right=top=0pt and bottom=20pt (20pt only to show the effect here).  With the version 2012/09/15 v1.1b of standalone and the following MWE I get no 20 pt margin at the bottom of my picture.  What is the problem?  MWE:  \documentclass[% % border=1pt   border={0pt 0pt 20pt 0pt} %left right bottom top ]{standalone}% http://ctan.org/pkg/standalone \begin{document} $2^5 = x_5 \times y^8$ \end{document}
45769
I want to have a longtable like this:  \begin{center} \begin{longtable}{|p{2cm}|p{3cm}|p{7cm}|p{3cm}|} \caption{my caption} \hline 1 &amp; 2 &amp; 3 &amp; 4\\  \hline  \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline 1 &amp; 2 &amp; 3 &amp; 4\\ \hline . . . 1 &amp; 2 &amp; 3 &amp; 4\\ \hline  \label{variability_impl_mech} \end{longtable} \end{center}   but when I try to compile this, I get this error: !Misplaced \noalign  when I write the caption after the last \hline, it works fine. I want to have the caption on top of my table but this error appears.
40919
I use the following table:  \documentclass[a4paper,              12pt,                                        bibliography=totoc,              index=totoc,             abstracton,              headsepline,             ]{scrreprt}  \usepackage{booktabs}    \begin{document}   \begin{table}[H]\hspace*{-1cm} \centering \begin{tabular}{lcclll} \toprule  Company&amp; \multicolumn{2}{c}{exceedances (empirical)}&amp;exeedances (expected)&amp;no. of obs.\\ \cmidrule(r){2-3}\\ &amp;standard normal&amp;standardized Student's-t&amp;&amp;\\ \midrule Company1&amp;1&amp;5&amp;9&amp;13\\ Company2&amp;2&amp;6&amp;10&amp;14\\ Company3&amp;3&amp;11&amp;15\\ Company4&amp;4&amp;8&amp;12&amp;16\\ \bottomrule \multicolumn{4}{l}{\begin{footnotesize}an additional hint about a detail\end{footnotesize}} \end{tabular} \caption{Here is the caption.} \label{labelhere} \end{table}   \end{document}     Which gives    I have two problems:   The space after the \cmidrule(r){2-3} is too big, how can I change this? The table looks not that good, how can I improve it in general?
7598
I'm posting today because I would like to reduce white space in a document I'm writing. The content is two-columns but I have floating tables that span across both columns (table*).   At some point, the text ends in the beginning of the first column of a new page. I would like to include my table on this page since it has a lot of free space below the text, but when I insert the table* right after the text, it goes to the top of the next page instead:    Do you know a way of obtaining the desired behavior?  Minimal working example :  \documentclass{article} \usepackage{lipsum}  \begin{document} \twocolumn  \paragraph{} \lipsum[1]  \begin{table*} \centering \begin{tabular}{|c|c|c|c|} \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline Column 1 &amp; Column 2 &amp; Column 3 &amp; Column 4 \\ \hline \end{tabular} \end{table*}%   \end{document}
58815
I want to do something similar to what is done in  paper:    In particular I'm interested in:   Same amount of images per row Using a vertical label to categorize each row Adding a caption Wrapping the image (so there can be text on one side)   I've read some questions ( and ) but they are very different from what I want, can you help me?  I've tried this, but I'm getting errors:  \usepackage{subcaption} % for subfigures  \begin{table}[ht] \begin{tabular}{ccc} \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/all_souls_000021.jpg}&amp; \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/all_souls_000091.jpg}&amp; \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/oxford_000177.jpg}\\ \end{tabular} \caption{A table with figures} \label{tab:mytable} \end{table}   Error:  ! Missing } inserted.&lt;inserted text&gt;} ...olumnwidth]{Figures/all_souls_000021.jpg}&amp;
92103
I am unable to get table captions to show up when using the  from 2008 (the latest version includes printer marks that I do not want).  The documentation says "Figure and table captions should be entered at the end of the document..." but as captions are shown for figures, I'd like them to be shown for tables too.  I was hoping their recommendation wasn't implemented as a limit for authors but it seems it is, or am I missing something? If not, is there a workaround I can employ?  \documentclass{pnastwo}  \usepackage{graphicx} \usepackage{pnastwoF} \usepackage{amssymb,amsfonts,amsmath}  \begin{document}  \begin{article}  \begin{table}[h]     \begin{tabular}{cc}         1 & 2 \\         3 & 4     \end{tabular}     \caption{A caption that does not appear.} \end{table}  \begin{figure}     \caption{A caption that does appear.} \end{figure}  \end{article}  \end{document}
83635
I'm writing a short tabular CV that I have to add to my thesis. I thought a quick way would be to use a table for that purpose:  \begin{tabular}{ll} 2009-present           &amp; very long text 1, very long text 2, very long text 3 , very long text 4, very long text 5, very long text 6, very long text 7, very long text 8, very long text 9, very long text 10\\ 2009  &amp; Masters\\ 2006  &amp; Bachelors\\ \end{tabular}   Unfortunately, LaTeX does not break the lines at the spaces. The only solutions I found so far, are   "adding additional rows to the table" "use fixed table size + \newline".   Manually adjusting texts is not very efficient.  Is there also a way to automate this (e.g. by define a cell/column as "text-cell/column")?  \begin{tabular}{lp{12cm}} 2009-present           &amp; very long text 1, very long text 2, very long text 3 , very long text 4, very long text 5, very long text 6, very long text 7, very long text 8, very long text 9, very long text 10\\ 2009  &amp; Masters\\ 2006  &amp; Bachelors\\ \end{tabular}   Could be a solution, but the right column does not automatically reach the right "border" of the page.
73194
I'm trying to prepare html for conversion to an epub and have encountered a couple of problems that I would appreciate help with. Hope mixing a couple of related questions in a single post is OK.  The easiest is the quotation environment doesn't indent both margins (and not enough on the left). I've written a .cfg file and think I have that one solved. Here's what I'm using:  \Preamble{html} \begin{document} \Css { .quotation { margin-bottom:0.25em; margin-top:0.25em; margin-left:4em; margin-right:4em } } \EndPreamble   The next is figures and tables. tex4ht inserts an hr tag before and after the table. This is not part of the css, it's a separate tag generated by tex4ht. I haven't found where one customizes this. I can delete these in emacs from the html, but that doesn't seem the right way to do this. Here's a fairly minimal example showing the rules (and the quotation indent as well).  \documentclass{book}  \begin{document}  \chapter{Simple Example}  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla.  \begin{quotation} Default book style icreases the left and right margins for quotations by a noticeable amount. The css generated by tex4ht only increases the left margin by one em. The attached .cfg increases this to 4 em.  \end{quotation}  Sed lectus. Integer euismod lacus luctus magna. Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. amet mauris.  \begin{table} \begin{center} \hbox{ \begin{tabular}{|l|c|c|}\hline entry1&amp;entry2&amp;entry3\\ entry4&amp;entry5&amp;entry6\\ \hline \end{tabular}} \end{center} \caption{a caption} \end{table}   Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor.   \end{document}   [Edit 2] I'm pretty sure the hr tag is being generated for all floats. By trial and error I found my way to the html4.4ht file, which contains this code:  \Configure{float}    {\ifOption{refcaption}{}{\csname par\endcsname\ShowPar \leavevmode}}    {\:xhtml{\IgnorePar\EndP}\HCode{&lt;hr class="float"\xml:empty&gt;&lt;div      class="float"\Hnewline&gt;}}    {\ifvmode \IgnorePar \fi\EndP     \HCode{&lt;/div&gt;&lt;hr         class="endfloat" /&gt;}\csname par\endcsname\ShowPar}   On the assumption that the \HCode macro defines the html output, I removed the hr tag:  \Configure{float}    {\ifOption{refcaption}{}{\csname par\endcsname\ShowPar \leavevmode}}    {\:xhtml{\IgnorePar\EndP}\HCode{&lt;div      class="float"\Hnewline&gt;}}    {\ifvmode \IgnorePar \fi\EndP     \HCode{&lt;/div&gt;}\csname par\endcsname\ShowPar}   When I run htlatex with this config file, I get an error on a \begin{center} that is within a begin{table}. Without this change to the config file it runs fine, it has something to do with the edit, but since I don't really understand what's going on here, I'm utterly baffled as to how to fix it.  [End Edit 2]  [Edit 3]  The problem is not the change to the \Configure statement, but the presence of the \Configure statement in the .cfg file. Even if I copy the \Configure statement verbatim, I still get an error when \begin{center} is encountered. The error is "Missing $ inserted"  [End Edit 3]  The captions for figures and tables are not on the float page, but follow immediately on the next page after conversion to epub. Is this an html problem that can be fixed in tex4ht, or is it a problem in how Calibre is interpreting the html?  (updating to the current version of Calibre fixed this)  Should I be producing xhtml instead of html?  I'd be grateful for a pointer to good documentation about customizing tex4ht.
53044
I want to put a table and a figure side-by-side. The table should fill two third of the text width, and the figure the last third.  So I'd like to achieve one of the following effects (which are equivalent in my case):   One table with 3 columns. The first two columns contain text, the third column contains a lengthy image. The height of the image should be determined by the height of the whole table, if that's possible Or, a divided page like in newspapers. On the left side I have the table, on the right side the image.   What I have tried:  \begin{multicols}{2} \begin{tabular}{ l l } Text &amp; Text \\ Text &amp; Text \\ ... &amp; ... \\ \end{tabular} \vfill \begin{figure}[H]     \includegraphics[]{images/image} \end{figure} \end{multicols}   But this places the picture directly on top of the table.  I also tried using \usepackage[export]{adjustbox} and \includegraphics[right]{images/image} but the caption is still in the center of the page and therefor on top of the table.
15541
I am importing a data table into a document and want the table to be within the text. When I import with \input{bodyrate}[htpb], the table is placed at the end of the document and [htpb] is printed instead. How do I get the table to be where I import it in the .tex file?  \documentclass[preprint]{aastex} \begin{document} \input{file}[htpb] \end{document}   the table file begins with:  \begin{deluxetable}{lccc} \tablecolumns{4} \tablewidth{0pc}
6125
I'm trying to typeset a table that would have a header in the first row (I'm not looking for a different/better solution to adding a header, but for a fix to this solution. Thanks). I want to achieve this by having a multicolumn cell spanning all the columns of the first row. The problem is that if the text is too long, the column widths are uneven, with the last column accumulating excess width. I would expect all of the columns to be of approximately the same width (although I cannot find a decent source that would say they should), given the fact that all the text in the second row is of approximately the same width.  I find this behaviour quite puzzling and have no idea what the cause could be. I know I could perhaps remedy this by manually setting the column widths, but am curious as to how to fix this without doing that (I do not need or indeed want the columns to be of the same width, but roughly proportional to the length of their content), preferably but not necessarily by using the tabular environment only (some other conflict with the document class I am using).   What is it that I'm doing or assuming wrong? And why?  MWE:  \documentclass{article} \begin{document}  \begin{tabular}{ccccc} \multicolumn{5}{c}{This is a piece of text. The longer it is, the longer the last column.} \\  1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 \\ \hline \end{tabular}  \end{document}   Resulting table. Notice how the last column of the second row accumulates excess width.
114409
I am trying to prepare printer labels for the spine of ring binders. The text is designed to be printed on label paper sheets with A4 format, having top and bottom margins of 26.5mm and left/right margins of 9mm.  The format of the labels is 61mm by 192mm, there are 4 of them on the sheet, without any separation between them.  I use the tcolorbox environment as a 'frame' for the labels and  and perhaps my idea is to naive, but I just wrote four of such environments in a row with nobeforeafter setting for each (well, using \tcbset command).  Even with \parskip set to 0pt there is small spacing between the boxes of about 1mm, which would lead to a shift of the content consecutively, and the 4th box appears on the next page. Reducing the bottom margin is not an option, of course. I believe, that \parskip is of no use here anyway.  I am pretty sure, that the content of the boxes has no influence on the spacing, as long as the height is not too large, which does not seem to be the case here.  How can I reduce the space between those colorboxes to a effectively 'zero' value, resulting in no shift when printed?   Note  I checked the margins etc. after print out, they are correct!   Even if there might be other solution for such label printing, I would like to have some solution to reduce the spacing between the boxes (Ok, it might be a very trivial solution.)    This is the code I tried so far  \documentclass[12pt,paper=a4]{article}  \usepackage[lmargin=0.9cm,rmargin=0.9cm,tmargin=26.5mm,bmargin=26.5mm,showframe=true,a4paper]{geometry} \usepackage{tcolorbox} \usepackage{lmodern}   \begin{document} \setlength{\parindent}{0pt}% \setlength{\parskip}{0pt}% \pagestyle{empty}%  \fontsize{80}{96}\selectfont  \tcbset{height=61mm,nobeforeafter,top=2cm} \begin{tcolorbox}% \textbf{\LaTeX}% \end{tcolorbox} \begin{tcolorbox}% \textbf{is}% \end{tcolorbox} \begin{tcolorbox}% \textbf{very}% \end{tcolorbox} \begin{tcolorbox}% \textbf{sophisticated}% \end{tcolorbox}  \end{document}   I looked into other 'similar' questions here, none of them seems to be connected to this problem          Note  Here is the result with some features of the tcolorbox package and the solutions by Gonzalo Medina and egreg together with the comment by Thomas F. Sturm.
115811
I'd like to typeset the caption of an algorithm environment such that it is bold, fills the available width of the paper, and neither the caption nor the line numbers encroach into the margins.  In the example, the caption is indented and encroaches to the margin. I know that I can set the width of the caption but setting the width of the caption doesn't remove the caption indentation. I also know how to decrease the caption's indentation, but, removing the caption indentation makes the line numbers encroach to the margins. How can I make the caption fill the whole width (without any indentation) and keep the line numbers from encroaching to the margins?  I'd like to keep the caption a figure caption but I'm open to configuring the "algorithm2e" or "caption" packages.  \documentclass[10pt]{article} \usepackage{showframe} \usepackage[figure,noend,noline,linesnumbered]{algorithm2e} \usepackage[font=bf,skip=\baselineskip]{caption} \begin{document} \begin{algorithm}[t] Some algorithm step \; \caption{Here is a long caption for an algorithm. I'd like to typeset the caption such that it is bold and fills the available width of the page without encroaching into margins.} \end{algorithm} \end{document}
92740
Consider the minimal code below, which produces two different layouts depending on the  table position marks.    The first layout uses   \begin{table}   which results in the table ending below the footnotes and the second,  \begin{table}[htbp]   results in the table ending above the footnotes. Is this normal behaviour in LaTeX? I think a better algorithm would have been to try and position images or tables above the footnotes; is it some form of a bug? Here is the MWE.  \documentclass{book} \usepackage[paperwidth=4.75in,paperheight=7.25in,             textwidth=4.5in,textheight=6.5in,             headsep=0.1in, footskip=0.15in,             marginratio=1:1]{geometry} \usepackage[latin,english]{babel} \usepackage[demo]{graphicx} \usepackage{booktabs,lipsum} \begin{document}  \selectlanguage{latin} \chapter{Errora}  Una imagine tabula, figura et \ae nigma.\footnote{translatio via google}.   \begin{figure}[htbp] \centering \includegraphics[width=0.3\textwidth]{./graphics/amato} \caption{Uno pictorum}  \end{figure} \begin{table}%[htbp] %uncomment to see difference \centering \begin{tabular}{cccc}   \toprule   Error &amp;Errors &amp;error &amp;errors\\   \bottomrule \end{tabular}       \caption{Test} \end{table} %\lipsum[1-3] \end{document}   Edit:  I had a look at the documentation of the footmisc recommended by Thorsten Donig as a workaround where  Robin Fairbairns describes this behaviour as an "infelicity". There is a further infelicity, if you let both floats to float freely, the table floats to the next page and the image goes in the footer area, while there is ample space to have stayed exactly in its position in the text.
103383
I would like to know what are the margins (top, right,bottom and left; in meters) that are by default assigned for thebook class. Is there a command or a way to know them?
117545
Can u please help me in this table. The problem in this table that is not move to the next page in a proper way and kindly mention the size of the figure as well as the place of the figure. \begin{longtable}[c]{@{}|c|c|c|c|c|c|c|c|c|@{}} \caption{Bacteria isolates on different media} \label{tab:my-table}\\ \toprule \textbf{Sr.No} &amp;   \textbf{Reference Code} &amp;   \textbf{Sample Location} &amp;   \textbf{Colony Color} &amp;   \textbf{Colony Morphology} &amp;   \textbf{Pigmentation} &amp;   \textbf{Media} &amp;   \textbf{Predicted Name Of Strain} &amp;   \textbf{Figures} \\* \midrule \endhead % 1 &amp;   EMB(P)1 &amp;   Islamabad &amp;   Green sheen &amp;   Circular &amp;   Green Sheen &amp;   \begin{tabular}[c]{@{}c@{}}Eosin methylene\\    \\ blue agar\end{tabular} &amp;   \textit{\textbf{E.coil}} &amp;    \\* \midrule 2 &amp;   MSA(P)1 &amp;   Islamabad &amp;   Yellow &amp;   Punctiform &amp;   Yellow &amp;   Mannitol salt agar &amp;   \textit{\textbf{\begin{tabular}[c]{@{}c@{}}Staphylococcus\\    \\ Epidermidis\end{tabular}}} &amp;    \\* \midrule 3  &amp; MACC(P)1 &amp; Islamabad &amp; Off white       &amp; Circular  &amp; Off white       &amp; MacConkey agar     &amp; \textit{\textbf{Salmonella}}              &amp;  \\* \midrule 4  &amp; MSA(P)2  &amp; Islamabad &amp; White           &amp; Circular  &amp; White           &amp; Mannitol salt agar &amp; \textit{\textbf{Staphylococcus   aureus}} &amp;  \\* \midrule 5 &amp;   B.A(P)1 &amp;   Islamabad &amp;   White &amp;   Smooth &amp;   White &amp;   \begin{tabular}[c]{@{}c@{}}Blood \\    \\ Agar\end{tabular} &amp;   \textit{\textbf{Pseudomonas   aeruginosa}} &amp;    \\* \midrule 6  &amp; B.A(P)2  &amp; Islamabad &amp; White           &amp; Circular  &amp; White           &amp; Blood agar         &amp; \textit{\textbf{Lactobacilli}}            &amp;  \\* \midrule 7  &amp; MACC(P)2 &amp; Islamabad &amp; Pink            &amp; Circular  &amp; Pink            &amp; MacConkey agar     &amp; \textit{\textbf{Klebsiella}}              &amp;  \\* \midrule 8  &amp; MACC(P)3 &amp; Islamabad &amp; Purple          &amp; Irregular &amp; Purple          &amp; MacConkey agar     &amp; \textit{\textbf{pseudomonas}}             &amp;  \\* \midrule 9  &amp; MSA(P)3  &amp; Islamabad &amp; Crystal White   &amp; spherical &amp; Crystal White   &amp; Mannitol salt agar &amp; \textit{\textbf{Salmonella}}              &amp;  \\* \midrule 10 &amp; B.A(P)3  &amp; Islamabad &amp; White           &amp; Puntiform &amp; White           &amp; Blood agar         &amp; \textit{\textbf{Staphylococcus}}          &amp;  \\* \midrule 11 &amp; MACC(P)4 &amp; Islamabad &amp; Orange to amber &amp; Circular  &amp; Orange to amber &amp; MacConkey agar     &amp; \textit{\textbf{Shigella}}                &amp;  \\* \midrule 12 &amp; MSA(P)4  &amp; Islamabad &amp; Yellow          &amp; Circular  &amp; Yellow          &amp; Mannitol salt agar &amp; \textit{\textbf{S. aureus}}               &amp;  \\* \midrule 13 &amp; MACC(P)5 &amp; Islamabad &amp; Pink to purple  &amp; Circular  &amp; Pink to purple  &amp; MacConkey          &amp; \textit{\textbf{Klebisella}}              &amp;  \\* \bottomrule \end{longtable}