The following gives many strange errors:

\begin{tcolorbox}[fit,height=5cm,blank, borderline={1pt}{-2pt},nobeforeafter]
[83 democrat / 66 republican]
| | a_b_c = y: [28 democrat / 64 republican]

including "Missing $ inserted", "Double subscript", so verbatim isn't working. Without tcolorbox the code works fine. How can I use verbatim with tcolorbox?

  • 4
    For those of us who may not be very familiar with tcolorbox, can you include a complete document (starting with \documentclass and ending with \end{document})? For example, with some experimentation I was able to reproduce your error with \usepackage{tcolorbox} \tcbuselibrary{fitting} \tcbuselibrary{skins} but I don't know if you did the same things. – ShreevatsaR Feb 7 '18 at 2:45
  • 1
    Please also provide the full and exact text of the error message you get when compiling the (completed) code you provide. This will include, for example, the line number corresponding to the relevant line in your example. – cfr Feb 7 '18 at 2:48
  • 1
    Section '7 Saving and Loading of Verbatim Texts'. Page 126 of tcolorbox's manual. 22.1 /tcb/verbatim page 423. – cfr Feb 7 '18 at 2:53

It runs. I hope the options are what you intended.



[83 democrat / 66 republican]
| | a_b_c = y: [28 democrat / 64 republican]

\begin{tcolorbox}[fit,height=5cm,blank, borderline={1pt}{-2pt},nobeforeafter]



| improve this answer | |

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.