# Tag Info

2

You can use the same idea as spverbatim as I did in Redefine verbatim environment With the verbatim package you can define a new environment to which apply \surroundwithmdframed. \documentclass{article} \usepackage{verbatim,mdframed,ragged2e} \usepackage{color} \definecolor{lightblue}{RGB}{240,248,255} \surroundwithmdframed[ backgroundcolor=lightblue, ...

4

Here are two versions that give slightly different behavior, depending on what you really seek. \documentclass{article} \usepackage[T1]{fontenc} \newcommand{\mytest}[1]{\texttt{#1}} \def\mydump#1{\detokenize\expandafter{#1}} \def\mydumplit#1{\detokenize{#1}} \begin{document} \mydump{\mytest{Hello World}} \mydumplit{\mytest{Hello World}} \end{document} ...

0

There are bound to be packages for doing this, but I have some code for generating a notational index that is written to a file which is then included at the end of the document. To do this I used the following macros from the TeXbook: \def\\{\let\stoken= } \\ \long\def\unexpandedwrite#1#2#3{\def\finwrite{\write#1}% ...

5

I think you are trying to print the paths. If so, you may need this: \documentclass{article} \usepackage[obeyspaces]{url} \begin{document} \path{\\server\folder\folder} \path{\\server\my folder\folder} \end{document}

4

You could use the listings package: Code \documentclass{book} \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} \usepackage{lmodern}% better font than default \usepackage{tgcursor}% tt font with bold/italic styles \usepackage{listings} \lstset{ language=R, basicstyle=\ttfamily } \begin{document} \appendix \chapter{Some R code} Some code ...

3

You can fix the problem by adding fragile: \documentclass{beamer} \begin{document} \begin{frame}[fragile]{Title} Some text \verb+\int+ \end{frame} \end{document}

4

You have to add [fragile] option to \begin{frame}. I have also added the options font=\tiny,text width=0.45\textwidth to the mybox style. Code: \documentclass[table,xcolor=pdftex,dvipsnames]{beamer} \usepackage{tikz} \usetikzlibrary{shapes,snakes} \begin{document} \begin{frame}[fragile] \frametitle{Testing verbatim} \tikzstyle{mybox} = [draw=red, ...

4

Unfortunately, space characters cannot reliably be copied from a PDF. This answer on Superuser is bang on: The problem with PDF is that it doesn't really encode text. All it does is pretty much saying "Put those glyphs there, and those glyphs there". It's a format intended for print and high-fidelity document preview on screen but not so much to ...

Top 50 recent answers are included