Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My code is really long. And I really want to use the frame Shadowbox in my code. But the problem is since it is going over a single page, the box is actually completing at the end of the code ....which makes the box look ugly...Is there any way, I can use Shadowbox but at the end of every page it will show a complete box (rather then incomplete portion until the end) This is my lstset

\lstset{ %
frame=shadowbox,
rulesepcolor=\color{black},
backgroundcolor=\color{white},   
basicstyle=\footnotesize\ttfamily,       
breaklines=true,                 
captionpos=b,                    
commentstyle=\color{dark slate grey}\itshape,    
escapeinside={\%*}{*)},          
keywordstyle=\color{blue},       
stringstyle=\color{red},        
numberstyle=\tiny,          
numbersep=5pt,             
tabsize=2,                
extendedchars=true,              
showspaces=false,      
showtabs=false,       
xleftmargin=17pt,
framexleftmargin=17pt,
framexrightmargin=5pt,
framexbottommargin=2pt,
showstringspaces=false,

}

share|improve this question

closed as off-topic by Jubobs, Peter Jansson, Claudio Fiandrino, egreg, Werner Feb 28 at 17:34

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. –  Jubobs Feb 27 at 11:07
    
This is not an answer to your question, just a comment: are you sure you want a complete frame around only part of a listing? That may lead your readers to believe that what's in that frame is the complete listing, especially if they're reading your document on a screen and can't see that the listing is continued on the next page. –  Jubobs Feb 27 at 11:15
    
Voters, note that this is not possible with listings alone, but Harish Kumar has a solution involving tcolorbox also. Let's reopen this question so he can answer it, or so it can be closed as a "dupe" as opposed to "off-topic". –  Jubobs Apr 11 at 7:10

Browse other questions tagged or ask your own question.