Issue3322.tex 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. % Nisse, 2018-10-26
  2. % Testing that record field are already highlighted by scope checker.
  3. \documentclass{article}
  4. \usepackage{agda}
  5. % This redefinition of AgdaField,
  6. % in combination with the math-only command \bot,
  7. % will fail the LaTeX build if no highlighting
  8. % of fields has been performed.
  9. \renewcommand{\AgdaField}[1]{\ensuremath{#1}}
  10. \usepackage{amsmath}
  11. \usepackage{newunicodechar}
  12. \newunicodechar{₁}{\ensuremath{{}_{\text{1}}}}
  13. \newunicodechar{₂}{\ensuremath{{}_{\text{2}}}}
  14. \newunicodechar{⊥}{\bot}
  15. \pagestyle{empty}
  16. \begin{document}
  17. \begin{code}%
  18. \>[0]\AgdaKeyword{record}\AgdaSpace{}%
  19. \AgdaRecord{R}\AgdaSpace{}%
  20. \AgdaSymbol{:}\AgdaSpace{}%
  21. \AgdaPrimitive{Set₂}\AgdaSpace{}%
  22. \AgdaKeyword{where}\<%
  23. \\
  24. \>[0][@{}l@{\AgdaIndent{0}}]%
  25. \>[2]\AgdaKeyword{field}\<%
  26. \\
  27. \>[2][@{}l@{\AgdaIndent{0}}]%
  28. \>[4]\AgdaField{⊥}\AgdaSpace{}%
  29. \AgdaSymbol{:}\AgdaSpace{}%
  30. \AgdaPrimitive{Set₁}\<%
  31. \\
  32. %
  33. \\[\AgdaEmptyExtraSkip]%
  34. \>[0]\AgdaFunction{r}\AgdaSpace{}%
  35. \AgdaSymbol{:}\AgdaSpace{}%
  36. \AgdaRecord{R}\<%
  37. \\
  38. %
  39. \\[\AgdaEmptyExtraSkip]%
  40. \>[0]\AgdaFunction{r}\AgdaSpace{}%
  41. \AgdaSymbol{=}\AgdaSpace{}%
  42. \AgdaKeyword{record}\AgdaSpace{}%
  43. \AgdaSymbol{\{}\AgdaSpace{}%
  44. \AgdaField{⊥}\AgdaSpace{}%
  45. \AgdaSymbol{=}\AgdaSpace{}%
  46. \AgdaPrimitive{Set}\AgdaSpace{}%
  47. \AgdaSymbol{\}}\<%
  48. \end{code}
  49. \end{document}