Le Lundi 20 Août 2001 03:35, vous avez écrit :
> Thanks to all your help, I'm able to make layout files in my ~/.lyx/layouts
> directory to change just about anything I want in the Lyx environment. But
> of course layout file changes don't change the finished product (.dvi, .ps,
> .pdf etc).
>
> My understanding is I need to make a .sty file to change what I want in the
> finished product. First question: What would be in a myclass.sty file that
> does nothing but change the font size of the Author environment to Giant,
> otherwise keeping the Report text class as-is?


No, you don't need to create a .sty file to have a layout file that will do 
something different, you can use the Preamble ... EndPreamble alone or within 
a style statement and LyX will automatically include those lines in the LaTeX 
preamble. Have a look at the formulaire.layout I did for my personal use wich 
is a modification of the article layout.

-- 
L'intelligence est la chose la mieux repartie dans le monde,
tout le monde pense en avoir assez, vu que c'est avec la
sienne qu'il en juge. Coluche

Renaud MICHEL
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article]{formulaire}
# Article textclass definition file. Taken from initial LyX source code
# Author : Renaud MICHEL <[EMAIL PROTECTED]>
# Heavily modifed and enhanced by serveral developers.


# General textclass parameters
Columns                 1
Sides                   1
SecNumDepth             3
TocDepth                3
MaxCounter              Counter_Section
ProvidesMakeidx         1

ClassOptions
  PageStyle             ""
  Other                 "fleqn"
End

#definitions dans le preambule
Preamble
  \usepackage{amsfonts,amssymb}
  \usepackage{fancyhdr}
  \usepackage{slashbox}
  \usepackage{multirow}
  \pagestyle{fancy}
  
  \usepackage{makeidx}
  \makeindex
  
  \newcommand{\nompartie}{}
  \newcommand{\nomsection}{}
  \newcommand{\theparthead}{\thepart \hspace{0.5em} \textsc{\nompartie}}
  \newcommand{\thesectionhead}{\thesection \hspace{0.5em} \nomsection}
  
  \@addtoreset{section}{part}
  
  \let\tableofcontentsancien=\tableofcontents
  \renewcommand{\tableofcontents}{\pagebreak {\renewcommand{\nompartie}{\textsc{Table 
des matires}} %
    \markboth{}{} \renewcommand{\thepage}{\Roman{page}} \tableofcontentsancien 
\pagebreak} %
    \setcounter{page}{1}}
  
  \let\printindexancien=\printindex
  \renewcommand{\printindex}{\pagebreak \addcontentsline{toc}{part}{Index} %
    {\renewcommand{\theparthead}{\textsc{Index}} \markboth{}{} \printindexancien 
\pagebreak}}
  
  %on (re)definit les commandes pour les fonctions mathematiques
  \def\sin{\mbox{sin}}
  \def\cos{\mbox{cos}}
  \def\tan{\mbox{tg}}
  \def\cot{\mbox{cotg}}
  
  \def\arcsin{\mbox{arcsin}}
  \def\arccos{\mbox{arccos}}
  \def\arctan{\mbox{arctg}}
  \def\arccot{\mbox{arccotg}}
  
  \def\sinh{\mbox{sh}}
  \def\cosh{\mbox{ch}}
  \def\tanh{\mbox{th}}
  \def\coth{\mbox{coth}}
  
  \def\arcsinh{\mbox{arcsh}}
  \def\arccosh{\mbox{arcch}}
  \def\arctanh{\mbox{arcth}}
  \def\arccoth{\mbox{arccoth}}
  
  \def\arg{\mbox{arg}}
  
  %pour les ensembles mathematiques
  \def\N{\mbox{I\hspace{-0.15em}N}}
  \def\Z{\mbox{Z\hspace{-0.3em}Z}}
  \def\R{\mbox{I\hspace{-0.15em}R}}
  \def\C{\mbox{\hspace{0.22em}\textsf{I}\hspace{-0.47em}C}}
  \def\Q{\mbox{\hspace{0.22em}\textsf{I}\hspace{-0.47em}Q}}
  
  %le 1 de la matrice identite
  \def\un{\ensuremath{1\hspace{-0.22em}\mathrm{l}}}
  
  %modifier l'espacement des equations hors-texte
  \setlength{\mathindent}{5mm}
EndPreamble

# This is just to show how to declare the default font.
# The defaults are exactly those shown here.
DefaultFont
  Family                Roman
  Series                Medium
  Shape                 Up
  Size                  Normal
  Color                 None
EndFont

# Standard style definition
Style Standard
  Margin                Static
  LatexType             Paragraph
  LatexName             dummy
  ParIndent             MM
  ParSkip               0.4
  Align                 Block
  AlignPossible         Block, Left, Right, Center
  LabelType             No_Label
End

Input stdlists.inc
Input stdsections.inc
################################################################
# Part style definition
Style Part
  TopSep                2
  BottomSep             1.5
  Align                 Left
  Alignpossible         Left

  Font 
    Size                Larger
  EndFont

  Preamble
    \let\partancien=\part
    \renewcommand{\part}[1]{\pagebreak \renewcommand{\nompartie}{#1} \partancien{#1}}
  EndPreamble
End

# There are no chapters in an article.
NoStyle Chapter

# Section style definition
#Style Section
#  Preamble
#    \let\sectionancien=\section
#    \renewcommand{\section}[2][]{\renewcommand{\nomsection}{#2} \sectionancien{#2}}
#  EndPreamble
#End

# Paragraph style definition
Style Paragraph
  Preamble
    \renewcommand{\theparagraph}{\Alph{paragraph}}
  EndPreamble
End

# Subparagraph style definition
Style Subparagraph
  Preamble
    \renewcommand{\thesubparagraph}{\alph{subparagraph}}
  EndPreamble
End
################################################################
Input stdstarsections.inc
################################################################
# Part* style definition
Style Part*
  TopSep                2
  BottomSep             1.5
  Align                 Left
  Alignpossible         Left

  Font 
    Size                Larger
  EndFont

  Preamble
    \let\partancien*=\part*
    \renewcommand{\part*}[1]{\pagebreak \renewcommand{\nompartie}{#1} \partancien*{#1}}
  EndPreamble
End

# There are no chapters in an article.
NoStyle Chapter*
################################################################
Input stdstruct.inc
Input stdtitle.inc
Input lyxmacros.inc
################################################################
NoStyle Address
NoStyle Right_Address
################################################################
Input stdlayouts.inc
Input obsolete.inc

Reply via email to