* Filter to create sideways figures
@ 2016-11-20 14:48 Chris Chandler
[not found] ` <f8d8ad3d-d2fa-4217-926d-b6f6ca0118dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Chris Chandler @ 2016-11-20 14:48 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1304 bytes --]
I have several wide figures in a large document that need to be displayed
landscape. Using the LaTeX package rotating, I can use
\begin{sidewaysfigure} and get this result very easily. The current tex
file generated from my markdown looks like this:
![Example figure](/location/of/image.png){#fig:blah}
\begin{figure}[htbp]
\centering
\includegraphics{/location/of/image.png}
\caption{Example figure\label{fig:blah}}
\end{figure}
Is there a way for a filter to replace \begin{figure}[htbp] and
\end{figure} with \begin{sidewaysfigure} and \end{sidewaysfigure} if there
is a tag like so: ![Example figure](/location/of/image.png){#fig:blah
sidewaysfigure}? Any advice would be helpful. I have been trying with no
success.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f8d8ad3d-d2fa-4217-926d-b6f6ca0118dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 1750 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Filter to create sideways figures
[not found] ` <f8d8ad3d-d2fa-4217-926d-b6f6ca0118dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-11-20 16:01 ` Václav Haisman
2016-11-20 19:36 ` John MacFarlane
0 siblings, 1 reply; 3+ messages in thread
From: Václav Haisman @ 2016-11-20 16:01 UTC (permalink / raw)
To: pandoc-discuss
On 20 November 2016 at 15:48, Chris Chandler
<christopher.e.chandler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I have several wide figures in a large document that need to be displayed
> landscape. Using the LaTeX package rotating, I can use
> \begin{sidewaysfigure} and get this result very easily. The current tex file
> generated from my markdown looks like this:
>
> ![Example figure](/location/of/image.png){#fig:blah}
>
> \begin{figure}[htbp]
> \centering
> \includegraphics{/location/of/image.png}
> \caption{Example figure\label{fig:blah}}
> \end{figure}
>
> Is there a way for a filter to replace \begin{figure}[htbp] and \end{figure}
> with \begin{sidewaysfigure} and \end{sidewaysfigure} if there is a tag like
> so: ![Example figure](/location/of/image.png){#fig:blah sidewaysfigure}? Any
> advice would be helpful. I have been trying with no success.
>
Personally, whenever I need to do something like this I just generate
the LaTeX source and I post-process it using a suitable script and
then invoke `latexmk` on it.
--
VH
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Filter to create sideways figures
2016-11-20 16:01 ` Václav Haisman
@ 2016-11-20 19:36 ` John MacFarlane
0 siblings, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2016-11-20 19:36 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
+++ Václav Haisman [Nov 20 16 17:01 ]:
>On 20 November 2016 at 15:48, Chris Chandler
><christopher.e.chandler-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> I have several wide figures in a large document that need to be displayed
>> landscape. Using the LaTeX package rotating, I can use
>> \begin{sidewaysfigure} and get this result very easily. The current tex file
>> generated from my markdown looks like this:
>>
>> ![Example figure](/location/of/image.png){#fig:blah}
>>
>> \begin{figure}[htbp]
>> \centering
>> \includegraphics{/location/of/image.png}
>> \caption{Example figure\label{fig:blah}}
>> \end{figure}
>>
>> Is there a way for a filter to replace \begin{figure}[htbp] and \end{figure}
>> with \begin{sidewaysfigure} and \end{sidewaysfigure} if there is a tag like
>> so: ![Example figure](/location/of/image.png){#fig:blah sidewaysfigure}? Any
>> advice would be helpful. I have been trying with no success.
>>
>
>Personally, whenever I need to do something like this I just generate
>the LaTeX source and I post-process it using a suitable script and
>then invoke `latexmk` on it.
That's the easiest approach. Another possibility would be
to temporarily redefine the figure environmentn before your
figure. With a filter, you'd have to generate all of the
LaTeX code for the figure; there's no way to change just the
environment name.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20161120193650.GE94089%40Johns-MBP.home.
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-20 19:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-20 14:48 Filter to create sideways figures Chris Chandler
[not found] ` <f8d8ad3d-d2fa-4217-926d-b6f6ca0118dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-11-20 16:01 ` Václav Haisman
2016-11-20 19:36 ` John MacFarlane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).