Closed johnblommers closed 4 years ago
The latexcodec
documentation states that it isn't complete. I suppose all we can do is identify the problems and add them to the replacement dictionary manually, or report them to the package developers.
I will add these two, and check a few others of similar type.
I've found a workaround. If the intention is to export to LaTeX then the writer can simply insert the LaTeX code for the symbols they want. So:
novelWriter already passes the LaTeX codes directly into the LaTeX output file where it will present correctly when converted to PDF. I'm a Gummi fan and this worked for me.
Yes, the latexcodec
package leaves already correct LaTeX formatted text alone.
Only paragraphs and heading text is encoded with this package though, but this is certainly a workable solution if LaTeX is the only export used. I will add it to the documentation.
Comment.
Writers that include LaTeX in their novels are probably a rare breed and will know how to handle problems they encounter using it in novelWriter.
For example. I created a LaTeX math formula that contained subscripts like this:
$$f(x)=a_{0}+a_{1}x$$
but on exporting this with novelWriter the subscript character _
found itself escaped as \_
in the .tex
export file. The workaround is to instead use the \sb
LaTeX syntax:
$$f(x)=a\sb{0}+a\sb{1}x$$
Yeah, that's far beyond what is intended usage of novelWriter. It's for writing plain text. The LaTeX export is only intended for generating PDFs of plain text quickly.
LaTeX export will not be included in the new Project Build Tool, and the current Export tool will be removed. This issue will therefore not be addressed. Closing it.
I've placed the characters π (
π
) and → (→
) in a novelWriter document. When I export to LaTeX and attempt PDF conversion using TeXshop two errors present themselves:The two unicode characters don't appear in the PDF output after we press Return twice to bypass the error messages.
I had thought the matter resolved with the addition of the
latexcodec
but I think I've jumped the gun and tested this prematurely.