I want to use a "|" in my \emph{}, like \emph{"Yes"|"No"}, but it changes the | to a --.
How do I stop this from happening?
I want to use a "|" in my \emph{}, like \emph{"Yes"|"No"}, but it changes the | to a --.
How do I stop this from happening?
With \usepackage[T1]{fontenc} you don't have the problem with the bizarre output. However the result is not beautiful. I'll show it together with a \textor command that seems better.
\documentclass{article}
\usepackage[T1]{fontenc}
\DeclareRobustCommand\textor{%
\ifdim\fontdimen1\font>0pt % test if the current font is slanted
\/$\,|$% it is
\else
$\,|\,$% it isn't
\fi}
\begin{document}
\emph{``Yes''|``No''}
\emph{``Yes''\textor``No''}
``Yes''\textor``No''
\end{document}

\usepackage[T1]{fontenc}. However a slanted bar doesn't seem the best choice. – egreg Jun 19 '13 at 16:02|with\textbar– karlkoeller Jun 19 '13 at 16:51