At the current time I have inserted the configuration of a couple of routers and switches using the following method:

   [Config here]

But it looks a bit bland and boring, was trying to look if there was an option for the lstset such as \lstset{languague=Cisco}, but I can't find any.

Could someone give me a hand with the style?

Thanks for the help.

  • You will probably have to define your own language, you can have a look in the listings support packages (they contain the language definitions for other languages)
    – daleif
    Commented Mar 10, 2016 at 11:43
  • if you want someone to suggest some listings patterns you should probably fix the example above to be a complete document including a sample code to be highlighted that would allow answers to be tested. Commented Mar 10, 2016 at 13:18
  • 1
    Please, define not bland and not boring with Cisco IOS commands in mind ;-)
    – Ignasi
    Commented Mar 10, 2016 at 16:22

1 Answer 1


I think routers and switches configuration files, commands and results are boring even with tcolorbox bells and whistles. In any case this is something I've found in my computer:


\newtcblisting{cisco}[1][]{size=fbox, listing only, listing options={style=tcblatex,basicstyle=\ttfamily\scriptsize,tabsize=2,language=sh},#1}


\begin{cisco}[title=Example of cisco command]
master#show ip cef, version 44, epoch 0, cached adjacency
0 packets, 0 bytes
    tag information set, all rewrites owned
    local tag: 20
    fast tag rewrite with Eth0/0/0,, tag imposed {18} via, Ethernet0/0/0, 0 dependencies
    next hop, Ethernet0/0/0
    valid cached adjacency
    tag rewrite with Et0/0/0,, tags imposed {18}


enter image description here

  • Thank you so much, you're a genious, just have a little problem: One of the configurations goes over one page and it looks like if that is the case the frame doesn't create a page jump
    – Neptune
    Commented Mar 11, 2016 at 8:50
  • @Neptune tcolorboxes can break between pages if you add enhanced, breakable options to \newtcblisting definition.
    – Ignasi
    Commented Mar 11, 2016 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .