Matthew Daggitt
2017-12-30 13:47:04 UTC
I've been trying to get literate agda up and running as per the
instructions in the documentation
<https://agda.readthedocs.io/en/v2.5.3/tools/generating-latex.html>
and I'm having problems getting unicode symbols to appear inside code
blocks. I've run "agda --latex code.lagda" to get the following
"code.tex" file below .
\documentclass{article}
\usepackage{agda}
\begin{document}
â
\begin{code}%
%
\>[4]\AgdaKeyword{data}\AgdaSpace{}%
\AgdaDatatype{â}\AgdaSpace{}%
\AgdaSymbol{:}\AgdaSpace{}%
\AgdaPrimitiveType{Set}\AgdaSpace{}%
\AgdaKeyword{where}\<%
\end{code}
\end{document}
When I compile it using XeLatex (or LuaLatex) everything compiles without
errors and it all appears fine (including the first â symbol outside of the
code block) except that the â symbol inside the \AgdaDatatype{} command
doesn't appear. The same problem occurs when I place any unicode character
inside the \AgdaDatatype{} command. I've tried adding in various
combinations of the following package imports (even though according to the
documentation they shouldn't be necessary in XeLatex):
\usepackage{bbm}
\usepackage[greek,english]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{autofe}
Does anyone have any suggestions?
Thanks,
Matthew
instructions in the documentation
<https://agda.readthedocs.io/en/v2.5.3/tools/generating-latex.html>
and I'm having problems getting unicode symbols to appear inside code
blocks. I've run "agda --latex code.lagda" to get the following
"code.tex" file below .
\documentclass{article}
\usepackage{agda}
\begin{document}
â
\begin{code}%
%
\>[4]\AgdaKeyword{data}\AgdaSpace{}%
\AgdaDatatype{â}\AgdaSpace{}%
\AgdaSymbol{:}\AgdaSpace{}%
\AgdaPrimitiveType{Set}\AgdaSpace{}%
\AgdaKeyword{where}\<%
\end{code}
\end{document}
When I compile it using XeLatex (or LuaLatex) everything compiles without
errors and it all appears fine (including the first â symbol outside of the
code block) except that the â symbol inside the \AgdaDatatype{} command
doesn't appear. The same problem occurs when I place any unicode character
inside the \AgdaDatatype{} command. I've tried adding in various
combinations of the following package imports (even though according to the
documentation they shouldn't be necessary in XeLatex):
\usepackage{bbm}
\usepackage[greek,english]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{autofe}
Does anyone have any suggestions?
Thanks,
Matthew