Tag Info

New answers tagged

0

The problem is pretty similar to the one described in Tabs in output file written by xelatex and pdflatex are different The solution should be to call xelatex with the -8bit option: xelatex -8bit -shell-escape test Here's the test.tex example I used, to show that two byte characters are honored in comments nonetheless. \documentclass[11pt]{article} ...


2

The quickest fix is to \let the listing entries be formatted as figure entries using \makeatletter \let\l@listing\l@figure \makeatother I reduced the original code even further up to almost a MWE: \documentclass[a4paper,12pt]{article} \usepackage{xcolor} \usepackage{setspace} \onehalfspacing \usepackage{listings} \usepackage{minted} ...


5

If I understand correct, yuo want to \laebl the listing and \ref it some where. If so add the label like: \begin{listingsbox}{myc,label=mint}{test} and use \ref{mint} elsewhere. \documentclass{article} \usepackage[many,minted]{tcolorbox} \newcommand{\mynewminted}[3]{% \newminted[#1]{#2}{#3}% \tcbset{myminted/#1/.style={minted language=#2,minted ...


1

Prepare a file called chktexrc.local in the same directory as the file you have to check, containing VerbEnvir { verbatim comment listing verbatimtab rawhtml errexam picture texdraw filecontents pgfpicture tikzpicture minted } Call chktex -l chktexrc.local filename.tex (where filename stands for the name of the file, of course). I tested it ...


0

I've just had a similar problem, and got rid of it by merely closing the command line (I use it to compile my documents), opening another one, doing a clean and recompiling everything. If you use an editor provided with a compile option, try closing and re-opening it.


0

I found a solution how to make it compile withour error, and get output that on first view looks fine. Even the linenos option of minted appears to work. \meaning\lineref shows lineref's definition as in eledmac, which is what I want. \documentclass{memoir} \usepackage[T1]{fontenc} \usepackage{lipsum} \usepackage{minted} \let\lineref\relax ...


2

The \inputminted command is defined with an optional argument, so it's not patchable with etoolbox, unless you say \expandafter\pretocmd\csname\string\inputminted\endcsname... (see How can I use \patchcmd with commands with optional arguments?) The package xpatch does the necessary bits by itself. \usepackage{xpatch} ...


1

I think you are better off if you load minted.sty with option newfloat and use the interface to tocloft.sty as described in newfloat.pdf. Code: \documentclass{article} \usepackage[titles]{tocloft} \newlistof{listing}{lol}{List of Listings} \usepackage[newfloat]{minted} \usepackage{caption} \newenvironment{code}{\captionsetup{type=listing}}{} ...


1

This is the .pygtex file that's produced: \begin{Verbatim}[commandchars=\\\{\}] \PYGborland{c+cp}{\PYGborlandZlt{}\PYGborlandZpc{}}\PYGborland{n+nb}{inherit} \PYGborland{err}{file=\PYGborlandZsq{}base\PYGborlandZsq{}}\PYGborland{c+cp}{/\PYGborlandZgt{}} \PYGborland{c+cp}{\PYGborlandZpc{}} \PYGborland{k}{for} \PYGborland{n}{i} \PYGborland{o+ow}{in} ...


5

That's the expected result since, according to the minted (v2.0 from 2015/01/31) documentation, mathescape=true enables LaTeX math mode inside comments. Outside comments you can use escapeinside (beware that this requires Pygments version 2.0+): \documentclass{article} \usepackage{minted} \begin{document} ...


2

\mintinline, and thus \newmintinline, are only supported in minted versions 2.0+. This error could be caused by using earlier versions of minted in which these commands do not exist. The latest version may be obtained via the TeX Live package manager or directly from CTAN.



Top 50 recent answers are included