From 2f64f338cffe4a03ab1b91741a6f7ff7b5f67269 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 3 Mar 2011 00:35:00 +0000 Subject: apa6e (1mar11) git-svn-id: svn://tug.org/texlive/trunk@21585 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/apa6e/apa6e.pdf | Bin 242379 -> 257331 bytes Master/texmf-dist/source/latex/apa6e/apa6e.dtx | 50 ++++++++++++++- Master/texmf-dist/source/latex/apa6e/apa6e.ins | 85 +++++++++++++++++++++++++ Master/texmf-dist/tex/latex/apa6e/apa6e.cls | 18 +++++- Master/tlpkg/libexec/ctan2tds | 1 + 5 files changed, 149 insertions(+), 5 deletions(-) create mode 100644 Master/texmf-dist/source/latex/apa6e/apa6e.ins (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/apa6e/apa6e.pdf b/Master/texmf-dist/doc/latex/apa6e/apa6e.pdf index 312dd9e24a2..a7a710ac165 100644 Binary files a/Master/texmf-dist/doc/latex/apa6e/apa6e.pdf and b/Master/texmf-dist/doc/latex/apa6e/apa6e.pdf differ diff --git a/Master/texmf-dist/source/latex/apa6e/apa6e.dtx b/Master/texmf-dist/source/latex/apa6e/apa6e.dtx index 145c58063c3..7b33bed60e8 100644 --- a/Master/texmf-dist/source/latex/apa6e/apa6e.dtx +++ b/Master/texmf-dist/source/latex/apa6e/apa6e.dtx @@ -36,7 +36,7 @@ %\NeedsTeXFormat{LaTeX2e} %\ProvidesClass{apa6e} %<*class> - [2011/02/12 v0.1 APA 6e manuscript formatting] + [2011/03/01 v0.2 APA 6e manuscript formatting] % % %<*driver> @@ -69,6 +69,7 @@ % % % \changes{v0.1}{2011/02/12}{Initial version} +% \changes{v0.2}{2011/03/01}{Added support for appendices} % % \GetFileInfo{apa6e.dtx} % @@ -116,6 +117,16 @@ % \end{verbatim} % Pretty simple, really. But for a few more details, read on. % +% \section{Appendices} +% +% In APA style, appendices are not named. So to get appendices, use +% the same mechanism as normal \LaTeX (i.e., type |\appendix| to +% switch to `appendix mode' and then use |\section| to start each +% appendix), but note that the section title will be ignored. You can +% type |\section{Stimuli}| or |\section{La La La}| or just +% |\section{}| and you'll get the same result regardless (something +% like ``Appendix B''). +% % \subsection{References} % % This class does not provide any built-in support for formatting @@ -144,7 +155,7 @@ % this also inserts a large note on the front page to remind you that % you are looking at a draft with illegitimate formatting. % -% \subsubsection\texttt{endnotes} +% \subsubsection{\texttt{endnotes}} % APA style allows footnotes to either be formatted as footnotes % directly in the text, or placed at the end in a `Footnotes' % section. By default we do the former; if you really want the latter @@ -396,6 +407,29 @@ Author Note\par\RaggedRight\@authornote% {\Centering\normalfont\normalsize}} % \end{macrocode} % \end{macro} +% \begin{macro}{\appendix} +% Appendix handling is pretty straightforward, except that we have to +% rearrange how floats are numbered (they go A1, A2, ... within +% appendix A), and this is complicated by the need to work properly +% with \textsc{endfloat}. So if the \textsc{leavefloats} option is in +% effect, we'll want to change numbering immediately, but if we're +% putting floats at the end, then we need to arrange for the numbering +% changes to happen when \textsc{endfloat} is part of the way through +% processing the floats. This is done by defining +% |\apaSIXe@appendixfloats@setup| appropriately in the two cases, +% below. +% \begin{macrocode} +\renewcommand{\appendix}{\setcounter{section}{0}% + \renewcommand{\section}[1]{\addtocounter{section}{1}% + \apaSIXe@appendixfloats@setup{\Alph{section}}% + \mspart{Appendix \Alph{section}}}} +\newcommand{\apaSIXe@appendixfloats@go}[1]{% + \setcounter{figure}{0}% + \renewcommand{\thefigure}{#1\arabic{figure}}% + \setcounter{table}{0}% + \renewcommand{\thetable}{#1\arabic{table}}} +% \end{macrocode} +% \end{macro} % \subsection{Endnotes} % If the user requested endnotes, then set them up here. I'm not sure % why you'd want this, but I wrote the code before realizing that @@ -414,12 +448,22 @@ Author Note\par\RaggedRight\@authornote% % This must come after the endnotes handling above, since they both % use |\AtEndDocument| and floats are supposed to come after % footnotes. +% +% If \textsc{endfloat} is in use, then we have to arrange for +% |\apaSIXe@appendixfloats@go| to be called partly through the floats +% being processed. We accomplish this by writing out a call to it to +% the \texttt{fff} and \texttt{ttt} files that it uses. % \begin{macrocode} \ifdefined\apaSIXe@leavefloats - \relax + \newcommand{\apaSIXe@appendixfloats@setup}[1]{\apaSIXe@appendixfloats@go{#1}} \else \RequirePackage[nolists,noheads,nomarkers,tablesfirst]{endfloat} \AtBeginDelayedFloats{\@doublespacing} + \newcommand{\apaSIXe@appendixfloats@setup}[1]{% + \efloat@iwrite{fff}{% + \string\makeatletter\string\apaSIXe@appendixfloats@go{#1}\string\makeatother}% + \efloat@iwrite{ttt}{% + \string\makeatletter\string\apaSIXe@appendixfloats@go{#1}\string\makeatother}} \fi % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex/apa6e/apa6e.ins b/Master/texmf-dist/source/latex/apa6e/apa6e.ins new file mode 100644 index 00000000000..3cb9f859cda --- /dev/null +++ b/Master/texmf-dist/source/latex/apa6e/apa6e.ins @@ -0,0 +1,85 @@ +%% +%% Copyright (C) 2011 by Nathaniel J. Smith +%% +%% Redistribution and use in source and binary forms, with or without +%% modification, are permitted provided that the following conditions are +%% met: +%% +%% 1. Redistributions of source code must retain the above copyright +%% notice, this list of conditions and the following disclaimer. +%% +%% 2. Redistributions in binary form must reproduce the above +%% copyright notice, this list of conditions and the following +%% disclaimer in the documentation and/or other materials provided +%% with the distribution. +%% +%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +%% ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +%% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +%% A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +%% HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +%% SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +%% LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +%% DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +%% THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +%% (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +%% OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +%% +%% DocStrip tutorial: +%% http://carroll.aset.psu.edu/pub/CTAN/info/dtxtut/ + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/apa6e} + +\preamble + +This is a generated file. + +Copyright (C) 2011 by Nathaniel J. Smith + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +\endpreamble + +\generate{\file{apa6e.cls}{\from{apa6e.dtx}{class}}} + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* apa6e.cls *} +\Msg{* *} +\Msg{* To produce the documentation run the file apa6e.dtx *} +\Msg{* through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/apa6e/apa6e.cls b/Master/texmf-dist/tex/latex/apa6e/apa6e.cls index 52c725cb61e..602edeee6cb 100644 --- a/Master/texmf-dist/tex/latex/apa6e/apa6e.cls +++ b/Master/texmf-dist/tex/latex/apa6e/apa6e.cls @@ -36,7 +36,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{apa6e} - [2011/02/12 v0.1 APA 6e manuscript formatting] + [2011/03/01 v0.2 APA 6e manuscript formatting] \DeclareOption{endnotes}{\def\apaSIXe@endnotes\relax} \DeclareOption{leavefloats}{\def\apaSIXe@leavefloats\relax} \DeclareOption*{% @@ -117,6 +117,15 @@ Author Note\par\RaggedRight\@authornote% {-0.2\baselineskip \@plus -0.2ex \@minus -0.2ex}% {0.2\baselineskip \@plus .2ex}% {\Centering\normalfont\normalsize}} +\renewcommand{\appendix}{\setcounter{section}{0}% + \renewcommand{\section}[1]{\addtocounter{section}{1}% + \apaSIXe@appendixfloats@setup{\Alph{section}}% + \mspart{Appendix \Alph{section}}}} +\newcommand{\apaSIXe@appendixfloats@go}[1]{% + \setcounter{figure}{0}% + \renewcommand{\thefigure}{#1\arabic{figure}}% + \setcounter{table}{0}% + \renewcommand{\thetable}{#1\arabic{table}}} \ifdefined\apaSIXe@endnotes \RequirePackage{endnotes} \renewcommand{\enoteheading}{\mspart{Footnotes}} @@ -125,10 +134,15 @@ Author Note\par\RaggedRight\@authornote% \AtEndDocument{\ifdefined \apaSIXe@hasendnotes \theendnotes \fi} \fi \ifdefined\apaSIXe@leavefloats - \relax + \newcommand{\apaSIXe@appendixfloats@setup}[1]{\apaSIXe@appendixfloats@go{#1}} \else \RequirePackage[nolists,noheads,nomarkers,tablesfirst]{endfloat} \AtBeginDelayedFloats{\@doublespacing} + \newcommand{\apaSIXe@appendixfloats@setup}[1]{% + \efloat@iwrite{fff}{% + \string\makeatletter\string\apaSIXe@appendixfloats@go{#1}\string\makeatother}% + \efloat@iwrite{ttt}{% + \string\makeatletter\string\apaSIXe@appendixfloats@go{#1}\string\makeatother}} \fi \endinput %% diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 642bc0eac65..2804b4212c6 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1590,6 +1590,7 @@ $standardins='\.ins'; my $core_latex = "$Master/texmf-dist/tex/latex"; %specialinsrunner = ( + 'apa6e' => 'latex', # requires interaction 'bosisio' => 'latex -translate-file=empty.tcx', # ^^, no 8-bit 'bullcntr' => 'latex', # requires interaction 'canoniclayout' => 'tex', -- cgit v1.2.3