Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. Label is long text
  2. lab2 blalballalaa
  3. label3 possible second rule
  4. label four hello world
  5.  
  6. newenvironment{mydescription}[1]
  7. {begin{list}{}%
  8. {renewcommandmakelabel[1]{##1:hfill}%
  9. settowidthlabelwidth{makelabel{#1}}%
  10. setlengthleftmargin{labelwidth}
  11. addtolengthleftmargin{labelsep}}}
  12. {end{list}}
  13.  
  14. documentclass{article}
  15. usepackage{calc}
  16. usepackage{enumitem}
  17.  
  18. begin{document}
  19.  
  20. begin{description}[leftmargin=!,labelwidth=widthof{bfseries The longest label}]
  21. item[The longest label] text
  22. item[Short] long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long text
  23. end{description}
  24.  
  25. end{document}
  26.  
  27. documentclass[twocolumn]{article}
  28. usepackage{scrextend}
  29. begin{document}
  30. begin{labeling}{alligator} % alligator is the longest label
  31. item [textbf{ant}]really busy all the time
  32. item [chimp] likes bananas
  33. item [alligator] very dangerous animal, sharp teeth, long
  34. muscular tail and a bit of text that is longer than one
  35. line and shows the alignment of text quite nicely
  36. end{labeling}
  37. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement