Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using XeLaTeX in conjunction with amsmath and unicode-math for my reports. After a while, I ran into a weird problem in which compilation would just hang indefinitely. I found out the culprit was me using \pm or \times symbols (there might of course be others) in a math environment.

Does anybody know why this occurs and how to fix it?

Edit: Okay, after stripping down my list of packages I observed that compilation breaks as soon as I use the inputenc package, for example:

\documentclass[11pt,titlepage]{report}

\usepackage[T1]{fontenc}
\usepackage{fontspec} % XeLaTeX required!
\usepackage[latin1]{inputenc} % <------ This package breaks compilation!!!
\usepackage{mathtools}
\usepackage{unicode-math}

\setmainfont[Ligatures=TeX]{Myriad Pro}
\setmathfont{Asana Math}
\setmonofont{Consolas}

\begin{document}
$\pm$
\end{document}

Not being able to use this package would be a real shame though, because we dutch people sure like our accents at times...

share|improve this question
2  
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document} –  Joseph Wright Apr 28 at 14:40
    
Can you please provide a mwe as having just tried the most simple case, I cannot reproduce your problem. –  ArTourter Apr 28 at 14:41
    
Thanks for your replies, I have added an example using every package that is in my default set-up and does not compile. –  NinjaTuna Apr 28 at 15:27
1  
Yes, Asana Math is a Unicode complete math font, you can download it as a package: ctan.org/tex-archive/fonts/Asana-Math I now stripped my MWE to an actual minimal example, and concluded inputenc breaks compilation. –  NinjaTuna Apr 28 at 16:28
1  
If you are using XeLaTeX or LuaLaTeX you should never load the inputenc package (and usually not the fontenc package.) Your file should be saved at UTF-8. See Using XeLaTeX instead of pdfLaTeX. Also, if you are using IPA characters with XeLaTeX you may run into problems using TIPA; instead use a Unicode font that has IPA. See Using TeX for writing papers on linguistics. –  Alan Munn Apr 28 at 16:32

1 Answer 1

up vote 4 down vote accepted

If you are using XeLaTeX or LuaLaTeX you should never load the inputenc package (and usually not the fontenc package.) Your file should be saved at UTF-8. See

Also, if you are using IPA characters with XeLaTeX you may run into problems using TIPA; instead use a Unicode font that has IPA. See

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.