Text FormattingRemove spacing before a list and make description not bold

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

Remove spacing before a list and make description not bold

Post by kulima »

Hello again

I have the following code:

Code: Select all

\documentclass[12pt]{scrreprt}
\usepackage{palatino,url}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{enumitem}
\hypersetup{
	colorlinks=true,
	linkcolor=blue
}
\usepackage{mdwlist}
\begin{document}
\chapter{blafasl}
   \section*{kabumm}
      Shares:
		\begin{description*}
			\item[share1/] \hfill  blabla
			\item[share2/] \hfill more blabla
			\item[share3/] \hfill even more blabla
		\end{description*}
\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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

Re: Remove spacing before a list and make description not bo

Post by Johannes_B »

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

Re: Remove spacing before a list and make description not bo

Post by kulima »

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

Remove spacing before a list and make description not bold

Post by Johannes_B »

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.

Code: Select all

\documentclass[12pt]{scrreprt}
\usepackage{palatino,url}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{hyperref}%Load hyperref last
\hypersetup{
	colorlinks=true,
	linkcolor=blue
}
%\usepackage{mdwlist}
\setlist[description]{font=\normalfont}%global setting
%\addtokomafont{descriptionlabel}{\color{blue}}%alternatively ;-)
\begin{document}
\chapter{blafasl}
\section*{kabumm}
Shares:
\begin{description}[topsep=0pt,itemsep=0pt,parsep=0pt]%local setting
	\item[share1/]
		\hfill
		blabla
	\item[share2/]
		\hfill
		more blabla
	\item[share3/]
		\hfill
		even more blabla
\end{description}
\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

Re: Remove spacing before a list and make description not bo

Post by kulima »

Awesome, thanks again!
Post Reply