"Garst R. Reese" wrote:
> 
> Herbert Voss wrote:
> >
> > "Garst R. Reese" wrote:
> > >
> > > \newlength{\oneinch}
> > > \setlength{\oneinch}{72bp}
> > > \providecommand{\linesperinch}[1]%
> > > {\renewcommand{\baselinestretch}{\ratio{\oneinch}{\baselineskip} /(#1)}%
> > > \normalsize}%
> > > \endinput
> > > %%
> > > %% End of file `hollywood.cls'
> >
> > there is a problem with the use of \ratio. both parameters must be
> > a length.
> \oneinch and \baselineskip are lengths. It will not even take
> \renewcommand{\baselinestretch}{\baselineskip *#1}
> > what about \usepackage{setspace}
> >
> > and than in ert \setstretch{1.5} for 4 lines per inch (as an example)
> Not very intuitive for the user, but it works well.

this is a better one, but you need package fp
\LinesPerInch{3} is now a valid command. instead of package setspace
you can use the commands from the package for setstretch.


\usepackage{fp}% floating point arithmetic
\usepackage{setspace}
\def\NormLPI{6}%  like singlespace
\def\myLPI{}
\def\setLPI{}
\newcommand{\LinesPerInch}[1]{%
   \renewcommand\setLPI{#1}
   \FPdiv\myLPI\NormLPI\setLPI
   \setstretch{\myLPI}%
   \normalsize%
}

Herbert


-- 
http://www.educat.hu-berlin.de/~voss/lyx/

Reply via email to