1

I try to to make agda code using unicode characters such as greek characters readable in a LaTeX2e file (which uses a lmcs.cls file http://www.lmcs-online.org/Information/lmcs.cls ). So, I cannot use XeLaTeX instead as recommended to similar problem.

More precisely I added the necessary lines from http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.LiterateAgda to my file. As described there, it can happen that certain unicode characters are still not yet available and need to be declared separately.

Here is a (possibly minimal) example:

 \documentclass{lmcs}

\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{autofe}

\usepackage[greek,english]{babel} %note: after loading autofe

\DeclareUnicodeCharacter{"03B9}{\textiota}     % ι
\DeclareUnicodeCharacter{"27E6}{\llbracket} 

\begin{document}
ι
⟦
\end{document}

The problems with this are: 1)even if there is no error message, \textiota is not displayed in the pdf output, 2) there is an error message Undefined control sequence. \u-document-10214 #1->\llbracket

guest
  • 13
  • 1
    Note that there's a difference between the example code and what is suggested: \DeclareUnicodeCharacter{"03B9}{\textiota} - note the use of ". – Werner Feb 24 '17 at 01:17
  • Thanks for your answer. Sorry, where is the " suggested? When I add it, I still receive the same error message. – guest Feb 24 '17 at 01:26
  • It is in the syntax given on the page you linked to. If you still get an error, post a proper minimal example we can compile to reproduce the error. Please also provide the exact text of the error message and not just a summary or interpretation. – cfr Feb 24 '17 at 04:23
  • 1
    @cfr @Werner The linked page suggests ! The correct character is ". – Paul Gaborit Feb 24 '17 at 06:06
  • @PaulGaborit You can only ping one person at a time. – cfr Feb 25 '17 at 00:43
  • @PaulGaborit Yes, well. Given that it tells users to use the utf8x option, what do you expect? [Not sure about ucs - is that useful?] – cfr Feb 25 '17 at 00:45
  • 2
    @Werner The linked page suggests \DeclareUnicodeCharacter{”03B9}{\textiota} instead of \DeclareUnicodeCharacter{"03B9}{\textiota} (note the difference between and "). – Paul Gaborit Feb 25 '17 at 06:35
  • Can you reproduce with a standard class? With article it works for me. If not , please give a link for the class. – cfr Mar 07 '17 at 02:14
  • I have updated which problems I still have and have added a link to the style file. I know that there have been proposed some solutions to similar problems in other classes, but I have to use the lmcs class. – guest Mar 07 '17 at 02:49
  • The demo file for lmcs.cls works fine when processing with XeLaTeX. LaTeX2e is a format; XeTeX is an engine; XeLaTeX is shorthand for LaTeX to be processed by XeTeX. There are a few instances where your choice of engine matters, but this does not appear to be the case. Perhaps this glorified glossary will help. – Sean Allred Mar 07 '17 at 03:06
  • Thank you, but I don't have the freedom to choose a different engine or -format. – guest Mar 07 '17 at 03:15
  • It is true that you can't choose a different format: \documentclass means you are using the LaTeX format. But why can't you use a different engine? There is nothing in the cls file that seems to forbid it. More importantly, however, the usual advice is to avoid the ucs package and utf8x encoding. See, e.g., this answer; but I think you can find the advice repeated fairly often in different questions (here's the search results). – jon Mar 07 '17 at 03:45
  • Can you suggest an alternative to the use of ucs and utf8x which does http://wiki.portal.chalmers.se/agda/pmwiki.php?n=Main.LiterateAgda ? – guest Mar 07 '17 at 04:21

0 Answers0