<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I am still not sure what exactly you are looking for. What I do is I use minted to typeset the code, and I just copy and paste the code in. other packages, of course, would also work.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Or are you asking how to handle the Unicode used in an Agda source?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:eduardoochs@gmail.com">Eduardo Ochs</a><br>
<b>Sent: </b>Wednesday, July 7, 2021 12:04 AM<br>
<b>To: </b><a href="mailto:agda@lists.chalmers.se">agda@lists.chalmers.se</a><br>
<b>Subject: </b>[Agda] Poor man's way to latex Agda source</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello list,<br>
<br>
how do I latex small snippets of Agda code?<br>
<br>
Ok, let me explain... I am a beginner with Agda and I am alternating<br>
between reading the tutorials and trying to understand the<br>
agda-categories library:<br>
<br>
  <a href="https://github.com/agda/agda-categories">https://github.com/agda/agda-categories</a><br>
  <a href="https://arxiv.org/abs/2005.07059">https://arxiv.org/abs/2005.07059</a><br>
<br>
I've been working on ways to visualize some statements and proofs in<br>
Category Theory and on ways to translate between different notations,<br>
and I would like to be able to add to a diagram like this one<br>
<br>
  <a href="http://angg.twu.net/LATEX/2020favorite-conventions.pdf#page=33">http://angg.twu.net/LATEX/2020favorite-conventions.pdf#page=33</a><br>
<br>
the information on how to translate each of my terms to Agda, using<br>
exactly the terminology of the agda-categories library whenever<br>
possible...<br>
<br>
My guess is that it should be possible to write a "poor man's way to<br>
typeset Agda source", like this thing here, that requires the user to<br>
add lots of backslashes by hand:<br>
<br>
  % \co: a low-level way to typeset code; a poor man's "\verb"<br>
  \def\co#1{{%<br>
    \def\%{\char37}%<br>
    \def\\{\char92}%<br>
    \def\^{\char94}%<br>
    \def\~{\char126}%<br>
    \tt#1%<br>
    }}<br>
  \def\qco#1{`\co{#1}'}<br>
  \def\qqco#1{``\co{#1}''}<br>
<br>
_and_ I guess that some people here may have written hacks like this,<br>
which is why I am asking... the tricky part is how to handle the<br>
unicode characters.<br>
<br>
By the way, I use lualatex most of the time and pdflatex when I need,<br>
and I've spent too much time learning how to use tricks like these<br>
<br>
  \catcode`¢Ö=13 \def¢Ö{\nearrow} % lualatex<br>
  \DeclareUnicodeCharacter{2198}{\searrow} % pdflatex<br>
<br>
and how to fix them when they break. =/<br>
<br>
  Thanks in advance!<br>
    Eduardo Ochs<br>
    <a href="http://angg.twu.net/math-b.html">http://angg.twu.net/math-b.html</a><br>
    <a href="http://angg.twu.net/dednat6.html">http://angg.twu.net/dednat6.html</a><br>
_______________________________________________<br>
Agda mailing list<br>
Agda@lists.chalmers.se<br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda">https://lists.chalmers.se/mailman/listinfo/agda</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>