Im running into a problem with text and math font encoding.
First off, the goal at the end of the day is to have a .pdf and .tex which can be searched and copied. The document is compiled in XeTex, and written (the .tex) entirely with unicode characters. So ω
instead of \omega
.
The most significant issue I am running into is fonts. After some searching, I found that the Latin Modern Roman typeset doesnt actually have very many characters in it. I cannot find a more extensive version other than latinmodern-math.otf, which has its own problems. It is important to be able to type every character outside of a math environment.
After exploring with the unicode-math package (which uses latinmodern-math.otf) I found that it destroys the output .pdf because of the math font indexes it uses. For example, all italic characters have a unique hex value instead of the same as their upright character (the later being the standard). This makes searching the .pdf for all bold, italic, and Fraktur impossible.
Similarly, without the unicode-math package, (because typing ω in a math setting does nothing) using \omega
creates a !
character, which also makes the document unsearchable. (I have yet to figure out why it doesn't show up as an !
in the .pdf).
Example, without the unicode-math package:
$H_{2}(j Ω \Omega ω \omega)$
will produce H2(jΩ!)
. Both the Ω
and ω
were omitted from the end result.
Example, with the unicode-math package:
$H_{2}(jΩω)$
will produce 𝐻(𝑗Ω𝜔)
What I am looking for, is to be able to type, for example:
Here is some text, Ω, ω, $H_{2}(jΩω)$
And have that output the characters:
Here is some text, Ω, ω, H2(jΩω)
Then of course format the math section like normal. (not shown)
Does anyone know how to solve this problem, and create both text and math that turn standard unicode input into standard unicode output? One that can be properly searched and copied?