LaTeX forum ⇒ Text FormattingRemove spacing before a list and make description not bold Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
kulima
Posts: 23
Joined: Mon Aug 03, 2015 5:42 pm

Remove spacing before a list and make description not bold

Postby kulima » Tue Aug 04, 2015 12:55 am

Hello again

I have the following code:
  1. \documentclass[12pt]{scrreprt}
  2. \usepackage{palatino,url}
  3. \usepackage{graphicx}
  4. \usepackage{hyperref}
  5. \usepackage{xcolor}
  6. \usepackage{enumitem}
  7. \hypersetup{
  8. colorlinks=true,
  9. linkcolor=blue
  10. }
  11. \usepackage{mdwlist}
  12. \begin{document}
  13. \chapter{blafasl}
  14. \section*{kabumm}
  15. Shares:
  16. \begin{description*}
  17. \item[share1/] \hfill blabla
  18. \item[share2/] \hfill more blabla
  19. \item[share3/] \hfill even more blabla
  20. \end{description*}
  21. \end{document}


Now that looks all nice, but i want the space between "Shares:" and the start of the list gone, so the list starts directly under "Shares"
Furthermore i'd really like the [description] not to be bf, but normal.
Any suggestions?

Edit: Edited sample, hope it compiles, cant paste directly out of the document since it's under NDA
Last edited by kulima on Tue Aug 04, 2015 2:08 am, edited 1 time in total.

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3550
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Aug 04, 2015 1:51 am

Can you make your snippet into a fully compilable example? A solution might depend on the documentclass in use.
Advantage:
- You spend a little bit more time but get a personalized answer
- I (we) can concentrate on a small and limited scope. Listing everything possible would be too time consuming.
- We can directly test a solution, ensuring we are on the same base.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

kulima
Posts: 23
Joined: Mon Aug 03, 2015 5:42 pm

Postby kulima » Tue Aug 04, 2015 2:27 am

Updated

User avatar
Johannes_B
Site Moderator
Posts: 3550
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Aug 04, 2015 11:56 am

Since you are loading package enumitem anyway, we can change it using this package. You can make those changes globally (this will affect all lists) or locally, just for one list.

With KOMA-script, you can also use its own font-mechanism.

  1. \documentclass[12pt]{scrreprt}
  2. \usepackage{palatino,url}
  3. \usepackage{graphicx}
  4. \usepackage{xcolor}
  5. \usepackage{enumitem}
  6. \usepackage{hyperref}%Load hyperref last
  7. \hypersetup{
  8. colorlinks=true,
  9. linkcolor=blue
  10. }
  11. %\usepackage{mdwlist}
  12. \setlist[description]{font=\normalfont}%global setting
  13. %\addtokomafont{descriptionlabel}{\color{blue}}%alternatively ;-)
  14. \begin{document}
  15. \chapter{blafasl}
  16. \section*{kabumm}
  17. Shares:
  18. \begin{description}[topsep=0pt,itemsep=0pt,parsep=0pt]%local setting
  19. \item[share1/]
  20. \hfill
  21. blabla
  22. \item[share2/]
  23. \hfill
  24. more blabla
  25. \item[share3/]
  26. \hfill
  27. even more blabla
  28. \end{description}
  29. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

kulima
Posts: 23
Joined: Mon Aug 03, 2015 5:42 pm

Postby kulima » Tue Aug 04, 2015 2:30 pm

Awesome, thanks again!


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 1 guest