
Cuando copio y pego llaves (también conocidas comotirantes) del \texttt{}
modo, se interpretan comoFygramo. ¿Qué puedo hacer para obtener llaves adecuadas? Intenté usarlo \string
pero parece que esto no permite dividirlo en varias líneas.
Aquí está mi ejemplo de trabajo mínimo.
\documentclass{article}
\usepackage{empheq}
\newcommand*\widefbox[1]{\fbox{\hspace{2em}#1\hspace{2em}}}
\begin{document}
Compiles but gives "f g"-problem:
\begin{empheq}[box=\fbox]{align*}
&\texttt{\{}\\
&\texttt{something}\\
&\texttt{\}}
\end{empheq}
Compiles and gives proper curly brackets, but I need three lines not one:
\begin{empheq}[box=\fbox]{align*}
\texttt{\string{ something \string}}
\end{empheq}
\iffalse
Does not compile:
\begin{empheq}[box=\fbox]{align*}
\texttt{\string{ \\
something \\
\string}}
\end{empheq}
\fi
\end{document}
Respuesta1
No puedo reproducir el problema; por otro lado, si desea obtener las llaves en la fuente monoespaciada, puede cargar
\usepackage[T1]{fontenc}
o ingréselo como
\texttt{\symbol{`\{}}
y
\texttt{\symbol{`\}}}