Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. documentclass{article}
  2. usepackage{stackengine,xcolor,lipsum}
  3. letsvitemitem
  4. newcommanddifbox[1]{stackengine{0pt}{color{gray!30}rule{5ex}{1.15ex}}{%
  5. color{cyan!60!black}$mkern1mumakeballs{#1}$}{O}{c}{F}{F}{L}}
  6. defmakeballs#1{ifnum#1>0relax{bullet}%
  7. expandaftermakeballsthenumexpr#1-1relaxfi}
  8. newenvironment{benumerate}
  9. {renewcommanditem[1][1]{defdifficulty{##1}svitem}%
  10. deflabelenumi{smash{stackunder[1pt]{color{cyan!60!black}%
  11. bfseriessffamilytheenumi}{difbox{difficulty}}}}%
  12. enumerate}{endenumerate}
  13. begin{document}
  14. begin{benumerate}
  15. setcounter{enumi}{32}
  16. item[2] lipsum[4]
  17. item[3] lipsum[4]
  18. item[4] lipsum[3]
  19. end{benumerate}
  20. end{document}
  21.  
  22. documentclass{article}
  23. usepackage[most]{tcolorbox}
  24. usepackage{lipsum}
  25.  
  26. newtcolorbox[auto counter]{problem}[2][]{%
  27. breakable,
  28. blankest,
  29. enhanced,
  30. attach boxed title to top left={yshift=-tcboxedtitleheight},
  31. left=tcboxedtitlewidth+1mm,
  32. top=0pt,
  33. colback=white,
  34. fonttitle=bfseriessffamily,
  35. coltitle={cyan!60!black},
  36. colbacktitle=white,
  37. colframe=white,
  38. title=thetcbcounter,
  39. overlay unbroken and first={node[fill=gray!30, inner sep=1pt, minimum width=tcboxedtitlewidth, outer sep=0pt, text=cyan!60!black, anchor=north] at (title.south) {foreach i in {1,...,#2}{if#2gt1{,}fi$bullet$}}; }, #1}
  40.  
  41. begin{document}
  42.  
  43. lipsum[1]
  44.  
  45. begin{problem}{1}
  46. lipsum[2]
  47. end{problem}
  48.  
  49. begin{problem}{4}
  50. lipsum[3]
  51. end{problem}
  52.  
  53. begin{problem}{2}
  54. lipsum[4]
  55. end{problem}
  56.  
  57. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement