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 would like to create a logo in LaTeX. Here I need to adjust two words relative to each other by a chosen letter.

Here is an example, where I'd like to get the two red characters exact among the other:

\documentclass{scrreprt} 
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{
    adieresis={ä},
    germandbls={ß},
    Euro={€},
}
\usepackage{tikz}

\begin{document} 

\begin{tikzpicture}
        \node at (0, 0) [above] {Irg\textcolor{red}{e}ndeinWort};
        \node at (0, 0) [below] {Hi\textcolor{red}{e}r};
\end{tikzpicture}

\end{document}

Do you have an idea how to do this without guessing the right values? Also it would be fine to have a solution independent from font size changes.

share|improve this question
add comment

1 Answer 1

up vote 12 down vote accepted

can be done with a simple tabular. You can also define a new macro for this if you need different texts and colors

\documentclass{scrreprt} 

\usepackage{array,xcolor}

\begin{document} 

{\tabcolsep=0pt
\begin{tabular}{r>{\color{red}}cl}
Irg & e & ndeinWort\\
Hi & e & r
\end{tabular}}

\end{document}

enter image description here

or if you do not have the same characters

\tabcolsep=0pt
\begin{tabular}{rcl}
    Irgende & i & nWort\\
    Hi \kern0pt& \makebox[0pt]{m} & \kern2.5pt mel\\
\end{tabular}
share|improve this answer
    
Thanks! An easy way is always the best one. But often missed. –  Dirk Nov 19 '12 at 12:01
    
This works too. Thank you! But I tried it with an "l" instead of the "m" and the distances are wrong again. How did you find 0pt and 2.5pt? –  Dirk Nov 20 '12 at 12:39
    
trial and error ... it is not really easy to catch all different combinations of characters with correct spacing –  Herbert Nov 20 '12 at 12:45
    
Ok, I did it this way. Some spaces are good in ex and em, but can only find by trial and error. Thx! –  Dirk Nov 21 '12 at 13:29
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.