Documenter.jl icon indicating copy to clipboard operation
Documenter.jl copied to clipboard

Greek letters mangled in LaTeXWriter

Open odow opened this issue 1 year ago • 2 comments

These are @example blocks in the JuMP documentation:

```@example
π
```
```@example
typeof(π)
```
image

Note the new line after the first π and the incorrect location of π in the output of the typeof cell.

REPL is

julia> π
π = 3.1415926535897...

julia> typeof(pi)
Irrational{:π}

odow avatar Sep 15 '22 09:09 odow

The .tex file is correct without any spurious new line or escape characters:

\begin{lstlisting}
π = 3.1415926535897...
\end{lstlisting}

so this is a known problem with unicode in the {lstlisting} environments: https://tex.stackexchange.com/questions/24528/having-problems-with-listings-and-utf-8-can-it-be-fixed

Given the prevalence of unicode in Julia output, I think we might need to consider an alternative package/environment.

odow avatar Sep 15 '22 21:09 odow

Given the prevalence of unicode in Julia output, I think we might need to consider an alternative package/environment.

That sounds reasonable.

mortenpi avatar Sep 17 '22 06:09 mortenpi