Tag Info

Hot answers tagged


\verb has no effect on tokens (even if you expanded \FileName), so you want something more like this \def\FileName{A_B} \documentclass{article} \usepackage[T1]{fontenc} \begin{document} \texttt{\detokenize\expandafter{\FileName}} \end{document}


\cprotect\bla allows to have \verb in the argument to \bla, but since \bla has no argument, nothing is done. You have to \cprotect the definition of \bla: \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{cprotect} \usepackage{fancyvrb} \begin{document} \cprotect{\newcommand{\bla}}{Like this one: \verb-!@#$%^&*()_+-.} ...


Just add Mapping=tex-text or Ligatures=TeX to the \fontspec options (see ยง11.1 of the docs).


You need to tell fontspec to emulate traditional TeX typesetting features, such as turning backticks and straight quotation marks into curly quotation marks. You can do this using Mapping but the recommended syntax is Ligatures=TeX: \documentclass{article} \usepackage[a4paper, margin = 0.4in]{geometry} \usepackage{fontspec} \begin{document} ...


You have to brace \href{www.numpy.org}: \documentclass{article} \usepackage{cprotect} \usepackage{hyperref} \begin{document} With \texttt{\string\verb}: \cprotect{\href{http://www.numpy.org}}{\verb|numpy|} With \texttt{\string\texttt}: \href{http://www.numpy.org}{\texttt{numpy}} \end{document} However, using \cprotect doesn't seem necessary here, as ...


The first part of the the answer is clear from the comments above. WinEdt only recognises verbatim as a "verbatim" environment. If you want more control on these kind of environments you have to install the plugin of mine VerbatimPlus. With this, you have support for environments coming from the following packages: listings, moreverb, verbatim and fancyvrb. ...


Here's a way using a verbatimbox. \documentclass{article} \usepackage{verbatimbox,hyperref} \begin{document} \begin{myverbbox}{\numpy}n$_umpy\end{myverbbox} And now we \href{www.numpy.org}{\numpy}\,. \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible