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.

For alphabets with dots one has ö=\"o, but I would like to introduce another horizontal line just above the two dots. The command \=\"o doesn't yield the sought result.

share|improve this question
    
Did you try \={\"o}? Writing \=o is actually an abbreviated form of \={o} which works because there's only a token. You want to put the bar above the whole \"o (which should be \"{o}, but works also without braces for the same reason). –  egreg Dec 17 '12 at 16:23
    
No matter how many braces I put, the same result -- the bar is stubbornly put before the \"o. –  Ilonpilaaja Dec 17 '12 at 16:26
    
Use \usepackage[T1]{fontenc}, which for a Finn should be always the case. –  egreg Dec 17 '12 at 16:29

1 Answer 1

up vote 8 down vote accepted

Well, superimposing accents is not always easy; even the advice of \usepackage[T1]{fontenc} doesn't give the expected result. Here's a workaround:

\documentclass{article}
\usepackage[T1]{fontenc}

\newcommand{\tbar}[1]{\mbox{%
  \sbox0{#1}\sbox2{\={}}%
  \ooalign{\hidewidth\raise\dimexpr\ht0-\ht2+.25ex\box2 \hidewidth\cr#1\cr}}}

\begin{document}
\tbar{\"o}\={\"o}
\end{document}

I've put next the result of superimposing the accent. Act on .25ex for changing the height of the bar.

enter image description here

share|improve this answer
    
Yes, this worked even with [T2A]{fontenc}, that I had to have for certain reasons. Thanks! –  Ilonpilaaja Dec 17 '12 at 16:56

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.