I use the minted-package with


in the preamble and wrote this in my document:

  {<publishedQueryName>: {<storedName>: {Item: [<ListOfUnsigned>]}}}

This is my result:

wrong result

I do not understand, why these bordered boxes are created and I do not wanted them. What is wrong with minted and do I have to change? Other codes are fine.

  • 3
    i don't know the pygments json lexer that well but in other languages that's the style that pygments uses to denote a syntax error. your <xxxx> are presumably intended as meta-syntax examples, but pygments doesn't know that – David Carlisle Mar 25 '17 at 16:50

The output you got is correct. You are using a unknown syntax for the language json.

That you are using a wrong syntax can be seen by the resulted files and commands too. Therefor let me explain in short forms how minted works (for more details see documentation).

  1. Export the contents of the minted environment to the file with the extension pyg. In your case the content is:

    {<publishedQueryName>: {<storedName>: {Item: [<ListOfUnsigned>]}}}
  2. Use the command pygmentize to provide a latex input file with the extension out.pyg. The contents is

      \PYG{p}{\PYGZob{}}\PYG{err}{\PYGZlt{}publishedQueryName\PYGZgt{}:} \PYG{err}{\PYGZob{}\PYGZlt{}storedName\PYGZgt{}:} \PYG{err}{\PYGZob{}Item:} \PYG{err}{[\PYGZlt{}ListOfUnsigned\PYGZgt{}]}\PYG{p}{\PYGZcb{}}\PYG{err}{\PYGZcb{}\PYGZcb{}}
  3. The output is highlighted by the commands \PYG with the specification of the first argument. In your case depending on the unknown syntax your are getting the highlighting of an error \PYG{err}. \PYG{err} is defined as:

    \expandafter\def\csname PYG@tok@err\endcsname{\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}

You can also test the output provided by minted with the following site: http://pygments.org/demo/ Here it's also possible to test various styles like fruity. As usual the style default is default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.