-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eurosym in Pandoc seems to be incompatible with hyperref #3801
Comments
could not reproduce on macOS with have you modified your default template? |
mb21, no (as elaborated on StackOverflow), I've used the latest jgm |
The second answer here is illuminating on what the error
message means:
https://tex.stackexchange.com/questions/64900/improper-alphabetic-constant
Not sure yet how to fix this in pandoc.
|
Note that this works fine with --latex-engine=pdflatex.
The difference is that, when pdflatex is used, we have
\usepackage{eurosym}
while with xelatex, we have
\newcommand{\euro}{€}
in the default template.
|
Minimal case that fails for me using \documentclass[]{article}
\usepackage{unicode-math}
\newcommand{\euro}{€}
\usepackage[unicode=true]{hyperref}
\begin{document}
\hypertarget{section}{
\section{2\euro{}}\label{section}
}
\end{document} Note that if you comment out the unicodemath part, OR if you remove hyperref and the hyperref specific commands, it compiles successfully. So it's the combination of the custom |
This can be fixed by dropping the The following produces an identical PDF under any of the three LaTeX engines: \documentclass{article}
\usepackage{lmodern}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\usepackage{unicode-math}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
\usepackage{upquote}
\usepackage{hyperref}
\begin{document}
\hypertarget{section}{
\section{2€}\label{section}
}
\end{document} |
Windows 10 version 1703
,MiKTeX 2.9.6300 64-bit
,pandoc v1.19.2.1
.Arch linux 4.11.9-1
,texlive-bin 2016.41290-12
,pandoc 1.19.2.1-90
.eurosym.md
contains just:pandoc eurosym.md -o eurosym.pdf --latex-engine=xelatex
returns variants of:Further details: pandoc convert to pdf fails when € is in a header.
The text was updated successfully, but these errors were encountered: