3

In Memoir class, I can \usepackage{enumitem}, and then make a nice description list. I tried to do the same with Memoir's built-in flexlabelled environment, but the labels are fully justified. MWE:

\documentclass[article]{memoir}

\usepackage{enumitem}

\usepackage{polyglossia}
  \setdefaultlanguage[variant=uk]{english}
  \setmainfont{Open Sans}

\begin{document}

\chapter*{Lights (enumitem)}
\begin{description}[style=multiline,leftmargin=4cm,font=\normalfont\sffamily]
  \item [SR tripod] 300W PAR56, vertically > Marjolaine
  \item [somewhere, possibly] 12V 50W or 300W PAR56 > house
\end{description}

\chapter*{Lights (flexlabelled)}
\newcommand*\sfl{\raggedright\sffamily}
\begin{flexlabelled}{sfl}{4cm}{*}{0mm}{5cm}{0mm}
  \item [SR tripod] 300W PAR56, vertically > Marjolaine
  \item [somewhere, possibly] 12V 50W or 300W PAR56 > house
\end{flexlabelled}

\end{document}

which makes:

enumitem vs flexlabelled

You can see the second set of labels are fully justified, and thus barely readable. I can't get those labels left justified, eg:

\newcommand*{\sfl}[1]{\sffamily{\raggedright{}#1}}

doesn't change anything. Anyone understand what's going on?

2

The command \sfl should have an argument (the label); \raggedright does nothing, because the label is typeset in a \makebox, use \hfill to force left alignment.

\documentclass[article]{memoir}

\usepackage{polyglossia}
\usepackage{siunitx}

\setdefaultlanguage[variant=uk]{english}
\setmainfont{Linux Libertine O}
\setsansfont{Open Sans}[Scale=MatchLowercase]

\newcommand*\sfl[1]{\sffamily\raggedright#1\hfill}

\begin{document}

\chapter*{Lights (flexlabelled)}
\begin{flexlabelled}{sfl}{4cm}{0mm}{0mm}{4cm}{0mm}
  \item [SR tripod] \SI{300}{W} PAR56, vertically > Marjolaine
  \item [somewhere, possibly] \SI{12}{V} \SI{50}{W} or \SI{300}{W} PAR56 > house
\end{flexlabelled}

\end{document}

I have used a serif font for the main text just to show that the \sffamily declaration is only applied to the label.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.