-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep subfigures on the same line in LaTeX output? #60
Comments
You can coerce Pandoc to treat any image as figure. This works: <div id="fig:coolFig">
![cool caption](coolfiga.png "fig:"){#fig:cfa width=40%}
![cooler caption](coolfigb.png "fig:"){#fig:cfb width=40%}
Cool figure!
</div> |
Doesn't that break pandoc-crossref's referencing system? When I run that, I get latex output: \hypertarget{fig:coolFig}{}
\includegraphics[width=0.4\textwidth]{coolfiga.png}
\includegraphics[width=0.4\textwidth]{coolfigb.png}
Cool figure! Subfigure labels, and references in the text ( |
Did you forget to add "fig:" after image path?
|
I try this
But subfigures labels hide off. Is it posible to show them? |
@danil-tolkachev, what is your output format? |
@lierdakil, html and docx. Sorry for off topic. By labels I mean 'a' and 'b' |
At the moment, there is no direct way to get multiple (sub)figures on one line with these. You could probably hack something together with grid tables, but only Example: <div id="fig:coolFig">
+---------------------------------------------------------+-----------------------------------------------------------+
|![cool caption](coolfiga.png "fig:"){#fig:cfa width=100%}|![cooler caption](coolfigb.png "fig:"){#fig:cfb width=100%}|
+---------------------------------------------------------+-----------------------------------------------------------+
Cool figure!
</div> Not sure how that will fare with docx output though. Probably not very well, if I had to guess. |
@lierdakil, thank you. I'll try to build pandoc-crossref, but I'm not sure that I can do it. When is the next release? |
I noticed that image caption doesn't marked with tag |
Move comment to #79. Sorry for mess. |
Patch to avoid unsightly <div id="fig:coolFig">
![cool caption](coolfiga.png){#fig:cfa width=40%}
![cooler caption](coolfigb.png){#fig:cfb width=40%}
![cool caption](coolfiga.png){#fig:cfx width=40%}
![cooler caption](coolfigb.png){#fig:cfy width=40%}
Cool figure!
</div> will work as one would expect, i.e. produce two rows of subfigures side-by-side: \begin{figure}
\subfloat[cool
caption]{\includegraphics[width=0.40000\textwidth]{coolfiga.png}\label{fig:cfa}}
\subfloat[cooler
caption]{\includegraphics[width=0.40000\textwidth]{coolfigb.png}\label{fig:cfb}}
\subfloat[cool
caption]{\includegraphics[width=0.40000\textwidth]{coolfiga.png}\label{fig:cfx}}
\subfloat[cooler
caption]{\includegraphics[width=0.40000\textwidth]{coolfigb.png}\label{fig:cfy}}
\caption{Cool figure!}
\label{fig:coolFig}
\end{figure} |
Subfigures are currently written into latex with line breaks between them, so that
gets written as
This causes subfigures to be rendered on separate lines, even if they could all fit onto a single row. Is there some way to specify whether these linebreaks should not be written? Or other ways to cause subfigures to appear in a single row?
The text was updated successfully, but these errors were encountered: