The Stack Overflow podcast is back! Listen to an interview with our new CEO.

# Tag Info

1

UPDATE. I made it, here is the new version of the command: \newcommand{\figura}[5]{ \begin{figure}[H] \begin{minipage}{\textwidth} \caption[#2]{\raggedright #2} \label{fig:#5} \begin{center} \includegraphics[width=#3\textwidth]{#1}\\ \end{center} \...

1

The biggest problem is aligning on top and aligning the captions. Solved with a tabular. \documentclass[a4paper]{article} \usepackage[margin=2cm,heightrounded]{geometry} \usepackage{newtxtext,newtxmath} \usepackage{graphicx} \usepackage[export]{adjustbox} \usepackage{subcaption} \begin{document} \begin{figure*} \setlength{\tabcolsep}{0.025\textwidth} \...

1

A common misconception is that a tabular environment needs a table environment around it. This is not true: to TeX, a tabular is just like a big character (a box, in more correct terminology), with its vertical and horizontal sizes and its reference point (that can be influenced by using the [t] or [b] options to \begin{tabular}). The same holds for \...

3

Your code fragment is fine. You should see figures: If you not, than you have something in document, what you not show us. So you need always to provide MWE (Minimal Working example) which reproduce your problem and not only a code fragment. My testing MWE is: \documentclass[twocolumn]{article} \usepackage{graphicx} \usepackage{subcaption} \begin{document}...

2

if figure and table are in the same float, they will be placed on the same page \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{rotating} \usepackage{pdflscape} \begin{document} \begin{sidewaystable} \centering \begin{tabular}{cc} a & b \\ a & b \\ \end{tabular} \caption{Caption} \vspace{1cm} \...

2

Tikz is used to clip and position the image (stored in a savebox) on the page. Don't forget to run it twice. \documentclass{article} \usepackage[a4paper]{geometry} \pagestyle{empty} \usepackage{tikz} \newsavebox{\master} \savebox{\master}{\includegraphics[width=2\paperwidth, height=\paperheight]{example-image}} \begin{document} \begin{tikzpicture}[...

2

This is primarily based on how LaTeX processes the optional argument to a float. In essence, it captures the optional argument in a different macro (\@fps, specifically), then attempts to expand that macro by looking at it's \meaning. Then it sequentially processes the characters of the meaning. However, the capturing process uses \def, similar to the ...

2

As I first suspected, it is caused by the text width setting the yticklabel style, which makes those nodes very wide. One way of avoiding guesswork for appropriate widths is to add scale only axis,width=0.45\textwidth to the axis options, and use text width=0.45\textwidth in the yticklabel style. Regarding the small misalignment, it is because of the text ...

1

With addition to Zarko's answer, if you need two figures at the bottom of the same page, then keep both figures in the same figure* tag, MWE given below \documentclass[twocolumn]{article} \usepackage{graphicx} \usepackage{stfloats} \begin{document} \section{Omitted Figures} \begin{figure*}[b] \centering \includegraphics[scale=0.6]{example-image-a}\\ %\...

2

With help of the package stfloats you can put figure on the bottom of the same page where is inserted (if there is enough space): \documentclass[twocolumn]{article} \usepackage{graphicx} \usepackage{stfloats} % <--- \begin{document} \section{Omitted Figures} \begin{figure*}[b] \includegraphics{example-image-a} \end{figure*} \end{document} On such ...

1

With using \sidesubfloat instead \floatbox I was able to obtain the following result: (red lines indicate text borders) Is this what you looking for? \documentclass{article} \usepackage{geometry} \usepackage{floatrow} \usepackage{graphicx} \usepackage[label font=bf, labelformat=parens]{subfig} \usepackage{caption} \floatsetup[figure]{style=plain, ...

0

According to your question title I gues that you look for something like this: (red lines indicate text area borders) Do I'm right? Edit: I reduce your document to MWE (Minimal Working Example) in which I consider from its preamble only packages which are relevant to your problem and only one example of a combination table/image. By it is produced above ...

1

It is best of course to avoid png for graphs or text, and use a scalable format such as pdf, but in either case your problem is [width=1\linewidth] which scales by an arbitrary amount. Remove that and include the image at its natural size, then in matlab use the same text size as in your document.

3

tl;dr : Your distro packaged a bad version of caption.sty. This is due to your machine using a particularly inopportune version of the Debian SID texlive-latex-recommended package. A bug in caption.sty resulted in this failure; while it was promptly fixed, the texlive-latex-recommended package picked up the buggy caption.sty. If you download an up-to-date ...

0

So if I understood well your issue is that you have to use the subfig package instead of subcaption. Also you wanted a unique global caption instead of one caption per column, is that right? Based on my understanding, here is the solution that I propose (I downloaded an image that I named test.png for the test purpose): use the subfloat command from the ...

0

As stated in the comments, this is intended to happen. If there is a floating environment that doesn't fit on the page it is supposed to be on, LaTeX places it on the next, even if that leaves a completely empty page. There is a workaround for this though: To trick LaTeX into believing that the object fits! I was told this should not be used as standard ...

3

You can use \input for this (there is no \insert command in latex by default). That should have no issues at all. Unrelated though: you should not use [h!] LaTeX will usually warn about that and change the option.

1

keyfloat package provides an equally short syntax without making editing of additional files necessary: \documentclass{article} \usepackage{keyfloat} \begin{document} some text \keyfig[h!]{s=.5,c={The birds},l={fig:birds}}{birds} some more text \end{document}

0

The mdframed package can add a coloured background if the bg of the pdf is transparent \documentclass{article} \usepackage{xcolor,mdframed} \usepackage{graphicx} \begin{document} \begin{figure}[htbp] \begin{mdframed}[backgroundcolor=blue!50,linecolor=blue!50] \includegraphics[width=\linewidth]{example-image-a4-landscape.pdf} \caption{text} \end{mdframed} \...

2

You're seeing this behavior because of the way that you're composing the savebox on the fly and inserting it as a bottom figure. You insert two or more multicols environments into bottom figures before the output routine has had a chance to work, and this triggers what I believe should count as a bug in multicol (although admittedly this is an edge case). ...

0

The solution is quite easy, actually, and you're on the right track: don't use the floating environment but center for example. You can still caption the image with \captionof which is available in each KOMA-Script class like scrreprt: \documentclass{scrreprt} \usepackage{chemmacros} \usechemmodule{scheme} \usepackage{lipsum} \begin{document} \section{...

2

Here below is a solution based on this : How to highlight an entire paragraph? Mechanism I created a new float style by using the same way as the float package does for the 'ruled' style. Then I used the framed package and its snugshade environment to create the color box. It looks like this: Code \documentclass{article} % Mandatory package \usepackage{...

0

The memoir class (an extension to book, report and article classes) provides a \sidebar{<text>} macro whereby <text> is written in the margin starting near the top of the textblock. If <text> is long it may continue onto the next page(s). Several \sidebars can be used on a page, printed in order and continuing on to further pages if ...

3

Does this code solve your problem? \documentclass{article} \usepackage{lipsum} \newcommand{\bmarginpar}[1]{\marginpar{\parbox[b]{\marginparwidth}{\tiny#1}}} \begin{document} \lipsum[1-5] \bmarginpar{\lipsum[1]} \lipsum[6-10] \end{document}

2

This is a three pass solution. The first pass runs endfloat in order to create the .fff file. The second pass disables endfloat and uses the .fff file. However, the list of figures will not be accurate until the third pass. Note: the disabled version still needs endfloat to define macros like \processdelayedfloats and\efloatseparator. \documentclass{...

0

One option is to employ tikz and use an overlay picture with absolute positioning (which requires remember picture). (You could also use, say, eso-pic.) \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}[t] \frametitle{Pauses} \begin{tikzpicture}[overlay,remember picture] \node[above=1.5em] at (current page.south) {\includegraphics[...

0

Welcome on tex.stackexchange. There are several small issues in your code: It is far from being minimal You should not write \bibliography{\jobname.bib} as the .bib is automatically added You do not have to load graphics as it is already loaded by graphicx You don't need the filecontents package as long as you use the related environment in the preamble As ...

0

You could use the visible on style from this great answer. Note the proposed style is now provided by the aobs-tikz package. Instead of setting opacity to 0 just set it to another value that fits your need (I do not know the default opacity that beamer uses. \documentclass[10pt]{beamer} \usepackage{tikz} \tikzset{ invisible/.style={opacity=0.3}, ...

0

Oké, I found the solution in another article: https://tex.stackexchange.com/a/340384/195439 set \counterwithout{section} but also `\counterwithout{chapter} \AtBeginEnvironment{subappendices}{% %\chapter*{Appendix} \addcontentsline{toc}{chapter}{Appendices} \counterwithin{figure}{section} \counterwithin{table}{section} } \AtEndEnvironment{subappendices}{% \...

0

I hope that this will get you going. In the following I have used the changepage package to adjust the contents of a figure environment depending on whether the figure ends up on an odd or even page. % figpageprob.tex SE 509111 Is figure on even or odd page \documentclass{book} \usepackage{changepage} \strictpagecheck \usepackage{lipsum} \begin{...

3

The els-cas templates redefine LaTeX's figure environment, so the syntax changed. Instead of \begin{figure*}[t] you need to use \begin{figure*}[pos=t]. The optional argument now allows you to change other things as well, such as the alignment, spacing before and after the figure and caption, so that you can have a nice inconsistent document layout ;-)

Top 50 recent answers are included