home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Mathematics / TeX / TeXsis-2.15 / TXSfmts.tex < prev    next >
Text File  |  1992-08-04  |  15KB  |  306 lines

  1. %% file: TXSfmts.tex                             TeXsis version 2.15
  2. %  $Revision: 15.6 $  :  $Date: 92/06/30 11:10:05 $  :  $Author: myers $
  3. %======================================================================*
  4. % DOCUMENT FORMATS              (C) copyright 1986, 1991 by Eric Myers.
  5. %
  6. %       Several standard document formats are defined in TeXsis. All of
  7. % these set up the appropriate dimensions, title page macros, etc., and
  8. % call \texsis:
  9. %
  10. %       \preprint               Preprint format. Makes a standard title
  11. %                               page from \title, \author, etc. and puts the
  12. %                               manuscript on the following pages.
  13. %
  14. %       \Manuscript             Like \preprint, but printed with 
  15. %                               \TrueDoubleSpacing for submission to 
  16. %                               journals like Physical Review
  17. %
  18. %       \paper                  Like \preprint but puts \title, \author,
  19. %                               etc. material at top of first page
  20. %                               instead of on a separate title page.
  21. %
  22. %       \book                   For books, with chapters and sections,
  23. %                               and odd/even page numbering
  24. %
  25. %       \slides                 Slides/transparencies format, in 24 pt type,
  26. %                               special formatting.
  27. %
  28. %       \letter                 Standard business letter; see TXSletr.tex
  29. %
  30. %       \memo                   Standard memo; see TXSmemo.tex.
  31. %
  32. %       \referee                Referee reports; similar to \memo
  33. %
  34. %       \twinprint              Preprint in twin page format, with
  35. %                               title page in full size landscape.
  36. %
  37. %       \twinformat             Twin page formatting for other styles.
  38. %
  39. %       More specialized document layouts are available in ``style'' 
  40. %  files, which are only loaded when they are called for.  This is 
  41. %  accomplished with the \autoload macro described below.  It's possible 
  42. %  (and easy) to add new style files for any desired document layout.
  43. %
  44. %       The specialized document layouts which are currently loaded 
  45. %  from style files [named in brackets] are:
  46. %
  47. %       \nuclproc               The ``NUCLPROC'' style for Nuclear
  48. %                               Physics Proceedings. [nuclproc.txs]
  49. %
  50. %       \NorthHolland           North Holland proceedings format,
  51. %                               single column, left justified titles.
  52. %                               [Elsevier.txs]
  53. %
  54. %       \NorthHollandTwo        North Holland double column proceedings
  55. %                               format, left justified titles. [Elsevier.txs]
  56. %
  57. %       \WorldScientific        World Scientific proceedings format.
  58. %                               [WorldSci.txs]
  59. %
  60. %       \IEEEproceedings        Conference paper in double column IEEE
  61. %                               format. [IEEE.txs]
  62. %
  63. %       \IEEEreduced            Same as \IEEEproceedings but reduced
  64. %                               by 75% to fit on 8.5 x 11 paper. [IEEE.txs]
  65. %
  66. %       \AIPproceedings         Conference paper in the American Institute
  67. %                               of Physics (AIP) format. [AIP.txs]
  68. %
  69. %======================================================================*
  70. \message{Layout macros.}
  71. \catcode`@=11
  72.      
  73. %--------------------------------------------------*
  74. % Paper Layout: This prints the \titlepage material at the top of
  75. % the first page, not on a separate page.
  76.      
  77. \def\paper{%                            % Paper:
  78.    \auxswitchtrue                       % save tags and labels in .aux file
  79.    \refswitchtrue                       % save references in .ref file
  80.    \texsis                              % Initialize
  81.    \def\titlepage{%                     % \paper title page
  82.       \bgroup                           % so changes don't leak out
  83.       \let\endmode=\relax               % \endmode will end a field
  84.       \pageno=1}%                       % title page is page 1 by default
  85.    \def\endtitlepage{%                  % \paper end title page
  86.       \endmode                          % end any open field
  87.       \goodbreak\bigskip                % no new page, but maybe break here
  88.       \egroup}%                         % everything back the way it was
  89.    \def\Tbf{\fourteenpoint\bf}%         % 14pt bold title
  90.    \def\tbf{\twelvepoint\bf}%           % 12pt bold section head
  91.    \autoparens                          % auto-sizing of parens
  92.    \quoteon                             % automatic begin/end quotes
  93.    }
  94.      
  95. %--------------------------------------------------*
  96. % Preprint Layout: This prints the \titlepage material on a separate
  97. % page with a \banner at the top.
  98.      
  99. \def\preprint{% Document layout for Preprints
  100.    \auxswitchtrue                       % save tags and labels in .aux file
  101.    \refswitchtrue                       % save references in .ref file
  102.    \texsis                              % Initialize TeXsis
  103.    \def\titlepage{%                     % \preprint title page
  104.       \bgroup                           % so changes don't leak out
  105.       \pageno=1                         % title page is page 1 by default
  106.       \let\endmode=\relax               % \endmode will end a field
  107.       \banner}%                         % prints the banner at top of page 1
  108.    \def\endtitlepage{%                  % \preprint end title page
  109.       \endmode                          % end any open field
  110.       \vfil\eject                       % new page
  111.       \egroup}%                         % everything back the way it was
  112.    \def\Tbf{\fourteenpoint\bf}%         % 14pt bold titles
  113.    \def\tbf{\twelvepoint\bf}%           % 12pt bold section heads
  114.    \autoparens                          % auto-sizing of parens
  115.    \quoteon                             % automatic begin/end quotes
  116.    }
  117.      
  118. %--------------------------------------------------*
  119. % \Manuscript is a layout similar to \preprint, but printed
  120. % in \TrueDoubleSpacing.  Use this for a manuscript to be submitted
  121. % to a journal such as Physical Review.
  122.  
  123. \def\Manuscript{% layout for manuscripts to be submitted to journals
  124.    \preprint
  125.    \FiguresLast
  126.    \TrueDoubleSpacing}
  127.  
  128. %--------------------------------------------------*
  129. % \book format is similar to \thesis but without the special 
  130. % formatting.  Use for books, long review articles, etc.
  131.      
  132. \def\book{% document layout for a book or similar document
  133.    \ContentsSwitchtrue                  % contents page ON
  134.    \refswitchtrue                       % save references
  135.    \auxswitchtrue                       % .AUX file for forward references
  136.    \texsis                              % initialize TeXsis
  137.    \RunningHeadstrue                    % running headlines
  138.    \bookpagenumbers                     % page numbers for book binding
  139.    \def\titlepage{%                     % \book title page
  140.       \bgroup                           % any changes local
  141.       \pageno=-1                        % start on page i
  142.       \let\endmode=\relax               % \endmode will end a field
  143.       \def\FootText{\relax}}%           %  no number on title page
  144.    \def\endtitlepage{%                  % end title page for \book
  145.       \endmode                          % end any open field
  146.       \vfil\eject                       % end title page
  147.       \egroup%                          % close group from \titlepage
  148.       \pageno=1}%                       % 
  149.    \def\abstract{%                      % abstract for \book
  150.       \endmode                          % end previous field
  151.       \bigskip\bigskip\medskip          % skip down some
  152.       \bgroup\singlespaced              % abstract has same spacing
  153.          \let\endmode=\endabstract      % to end \abstract
  154.          \narrower\narrower}%           %
  155.    \def\endabstract{%                   % end abstract for \book
  156.       \medskip\egroup\bigskip}%         %
  157.    \def\FootText{--\ \tenrm\folio\ --}% % for 1st page of chapter
  158.    \def\Tbf{\sixteenpoint\bf}%          % Chapter Titles in 16pt bold
  159.    \def\tbf{\fourteenpoint\bf}%         % Section titles in 12pt bold
  160.    \twelvepoint                         % 12pt type for most of doc
  161.    \doublespaced                        % double spacing
  162.    \autoparens                          % auto-sizing of parens
  163.    \quoteon                             % auto quote matching
  164.    }                                    %
  165.      
  166. %--------------------------------------------------*
  167. %  \thesis is loaded from a style file now because it will be
  168. %  different at different installations.
  169.  
  170. \autoload\thesis{thesis.txs}
  171.  
  172.  
  173. %--------------------------------------------------*
  174. % \letter is a letter format for typing letters, following the syntax
  175. % in Appendix F of the TeXbook.  See TXSletr.tex for details.
  176.      
  177. \def\Letter{%   document format for letters
  178.    \ContentsSwitchfalse                         % no table of contents
  179.    \refswitchfalse                              % no reference list
  180.    \auxswitchfalse                              % no forward references
  181.    \texsis                                      % initialize
  182.    \singlespaced                                % single space default
  183.    \LetterFormat}                               % Setup using \LetterFormat
  184.  
  185. \def\letter{\Letter}                            % synonym
  186.      
  187. %--------------------------------------------------*
  188. % \memo Format for memoranda, as defined in TXSmemo.tex
  189.  
  190. \def\Memo{%  document format for memos
  191.    \ContentsSwitchfalse                         % no table of contents
  192.    \refswitchfalse                              % no reference list
  193.    \auxswitchfalse                              % no forward references
  194.    \texsis                                      % initialize
  195.    \singlespaced                                % single space default
  196.    \MemoFormat}                                 % Setup using \MemoFormat
  197.  
  198. \def\memo{\Memo}                                % synonym
  199.  
  200. %--------------------------------------------------*
  201. % \Referee format for Referee Reports, as defined in TXSmemo.tex
  202.  
  203. \def\Referee{% document format for referee reports
  204.    \ContentsSwitchfalse                         % no table of contents
  205.    \auxswitchfalse                              % no need for an .aux file
  206.    \refswitchfalse                              % no reference list
  207.    \texsis                                      % initialize
  208.    \RefReptFormat}                              % Setup using \MemoFormat
  209.  
  210. \def\referee{\Referee}                          % synonym
  211.      
  212. %--------------------------------------------------*
  213. %       Landscape Layout: for printing ``sideways'' on the laser printer
  214. %
  215. % \Landscape sets up the page size for sideways (``landscape mode'')
  216. % printing, and calls \LandscapeSpecial to signal this to the printer.
  217. % What signal is given to the printer driver (with \special) depends
  218. % on which filter or driver you are using.  You may have to change
  219. % the definition of \LandscapeSpecial to suit your installation.
  220.  
  221. \def\Landscape{% set page size for printing ``sideways''
  222.    \texsis              % 12pt, double spaced, etc
  223.    \hsize=9in           % wide in the side
  224.    \vsize=6.5in         % short and stocky
  225.    \voffset=.5in        % and a little space from the ``margin''
  226.    \nopagenumbers       % default is no page numbering
  227.    \LandscapeSpecial           % actually turns on landscape mode   
  228. }
  229.  
  230. \def\landscape{\Landscape}                      % synonym
  231.      
  232.  
  233. %% \LandscapeSpecial turns on landscape mode on the laser printer.
  234. %% How this is done is very site dependent, so you may need to
  235. %% re-define this in TXSsite.tex
  236. %%
  237. %% 1) This is how dv2ips does it, and you need to have landscape.ps
  238. %% accesable to the filter program
  239.  
  240. \def\LandscapeSpecial{\special{psfile=landscape.ps}}
  241.  
  242. %% % 2) This is how dvips (Rokicki's version 5.484) does it:
  243. %% 
  244. %% \def\LandscapeSpecial{\special{papersize=11in,8.5in}}
  245. %% 
  246. %--------------------------------------------------*
  247. %   \slides makes slides or transparencies in default 24pt type with
  248. % sensible defaults. It also defines \bl for a blank line and
  249. % \np for new page.
  250. %
  251. \def\slides{%                                   % standard stuff except 12pt:
  252.    \quoteon                                     % automatic quote balancing on
  253.    \autoparens                                  % automatic paren balancing on
  254.    \ATlock                                      % now @ is no longer a letter
  255.    \pageno=1                                    % start on page one
  256.    \twentyfourpoint                             % 24 point type
  257.    \doublespaced                                % double spaced
  258.    \raggedright\tolerance=2000                  % very ragged right 
  259.    \hyphenpenalty=500                           % hyphens are bad
  260.    \raggedbottom                                % ragged bottom
  261.    \nopagenumbers                               % no numbers
  262.    \hoffset=-.25in \hsize=7.0in                 % to fit 8.5in x 10.5in
  263.    \voffset=-.25in \vsize=9.0in                 % to fit 8.5in x 10.5in
  264.    \parindent=30pt                              % for big type
  265.    \def\bl{\vskip\normalbaselineskip}%          % blank line
  266.    \def\np{\vfill\eject}%                       % new page
  267.    \def\nospace{\nulldelimiterspace=0pt%        % autoscale...
  268.       \mathsurround=0pt}%                       %
  269.    \def\big##1{{\hbox{$\left##1%                % ...\big
  270.       \vbox to2ex{}\right.\nospace$}}}%         %
  271.    \def\Big##1{{\hbox{$\left##1%                % ...\Big
  272.       \vbox to2.5ex{}\right.\nospace$}}}%       %
  273.    \def\bigg##1{{\hbox{$\left##1%               % ...\bigg
  274.        \vbox to3ex{}\right.\nospace$}}}%        %
  275.    \def\Bigg##1{{\hbox{$\left##1%               % ...\Bigg
  276.       \vbox to4ex{}\right.\nospace$}}}%
  277.   }
  278.  
  279. %-----------------------------------------------------------------------
  280. %      \twinprint sets up a twin column preprint, with the first page
  281. % full with in \twelvepoint and the rest in \tenpoint \twinout format.
  282.  
  283. \let\pr@pr@nt=\preprint                        % save \preprint
  284.  
  285. \def\twinprint{%                               % \twinout preprint
  286.    \hsize=\normvsize\vsize=\normhsize          % set sizes
  287.    \pr@pr@nt                                   % usual \preprint
  288.    \let\t@tl@=\title                           % save it
  289.    \def\title{\vskip-1.5in\t@tl@}%             % reduce space
  290.    \let\endt@tlep@ge=\endtitlepage             % save it
  291.    \def\endtitlepage{\endt@tlep@ge             % usual \endtitlepage
  292.    \twinformat}%                               % twin column default
  293. }
  294.  
  295. %      \twinformat sets up the standard defaults for \twinout, with
  296. % 10pt fonts and no headline offset.
  297.  
  298. \def\twinformat{%                              % 2 pages/page format
  299.    \tenpoint\doublespaced                      % ten point size
  300.    \def\Tbf{\twelvebf}\def\tbf{\tenbf}%        % title fonts
  301.    \headlineoffset=0pt                         % no extra offset
  302.    \twinout                                    % \twinout format
  303.    }
  304.  
  305. % >>> EOF TXSfmts.tex <<<
  306.