Discussion:
Special characters - .docx to .tex and .pdf
Nick Fraser
2015-04-19 14:46:15 UTC
Permalink
Hello,

I'm using Pandoc to convert a .docx file to both latex and pdf. The file
has several special characters in it, for example 'ÎŽ'.
pandoc -o test.tex test.docx --latex-engine=xelatex
This is fine, except the ÎŽ symbol appears in unicode in the .tex file, so
pandoc -o test.pdf test.tex --latex-engine=xelatex
It doesn't render the 'ÎŽ' symbol in the PDF. So far I found two options to
get around this:

1. Change the font type (using --variable mainfont=Arial) to a font that
does render the symbol in the PDF.

2. Manually change the 'ÎŽ' symbol in the .tex file to the latex format
$\delta$, and then it is rendered in the PDF without having to change font.

Option 2 would be vastly preferable for me, if there were some automated
way to do this on conversion from the original .docx file. Can anyone
suggest how this might be achieved?

Sorry if this all sounds very rookie - it is my first weekend of diving
into Pandoc!
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2cd21267-71d9-41ba-a789-59d55e8c913c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
John MacFarlane
2015-04-19 18:11:52 UTC
Permalink
Pandoc has code (via the texmath library) that will convert native Word equation objects into equivalent LaTeX math. But I assume this delta is just "loose" in your word document, not part of an equation. In that case, it wouldn't be appropriate, I think, to convert it to $\delta$. We'd need to know it's mathematics before doing that. Maybe it's part of a Greek word, for example.

The trick is to use xelatex and set a mainfont that has the glyphs you need.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20150419181152.GA43103%40localhost.hsd1.ca.comcast.net.
For more options, visit https://groups.google.com/d/optout.
Scot Mcphee
2015-04-20 01:07:17 UTC
Permalink
As someone who need to write polytonic Greek occasionally (see my .sig) and
never mathematics, the direct use of Unicode and a font that supports the
glyphs I need is generally far preferable to having to use the TeX \delta,
etc. (also the math symbols don't have the diacritics anyway).




*Scot Mcphee. *
*Computer programmer. Classics PhD.*
p +61 412 957414
e ***@gmail.com
w http://autonomous.org/
Post by John MacFarlane
Pandoc has code (via the texmath library) that will convert native Word
equation objects into equivalent LaTeX math. But I assume this delta is
just "loose" in your word document, not part of an equation. In that case,
it wouldn't be appropriate, I think, to convert it to $\delta$. We'd need
to know it's mathematics before doing that. Maybe it's part of a Greek
word, for example.
The trick is to use xelatex and set a mainfont that has the glyphs you need.
--
You received this message because you are subscribed to the Google Groups
"pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/pandoc-discuss/20150419181152.GA43103%40localhost.hsd1.ca.comcast.net
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFnRE0T73LDZSkTT6MWpEj-J3ixsi%3DhuBWajw05kHmMTMfHF5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Nick Moffitt
2015-04-20 07:57:18 UTC
Permalink
Post by Scot Mcphee
As someone who need to write polytonic Greek occasionally (see my .sig) and
never mathematics, the direct use of Unicode and a font that supports the
glyphs I need is generally far preferable to having to use the TeX \delta,
etc. (also the math symbols don't have the diacritics anyway).
Μπορῶ νὰ φάω σπασμένα γυαλιὰ χωρὶς νὰ πάθω τίποτα.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+***@googlegroups.com.
To post to this group, send email to pandoc-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20150420075718.GH12387%40zork.net.
For more options, visit https://groups.google.com/d/optout.
Loading...