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 use the command:

\path [shift={(-2.75,0)},decorate, decoration={text along path, text={Plan meridien}}]
      (165:2.8) arc (165:90:2.8) ;

to draw a text on the circular arc path. This work well.

But I use French language, and I try to put correct accentuation on the word "méridien". The problem is then the LaTeX compilation stop, the result is not rendered. It is not possible to put any accent.

So, can I wrote French text along a path on TikZ figure? or any accent and/or special accent by this way (text decoration by TikZ)?

share|improve this question
    
Welcome to TeX.sx!. Are you using babel with the french option? In such cases a minimal working example (MWE) that illustrates your problem is always beneficial because people see how exactly you do it. –  Martin Scharrer Jun 25 '11 at 17:40
add comment

1 Answer

According to the v2.10 manual, section 30.6, each letter of the text is typeset in its own \hbox. I take this to mean that TikZ parses the text = {...} token-by-token, so if you wrote Plan m\'eridien, it would take \' to be its own character; since it is just an accent command, that causes an error. Writing Plan m{\'e}ridien works.

Edit: As Altermundus says, the braces cause the accented letter {\'e} to be treated as a single token, which is very often the case in TeX.

share|improve this answer
1  
This is exact. You need to use parentheses –  Alain Matthes Jun 25 '11 at 17:19
    
I try the argument {\'e} and this work fine. I understand your explanation. Thanks very much !. –  Dominique COLLIN Jun 25 '11 at 18:08
    
TikZ seems to really read the text token by token (using \futurelet) but if it finds a { it reads the group as macro argument instead. (This actually will break if \bgroup is used outside { } because it looks like a { for \ifx.) –  Martin Scharrer Jun 25 '11 at 18:08
    
So there's no kerning between letters? Ouch! –  egreg Jun 25 '11 at 18:20
    
@egreg: In this application (placing the letters on a path) you don't need the normal kerning anyway. Actually you need to adjust the spacing/kerning depending on the current position of the path... –  Martin Scharrer Jun 25 '11 at 18:24
show 3 more comments

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.