article-pdflatex.tex 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. \documentclass{article}
  2. % Use the input encoding UTF-8 and the font encoding T1.
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[T1]{fontenc}
  5. % Support for Agda code.
  6. \usepackage{agda}
  7. % Customised setup for certain characters.
  8. \usepackage{newunicodechar}
  9. \newunicodechar{∀}{\ensuremath{\mathnormal{\forall}}}
  10. \newunicodechar{→}{\ensuremath{\mathnormal{\to}}}
  11. \newunicodechar{₁}{\ensuremath{{}_1}}
  12. % Support for Greek letters.
  13. \usepackage{alphabeta}
  14. % Disable ligatures that start with '-'. Note that this affects the
  15. % entire document!
  16. \usepackage{microtype}
  17. \DisableLigatures[-]{encoding=T1}
  18. \begin{document}
  19. Some code:
  20. \begin{code}%
  21. \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
  22. \AgdaKeyword{OPTIONS}\AgdaSpace{}%
  23. \AgdaPragma{--without-K}\AgdaSpace{}%
  24. \AgdaPragma{--count-clusters}\AgdaSpace{}%
  25. \AgdaSymbol{\#-\}}\<%
  26. \\
  27. %
  28. \\[\AgdaEmptyExtraSkip]%
  29. \>[0]\AgdaKeyword{open}\AgdaSpace{}%
  30. \AgdaKeyword{import}\AgdaSpace{}%
  31. \AgdaModule{Agda.Builtin.String}\<%
  32. \\
  33. %
  34. \\[\AgdaEmptyExtraSkip]%
  35. \>[0]\AgdaComment{--\ A\ comment\ with\ some\ TeX\ ligatures:}\<%
  36. \\
  37. \>[0]\AgdaComment{--\ --,\ ---,\ ?`,\ !`,\ `,\ ``,\ ',\ '',\ <<,\ >>.}\<%
  38. \\
  39. %
  40. \\[\AgdaEmptyExtraSkip]%
  41. \>[0]\AgdaFunction{Θ₁}\AgdaSpace{}%
  42. \AgdaSymbol{:}\AgdaSpace{}%
  43. \AgdaPrimitive{Set}\AgdaSpace{}%
  44. \AgdaSymbol{→}\AgdaSpace{}%
  45. \AgdaPrimitive{Set}\<%
  46. \\
  47. \>[0]\AgdaFunction{Θ₁}\AgdaSpace{}%
  48. \AgdaSymbol{=}\AgdaSpace{}%
  49. \AgdaSymbol{λ}\AgdaSpace{}%
  50. \AgdaBound{A}\AgdaSpace{}%
  51. \AgdaSymbol{→}\AgdaSpace{}%
  52. \AgdaBound{A}\<%
  53. \\
  54. %
  55. \\[\AgdaEmptyExtraSkip]%
  56. \>[0]\AgdaFunction{a-name-with--hyphens}\AgdaSpace{}%
  57. \AgdaSymbol{:}\AgdaSpace{}%
  58. \AgdaSymbol{∀}\AgdaSpace{}%
  59. \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
  60. \AgdaSymbol{:}\AgdaSpace{}%
  61. \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
  62. \AgdaSymbol{→}\AgdaSpace{}%
  63. \AgdaBound{A}\AgdaSpace{}%
  64. \AgdaSymbol{→}\AgdaSpace{}%
  65. \AgdaBound{A}\<%
  66. \\
  67. \>[0]\AgdaFunction{a-name-with--hyphens}\AgdaSpace{}%
  68. \AgdaBound{ff--fl}\AgdaSpace{}%
  69. \AgdaSymbol{=}\AgdaSpace{}%
  70. \AgdaBound{ff--fl}\<%
  71. \\
  72. %
  73. \\[\AgdaEmptyExtraSkip]%
  74. \>[0]\AgdaFunction{ffi}\AgdaSpace{}%
  75. \AgdaSymbol{:}\AgdaSpace{}%
  76. \AgdaPostulate{String}\<%
  77. \\
  78. \>[0]\AgdaFunction{ffi}\AgdaSpace{}%
  79. \AgdaSymbol{=}\AgdaSpace{}%
  80. \AgdaString{"--"}\<%
  81. \end{code}
  82. Note that the code is indented.
  83. \end{document}