Tag Info

Hot answers tagged

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 ...


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}


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).


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: ...


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 ...



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