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.

In the minimal example that follows luatex doesn't place the accent correctly (it's too far left):

\documentclass{minimal} 
\usepackage{fontspec}
\setromanfont{Linux Libertine O}
\begin{document}
\(\bar E\)
\end{document}

But if I compile it with xelatex, or with lualatex and \setromanfont{Linux Libertine O} commented out, everything works fine.

I believed that fonspec was only for text, and not for math. So why this strange behaviour ?

share|improve this question
2  
Try loading fontspec with the no-math option. –  Andrey Vihrov Nov 4 '11 at 15:01
    
@AndreyVihrov : It works. Maybe you could make an answer of you comment. –  Matsaya Nov 4 '11 at 16:22
    
Actually, I can't see any difference at all with LuaLaTeX and XeLaTeX. I use TeX Live 2011. Perhaps you could tell your distribution and show an image of what exactly is wrong. –  Andrey Vihrov Nov 4 '11 at 16:59
    
@AndreyVihrov I see the same with TeXlive 2011 (on W7), the bar is shifted left. –  Torbjørn T. Nov 4 '11 at 18:04
    
@AndreyVihrov I have TeXLive 2011 (on MacOs 10.7), fully updated. And the result really depend on the choice of the police (with Palatino, for example, it works fine). –  Matsaya Nov 5 '11 at 9:57
add comment

1 Answer

up vote 3 down vote accepted

This is what I get when calling \showlists after the formula:

LuaTeX

### horizontal mode entered at line 6
\whatsit
.\localinterlinepenalty=0
.\localbrokenpenalty=0
.\localleftbox=null
.\localrightbox=null
\hbox(0.0+0.0)x20.0, direction TLT
\mathon
\vbox(8.20554+0.0)x7.95831, direction TLT
.\hbox(5.67776+0.0)x0.0, direction TLT
..\OT1/cmr/m/n/10 ^^V
.\kern-4.30554
.\hbox(6.83331+0.0)x7.95831, direction TLT
..\OML/cmm/m/it/10 E
\mathoff

XeTeX

### horizontal mode entered at line 6
\hbox(0.0+0.0)x20.0
\mathon
\vbox(8.20554+0.0)x7.95831
.\hbox(5.67776+0.0)x0.0, shifted 2.31252
..\OT1/cmr/m/n/10 ^^V
.\kern-4.30554
.\hbox(6.83331+0.0)x7.95831
..\OML/cmm/m/it/10 E
\mathoff

There is clearly a problem with LuaTeX; it can be due to fontspec as, when not loading it or loading a different font than Linux Libertine O (I tested Old Standard and TeX Gyre Termes) I get the following:

LuaTeX (without Linux Libertine O)

### horizontal mode entered at line 6
\whatsit
.\localinterlinepenalty=0
.\localbrokenpenalty=0
.\localleftbox=null
.\localrightbox=null
\hbox(0.0+0.0)x20.0, direction TLT
\mathon
\vbox(8.20554+0.0)x7.95831, direction TLT
.\hbox(5.67776+0.0)x0.0, shifted 2.31252, direction TLT
..\OT1/cmr/m/n/10 ^^V
.\kern-4.30554
.\hbox(6.83331+0.0)x7.95831, direction TLT
..\OML/cmm/m/it/10 E
\mathoff
share|improve this answer
add comment

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.