LaTeX 中的 Windows 10 \欧元
我有MiKTeX 2.9.6300 64-bit,并且我可以xelatex eurosym在其中eurosym.tex包含以下LaTeX代码:
\documentclass{article}
\usepackage{eurosym}
\begin{document}
\section{2\euro{}} % (this line fails if eurosym package isn't called)
2€ % (this € symbol is lost if compiled with pdflatex instead of xelatex)
\end{document}
- 输出如预期:
Win10 eurosym 上的 Pandoc 调用失败
我的pandoc-templates/default.latex本地副本正确包含调用:
$if(euro)$
\usepackage{eurosym}
$endif$
而且我已经安装了pandoc v1.19.2.1,所以我希望只包含以下内容pandoc eurosym.md -o eurosym.pdf --latex-engine=xelatex时可以工作eurosym.md:
# 2€
2€
- 但事实上我得到:
! Improper alphabetic constant.
<to be read again>
\euro
l.70 \section{2\euro{}}
pandoc.exe: Error producing PDF
- 为什么\euro{}Pandoc 中的命令在这里失败?
与 Arch Linux 上的 Pandoc 相同
pandoc 1.19.2.1-90,调用texlive-bin 2016.41290-12,并使用jgm 的 default.latex我得到:
! Improper alphabetic constant.
<to be read again>
\euro
l.35 \section{2\euro{}}
pandoc: Error producing PDF
但是我可以通过注释掉 jgm's 的第 76 行\usepackage[unicode=true]{hyperref}(然后是第 80-98 行和第 253 行,这两个\hypersetup{...}子句和第 99 行,\urlstyle{same}它们都需要hyperref)来使其按预期工作default.latex。
发现有一个更新的 default.latex,我尝试使用那个,Pandoc\euro再次失败。
结论似乎是在 Pandoc 中以某种方式 eurosym 和 hyperref 相互不兼容
所以我创建了一个新问题:Pandoc 中的 eurosym 似乎与 hyperref #3801 不兼容。