public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Help writing a lua filter to modify parent attributes
@ 2021-07-31  2:02 Leena Murgai
       [not found] ` <d852c6c9-9685-47b6-ae19-c505976dc220n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Leena Murgai @ 2021-07-31  2:02 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1314 bytes --]

Hi there,

I'm converting a my book from LaTeX to HTML. Given the LaTeX:

\begin{figure}
\includegraphics[width=\textwidth]{file_path}
\caption{caption_text}
\label{unique_name}
\end{figure}

The HTML for my figures comes out something like:

<figure>
<img src="file_path" id="unique_name"/><figcaption>caption_text</figcaption>
</figure>

I want to write a filter that searches for a given unique_name from a list 
of them and adds class="fullwidth" to the direct parent <figure> node. A 
quick search makes me think I can't do this using CSS - please let me know 
if I'm wrong.

I think the easiest way to do this would be to write a lua filter (since 
I'm already using some in the conversion to help with cross references) but 
all this is outside my wheelhouse. Again, if I'm wrong and there's an 
easier way I've missed, please let me know.

Any thoughts/advice would be appreciated.

Best,
Leena

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d852c6c9-9685-47b6-ae19-c505976dc220n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2292 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-04 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  2:02 Help writing a lua filter to modify parent attributes Leena Murgai
     [not found] ` <d852c6c9-9685-47b6-ae19-c505976dc220n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-02 10:51   ` bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg
2021-08-03 22:42     ` Leena Murgai
     [not found]       ` <6650d64d-88c9-4056-a525-787e78164434n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-04  1:01         ` Leena Murgai
     [not found]           ` <bdf6cd45-2d69-49e8-952d-e2fa814f4c59n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-04  8:41             ` Bastien DUMONT
2021-08-04 16:54               ` Leena Murgai

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).