Hi again,

Steve Litt wrote:
On Monday 06 April 2009 05:02:20 am Olivier Ripoll wrote:
Steve Litt wrote:
On Saturday 04 April 2009 06:34:40 am Pavel Sanda wrote:
Steve Litt wrote:
Hi all,

I decided to put a short statement at the beginning of each chapter. I
wanted it to be surrounded by lines, a little bit narrower than general
text, and I wanted the print slightly bigger than normal. Here's how I
did it:
convert to module and put it into wiki?
pavel
How do I make it into a module? I don't have 1.6.x yet.

STeveT
Hi all,

Just for fun, I've tried to make a module out of it. I am no LaTeX
expert at all, so I have issues and perhaps someone can clarify them to me:

LaTeX complains about environment "Sbox" being undefined. I can work
around using "sbox" instead, but then, I still get plenty of errors. Is
Sbox different from sbox ? If so, should I add something to define it ?

My mistake. Sorry.
To get \Sbox to work, you must stick this in your preamble:

\usepackage{fancybox}%       For Sbox command

So here we are, here is the content of "LittChapterIntro.module"(*) file (between the dashed lines, those lines excluded of course):
-------------------------------------
#\DeclareLyXModule{LittChapterIntro}
#DescriptionBegin
#Puts a short statement at the beginning of each chapter.
#It is surrounded by lines, a little bit narrower than general text, and prints slightly bigger than normal.
#DescriptionEnd

#Author: Steve Litt

Format 11

Style ChapterIntro
  LatexType             Environment
  LatexName             chapterintroL
  Font
   Size                 Large
  EndFont
  LeftMargin            MMMMMM
  RightMargin           MMMMMM
  TopSep                1.4
  ItemSep               0.7
  ParSep                0.7
  BottomSep             1.0
  Preamble
        \usepackage{fancybox}
    \newenvironment{chapterintroL}[0]{
      ~\\[20pt]
      \addtolength{\textwidth}{-0.2\textwidth}
      \setlength{\parindent}{0.1\textwidth}
      \indent
      \begin{Sbox}\begin{minipage}{\textwidth}{}%
      \setlength{\parskip}{1.6\baselineskip}%
      \leftskip 10pt\rightskip 10pt\large ~\\[0.4\baselineskip]%
        }{
      \\[0.05\baselineskip]~\end{minipage}\end{Sbox}\fbox{\TheSbox}\\[20pt]
        }
  EndPreamble
End
-------------------------------------

Works for me on Windows (Miktex, 1.6.2 "Alt" installer). But I'm not sure I'll use it though ;-)

Best regards,

Olivier

(*) one may use another file name of course

Reply via email to