TeX - LaTeX Asked by user77402 on April 1, 2021
I am using Texpad 1.7.42 (Desktop, not cloud or iOS), to edit locally TeX documents produced originally in the cloud (on Overleaf). My documents contain many Unicode characters, and use XeLaTex with fontspec
loaded.
This is the document I produced in Overleaf:
documentclass{article}
usepackage{fontspec}
setmainfont{Times New Roman}
begin{document}
Résumé
end{document}
When I download the .tex
file, and open it in Texpad, Texpad transforms
Résumé
into
Résumé
(The rest of the file is unchanged, and it compiles without issue)
Texpad’s support documentation acknowledges an issue with unicode characters, and their recommendation is to insert:usepackage[utf8]{inputenc}
. However, as I am using fontspec
, inputenc
has no effect, and inserting it into my MWE changes nothing.
Similarly, this solution given for a similar problem in TexShop (inserting % !TEX encoding = UTF-8 Unicode
) doesn’t work.
Is there any way to use Unicode characters along with XeLaTeX and fontspec
in Texpad?
I just looked at the online TeXPad manual and it says there is a File->File Encoding menu item. Change to UTF-8. If possible try doing that with no open files to make sure you don't get a conversion that will make you unhappy.
Correct answer by Herb Schulz on April 1, 2021
This is not the problem the original poster had, but for those brought to this page’s title by a search engine (as I was), here’s what eventually worked for me for text mode. N.b. not math mode, which is completely broken due to “missing a few extensions required to support the unicode-math
package.”
Texpad’s proprietary LaTeX compiler doesn’t handle Unicode by default; e.g. “∀z z∉z ⇒ z∈x” hides everything but “z zz zx.” Unchecking Auto-Sense in the document’s Typeset/General configuration and changing to Unicode Mode instead gives garbage characters. (A common failing, but I expected better from a commercial Mac app. The documentation sort of hints at this, but without providing a solution.)
Some combination of the following got mathematical symbols to show up properly:
usepackage{fontspec}
setmainfont[Mapping=tex-text, ItalicFont={Latin Modern Roman Slanted}, BoldFont={Latin Modern Roman Demi}]{Latin Modern Math}
Those setmainfont
options are obviously not comprehensive; see Best way of using the full range of full fonts/styles/faces for Latin Modern Roman?
Another gotcha was that enabling microtype silently switches away from TexpadTex. And claims of support for the paid version turn out to be mostly illusory.
Answered by Flash Sheridan on April 1, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP