# Tag Info

1

Depending on the extent of your verbatim needs, the verbatimbox package might help. It will allow you to create the verbatim content and stick it into a LaTeX savebox prior to entering the frame. Then, in the frame, merely recall the savebox. \documentclass{beamer} \usepackage{beamerposter} \usepackage{verbatimbox} \begin{document} ...

1

In LyX, go to the Insert menu and choose "Program Listing".

4

You could read them into tex and write them out but simpler if you allow --shell-escape would be \immediate\write18{cat data2.tex data1.tex > foo.tex} (cat is available for windows, as noted in comments).

4

You can use the package upquote and put the code in a verbatim environment. \documentclass{article} \usepackage{upquote} \begin{document} \begin{verbatim} data 'a list = Nil | Cons (e, 'a list) \end{verbatim} \end{document}

1

Recent versions of Pygments hard-code quotes in a way that breaks upquote compatibility. I opened an issue at the Pygments site regarding this some time ago, but it hasn't yet been addressed. In the meantime, you can patch the faulty Pygments code by adding the following to your preamble. \AfterEndPreamble{\def\PYGdefaultZsq{\textquotesingle}} This ...

7

Gretl developer here. Here's the story: gretl has used (for a few years now) the Unicode character 2212 for the minus sign if the output terminal supports Unicode. This is typographically correct (see for example here), but doesn't play nice with LaTeX because of its awkward relationships with Unicode: the solution I use is to put the two lines ...

2

Are you doing this for literate programming? If so, then maybe you want a specialized literate programming tool? Yes, you could obviously do this by reimplementing fancyvrb.sty. Just tweak the lines containing \openout and \closeout, or even add the ability to write to an arbitrary handle as opposed to \FV@OutFile. Ain't the easiest or most robust ...

1

In this case you only need the monospace (typewriter) font, not the other features of \lstinline, so you can just use \texttt. As @barbarabeeton points out, to get a proper backslash in the same font, use this: \char\\ So the command you need is this: \subsection{\texttt{\char\\dot}} If you do this a lot, because it's TeX you can devise macros: ...

0

One advantage of \verb is that underscores are typeset better. For example in \documentclass{article} \usepackage{verbatim} \begin{document} \texttt{foo\_bar} \verb|foo_bar| \end{document} the first foo_bar has a thinner underscore. See Underscores in words (text) for more details.

Top 50 recent answers are included