diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/sae |
Initial commit
Diffstat (limited to 'macros/latex/contrib/sae')
-rw-r--r-- | macros/latex/contrib/sae/example.pdf | bin | 0 -> 19622 bytes | |||
-rw-r--r-- | macros/latex/contrib/sae/example.tex | 72 | ||||
-rw-r--r-- | macros/latex/contrib/sae/index.html | 61 | ||||
-rw-r--r-- | macros/latex/contrib/sae/sae.cls | 211 | ||||
-rw-r--r-- | macros/latex/contrib/sae/saeold.cls | 267 |
5 files changed, 611 insertions, 0 deletions
diff --git a/macros/latex/contrib/sae/example.pdf b/macros/latex/contrib/sae/example.pdf Binary files differnew file mode 100644 index 0000000000..44022074b5 --- /dev/null +++ b/macros/latex/contrib/sae/example.pdf diff --git a/macros/latex/contrib/sae/example.tex b/macros/latex/contrib/sae/example.tex new file mode 100644 index 0000000000..59565aee61 --- /dev/null +++ b/macros/latex/contrib/sae/example.tex @@ -0,0 +1,72 @@ +\documentclass[letterpaper]{sae} +\PaperTitle{Proposal for a \LaTeX\ document class for SAE Technical Papers} +\AddAuthor{Axel Franke}{Lund Institute of Technology, Sweden} +\PaperNumber{No number} +\SAECopyright{1999} +\begin{document} +\maketitle +\section{abstract} + This \LaTeX\ class provides correct formatting according to the requirements + for the publication of an SAE Technical Paper. It is supposed to be useful + for authors publishing simulation models and similar containing lots of + formulas. The style contains many features automating the formatting and + thus, making it easier for the author to concentrate on contents. + +\section{Introduction} +This is a Level 1 heading, created with the command +\begin{verbatim} +\section{Introduction} +\end{verbatim} +As can be seen, the correct format (bold face and capitalized) is done by the +style -- the author does not need to care about that. + +\section{Title and author information} +Title, author information, paper number and copyright are created in the +preface using the commands +\begin{verbatim} +\PaperTitle{Proposal for a \LaTeX\ document +class for SAE Technical Papers} +\AddAuthor{Axel Franke}{Lund Institute of +Technology, Sweden} +\PaperNumber{No number} +\SAECopyright{1999} +\end{verbatim} +Authors from the same affiliation should be added within one +\verb+\AddAuthor+ command. The general syntax is +\begin{verbatim} +\AddAuthor{Author1, Author2, ...}{Affiliation} +\end{verbatim} +The command may be used several times. + + +\subsection{A subheading} +This is a subheading which has been created as usual with the command +\begin{verbatim} +\subsection{A subsection} +\end{verbatim} +Also the following sub-subheading is formatted automatically by the style. +\subsubsection{General options of the style} +The \texttt{sae} \LaTeX\ style supports optional arguments which determine the +document font (Helvetica or Times) and the paper size (letterpaper or +A4). Default is Helvetica and A4. The letter format of this publication has +been obtained by the opening command +\begin{verbatim} +\documentclass[letterpaper]{sae} +\end{verbatim} +If Times is desired as document font, this can be achieved by using +\begin{verbatim} +\documentclass[letterpaper,times]{sae} +\end{verbatim} +or +\begin{verbatim} +\documentclass[times]{sae} +\end{verbatim} +The latter uses A4 as paper size. This concept has the advantage that document +font and the paper size can be changed easily at any time of the publication +process. +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/macros/latex/contrib/sae/index.html b/macros/latex/contrib/sae/index.html new file mode 100644 index 0000000000..3f6b45f8c6 --- /dev/null +++ b/macros/latex/contrib/sae/index.html @@ -0,0 +1,61 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> + +<HTML> + +<HEAD> +<META CONTENT="Axel Franke, SAE, latex, tex, class, style, paper" HTTP-EQUIV="keywords"> + <TITLE>A LaTeX style for writing an SAE Technical Paper</TITLE> +</HEAD> + +<BODY BGCOLOR="#FFF8DC" TEXT="#23238E"> + + + +<!-- AS-TOC_BEGIN{ --> +<H1 ALIGN=center>Table of Contents</H1> + +<UL> + <LI><A HREF="#as-h3-80061">Background</A> + <LI><A HREF="#as-h3-80062">Creating the style</A> + <LI><A HREF="#as-h3-6020">System Requirements</A> + <LI><A HREF="#as-h3-80063">Download</A> + <LI><A HREF="#as-h3-6021">Changes</A> + <LI><A HREF="#as-h3-80064">Usage</A> + <LI><A HREF="#as-h3-80066">Contact</A> +</UL> +<!-- AS-TOC_END} --> +<H2><A NAME="as-h2-80060">A LaTeX style for writing an SAE Technical Paper</A></H2> +<H3><A NAME="as-h3-80061">Background</A></H3> +The SAE Technical meetings are one of the most important publication medium for the research I am doing. Unfortunately, the SAE did not accept papers typeset in LaTeX by now. After many frustrating days trying to get a few so called <EM>wysiwyg</EM> text processors to behave in a reasonable way, I made up my mind and attempted to write an own style meeting the requirements of SAE. I had only been a LaTeX <EM>user</EM> by then, and I had no idea about how to change a titlepage, section styles and the fonts for a whole document. +<P> +I hope the style will be useful for many authors, especially for those making extensive use of mathematical formula. +<H3><A NAME="as-h3-80062">Creating the style</A></H3> +The first step was of course to ask <A HREF="http://www.altavista.com/"> AltaVista</A>, where I - after a while - found a link to <A HREF="http://www.ifs.hr/ifs/razno/doc/TeX/clsguide.html">LaTeX2e for class and package writers</A>. This helped me a lot. Many of the problems I encountered during the five days of creation could be solved with the help of <EM>The LaTeX Companion</EM> by Goossens, Mittelbach and Samarin. +<P> +The <TT>sae</TT> document class inherits all from the <TT>article</TT> class. However, the definition of the titlepage within the <TT>article</TT> class was not suitable. So I had a look at the <TT>article.cls</TT> file to find out how I should write this. The problem was finally solved by creating <TT>savebox</TT>es. This makes it possible to add as many author/affiliation pairs as wished. With each <TT>\AddAuthor</TT> command the old <TT>savebox</TT> is redefined and the new two lines are appended. The <TT>\SAECopyright</TT> command takes a year as the only argument, the surrounding text is created by the style. + +<H3><A NAME="as-h3-6020">System Requirements</A></H3> +I have tested the style with a <EM>TeTeX</EM> (version pre0.9) distribution containing <EM>LaTeX</EM> (Web2C 7.2) 3.14159 and <EM>pdfTeX</EM> (Web2C 7.2) 3.14159-0.12r. The style has been tested with <EM>MiKTeX</EM> as well. The <STRONG>geometry</STRONG> style required by the latest version can be obtained from your closest CTAN mirror (teTeX has it installed by default!). Search for <TT>geometry</TT> at <A HREF="http://www.ctan.org/search/" TARGET="new">http://www.ctan.org/search/</A>. Download the files <STRONG>geometry.dtx, geometry.ins and Readme</STRONG>. Follow the instructions in the Readme file. + +<H3><A NAME="as-h3-80063">Download</A></H3> +The style can be downloaded <A HREF="sae.cls">here</A>. The copyright notice is included in the file. The old version (before 2000-06-28) can still be obtained <A HREF="saeold.cls">here.</A> + +<H3><A NAME="as-h3-6021">Changes</A></H3> +<TABLE> +<TR><TD>2000-06-28<TD>Cleaned up the code. Now using <TT>geometry</TT> package instead of <TT>\setlength{}{}</TT> commands. New <TT>pdftex</TT> option, which is forwarded to the <TT>article</TT> class and the <TT>geometry</TT> package. +<TR><TD>2000-08-28<TD>Due to numerous questions I received during the past weeks, I decided to add a few instructions on how to obtain the geometry.sty file which is obviously missing in some TeX-distributions. +</TABLE> + + +<H3><A NAME="as-h3-80064">Usage</A></H3> +Well, I put an <A HREF="example.tex">example</A> in the same directory. It should explain most. Please contact me if you get trouble using the style. Tell me what kind of LaTeX version you're using. +<P> + +The class is compatible with the <TT>hyperref</TT> package and <TT>pdflatex</TT> and can be used to produce PDF files suitable for electronic publication and printing. There are no features in <TT>sae.cls</TT>which could prevent the usage together with other packages. I recommend the <TT>graphicx</TT>, <TT>natbib</TT> and <TT>tabularx</TT> styles to include figures, handle citations and build tables, respectively. + +<H3><A NAME="as-h3-80066">Contact</A></H3> +Feel free to contact <A HREF="mailto:axel.franke@forbrf.lth.se">me</A> if you want to suggest improvements or tell me about problems. +<HR> +<A HREF="..">Back to my homepage.</A> +</BODY> +</HTML> diff --git a/macros/latex/contrib/sae/sae.cls b/macros/latex/contrib/sae/sae.cls new file mode 100644 index 0000000000..43a0b0f81e --- /dev/null +++ b/macros/latex/contrib/sae/sae.cls @@ -0,0 +1,211 @@ +%% +%% LaTeX document style `sae', for use with LaTeX2e +%% This is a style for typesetting an SAE technical paper. +%% +%% COPYRIGHT 1999,2000 by Axel Franke, axel.franke@forbrf.lth.se +%% +%% Copying of part or all of any file in the sae.cls style +%% is allowed under the following conditions only: +%% (1) You may freely distribute unchanged copies of the files. Please +%% include the documentation when you do so. +%% (2) You may modify a renamed copy of any file, but only for personal +%% use or use within an organization. +%% (3) You may copy fragments from the files, for personal use or for use +%% in a macro package for distribution, as long as credit is given +%% where credit is due. +%% +%% You are NOT ALLOWED to take money for the distribution or use of +%% these files or modified versions or fragments thereof, except for +%% a nominal charge for copying etc. +%% + +% Identification +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{sae}[2000/06/28 SAE Technical paper format^^J +Copyright 1999,2000 Axel Franke (axel.franke@forbrf.lth.se)^^J] + + +\DeclareOption{times}{% + \renewcommand{\familydefault}{ptm}% + \typeout{^^JSetting document font to Times^^J}% + } +\DeclareOption{helvetica}{% + \renewcommand{\familydefault}{phv}% + \typeout{^^JSetting document font to Helvetica^^J}% + } +\DeclareOption{a4paper}{% + \PassOptionsToPackage{a4paper,nohead,left=15mm,top=15mm,right=15mm,textheight=240mm}{geometry}% + \typeout{^^JPaper size: A4^^J}% + \AtBeginDocument{ \columnsep 15mm } + } +\DeclareOption{letterpaper}{% + \PassOptionsToPackage{letterpaper,nohead,left=.5in,top=.5in,right=.5in,textheight=10in}{geometry}% + \typeout{^^JPaper size: Letter^^J}% + \AtBeginDocument{ \columnsep .5in } + } + +\DeclareOption{pdftex}{% + \PassOptionsToClass{\CurrentOption}{article}% + \PassOptionsToPackage{\CurrentOption}{geometry} + } + +\DeclareOption{nonumber}{% + \pagestyle{empty}% + } + +%% What we do not understand: +\DeclareOption*{\typeout{^^JOption [\CurrentOption] not % + supported by this style.^^J}} + +%% default otions +\ExecuteOptions{helvetica,a4paper} +\ProcessOptions + +% Using classes and packages +\LoadClass[twocolumn]{article} +\RequirePackage{geometry} + +%% Declarations + +% sections etc. not numbered +\setcounter{secnumdepth}{-2} + +% LaTeX uses rubber length for \parskip +% SAE style seems to use fixed length +\setlength{\parskip}{\baselineskip} + +% distance between the preceding text and a list item (description +% list, enumerated list, etc.) was too large +\setlength{\topsep}{-\parskip} + +% This places floats where they should go (suggested by Ross Pursifull, +% "Pursifull, Ross (R.)" <rpursifu@visteon.com>, 19991207) +\renewcommand{\bottomfraction}{1} +\renewcommand{\textfraction}{0} +\setcounter{topnumber}{10} +\setcounter{bottomnumber}{10} +\setlength{\parindent}{0pt} + +%% Heading formats +\renewcommand{\section}{\@startsection + {section}% + {1}% + {0mm}% + {-.1\baselineskip}% + {.1\baselineskip}% + {\normalsize\bfseries\uppercase}% +} + +\renewcommand{\subsection}{\@startsection + {subsection}% + {2}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize\uppercase}% +} + +\renewcommand{\subsubsection}{\@startsection + {subsubsection}% + {3}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize\underline}% +} + +\renewcommand{\paragraph}{\@startsection + {paragraph}% + {4}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize}% +} + + +\renewcommand{\refname}{\flushleft\normalsize\bfseries REFERENCES} + + +%% Build title page +\def\@maketitle{% + \null + \parbox[t][90mm][t]{\textwidth}{% + \begin{flushright}% + \fontsize{14}{18}\selectfont% + \usebox{\numberbox}\\ + \usebox{\titlebox} + \usebox{\authorbox}\\[2ex]% + \end{flushright}% +\vfill + \begin{flushleft}% + \raisebox{1cm}{\usebox{\saecopyrightbox}}\\% + \end{flushleft}}%b +} + +% Boxes for the title +\newsavebox{\authorbox} +\savebox{\authorbox}{} +\newsavebox{\titlebox} +\newsavebox{\numberbox} +\newsavebox{\saecopyrightbox} + +\newcommand{\AddAuthor}[2]{% + \savebox{\authorbox}{% + \parbox[t]{\textwidth}{% + \flushright% + \usebox{\authorbox}\\% + \fontfamily{\familydefault}\fontsize{12}{14}% + \fontseries{b}\fontshape{n}\selectfont% + #1\\% + {\fontfamily{\familydefault}\fontsize{10}{11}% + \fontseries{m}\fontshape{n}\selectfont% + #2}\fontsize{12}{12}\selectfont\\[2ex]% + }% + } + } +\newcommand{\PaperTitle}[1]{% + \savebox{\titlebox}{% + \parbox[t]{\textwidth}% + {\flushright% + \fontfamily{\familydefault}\fontsize{18}{22}% + \fontseries{b}\fontshape{n}\selectfont% + #1}% + }% + } +\newcommand{\PaperNumber}[1]{% + \savebox{\numberbox}{ + \fontfamily{\familydefault}\fontsize{14}{18}% + \fontseries{b}\fontshape{n}\selectfont% + #1}% + } + +\newcommand{\SAECopyright}[1]{% + \savebox{\saecopyrightbox}{% + {\fontfamily{\familydefault}\fontsize{8}{10}% + \fontseries{m}\fontshape{n}\selectfont% + Copyright {\copyright} #1 Society of % + Automotive Engineers, Inc.}% + }% + } + + + + + + + + + + + + + + + + + + + + + diff --git a/macros/latex/contrib/sae/saeold.cls b/macros/latex/contrib/sae/saeold.cls new file mode 100644 index 0000000000..e8562897bd --- /dev/null +++ b/macros/latex/contrib/sae/saeold.cls @@ -0,0 +1,267 @@ +%% +%% LaTeX document style `sae', for use with LaTeX2e +%% This is a style for typesetting an SAE technical paper. +%% +%% COPYRIGHT 1999 by Axel Franke, axel.franke@forbrf.lth.se +%% +%% Copying of part or all of any file in the sae.cls style +%% is allowed under the following conditions only: +%% (1) You may freely distribute unchanged copies of the files. Please +%% include the documentation when you do so. +%% (2) You may modify a renamed copy of any file, but only for personal +%% use or use within an organization. +%% (3) You may copy fragments from the files, for personal use or for use +%% in a macro package for distribution, as long as credit is given +%% where credit is due. +%% +%% You are NOT ALLOWED to take money for the distribution or use of +%% these files or modified versions or fragments thereof, except for +%% a nominal charge for copying etc. +%% + +% Identification +\NeedsTeXFormat{LaTeX2e} +\ProvidesClass{sae}[1999/07/31 SAE Technical paper format^^J +Copyright 1999 Axel Franke (axel.franke@forbrf.lth.se)^^J] + + +\DeclareOption{times}{% + \renewcommand{\familydefault}{ptm}% + \typeout{^^JSetting document font to Times^^J}% + } +\DeclareOption{helvetica}{% + \renewcommand{\familydefault}{phv}% + \typeout{^^JSetting document font to Helvetica^^J}% + } +\DeclareOption{a4paper}{% + \newcommand{\usepapersize}{% + \typeout{^^JDefault paper size: A4^^J}}% + \PassOptionsToClass{\CurrentOption}{article}% + } +\DeclareOption{letterpaper}{% + \renewcommand{\usepapersize}{% + \setlength{\topmargin}{.5in}% + \setlength{\oddsidemargin}{.5in}% + \setlength{\textheight}{10in}% + \setlength{\textwidth}{7.5in}% + \setlength{\columnsep}{.5in}% + \setlength{\footskip}{.3in}% + \setlength{\marginparwidth}{.5in}% + }% + \typeout{^^JDefault paper size: letter^^J}% + \PassOptionsToClass{\CurrentOption}{article}% + } + +\DeclareOption{nonumber}{% + \pagestyle{empty}% + } + +%% What we do not understand: +\DeclareOption*{\typeout{^^JOption [\CurrentOption] not % + supported by this style.^^J}} + +%% default otions +\ExecuteOptions{helvetica,a4paper} +\ProcessOptions + +% Using classes and packages +\LoadClass[twocolumn]{article} + +%% Declarations + +% sections etc. not numbered +\setcounter{secnumdepth}{-2} + +% LaTeX uses rubber length for \parskip +% SAE style seems to use fixed length +\setlength{\parskip}{\baselineskip} + +% This places floats where they should go (suggested by Ross Pursifull, +% "Pursifull, Ross (R.)" <rpursifu@visteon.com>, 19991207) +\renewcommand{\bottomfraction}{1} +\renewcommand{\textfraction}{0} +\setcounter{topnumber}{10} +\setcounter{bottomnumber}{10} + + +% Sizes +% general +\setlength{\hoffset}{-1in} +\setlength{\voffset}{-1in} +\setlength{\headheight}{0pt} +\setlength{\headsep}{0pt} +\setlength{\footskip}{.5in} +\setlength{\parindent}{0pt} +\setlength{\topskip}{0pt} + +% special to a4 paper +\setlength{\topmargin}{15mm} +\setlength{\oddsidemargin}{15mm} +\setlength{\textheight}{240mm} +\setlength{\textwidth}{180mm} +\setlength{\columnsep}{10mm} +\setlength{\marginparwidth}{10mm} + +% \usepapersize has been defined in the \DeclareOption further up +\usepapersize + + +%% Heading formats +\renewcommand{\section}{\@startsection + {section}% + {1}% + {0mm}% + {-.1\baselineskip}% + {.1\baselineskip}% + {\normalsize\bfseries\uppercase}% +} + +\renewcommand{\subsection}{\@startsection + {subsection}% + {2}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize\uppercase}% +} + +\renewcommand{\subsubsection}{\@startsection + {subsubsection}% + {3}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize\underline}% +} + +\renewcommand{\paragraph}{\@startsection + {paragraph}% + {4}% + {0mm}% + {-\baselineskip}% + {-\baselineskip}% + {\flushleft\normalsize}% +} + + +\renewcommand{\refname}{\flushleft\normalsize\bfseries REFERENCES} + + +%% Build title page +% Title redefinition +\renewcommand\maketitle{\par \begingroup + \renewcommand\thefootnote{\@fnsymbol\c@footnote}% + \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% + \long\def\@makefntext##1{\parindent 1em\noindent + \hb@xt@1.8em{% + \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% + \if@twocolumn + \ifnum \col@number=\@ne + \@maketitle + \else + \twocolumn[\@maketitle]% + \fi + \else + \global\@topnum\z@ % Prevents figures from going at top of page. + \@maketitle + \fi + \@thanks + \endgroup + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty + \global\let\@author\@empty + \global\let\@date\@empty + \global\let\@title\@empty + \global\let\title\relax + \global\let\author\relax + \global\let\date\relax + \global\let\and\relax +} +\def\@maketitle{% + \null + \parbox[t][90mm][t]{\textwidth}{% + \begin{flushright}% + \fontsize{14}{16}\selectfont% + \usebox{\numberbox}\\ + \usebox{\titlebox} + \usebox{\authorbox}\\[2ex]% + \end{flushright}% +\vfill + \begin{flushleft}% + \raisebox{1cm}{\usebox{\saecopyrightbox}}\\% + \end{flushleft}}%b +} + +% Boxes for the title +\newsavebox{\authorbox} +\savebox{\authorbox}{} +\newsavebox{\titlebox} +\newsavebox{\numberbox} +\newsavebox{\saecopyrightbox} + +\newcommand{\AddAuthor}[2]{% + \savebox{\authorbox}{% + \parbox{\textwidth}{% + \flushright% + \usebox{\authorbox}\\% + \fontfamily{\familydefault}\fontsize{12}{14}% + \fontseries{b}\fontshape{n}\selectfont% + #1\\% + {\fontfamily{\familydefault}\fontsize{10}{11}% + \fontseries{m}\fontshape{n}\selectfont% + #2}\fontsize{12}{12}\selectfont\\[2ex]% + }% + } + } +\newcommand{\PaperTitle}[1]{% + \savebox{\titlebox}{% + \parbox{\textwidth}% + {\flushright% + \fontfamily{\familydefault}\fontsize{18}{22}% + \fontseries{b}\fontshape{n}\selectfont% + #1}% + }% + } +\newcommand{\PaperNumber}[1]{% + \savebox{\numberbox}{% + \raisebox{18pt}[0pt][0pt]{ +{% + \fontfamily{\familydefault}\fontsize{14}{18}% + \fontseries{b}\fontshape{n}\selectfont% + #1}% + } + }% + } + +\newcommand{\SAECopyright}[1]{% + \savebox{\saecopyrightbox}{% + {\fontfamily{\familydefault}\fontsize{8}{10}% + \fontseries{m}\fontshape{n}\selectfont% + Copyright {\copyright} #1 Society of % + Automotive Engineers, Inc.}% + }% + } + + + + + + + + + + + + + + + + + + + + + |