Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % !TEX program = xelatex
- documentclass{scrbook}
- usepackage{wrapfig}
- usepackage{graphicx}
- usepackage{tcolorbox}
- setlength{parskip}{3mm}
- setlength{parindent}{0pt}
- newtcolorbox[auto counter]{sidebar}[2][]{
- parbox=false, % normal paragraph spacing (unless wrapped!)
- sharp corners,
- colframe=black,
- colback=black!15!white,
- title=#2,
- #1
- }
- begin{document}
- begin{sidebar}{Test without wrapping}
- Paragraph 1.
- Paragraph 2.
- end{sidebar}
- begin{wrapfigure}{r}{0.5linewidth}
- begin{sidebar}{Test with wrapping and no explicit parksip}
- Paragraph 1.
- Paragraph 2.
- end{sidebar}
- end{wrapfigure}
- begin{wrapfigure}{r}{0.5linewidth}
- begin{sidebar}{Test with wrapping and explicit parskip}
- setlength{parskip}{3mm}setlength{parindent}{0pt}Paragraph 1.
- Paragraph 2.
- end{sidebar}
- end{wrapfigure}
- end{document}
Add Comment
Please, Sign In to add comment