Questions tagged [tcblisting]

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

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

tcblisting box w/ minted shows incorrect listings

When using one of the tcblisting boxes for code and comments with minted, I often have problems getting the code snippets to show up. Previously, I used listings and had no problems, but the second I ...
user avatar
  • 163
0 votes
1 answer
93 views

Adding colon along with custom title to tcolorbox

Sorry that the question description isn't great, but what I mean is how can you update the settings to support having either a title that's just default from the tcbcounter like Example 1.1 or ...
user avatar
  • 163
1 vote
1 answer
108 views

tcolorbox with theorem and lstlisting

In some of my notes, I want to include an example question as well as code listings on how to carry out the function in one tcolorbox, something like the following image all included inside a box ...
user avatar
  • 163
2 votes
1 answer
33 views

how to remove this incompatibility between tikz, bodegraph and tcblisting

Hello I want to plot some code examples of using the Bodegraph package with tcblisting. The code below works fine if I put the semilog {} ... command in a scope environment, on the other hand if I put ...
user avatar
  • 11.4k
0 votes
0 answers
22 views

Cannot change Index title with \tcbuselibrary{documentation}

I use tcblistings with minted engine in tcolobox package for embedding code and package imakeidx for indices. In the documentation, tcolobox suggests that: For minted [12] support, load: \...
user avatar
0 votes
1 answer
52 views

Shadow of a frame remains

The setup below leaves a shadow of a frame around the input. How can I make the box blend totally with the background? \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{listings, breakable}...
user avatar
  • 1,870
0 votes
1 answer
57 views

How to add a tikzpicture to the tcblisting title?

I want to add this tikzture with the three coloured circles \definecolor{Button1}{RGB}{254,94,86} \definecolor{Button2}{RGB}{254,188,45} \definecolor{Button3}{RGB}{38,202,59} \begin{tikzpicture} \...
user avatar
  • 449
3 votes
3 answers
93 views

Show math macros and result in a table

I'm writing some documentation about some macros I've made up. (I know there will probably be comments about the macros too, but that's not what I'm asking about.) Ideally, I'd like to make a sort of ...
user avatar
  • 631
0 votes
1 answer
167 views

Adding program code to the listing

I want to make a nice headline. So that it does not stick out, but is exactly with the frame. How do I set the width and height of the gray header? Can be this can be done automatically? And still, ...
user avatar
1 vote
1 answer
73 views

Using listings linerange in tcolorbox breaks formatting

When using listings's linerange or firstline/lastline, the tcolorbox shows extra top and bottom padding, and the font is different. Is there a way to fix this, or is this a bug with tcolorbox that ...
user avatar
0 votes
1 answer
171 views

Cannot use unicode box drawing chars inside tcolorbox listing

I am trying to use unicode box drawing characters inside a tcblisting. First I used the pmboxdraw library to define what those characters should be mapped to, so that they could be drawn. I was able ...
user avatar
2 votes
2 answers
260 views

How can create marking exam with tcolorbox

In order to make an exam, I used the tabular environment, but it still boring, i want to make the something with the nice template tcolorbox, how can use it: \documentclass[11pt,a4paper]{article} \...
user avatar
  • 397
1 vote
0 answers
251 views

Centering \newtcblisting [closed]

Continuing with my book in xelatex, I could't solve how to center a tcblisting. Here is my (i hope this time), MWE: % !TEX encoding = UTF-8 % !TEX program = xelatex % !TEX spellcheck = es_ES % !TEX ...
user avatar
0 votes
0 answers
44 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} ...
user avatar
  • 950
1 vote
0 answers
141 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 ...
user avatar
  • 11.5k
1 vote
1 answer
92 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,...
user avatar
  • 11.5k
3 votes
1 answer
155 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 ...
user avatar
5 votes
1 answer
354 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}...
user avatar
4 votes
0 answers
168 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{...
user avatar
5 votes
1 answer
1k 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 ...
user avatar
1 vote
1 answer
209 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} \...
user avatar
  • 26.7k
6 votes
2 answers
495 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 ...
user avatar
  • 1,548
4 votes
2 answers
653 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 ...
user avatar
  • 481
0 votes
1 answer
188 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 \...
user avatar
  • 11.4k
1 vote
1 answer
220 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 ...
user avatar
  • 8,674
2 votes
1 answer
179 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 ...
user avatar
  • 8,674
0 votes
1 answer
633 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 ...
user avatar
  • 8,674
4 votes
4 answers
538 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 ...
user avatar
  • 54.2k
3 votes
1 answer
155 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 ...
user avatar
  • 8,674
4 votes
1 answer
1k 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 ...
user avatar
  • 8,674
1 vote
1 answer
168 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 ...
user avatar
1 vote
1 answer
400 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 ...
user avatar
  • 8,674
0 votes
1 answer
474 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 ...
user avatar
1 vote
0 answers
163 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 ...
user avatar
  • 18.3k
8 votes
2 answers
3k 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 ...
user avatar
2 votes
1 answer
148 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. ...
user avatar
  • 18.3k
1 vote
1 answer
502 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,% ...
user avatar