Open alexjbest opened 3 years ago
My intent with the Unicode characters for listings was to enable comments in different languages, mostly thinking of European accented languages. Now - if Sage is happy with a Greek letter as a variable, I guess we should try to support a nice print version of that! Who knew. (Oh, I see it is Python 3, really. All the moreso.)
Do you want to experiment editing the XSL to support your nu, lambda, mu, and kappa? In other words, are you OK with starting work on this? If there is no (more) messing around with LaTeX encodings and UTF8 support, that'd be the best outcome.
I don't want to step on the possibility of an entire document being authored in Greek, but we accomplish that with xelatex
and I guess this is localized to code listings anyway. The textgreek
package looks to be last updated 10 years ago, which makes me nervous. But there are subjects (chemistry) where they like the upright Greek letters, so we'd need to see how that goes.
I have some idea that the literate
option was limited to the "first" 256 Unicode characters, but perhaps your work already indicates that is nonsense.
I have a similar problem with the Greek letter lambda and the less-than-or-equal symbol not showing up when I create a PDF via pretext build print
(see attached)
pretext-unicode.zip
Outside of a computer program listing (which I think is the thrust of this issue), we get much better versions of mathematics with LaTeX syntax, and then we process with LaTeX for the PDF and MathJax for HTML. For example, we can turn the below into braille, not so right now when using Unicode.
So try
<m>\lambda</m>
for the bare lambda
and
<m>485\leq\lambda\lt 500</m>
in the table cells
OK; will make the change.
I have some code that makes use of unicode greek letters for variables (nu, lambda, kappa, mu) (thanks python3!) that I'm trying to include in a pretext program.
However the characters do not display, I believe this is as https://github.com/rbeezer/mathbook/blob/dev/xsl/pretext-latex.xsl#L1450 would need extending to include these letters.
Can we extend the conversion there to include some more (reasonably common) characters from greek?
For example a snippet of my pretext code is
In my tex output I have added
\usepackage{textgreek}
andto the
\lstset{literate=
but this seems a bit hacky and maybe not the Pretext way to achieve this!