admin管理员组文章数量:1391925
I'm using Pandoc to convert a Latex project to Markdown (to display it via Dokusaurus). I would like to define certain sections inside the Latex text that are ignored when compiled as a Pdf, but are kept when converted to markdown
I'm thinking of something like this:
% This config is only relevant for dokusuarus and must not be present in the Pdf
\begin{markdown-only}
---
title: Foobar42
---
\end{markdown-only}
\section{Section 1}
Lorem Ipsum dolor sit amet.
Resulting Latex PDF:
Section 1
Lorem Ipsum dolor sit amet.
Resulting markdown after conversion with pandoc:
---
title: Foobar42
---
# Section 1
Lorem Ipsum dolor sit amet.
How can I achieve this? I've played around with custom Latex commands and pandoc Lua-Filters. But it seems pandoc is too smart and ignores everything that would not end up in the Latex pdf.
版权声明:本文标题:lua - How to have an invisible Latex section that is kept when converted to markdown? (Pandoc) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744668216a2618662.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论