5

Inside a tabbing environment, certain symbol combinations (such as \') are reserved for defining tabs and increasing/decreasing indentation of the text. However, I would like to include special characters inside a tabbing environment with special characters such as \'{c} and \'{e}. Is there any way to "escape" these special character combinations?

Below is an MWE, where for instance I'd like to write "Adiós" instead of "Adios". But if I use Adi\'{o}s, the text only shifts and no accent is put on the "o".

\documentclass{article}
\begin{document}
\begin{tabbing}
Hello ~~~~ \= Hi\\
 \> Adios
\end{tabbing}
\end{document}

By the way: at some places I read that \o' is supposed to do the trick here, but it just converts the "o" to a "ø" and adds the ' afterwards.

1 Answer 1

5

For the occasional oddity, I'd suggest boxing the content first and then using the box inside tabbing:

enter image description here

\documentclass{article}
\newsavebox{\tabbox}
\begin{document}
\savebox{\tabbox}{Adi\'os}
\begin{tabbing}
Hello ~~~~ \= Hi\\
 \> \usebox{\tabbox}
\end{tabbing}
\end{document}

Alternatively, use a UTF8 input encoding directly:

\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{tabbing}
Hello ~~~~ \= Hi\\
 \> Adiós
\end{tabbing}
\end{document}

You can also save the original definitions you're interested in, like \' and \`:

\documentclass{article}
\let\textacute\'
\let\textgrave\`
\begin{document}
\begin{tabbing}
Hello ~~~~ \= Hi\\
 \> Adi\textacute{o}s
\end{tabbing}
\end{document}
1
  • Thanks for the answer, and even giving me several options to choose from! The last solution seems to be the "cleanest" to me -- just give the command another name, and call that name instead. That works well, thanks!
    – TMM
    Nov 12, 2015 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .