Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. documentclass[pdftex]{report}
  2.  
  3. usepackage{lipsum}
  4. usepackage[many]{tcolorbox} % Paket für textboxen
  5. usepackage{varwidth} % Paket zur anpassung der titelbreite von textboxen
  6.  
  7. begin{document}
  8.  
  9. newtcolorbox{mybox}{
  10. enhanced,
  11. before skip=2mm,after skip=2mm,
  12. colback=black!5,colframe=black!50,boxrule=0.2mm,
  13. attach boxed title to top left={xshift=1cm,yshift*=1mm-tcboxedtitleheight},
  14. varwidth boxed title*=-3cm,
  15. boxed title style={
  16. frame code={
  17. path[fill=tcbcol@back!30!black]
  18. ([yshift=-1mm,xshift=-1mm]frame.north west)
  19. arc[start angle=0,end angle=180,radius=1mm]
  20. ([yshift=-1mm,xshift=1mm]frame.north east)
  21. arc[start angle=180,end angle=0,radius=1mm];
  22. path[left color=tcbcol@back!60!black,right color=tcbcol@back!60!black,
  23. middle color=tcbcol@back!80!black]
  24. ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
  25. [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
  26. -- (frame.south east) -- (frame.south west)
  27. -- ([xshift=-1mm,yshift=-1mm]frame.north west)
  28. [sharp corners]-- cycle;
  29. },
  30. interior engine=empty,
  31. },
  32. fonttitle=bfseries,
  33. title={My title},
  34. colbacktitle=green
  35. }
  36. begin{mybox}
  37. lipsum[1]
  38. end{mybox}
  39.  
  40. end{document}
  41.  
  42. boxed title style={
  43. frame code={
  44. path[fill=tcbcol@back!30!black]
  45. ([yshift=-1mm,xshift=-1mm]frame.north west)
  46. arc[start angle=0,end angle=180,radius=1mm]
  47. ([yshift=-1mm,xshift=1mm]frame.north east)
  48. arc[start angle=180,end angle=0,radius=1mm];
  49. path[left color=tcbcol@back!60!black,right color=tcbcol@back!60!black,
  50. middle color=tcbcol@back!80!black]
  51. ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east)
  52. [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east)
  53. -- (frame.south east) -- (frame.south west)
  54. -- ([xshift=-1mm,yshift=-1mm]frame.north west)
  55. [sharp corners]-- cycle;
  56. },
  57. interior engine=empty,
  58. },
  59.  
  60. Undefined control sequence. [ begin{mybox}]
  61. Undefined control sequence. [ begin{mybox}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement