summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-10 22:46:35 +0000
committerKarl Berry <karl@freefriends.org>2013-09-10 22:46:35 +0000
commit8148607713ce67f4a8d132facbbf3a1d68dabdc1 (patch)
tree930b9065af7780298d0ab54a9ab2198394b4c127 /Master
parent91ff0e396787dd80a11dfb7b633db20058c3963a (diff)
skrapport (10sep13)
git-svn-id: svn://tug.org/texlive/trunk@31623 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/skrapport/skrapport.pdfbin220398 -> 220329 bytes
-rw-r--r--Master/texmf-dist/source/latex/skrapport/skrapport.tex155
-rw-r--r--Master/texmf-dist/tex/latex/skrapport/skrapport.cls81
3 files changed, 170 insertions, 66 deletions
diff --git a/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf b/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf
index 8a5a3d7fc6d..9b8def29aea 100644
--- a/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf
+++ b/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/skrapport/skrapport.tex b/Master/texmf-dist/source/latex/skrapport/skrapport.tex
index 96f760f7460..2cdc6455d7f 100644
--- a/Master/texmf-dist/source/latex/skrapport/skrapport.tex
+++ b/Master/texmf-dist/source/latex/skrapport/skrapport.tex
@@ -90,7 +90,7 @@
% This is where the documentation begins
\begin{document}
% Change & version info
- \version{0.12b}
+ \version{0.12c}
\changes{0.01}{Initial version}
\changes{0.03}{Removed \cs{rd} and \cs{id}}
\changes{0.04}{Added \pkg{microtype} package}
@@ -112,6 +112,7 @@
\changes{0.12a}{The \pkg{fontspec} package is now only loaded when using the \texttt{word} or \texttt{none} font stacks on \hologo{LuaLaTeX} or \hologo{XeLaTeX}. The \texttt{word} font stack is now
the default font stack on \hologo{XeLaTeX}}
\changes{0.12b}{Minor and major bugfixes to \cs{maketitle}, \opt{ptsize}, \opt{twocolumn} and others}
+ \changes{0.12c}{Added german language option, fixed sectioning macros in \opt{twocolumn} mode}
% Metadata
\package[ctan=skrapport,vcs=https://github.com/urdh/skrapport]{skrapport}
@@ -277,10 +278,11 @@
When \texttt{false}, the \pkg{skmath} package is loaded, providing
improvements to the math functionality of \pkg{amsmath} and friends.
- \Option{lang}\WithValues{en, sv}\AndDefault{sv}
+ \Option{lang}\WithValues{en, sv, de}\AndDefault{sv}
This option specifies what main language \pkg{babel} or
- \pkg{polyglossia} set up with. The other language is loaded as
- well, for use in constructs that allow for a second language.
+ \pkg{polyglossia} set up with. English (or swedish, for
+ \texttt{lang=en}) is loaded as well, for use in constructs
+ that allow for a second language.
\Option{draft}\WithValues{true, false}\AndDefault{false}
The \opt{draft} option, much like in \pkg{article}, enables
@@ -370,7 +372,7 @@
\DescribeMacro\subparagraph*[<short title>]{<title>}
The sectioning macros are superficially very similar to those
provided by \pkg{article}, but have been completely reimplemented
- in \pkg{expl3} code. Additionally, the style of these secioning
+ in \pkg{expl3} code. Additionally, the style of these sectioning
macros, as detailed by the \opt{titles} option documentation above,
can be changed.
@@ -595,7 +597,7 @@
\begin{MacroCode}{class}
\RequirePackage{expl3,l3keys2e,xparse,xstring,etoolbox}
\ProvidesExplClass{skrapport}%
- {2013/07/24}{0.12b}{stylish report document class}
+ {2013/09/09}{0.12c}{stylish report document class}
\end{MacroCode}
\subsection{Messages}
@@ -759,6 +761,8 @@
\end{macro}
\begin{macro}{\__skrapport_setup_twocolumn:}
+ \changes{0.12c}{Major changes to the sectioning commands, to
+ override what \pkg{grid} is doing}
Setting up for twocolumn mode is slightly compliacted. Note that this
macro should be called from \cs{AtEndOfClass} to ensure that we patch
everything correctly. Note also that \pkg{multicol} is always loaded
@@ -834,40 +838,61 @@
\BeforeBeginEnvironment{alignat*}{\begin{gridenv}}
\AfterEndEnvironment{alignat*}{\end{gridenv}}
\end{MacroCode}
- Since \pkg{grid} just overrides whatever sectioning macros we
- define normally, we have to fix them up to make the public API
- conform with the one-column mode. This is only necessary for
+ Since \pkg{grid} override the usual sectioning macros, we have to
+ provide fixed and improved variants that conform to our style
+ and out public API. This is only necessary for
the \enquote{major} sectioning macros, not \cs*{paragraph} and
\cs*{subparagraph}.
-\begin{MacroCode}{class}
- \cs_set_eq:NN\__skrapport_saved_section:w\section
- \RenewDocumentCommand\section{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_section:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_section:w{##3}}
- {\__skrapport_saved_section:w[##2]{##3}}
- }
+ \begin{macro*}{\section}
+\begin{MacroCode}{class}
+ \skip_gset:Nn\c__skrapport_section_pre_skip{-.999\baselineskip}
+ \skip_gset:Nn\c__skrapport_section_post_skip{0.001\baselineskip}
+ \dim_gset:Nn \c__skrapport_section_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_section_style:
+ {\normalfont\__skrapport_title_style:}
+ \DeclareDocumentCommand\section{som}{
+ \__skrapport_generic_section:nnnnn{section}{1}{##1}{##2}{##3}
}
- \cs_set_eq:NN\__skrapport_saved_subsection:w\subsection
- \RenewDocumentCommand\subsection{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_subsection:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_subsection:w{##3}}
- {\__skrapport_saved_subsection:w[##2]{##3}}
- }
+\end{MacroCode}
+ \end{macro*}
+ \begin{macro*}{\subsection}
+\begin{MacroCode}{class}
+ \skip_gset:Nn\c__skrapport_subsection_pre_skip{\baselineskip}
+ \skip_gset:Nn\c__skrapport_subsection_post_skip{-.35\baselineskip}
+ \dim_gset:Nn \c__skrapport_subsection_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_subsection_style:
+ {\normalfont\__skrapport_title_style:\unskip}
+ \DeclareDocumentCommand\subsection{som}{
+ \__skrapport_generic_section:nnnnn{subsection}{2}{##1}{##2}{##3}
}
- \cs_set_eq:NN\__skrapport_saved_subsubsection:w\subsubsection
- \RenewDocumentCommand\subsubsection{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_subsubsection:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_subsubsection:w{##3}}
- {\__skrapport_saved_subsubsection:w[##2]{##3}}
+\end{MacroCode}
+ \end{macro*}
+ \begin{macro*}{\subsubsection}
+\begin{MacroCode}{class}
+ \skip_gset:Nn\c__skrapport_subsubsection_pre_skip{\baselineskip}
+ \skip_gset:Nn\c__skrapport_subsubsection_post_skip{-.35\baselineskip}
+ \dim_gset:Nn \c__skrapport_subsubsection_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_subsubsection_style:
+ {\normalfont\itshape\__skrapport_title_style:\unskip}
+ \DeclareDocumentCommand\subsubsection{som}{
+ \__skrapport_generic_section:nnnnn{subsubsection}{3}{##1}{##2}{##3}
+ }
+\end{MacroCode}
+ \end{macro*}
+ We also redefine \cs{l@section} to make the TOC blend in a bit.
+ \begin{macro*}{\l@section}
+\begin{MacroCode}{class}
+ \DeclareDocumentCommand\l@section{mm}{
+ \group_begin:
+ \skip_vertical:n{.75ex}
+ \__skrapport_title_style:
+ \__skrapport_toc_line:nnnnn{1}{0em}{1.3em}{##1}{
+ \__skrapport_title_style: ##2
}
+ \group_end:
}
\end{MacroCode}
+ \end{macro*}
The \env{figure} environment is patched\ldots
\begin{MacroCode}{class}
\cs_new:Npn\__skrapport_xdblfloat:nn##1##2{\@xdblfloat{##1}[##2]}
@@ -1023,7 +1048,7 @@
\end{macro}
\begin{macro}{\__skrapport_setup_lang:n}[1]
- {Language (\texttt{sv} or \texttt{en})}
+ {Language (\texttt{sv}, \texttt{en} or \texttt{de})}
Thus far only two language options are implemented, each of them
setting the other as the \enquote{other} language. We check if
\pkg{polyglossia} has been loaded (this is done by
@@ -1077,7 +1102,6 @@
\end{macro*}
\end{macro*}
\end{macro*}
-
\begin{MacroCode}{class}
\PassOptionsToPackage{iso,swedish}{isodate}
}
@@ -1128,6 +1152,53 @@
\begin{MacroCode}{class}
\PassOptionsToPackage{iso,british}{isodate}
}
+ {de}{
+ \bool_if:NTF\g__skrapport_has_polyglossia_bool{
+ \setmainlanguage{ngerman}
+ \setotherlanguage[variant=british]{english}
+ }{
+ \RequirePackage[british,ngerman]{babel}
+ }
+\end{MacroCode}
+ \begin{macro*}{\__skrapport_and_word:}
+ \begin{macro*}{\__skrapport_Email_word:}
+ \begin{macro*}{\__skrapport_Comment_word:}
+ \begin{macro*}{\contentsname}
+ \begin{macro*}{\refname}
+ \begin{macro*}{\figurename}
+ \begin{macro*}{\tablename}
+ \begin{macro*}{\appendixname}
+ \begin{macro*}{\abstractname}
+ \begin{macro*}{\today}
+ \begin{macro*}{\__skrapport_RFC_language:}
+\begin{MacroCode}{class}
+ \cs_gset:Nn\__skrapport_and_word:{und}
+ \cs_gset:Nn\__skrapport_Email_word:{E-Mail}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Npn\contentsname{Inhaltsverzeichnis}
+ \cs_gset:Npn\refname{Literatur}
+ \cs_gset:Npn\figurename{Abbildung}
+ \cs_gset:Npn\tablename{Tabelle}
+ \cs_gset:Npn\appendixname{Anhang}
+ \cs_gset:Npn\abstractname{Zusammenfassung}
+ \cs_gset:Npn\today
+ {\int_use:N\day.\,\int_use:N\month.\,\int_use:N\year}
+ \cs_gset:Nn\__skrapport_RFC_language:{ger}
+\end{MacroCode}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+ \end{macro*}
+\begin{MacroCode}{class}
+ \PassOptionsToPackage{iso,ngerman}{isodate}
+ }
}{
\end{MacroCode}
Fallback prints an informational message and leaves both \pkg{babel}
@@ -1649,7 +1720,8 @@
\end{option}
\end{option}
- \begin{option}{lang}{sv, en}
+ \begin{option}{lang}{sv, en, de}
+ \changes{0.12c}{Added option value \texttt{de}}
\changes{0.12}{Incompatible change: values \texttt{swe} and
\texttt{eng} are now \texttt{sv} and \texttt{en},
respectively}
@@ -1662,7 +1734,7 @@
aliases are deprecated and will be removed.
\begin{MacroCode}{class}
lang .choices:nn =
- { sv, en }
+ { sv, en, de }
{\__skrapport_setup_lang:x{\tl_use:N\l_keys_choice_tl}},
lang .value_required:,
swe .code:n =
@@ -3153,7 +3225,13 @@
In addition to the \env{figure} and \env{table} environments, we
also provide a \env{figcenter} environment that enables centering
of figures or tables that are too wide for the page.
+ \begin{macro*}{\coffin_typeset:Nnnon}
+\begin{MacroCode}{class}
+\cs_generate_variant:Nn\coffin_typeset:Nnnnn{Nnnon}
+\end{MacroCode}
+ \end{macro*}
\begin{environment}{figcenter}
+ \changes{0.12c}{Fixed the x-offset calculation}
\begin{MacroCode}{class}
\DeclareDocumentEnvironment{figcenter}{}{
\cs_set_eq:NN\l__tmpa_cs\caption
@@ -3163,8 +3241,7 @@
}{
\hcoffin_set_end:
\dim_set:Nn\l_tmpa_dim{(\textwidth - \coffin_wd:N\l_tmpa_coffin)/2}
- \skip_horizontal:n{-\l_tmpa_dim}
- \coffin_typeset:Nnnnn\l_tmpa_coffin{H}{l}{0pt}{0pt}
+ \coffin_typeset:Nnnon\l_tmpa_coffin{H}{l}{\dim_use:N\l_tmpa_dim}{0pt}
\cs_set_eq:NN\caption\l__tmpa_cs
\cs_undefine:N\l__tmpa_cs
}
diff --git a/Master/texmf-dist/tex/latex/skrapport/skrapport.cls b/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
index fcbdcea0594..642334ebf10 100644
--- a/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
+++ b/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
@@ -29,7 +29,7 @@
\RequirePackage{expl3,l3keys2e,xparse,xstring,etoolbox}
\ProvidesExplClass{skrapport}%
- {2013/07/24}{0.12b}{stylish report document class}
+ {2013/09/09}{0.12c}{stylish report document class}
\msg_new:nnnn{skrapport}{option-deprecated}{Option~`#1'~deprecated!}
{Please~use~`#2'~instead.}
\msg_new:nnnn{skrapport}{option-no-effect}{Option~`#1'~deprecated!}
@@ -155,32 +155,38 @@
\AfterEndEnvironment{alignat}{\end{gridenv}}
\BeforeBeginEnvironment{alignat*}{\begin{gridenv}}
\AfterEndEnvironment{alignat*}{\end{gridenv}}
- \cs_set_eq:NN\__skrapport_saved_section:w\section
- \RenewDocumentCommand\section{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_section:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_section:w{##3}}
- {\__skrapport_saved_section:w[##2]{##3}}
- }
+ \skip_gset:Nn\c__skrapport_section_pre_skip{-.999\baselineskip}
+ \skip_gset:Nn\c__skrapport_section_post_skip{0.001\baselineskip}
+ \dim_gset:Nn \c__skrapport_section_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_section_style:
+ {\normalfont\__skrapport_title_style:}
+ \DeclareDocumentCommand\section{som}{
+ \__skrapport_generic_section:nnnnn{section}{1}{##1}{##2}{##3}
}
- \cs_set_eq:NN\__skrapport_saved_subsection:w\subsection
- \RenewDocumentCommand\subsection{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_subsection:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_subsection:w{##3}}
- {\__skrapport_saved_subsection:w[##2]{##3}}
- }
+ \skip_gset:Nn\c__skrapport_subsection_pre_skip{\baselineskip}
+ \skip_gset:Nn\c__skrapport_subsection_post_skip{-.35\baselineskip}
+ \dim_gset:Nn \c__skrapport_subsection_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_subsection_style:
+ {\normalfont\__skrapport_title_style:\unskip}
+ \DeclareDocumentCommand\subsection{som}{
+ \__skrapport_generic_section:nnnnn{subsection}{2}{##1}{##2}{##3}
+ }
+ \skip_gset:Nn\c__skrapport_subsubsection_pre_skip{\baselineskip}
+ \skip_gset:Nn\c__skrapport_subsubsection_post_skip{-.35\baselineskip}
+ \dim_gset:Nn \c__skrapport_subsubsection_indent_dim{\c_zero_dim}
+ \cs_set_protected:Nn\__skrapport_subsubsection_style:
+ {\normalfont\itshape\__skrapport_title_style:\unskip}
+ \DeclareDocumentCommand\subsubsection{som}{
+ \__skrapport_generic_section:nnnnn{subsubsection}{3}{##1}{##2}{##3}
}
- \cs_set_eq:NN\__skrapport_saved_subsubsection:w\subsubsection
- \RenewDocumentCommand\subsubsection{som}{
- \IfBooleanTF{##1}
- {\__skrapport_saved_subsubsection:w*{##3}}
- {\IfNoValueTF{##2}
- {\__skrapport_saved_subsubsection:w{##3}}
- {\__skrapport_saved_subsubsection:w[##2]{##3}}
+ \DeclareDocumentCommand\l@section{mm}{
+ \group_begin:
+ \skip_vertical:n{.75ex}
+ \__skrapport_title_style:
+ \__skrapport_toc_line:nnnnn{1}{0em}{1.3em}{##1}{
+ \__skrapport_title_style: ##2
}
+ \group_end:
}
\cs_new:Npn\__skrapport_xdblfloat:nn##1##2{\@xdblfloat{##1}[##2]}
\cs_generate_variant:Nn\__skrapport_xdblfloat:nn{nx}
@@ -317,6 +323,27 @@
\cs_gset:Nn\__skrapport_RFC_language:{eng}
\PassOptionsToPackage{iso,british}{isodate}
}
+ {de}{
+ \bool_if:NTF\g__skrapport_has_polyglossia_bool{
+ \setmainlanguage{ngerman}
+ \setotherlanguage[variant=british]{english}
+ }{
+ \RequirePackage[british,ngerman]{babel}
+ }
+ \cs_gset:Nn\__skrapport_and_word:{und}
+ \cs_gset:Nn\__skrapport_Email_word:{E-Mail}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Npn\contentsname{Inhaltsverzeichnis}
+ \cs_gset:Npn\refname{Literatur}
+ \cs_gset:Npn\figurename{Abbildung}
+ \cs_gset:Npn\tablename{Tabelle}
+ \cs_gset:Npn\appendixname{Anhang}
+ \cs_gset:Npn\abstractname{Zusammenfassung}
+ \cs_gset:Npn\today
+ {\int_use:N\day.\,\int_use:N\month.\,\int_use:N\year}
+ \cs_gset:Nn\__skrapport_RFC_language:{ger}
+ \PassOptionsToPackage{iso,ngerman}{isodate}
+ }
}{
\msg_info:nnn{skrapport}{invalid-lang}{#1}
}
@@ -570,7 +597,7 @@
{sftitles}{titles=sf}
\keys_set:nn{skrapport}{titles=sf}},
lang .choices:nn =
- { sv, en }
+ { sv, en, de }
{\__skrapport_setup_lang:x{\tl_use:N\l_keys_choice_tl}},
lang .value_required:,
swe .code:n =
@@ -1253,6 +1280,7 @@
}{
\end@float
}
+\cs_generate_variant:Nn\coffin_typeset:Nnnnn{Nnnon}
\DeclareDocumentEnvironment{figcenter}{}{
\cs_set_eq:NN\l__tmpa_cs\caption
\cs_set:Npn\caption{\msg_error:nn{skrapport}{caption-in-figcenter}}
@@ -1261,8 +1289,7 @@
}{
\hcoffin_set_end:
\dim_set:Nn\l_tmpa_dim{(\textwidth - \coffin_wd:N\l_tmpa_coffin)/2}
- \skip_horizontal:n{-\l_tmpa_dim}
- \coffin_typeset:Nnnnn\l_tmpa_coffin{H}{l}{0pt}{0pt}
+ \coffin_typeset:Nnnon\l_tmpa_coffin{H}{l}{\dim_use:N\l_tmpa_dim}{0pt}
\cs_set_eq:NN\caption\l__tmpa_cs
\cs_undefine:N\l__tmpa_cs
}