Re: [Help] Can't get what I want with the enumitem module. Need Help…

2020-11-14 Thread didiergabory
Thank you Paul for your help and for your time reading me.
I keep your solution while waiting for something better.
I would prefer, as you understood, to change the part written in preamble… 

Didier 

- Mail original -

| On 11/12/20 7:29 AM, didiergab...@free.fr wrote:

| | Hello,
| 

| | The pdf shows the alignment issue which I cannot resolve. I tried
| | to
| | understand the doc of the enumitem package but how to say... Not
| | very easy...
| 

| | As you can see the label of the first item, in second level
| | enumerate, is shifted to the right ...
| 

| | I attach a mwe in lyx as well as the generated tex.
| 

| | Here are the lines entered in the preamble:
| 

| | \setlist[enumerate]{font=\bfseries}
| 
| | \setlist[enumerate,1]{label=\textbf{\emph{Q\,\arabic*.}}, %
| 
| | labelwidth=30pt, align=left, labelsep*=2pt, leftmargin=0pt, %
| 
| | labelindent=0pt, itemindent=!, listparindent=0pt}
| 
| | \setlist[enumerate,2]{label=\emph{\alph*)}, %
| 
| | labelwidth=10pt, align=left, labelsep*=2pt,leftmargin=30pt,%
| 
| | labelindent=30pt, itemindent=!, listparindent=0pt}
| 

| | Thanks for your help.
| 

| | Didier.
| 

| I don't know the correct way to do this, but the attached hack seems
| to get the job done. The vertical spacing adjustment (-17pt), which
| brings the first item of the inner list onto the same line as the
| outer list label, was done by trial and error and may not line up
| perfectly. There likely is a better way to get the correct value,
| but it is (way) beyond my LaTeX skills.

| Paul

| --
| lyx-users mailing list
| lyx-users@lists.lyx.org
| http://lists.lyx.org/mailman/listinfo/lyx-users
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: [Help] Can't get what I want with the enumitem module. Need Help…

2020-11-12 Thread Paul A. Rubin

On 11/12/20 7:29 AM, didiergab...@free.fr wrote:

Hello,

The pdf shows the alignment issue which I cannot resolve. I tried to 
understand the doc of the enumitem package but how to say... Not very 
easy...


As you can see the label of the first item, in second level enumerate, 
is shifted to the right ...


I attach a mwe in lyx as well as the generated tex.


Here are the lines entered in the preamble:

\setlist[enumerate]{font=\bfseries}
\setlist[enumerate,1]{label=\textbf{\emph{Q\,\arabic*.}}, %
labelwidth=30pt, align=left, labelsep*=2pt,leftmargin=0pt, %
labelindent=0pt, itemindent=!, listparindent=0pt}
\setlist[enumerate,2]{label=\emph{\alph*)}, %
labelwidth=10pt, align=left, labelsep*=2pt,leftmargin=30pt,%
labelindent=30pt, itemindent=!, listparindent=0pt}


Thanks for your help.

Didier.


I don't know the correct way to do this, but the attached hack seems to 
get the job done. The vertical spacing adjustment (-17pt), which brings 
the first item of the inner list onto the same line as the outer list 
label, was done by trial and error and may not line up perfectly. There 
likely is a better way to get the correct value, but it is (way) beyond 
my LaTeX skills.


Paul



test_enumerate.lyx
Description: application/lyx
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


[Help] Can't get what I want with the enumitem module. Need Help…

2020-11-12 Thread didiergabory



Hello, 


The pdf shows the alignment issue which I cannot resolve. I tried to understand 
the doc of the enumitem package but how to say... Not very easy... 

As you can see the label of the first item, in second level enumerate, is 
shifted to the right ... 

I attach a mwe in lyx as well as the generated tex. 



Here are the lines entered in the preamble: 


\setlist[enumerate]{font=\bfseries} 
\setlist[enumerate,1]{label=\textbf{\emph{Q\,\arabic*.}}, % 
labelwidth=30pt, align=left, labelsep*=2pt, leftmargin=0pt, % 
labelindent=0pt, itemindent=!, listparindent=0pt} 
\setlist[enumerate,2]{label=\emph{\alph*)}, % 
labelwidth=10pt, align=left, labelsep*=2pt,leftmargin=30pt,% 
labelindent=30pt, itemindent=!, listparindent=0pt} 



Thanks for your help. 


Didier. 



test_enumerate.lyx
Description: application/lyx


test_enumerate.pdf
Description: Adobe PDF document
%% LyX 2.3.5.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[french]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{enumitem}

\makeatletter
%% Textclass specific LaTeX commands.
\newlength{\lyxlabelwidth}  % auxiliary length 

%% User specified LaTeX commands.
\usepackage{lipsum}

\setlist[enumerate]{font=\bfseries}
\setlist[enumerate,1]{label=\textbf{\emph{Q\,\arabic*.}}, labelwidth=30pt, align=left, labelsep*=2pt, leftmargin=0pt, labelindent=0pt, itemindent=!, listparindent=0pt}
\setlist[enumerate,2]{label=\emph{\alph*)}, labelwidth=10pt, align=left, labelsep*=2pt,leftmargin=30pt, labelindent=30pt, itemindent=!, listparindent=0pt}

\makeatother

\usepackage{babel}
\makeatletter
\addto\extrasfrench{%
   \providecommand{\og}{\leavevmode\flqq~}%
   \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%
}

\makeatother
\begin{document}

\section*{Essai custum enumerate}

\lipsum[2][2-4]
\begin{enumerate}
\item \lipsum[1][2-4]
\begin{enumerate}
\item \lipsum[1][2-4]
\item \lipsum[1][2-4]
\end{enumerate}
\end{enumerate}
\lipsum[1][2-4]
\begin{enumerate}[resume]
\item 
\begin{enumerate}
\item \lipsum[1][2-4]
\item \lipsum[1][2-4]
\item \lipsum[1][2-4]
\end{enumerate}
\item \lipsum[1][2-4]
\end{enumerate}

\end{document}
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users