acmart-xelatex.tex 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. \documentclass[acmsmall]{acmart}
  2. % Support for Agda code.
  3. \usepackage{agda}
  4. % Code should be indented.
  5. \setlength{\mathindent}{1em}
  6. % Use special font families without TeX ligatures for Agda code. (This
  7. % code is inspired by a comment by Enrico Gregorio/egreg:
  8. % https://tex.stackexchange.com/a/103078.)
  9. \usepackage{fontspec}
  10. \newfontfamily{\AgdaSerifFont}{Linux Libertine O}
  11. \newfontfamily{\AgdaSansSerifFont}{Linux Biolinum O}
  12. \newfontfamily{\AgdaTypewriterFont}{inconsolata}
  13. \renewcommand{\AgdaFontStyle}[1]{{\AgdaSansSerifFont{}#1}}
  14. \renewcommand{\AgdaKeywordFontStyle}[1]{{\AgdaSansSerifFont{}#1}}
  15. \renewcommand{\AgdaStringFontStyle}[1]{{\AgdaTypewriterFont{}#1}}
  16. \renewcommand{\AgdaCommentFontStyle}[1]{{\AgdaTypewriterFont{}#1}}
  17. \renewcommand{\AgdaBoundFontStyle}[1]{\textit{\AgdaSerifFont{}#1}}
  18. \begin{document}
  19. \acmConference{Some conference}
  20. \maketile
  21. Some code:
  22. \begin{code}%
  23. \>[0]\AgdaSymbol{\{-\#}\AgdaSpace{}%
  24. \AgdaKeyword{OPTIONS}\AgdaSpace{}%
  25. \AgdaPragma{--without-K}\AgdaSpace{}%
  26. \AgdaPragma{--count-clusters}\AgdaSpace{}%
  27. \AgdaSymbol{\#-\}}\<%
  28. \\
  29. %
  30. \\[\AgdaEmptyExtraSkip]%
  31. \>[0]\AgdaKeyword{open}\AgdaSpace{}%
  32. \AgdaKeyword{import}\AgdaSpace{}%
  33. \AgdaModule{Agda.Builtin.String}\<%
  34. \\
  35. %
  36. \\[\AgdaEmptyExtraSkip]%
  37. \>[0]\AgdaComment{--\ A\ comment\ with\ some\ TeX\ ligatures:}\<%
  38. \\
  39. \>[0]\AgdaComment{--\ --,\ ---,\ ?`,\ !`,\ `,\ ``,\ ',\ '',\ <<,\ >>.}\<%
  40. \\
  41. %
  42. \\[\AgdaEmptyExtraSkip]%
  43. \>[0]\AgdaFunction{Θ₁}\AgdaSpace{}%
  44. \AgdaSymbol{:}\AgdaSpace{}%
  45. \AgdaPrimitive{Set}\AgdaSpace{}%
  46. \AgdaSymbol{→}\AgdaSpace{}%
  47. \AgdaPrimitive{Set}\<%
  48. \\
  49. \>[0]\AgdaFunction{Θ₁}\AgdaSpace{}%
  50. \AgdaSymbol{=}\AgdaSpace{}%
  51. \AgdaSymbol{λ}\AgdaSpace{}%
  52. \AgdaBound{A}\AgdaSpace{}%
  53. \AgdaSymbol{→}\AgdaSpace{}%
  54. \AgdaBound{A}\<%
  55. \\
  56. %
  57. \\[\AgdaEmptyExtraSkip]%
  58. \>[0]\AgdaFunction{a-name-with--hyphens}\AgdaSpace{}%
  59. \AgdaSymbol{:}\AgdaSpace{}%
  60. \AgdaSymbol{∀}\AgdaSpace{}%
  61. \AgdaSymbol{\{}\AgdaBound{A}\AgdaSpace{}%
  62. \AgdaSymbol{:}\AgdaSpace{}%
  63. \AgdaPrimitive{Set}\AgdaSymbol{\}}\AgdaSpace{}%
  64. \AgdaSymbol{→}\AgdaSpace{}%
  65. \AgdaBound{A}\AgdaSpace{}%
  66. \AgdaSymbol{→}\AgdaSpace{}%
  67. \AgdaBound{A}\<%
  68. \\
  69. \>[0]\AgdaFunction{a-name-with--hyphens}\AgdaSpace{}%
  70. \AgdaBound{ff--fl}\AgdaSpace{}%
  71. \AgdaSymbol{=}\AgdaSpace{}%
  72. \AgdaBound{ff--fl}\<%
  73. \\
  74. %
  75. \\[\AgdaEmptyExtraSkip]%
  76. \>[0]\AgdaFunction{ffi}\AgdaSpace{}%
  77. \AgdaSymbol{:}\AgdaSpace{}%
  78. \AgdaPostulate{String}\<%
  79. \\
  80. \>[0]\AgdaFunction{ffi}\AgdaSpace{}%
  81. \AgdaSymbol{=}\AgdaSpace{}%
  82. \AgdaString{"--"}\<%
  83. \end{code}
  84. Note that the code is indented.
  85. \end{document}