Hot answers tagged

6

I think the to paths use some control points that extend the bounding box of the second figure. You can see this by adding \draw (current bounding box.south east) rectangle (current bounding box.north west); at the end of each tikzpicture, which gives you this: As you can see there is some extra whitespace around the second one. I don't know of an ...


4

The cause of your problem is use of \subref{...}. Their use in caption had to be protected: \protect\subref{ ...}. See and test code below: \documentclass{article} \usepackage{graphicx} \usepackage{subfig} \begin{document} \begin{figure}[htp] \centering \subfloat[\label{Sal:Colour}]{\includegraphics[width=0.49\linewidth]{example-image}} \hfill ...


4

You can use \subcaptionboxes as they get vertically aligned automatically: \documentclass[12pt,a5paper]{article} \usepackage{qrcode} \usepackage{subcaption} \begin{document} \begin{figure}[ht] \centering \subcaptionbox{Text1}{\qrcode{Text1}} \qquad \subcaptionbox{Text2}{\qrcode{Text2}} \end{figure} \end{document}


4

\documentclass{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \newdimen\figrasterwd \figrasterwd\textwidth \begin{document} \begin{figure}[ht] \centering \parbox{\figrasterwd}{ \parbox{.6\figrasterwd}{% \subcaptionbox{}{\includegraphics[width=\hsize, height=8cm]{imageA}}%'height=8cm' is needed for this example only and can be ...


4

Here is my suggested (even if bulky) answer. centering: It uses \minipages (since you already know it will be 3 rows and 2 colums) + \hfill, and \adjustboxes with valign=t,center option for centering the last one. adequate size We use the trick given in Scale included graphics to the higher ratio instead of the lower for given width, height : using the ...


3

Yes, it is possible. Insert \ContinuedFloat right after \begin{figure}[h!] of the 2nd figure (and change \caption{\roman{4}} to \caption{}), i.e.: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{subcaption} \renewcommand{\thesubfigure}{\roman{subfigure}} \begin{document} \begin{figure}[h!] \begin{subfigure}{.32\textwidth} ...


3

Two main suggestions: Remove the second \hfill instruction. (And, remove the redundant \centering instruction.) Replace the two instances of scale=0.2 with width=\linewidth. If that makes the graphs look too small in your opinion, consider changing both instances of {0.4\textwidth} to {0.45\textwidth}. In your screenshot, both subfigure captions -- "(a)" ...


3

I think you just want a table: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure*} \centering \begin{tabular}{lccccc} Input image& \includegraphics[width=1cm]{example-image}& \includegraphics[width=1cm]{example-image}& \includegraphics[width=1cm]{example-image}& \includegraphics[width=1cm]{example-image}& ...


3

You don't need subcaption if you have no subcaption to the images. Here's a way, by measuring the big picture. In the example I use \scalebox just to have the big picture higher than two small ones. \documentclass{article} \usepackage{graphicx} \newbox{\bigpicturebox} \begin{document} \begin{figure} \centering \sbox{\bigpicturebox}{% ...


2

Why not a tabular? \documentclass{standalone} \usepackage{graphicx} \newcommand{\photo}[1]{% \includegraphics[width=2cm]{#1} } \begin{document} \begin{tabular}{rcc} Input image & \photo{example-image-a} & \photo{example-image-a} \\ Aligned face & \photo{example-image-b} & \photo{example-image-b} \\ Apparent & ...


2

Here's a solution with a tabularx environment, with the overall width set to \textwidth. This approach assures that the tabular material will fit inside the text block. \documentclass[demo]{article} % remove 'demo' option in real document \usepackage{booktabs,tabularx,graphicx} \newcolumntype{C}{>{\centering\arraybackslash}X} ...


2

Are you looking for something like this: \documentclass[11pt]{article} \usepackage{caption,subcaption} \usepackage{graphicx,booktabs} \begin{document} \begin{figure}[tbp] \centering \begin{minipage}[b]{1.0\linewidth} \centering \subcaption{Panel A subtitle} \label{fig:sub-a} \includegraphics[width=0.3\textwidth]{example-image-1x1} ...


2

One minipage make a mess in images positioning (due to it baseline). Solution is use two or instead them use tabular as it is used in example below: \documentclass{article} \usepackage{subfig} \usepackage{graphicx} \usepackage{array,calc} \begin{document} \begin{figure}[htb] \captionsetup[subfloat]{farskip=2pt,captionskip=1pt} ...


2

Use justification=RaggedRight (it might require two LaTeX runs). Be careful with end-of-lines. \documentclass[11pt, twoside]{report} \usepackage{caption} \usepackage{subfig} \usepackage{ragged2e} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \captionsetup[subfigure]{format=hang,singlelinecheck=false,justification=RaggedRight} ...


2

You are inserting several unwanted spaces and newlines. Don't use blank lines if you do not want new paragraphs to start. \adjustbox{valign=t}{ \subfloat{ has to be \adjustbox{valign=t}{% \subfloat{% because both lines introduce a spurious white space. It helps a lot if you load the package lua-visual-debug and compile with LuaLaTeX. You will ...


2

A bit tricky, but resorting to inline math seems worth the pain. \documentclass{article} \usepackage{amsmath} \usepackage{lipsum} % just for the example \begin{document} \lipsum*[2] \begin{equation*} \mathrm{Vect} = \biggl( \begin{minipage}[t]{.85\displaywidth} % make locally the comma to allow line breaks \mathchardef\comma=\mathcode`, ...


1

This is why subfigure provides the option figtopcap which assumes that you'll use a figure caption at the top of the figure: \documentclass{article} \usepackage[figtopcap]{subfigure} \begin{document} \begin{figure}[ht] \centering \caption[Optional caption for list of figures]{Caption of subfigures \subref{fig:subfig1}, \subref{fig:subfig2} and ...


1

As Andrew has already mentioned in his comment to your question one solution would be to use the groupplots library of pgfplots, which I also present in my solution. But this approach can be adapted to three normal axis environments next to each other as well. Also for that you simply add some dummy lines to the first plot so all the entries you want to ...


1

I wasn't sure which way you wanted your arrows to point, so I made them all point up. As for subfigures and compatibility with babel, the easiest solution is to create your own. Babel defines \figurename and \listfigurename, but you really don't need a subfigure name. The only compatibility issue would be if the alphabet changes. ...


1

Something like this: Your picture in subfigure is to narrow, that caption below it -- which is in your case accommodate to figure width -- can be fit in one column. With your selection of subfigure (which is by the way very old and replaced with new subfig) above picture is difficult to obtain, better is use of the subcaption packages and his subfigure ...


1

Here is a simpler solution. I used \tempheight to equalize the heights and \raisebox to align the bottoms. The only adjustment needed is to fit the page. \documentclass{article} \usepackage{graphicx} \usepackage{siunitx} \usepackage{showframe}% check centering \newlength{\tempheight} \begin{document} \begin{figure} ...


1

Presumably you mean something like the below code. I've used the subcaption package and its subfigure environment for subfigures, but the same principle will apply for other packages. Put the first two subfigures in a minipage environment, and the third one just after the minipage. \documentclass{article} \usepackage{subcaption,graphicx} \begin{document} ...


1

This is a straightforward approach with tabular. I am shifting down the includegraphics box so that the reference is on the top margin of the figure in the first tabular. It needs a bit of manual adjusting, though --- surely it can be done better. \documentclass{article} \usepackage{graphicx} \begin{document} \begin{tabular}{@{}cc@{}} ...


1

There is no subfloat environment with subfig, but a \subfloat command. And no, there's no “nice” solution for combining the cross references. \documentclass{tufte-book} \usepackage[caption=false]{subfig} \usepackage[demo]{graphicx} \begin{document} \begin{figure}[t] \phantomsection \subfloat[Subfigure 1\label{fig:sub1}] {% ...



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