Questions tagged [tcblisting]

The `tcblisting` environment combines features of `tcolorbox` and `listings` or `minted`.

Filter by
Sorted by
Tagged with
0
votes
0answers
36 views

Problem with the extension of the file which is used to save listings [duplicate]

I want to display a snippet of Python code as a colored framed box in a beamer presentation. Besides, I'd like to save the snippet in a file. The code below gets the job done: \documentclass{beamer} ...
1
vote
0answers
36 views

Change or ignore ponctually the escaping characters of a `tcblisting`

In the MWE below, where $default^{ok}$ is typeset by LaTeX, I define escaping characters. Is it possible to modify this setting every time I would need to use pipelines in my code ? Can I simply turn ...
1
vote
1answer
48 views

Decorate minted listing inside a tcolorobox [Merly done…]

I would like to decorate some listings just for pedagogical reasons. Here is a starting code where I can draw a line but I still fail to produce a frame. How can I do that ? \documentclass[12pt,...
3
votes
1answer
65 views

tcolorbox adds fragments of listing to list of listings

I'm writing a report due to tomorrow night but I have a problem that I can not resolve. The code is the following, the problem is that in the list of listing appears also a fragment of the listing ...
5
votes
1answer
245 views

How to replace the “space symbol” (squat-u) in listings?

Instead of this output with a "squat-u" space symbol I would like to replace it with e.g. $\cdot$. It is no problem to replace the default symbol for tabs but not for spaces?? \documentclass{article}...
4
votes
0answers
72 views

How to remove lines and characters from listings / tcolorbox?

Consider this MWE \documentclass{ltxdoc} \PassOptionsToPackage{final}{listings} \usepackage[% ,listings ]{tcolorbox} \lstdefinestyle{mystyle}{% style = {mystyledef}, } \lstdefinestyle{...
4
votes
1answer
407 views

How to configure tcblisting with minted to allow copy/paste from listing with whitespace characters?

This answer from a similar question gets very close to a final copy/paste solution, but does not work for me as it does not select whitespace. I am asking a new question as the linked one is several ...
1
vote
1answer
68 views

tcblisting apparently not a verbatim environment

MWE % arara: pdflatex \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{listings} \begin{document} \begin{tcblisting}{listing options={language=ruby}} "hello #{world}" \end{tcblisting} \...
6
votes
2answers
336 views

Using tikzpicture along with tcblisting

I am trying to use tikzpicture along with tcblisting. Basically, I am trying to design a figure to show the use of Java compiler, which converts Java source code into bytecode. See below the code ...
3
votes
2answers
289 views

tcolorbox: TikZ picture option of “tikz lower”?

Package tcolorbox has defined a style called "tikz lower". The package manual introduces it as follows: /tcb/tikz lower=options This style adds a centered tikzpicture environment to the start ...
0
votes
1answer
50 views

how break the page between the 2 parts of tcblisting

As soon as the latex code is too long, the second frame is not displayed correctly. How to cut the box of tcblisting so that the listing on the one hand and its execution is in two separate frames \...
1
vote
1answer
143 views

Label inside of \newtcbinputlisting giving incorrect ref number

In the code below, I am trying to reference some matlab code that is written using a \newtcbinputlisting environment. When I attach a label to the code, the reference number come in as "1" or "a)" or ...
2
votes
1answer
137 views

Have new tcblisting TOC match up current TOCs

In the code below, I am trying to match up the format and font of a new \tcblistof to my other TOCs My new \tcblistof looks like this where it is missing the figure number 1.1: and I want this to ...
0
votes
1answer
392 views

Change font type in \newtcbox to \texttt

I wanted to change the font type to \texttt inside of the LIB box: This code is found here: \documentclass{article} \usepackage[many]{tcolorbox} \newtcbox{\mylib}{enhanced,nobeforeafter,tcbox raise ...
4
votes
4answers
382 views

Is it possible to have a tcblisting environment within an \ifthenelse?

I would like to choose which code to print according to a boolean flag. If I use my \ifthenelse with plain text it works perfectly, but if I put a tcblisting environment instead of the plain text, it ...
3
votes
1answer
137 views

“Repair” listing environment when used in the enumerate environment

In the code given below, the my listing environment gets skewed while in the enumerate environment: How to fix the code so that the listing box inside the enumerate environment, looks like that out ...
4
votes
1answer
459 views

Change size of listing box locally

In the code given below, I get the output: How to go about changing the size of the box locally, so that the heading " "cubemaster" Usage" appears on one line instead of two lines? Thanks. Here is ...
1
vote
1answer
117 views

Increase parskip in tcblisting output

How to increase the \parskip in the output of a tcblisting, i.e. the vertical space between the black squares in the following example? Neither the \parskip of the surrounding text nor the spacing ...
1
vote
1answer
251 views

Change \tcolorbox tcblistof font formatting to match document's other lists

This code is building from the solution posted here by Dr. Hupfer. I was attempting to get the font and other formatting of the tcblistof to match with the other lists in the document (like the list ...
0
votes
1answer
296 views

Beamer overlay specification and tcblistings

I have a beamer slide with several code snippets formatted using tcblisting and displayed using tcb raster blocks. I would like to reveal the tcblisting blocks one at a time, but I haven't been able ...
1
vote
0answers
145 views

math corruption in tex4ht when using adjustbox and \tcbuselibrary{listings}

I am using latest update of TexLive on Linux. I just found one of my large files has all the math generated by tex4ht corrupted or missing from the web page. This only affects the math itself. Nothing ...
5
votes
1answer
910 views

IPython Notebook input and output cells with listings

I would like to include both input and output cells that look like Jupyter IPython cells. The "IPython Notebook cells with listings" at IPython Notebook cells with listings shows how to do a single ...
2
votes
1answer
106 views

error using tcblisting inside longtable, no error inside tabular.

I was testing a nice solution provided in this answer how-to-crop-background-color-in-listings-to-the-longest-line-in-the-code However, I happened to be using longtable and not the standard tabular. ...
1
vote
1answer
330 views

Left indent in tcblisting code

In this MWE \documentclass{beamer} \usepackage[most]{tcolorbox} \newtcblisting{myexample}{ width=1.01\linewidth, sharp corners,% beforeafter skip=0.5\baselineskip,% sidebyside gap=2mm,% ...