Grapheme-clusters-with-pragma.quick.tex 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. \documentclass{article}
  2. \usepackage{agda}
  3. % Make sure that cluster counting is activated.
  4. \begin{code}[hide]%
  5. %
  6. \>[2]\AgdaSymbol{\{-\#}\AgdaSpace{}%
  7. \AgdaKeyword{OPTIONS}\AgdaSpace{}%
  8. \AgdaPragma{--count-clusters}\AgdaSpace{}%
  9. \AgdaSymbol{\#-\}}\<%
  10. \end{code}
  11. \begin{document}
  12. \AgdaPostulate{A} and \AgdaPostulate{B} should be aligned:
  13. \begin{code}%
  14. %
  15. \>[2]\AgdaKeyword{postulate}\<%
  16. \\
  17. \>[2][@{}l@{\AgdaIndent{0}}]%
  18. \>[4]\AgdaPostulate{+̲+̲+̲+̲+̲+̲}%
  19. \>[12]\AgdaPostulate{A}\<%
  20. \\
  21. %
  22. \>[12]\AgdaPostulate{B}\AgdaSpace{}%
  23. \AgdaSymbol{:}\AgdaSpace{}%
  24. \AgdaPrimitive{Set}\<%
  25. \end{code}
  26. The two \AgdaKeyword{field} keywords should not be aligned:
  27. \begin{code}%
  28. %
  29. \>[2]\AgdaKeyword{record}\AgdaSpace{}%
  30. \AgdaRecord{+̲}\AgdaSpace{}%
  31. \AgdaSymbol{:}\AgdaSpace{}%
  32. \AgdaPrimitive{Set₁}\AgdaSpace{}%
  33. \AgdaKeyword{where}%
  34. \>[25]\AgdaKeyword{field}\AgdaSpace{}%
  35. \AgdaField{C}\AgdaSpace{}%
  36. \AgdaSymbol{:}\AgdaSpace{}%
  37. \AgdaPrimitive{Set}\<%
  38. \\
  39. \>[25][@{}l@{\AgdaIndent{0}}]%
  40. \>[26]\AgdaKeyword{field}\AgdaSpace{}%
  41. \AgdaField{D}\AgdaSpace{}%
  42. \AgdaSymbol{:}\AgdaSpace{}%
  43. \AgdaPrimitive{Set}\<%
  44. \end{code}
  45. \end{document}