嵌套列表无法从 markdown 或 html 转换为 pdf

嵌套列表无法从 markdown 或 html 转换为 pdf

我正在尝试转换markdownpdf使用pandoclatex-engine 集,因为xelatex我正在尝试使用系统上安装的字体。我尝试切换到,pdf-enginepdflatex问题仍然存在。

我把这段 markdown 代码粘贴到了Pandoc 在线试用演示:

###Lipsum
  + **Lipsum Generator (Sept 2013-Present)**

   **[google](https://www.google.com/)**

   Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged

    * Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

    * Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance

渲染后的乳胶:

\subsubsection{Lipsum}\label{lipsum}

\begin{itemize}
\tightlist
\item
  \textbf{Lipsum Generator (Sept 2013-Present)}
\end{itemize}

\textbf{\href{https://www.google.com/}{google}}

Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text ever
since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only five
centuries, but also the leap into electronic typesetting, remaining
essentially unchanged

\begin{verbatim}
* Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

* Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance
\end{verbatim}

我注意到, 我认为\begin{verbatim}\begin{itemize}哪个导致了错误。

我使用了这个命令:

pandoc resume.md --standalone --latex-engine=xelatex -f markdown --atx-headers -t latex -o resume_pandoc.pdf -V mainfont=Ubuntu -V sansfont=Lato -V fontsize=11pt -V title="Vamsi Deepak Ampolu" -V papersize=letter

我也尝试使用此命令将其转换htmlpdf

pandoc resume.html --standalone --latex-engine=xelatex -V mainfont=Ubuntu -V sansfont=Lato -V papersize=letter title="Vamsi Deepak Ampolu"

但是,我发现嵌套列表在输出html中可以正确呈现,如下所示pdf

+ built a layer of dynamic, reusable UI templates using Handlebars based on Twitter Bootstrap

答案1

每个级别必须缩进正好四 (4) 个空格。

输入:

### Lipsum
+ **Lipsum Generator (Sept 2013-Present)**

    **[google](https://www.google.com/)**

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged

    * Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.

    * Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance

输出:

\subsubsection{Lipsum}\label{lipsum}

\begin{itemize}
\item
  \textbf{Lipsum Generator (Sept 2013-Present)}

  \textbf{\href{https://www.google.com/}{google}}

  Lorem Ipsum is simply dummy text of the printing and typesetting
  industry. Lorem Ipsum has been the industry's standard dummy text ever
  since the 1500s, when an unknown printer took a galley of type and
  scrambled it to make a type specimen book. It has survived not only
  five centuries, but also the leap into electronic typesetting,
  remaining essentially unchanged

  \begin{itemize}
  \item
    Contrary to popular belief, Lorem Ipsum is not simply random text.
    It has roots in a piece of classical Latin literature from 45 BC,
    making it over 2000 years old.
  \item
    Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of ``de Finibus
    Bonorum et Malorum'' (The Extremes of Good and Evil) by Cicero,
    written in 45 BC. This book is a treatise on the theory of ethics,
    very popular during the Renaissance
  \end{itemize}
\end{itemize}

相关内容