Hello,
It's about few weeks I suggested Herbert to update his LyXTricks, but
nuthin' happened. So I deceded to forward the mail to lyx-users. Hope
this helps any one :-)
Yeah, my english is really bad.
KAMIL ;-{
----- Forwarded message from Kamil Anis <[EMAIL PROTECTED]> -----
Date: Fri, 17 Jan 2003 19:12:36 -0500
From: Kamil Anis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: adjust the labelwidth in the LyXlist environment
User-Agent: Mutt/1.4i
Hello Herbert,
I needed to adjust globally the \labelwidth in the LyXlist environment
however the commands such as
\setlength\labelwidth{<value>}
\setlength\labelsep{<value>}
do not work as one may expect. Moreover the list looks so ugly if the
width of some label exceeds the width of (default) 00.00.0000 string.
I did some fiddling around but wasn't successful so I tried to find the
solution at www.lyx.org/help. But finally found a way how to force LyX
to do that with NO LaTeX commands in the document e.g.
\begin{list}{}{<settings>}
\item bla bla bla
\item bla bla bla
\item bla bla bla
...
\end{list}
So check it out...you just put the following code in the preamble
% adjust the labelwidth in the LyXlist environment
\newlength\extrawidth
\setlength\extrawidth{0pt} % default value
\renewenvironment{lyxlist}[1]
{\begin{list}{}
{\settowidth{\labelwidth}{#1}
\addtolength{\labelwidth}{\extrawidth}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}[1]{##1\hfil}}}
{\end{list}}
If you would like to have the same value of \labelwidth throughout the
whole document set the length of \extrawidth in the preamble
\setlength\extrawidth{<value>}
or if you want it to have just for a selected lists in the document you
just type
\addtolength\extrawidth{<value>}
before the list environment. If needed the \labelwidth may be any time
restored
\addtolength\extrawidth{-<value>}
or
\setlength\extrawidth{0pt}
Of course you can use the
\settowidth\extrawidth{TEXT}
Anyway the code above doesn't affect the formatting of other lists
(bibliography, etc.).
Regards,
Kamil ;-{
----- End forwarded message -----