summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-09-21 21:37:42 +0000
committerKarl Berry <karl@freefriends.org>2013-09-21 21:37:42 +0000
commitf5628028710fc1360a0446b4c92ae214d08ef20f (patch)
tree521b743e01d336bae4f05bcd69e75f78288d81af
parent74e7c8b0e6d77f0d143fac7754168b84747ef59b (diff)
skrapport (21sep13)
git-svn-id: svn://tug.org/texlive/trunk@31718 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/skrapport/README2
-rw-r--r--Master/texmf-dist/doc/latex/skrapport/skrapport.pdfbin220329 -> 223989 bytes
-rw-r--r--Master/texmf-dist/source/latex/skrapport/skrapport.tex300
-rw-r--r--Master/texmf-dist/tex/latex/skrapport/skrapport.cls141
4 files changed, 303 insertions, 140 deletions
diff --git a/Master/texmf-dist/doc/latex/skrapport/README b/Master/texmf-dist/doc/latex/skrapport/README
index 14face239ad..ed97e381a5c 100644
--- a/Master/texmf-dist/doc/latex/skrapport/README
+++ b/Master/texmf-dist/doc/latex/skrapport/README
@@ -26,7 +26,7 @@
%% * skrapport-size11pt.clo
%% * skrapport-size12pt.clo
-This is version 0.12b of the skrapport document class, intended for simple
+This is version 0.12d of the skrapport document class, intended for simple
reports submitted by the author at Chalmers University of Technology.
The following files are enclosed.
diff --git a/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf b/Master/texmf-dist/doc/latex/skrapport/skrapport.pdf
index 9b8def29aea..3d83e7906e2 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 2cdc6455d7f..7f355fcaf77 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.12c}
+ \version{0.12d}
\changes{0.01}{Initial version}
\changes{0.03}{Removed \cs{rd} and \cs{id}}
\changes{0.04}{Added \pkg{microtype} package}
@@ -113,6 +113,7 @@
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}
+ \changes{0.12d}{Added \opt{hanging-titles}, latin phrase macros. Load \pkg{isomath}. Don't load \pkg{icomma}. Use \cs{frenchspacing}}
% Metadata
\package[ctan=skrapport,vcs=https://github.com/urdh/skrapport]{skrapport}
@@ -191,13 +192,17 @@
default behaviour thus is similar to that obtained using the
\pkg{parskip} package with the \pkg{article} package.
- \Option{titles}\WithValues{rm, bf, sf}\AndDefault{bf}
+ \Option{titles}\WithValues{rm, it, bf, sf}\AndDefault{bf}
Section titles (and a few other elements) are controlled by this
option in that they are typeset either using the regular roman font,
the boldfaced roman font or the sans serif font. For historical
reasons the default is a boldfaced roman font, but the sans serif
option is very handsome.
+ \Option{hanging-titles}\WithValues{true, false}\AndDefault{false}
+ This options allow sections to be set as \enquote{hanging} titles,
+ \emph{i.e.} with the section number in the margin.
+
\Option{color}\WithValues{\meta{color theme}}\AndDefault{default}
This option tells the class to activate color theme support and
optionally load a color theme. Several color themes are available
@@ -464,6 +469,19 @@
comment inline with a red background, while the unstarred variant
typesets the comment in a \cs{marginpar}.
+ \DescribeMacro\eg
+ \DescribeMacro\ie
+ \DescribeMacro\etc
+ \DescribeMacro\cf
+ \DescribeMacro\viz
+ These macro print the abbreviation of the latin phrases
+ \emph{exempli gratia}, \emph{id est}, \emph{et cetera},
+ \emph{confer} and \emph{videlicet}, respectively.
+ The macros peek ahead to find punctuation marks and spaces, so they
+ should behave correctly regardless of usage (assuming they're used in
+ running text and uncomplicated settings). In languages other than
+ english, appropriate translations are made if applicable.
+
\subsubsection{Color theme support}
\DescribeMacro\colortheme{<theme>}
The \cs{colortheme} macro, which is only available when the
@@ -1019,7 +1037,8 @@
\end{macro}
\begin{macro}{\__skrapport_setup_titles:n}[1]
- {Title style (\texttt{rm}, \texttt{bf} or \texttt{sf})}
+ {Title style (\texttt{rm}, \texttt{it},
+ \texttt{bf} or \texttt{sf})}
The title styles are implemented by creating a new macro
\cs{__skrapport_title_style:} which will later be used by
\cs{section} and friends.
@@ -1030,8 +1049,10 @@
\begin{macro*}{\__skrapport_title_style:}
\changes{0.11a}{Removed incorrect \cs{bfseries}, replaced
\cs{relax} with \cs{rmfamily}}
+ \changes{0.12d}{Added \texttt{it} option}
\begin{MacroCode}{class}
{rm}{\cs_new_protected:Nn\__skrapport_title_style:{\rmfamily}}
+ {it}{\cs_new_protected:Nn\__skrapport_title_style:{\itshape}}
{bf}{\cs_new_protected:Nn\__skrapport_title_style:{\bfseries}}
{sf}{\cs_new_protected:Nn\__skrapport_title_style:{\sffamily}}
\end{MacroCode}
@@ -1049,6 +1070,8 @@
\begin{macro}{\__skrapport_setup_lang:n}[1]
{Language (\texttt{sv}, \texttt{en} or \texttt{de})}
+ \changes{0.12d}{Use \pkg{babel} mechanisms for language-dependent
+ strings, so they work correctly in \env{otherlanguage}}
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
@@ -1066,42 +1089,11 @@
\RequirePackage[british,swedish]{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:{och}
- \cs_gset:Nn\__skrapport_Email_word:{E-post}
- \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
- \cs_gset:Npn\contentsname{Innehåll}
- \cs_gset:Npn\refname{Referenser}
- \cs_gset:Npn\figurename{Figur}
- \cs_gset:Npn\tablename{Tabell}
- \cs_gset:Npn\appendixname{Bilaga}
- \cs_gset:Npn\abstractname{Sammanfattning}
- \cs_gset:Npn\today
- {\int_use:N\year--\int_use:N\month--\int_use:N\day}
\cs_gset:Nn\__skrapport_RFC_language:{swe}
\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,swedish}{isodate}
}
@@ -1113,42 +1105,11 @@
\RequirePackage[swedish,british]{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:{and}
- \cs_gset:Nn\__skrapport_Email_word:{Email}
- \cs_gset:Nn\__skrapport_Comment_word:{Comment}
- \cs_gset:Npn\contentsname{Contents}
- \cs_gset:Npn\refname{References}
- \cs_gset:Npn\figurename{Figurr}
- \cs_gset:Npn\tablename{Table}
- \cs_gset:Npn\appendixname{Appendix}
- \cs_gset:Npn\abstractname{Abstract}
- \cs_gset:Npn\today
- {\int_use:N\year--\int_use:N\month--\int_use:N\day}
\cs_gset:Nn\__skrapport_RFC_language:{eng}
\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,british}{isodate}
}
@@ -1160,42 +1121,11 @@
\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}
}
@@ -1206,6 +1136,89 @@
\begin{MacroCode}{class}
\msg_info:nnn{skrapport}{invalid-lang}{#1}
}
+\end{MacroCode}
+ After loading \pkg{babel} or \pkg{polyglossia}, we provide
+ translation strings. This is done using the \cs*{addto} and
+ \cs*{captions<lang>}, which is compatible with both packages.
+ \begin{macro*}{\captionsswedish}
+ \begin{macro*}{\dateswedish}
+\begin{MacroCode}{class}
+ \addto\captionsswedish{
+ \cs_gset:Nn\__skrapport_and_word:{och}
+ \cs_gset:Nn\__skrapport_Email_word:{E-post}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Nn\__skrapport_eg_word:{t.ex.}
+ \cs_gset:Nn\__skrapport_ie_word:{dvs.}
+ \cs_gset:Nn\__skrapport_etc_word:{\emph{etc.}}
+ \cs_gset:Nn\__skrapport_cf_word:{jfr.}
+ \cs_gset:Nn\__skrapport_viz_word:{dvs.}
+ \cs_gset:Npn\contentsname{Innehåll}
+ \cs_gset:Npn\refname{Referenser}
+ \cs_gset:Npn\figurename{Figur}
+ \cs_gset:Npn\tablename{Tabell}
+ \cs_gset:Npn\appendixname{Bilaga}
+ \cs_gset:Npn\abstractname{Sammanfattning}
+ }
+ \cs_gset:Npn\dateswedish{
+ \cs_gset:Npn\today
+ {\int_use:N\year--\int_use:N\month--\int_use:N\day}
+ }
+\end{MacroCode}
+ \end{macro*}
+ \end{macro*}
+ \begin{macro*}{\captionsbritish}
+ \begin{macro*}{\datebritish}
+\begin{MacroCode}{class}
+ \addto\captionsbritish{
+ \cs_gset:Nn\__skrapport_and_word:{and}
+ \cs_gset:Nn\__skrapport_Email_word:{Email}
+ \cs_gset:Nn\__skrapport_Comment_word:{Comment}
+ \cs_gset:Nn\__skrapport_eg_word:{\emph{e.g.}}
+ \cs_gset:Nn\__skrapport_ie_word:{\emph{i.e.}}
+ \cs_gset:Nn\__skrapport_etc_word:{\emph{etc.}}
+ \cs_gset:Nn\__skrapport_cf_word:{\emph{cf.}}
+ \cs_gset:Nn\__skrapport_viz_word:{\emph{viz.}}
+ \cs_gset:Npn\contentsname{Contents}
+ \cs_gset:Npn\refname{References}
+ \cs_gset:Npn\figurename{Figurr}
+ \cs_gset:Npn\tablename{Table}
+ \cs_gset:Npn\appendixname{Appendix}
+ \cs_gset:Npn\abstractname{Abstract}
+ }
+ \cs_gset:Npn\datebritish{
+ \cs_gset:Npn\today
+ {\int_use:N\year--\int_use:N\month--\int_use:N\day}
+ }
+\end{MacroCode}
+ \end{macro*}
+ \end{macro*}
+ \begin{macro*}{\captionsngerman}
+ \begin{macro*}{\datengerman}
+\begin{MacroCode}{class}
+ \addto\captionsngerman{
+ \cs_gset:Nn\__skrapport_and_word:{und}
+ \cs_gset:Nn\__skrapport_Email_word:{E-Mail}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Nn\__skrapport_eg_word:{z.~B.}
+ \cs_gset:Nn\__skrapport_ie_word:{d.~h.}
+ \cs_gset:Nn\__skrapport_etc_word:{usw.}
+ \cs_gset:Nn\__skrapport_cf_word:{vgl.}
+ \cs_gset:Nn\__skrapport_viz_word:{\emph{viz.}}
+ \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\datengerman{
+ \cs_gset:Npn\today
+ {\int_use:N\day.\,\int_use:N\month.\,\int_use:N\year}
+ }
+\end{MacroCode}
+ \end{macro*}
+ \end{macro*}
+\begin{MacroCode}{class}
}
\end{MacroCode}
\end{macro}
@@ -1478,6 +1491,7 @@
\begin{macro}{\__skrapport_setup_xelatex:}
\changes{0.12a}{Don't load \pkg{polyglossia} for \hologo{LuaTeX}.
Don't load \pkg{fontspec} for any engine}
+ \changes{0.12d}{Force \texttt{quiet} option for \pkg{fontspec}}
This macro contains special setup code for the \hologo{XeTeX} and
\hologo{LuaTeX} engines, such as providing
missing commands (which have been replaced by equivalent Unicode
@@ -1510,6 +1524,7 @@
Thus, only load \pkg{polyglossia} for \hologo{XeLaTeX}.
\begin{MacroCode}{class}
\xetex_if_engine:TF{
+ \PassOptionsToPackage{quiet}{fontspec}
\RequirePackage{polyglossia}
\bool_gset_true:N\g__skrapport_has_polyglossia_bool
}{
@@ -1520,11 +1535,15 @@
\end{macro}
\begin{macro}{\__skrapport_setup_pdftex:}
+ \changes{0.12d}{Load \pkg{isomath}}
This macro contains special setup code for the \hologo{pdfTeX}
engine. Currently, it only sets the font encoding to T1.
\begin{MacroCode}{class}
\cs_new:Nn\__skrapport_setup_pdftex:{
\RequirePackage[T1]{fontenc}
+ \AtEndOfClass{
+ \RequirePackage{isomath}
+ }
\bool_gset_false:N\g__skrapport_has_polyglossia_bool
}
\end{MacroCode}
@@ -1687,7 +1706,7 @@
\end{MacroCode}
\end{option}
- \begin{option}{titles}{rm, bf, sf}
+ \begin{option}{titles}{rm, it, bf, sf}
Declare options for section titles. The old \opt*{??titles} aliases
are deprecated and will be removed in a future version.
\begin{option}{rmtitles}
@@ -1699,7 +1718,7 @@
\changes{0.12}{Option is now deprecated}
\begin{MacroCode}{class}
titles .choices:nn =
- { rm, bf, sf }
+ { rm, it, bf, sf }
{\__skrapport_setup_titles:x{\tl_use:N\l_keys_choice_tl}},
titles .value_required:,
rmtitles .code:n =
@@ -1720,6 +1739,15 @@
\end{option}
\end{option}
+ \begin{option}{hanging-titles}{true, false}
+ \changes{0.12d}{Added option to enable \enquote{hanging} titles}
+\begin{MacroCode}{class}
+ hanging-titles .bool_gset:N = \g__skrapport_hanging_titles_bool,
+ hanging-titles .default:n = true,
+ hanging-titles .initial:n = false,
+\end{MacroCode}
+ \end{option}
+
\begin{option}{lang}{sv, en, de}
\changes{0.12c}{Added option value \texttt{de}}
\changes{0.12}{Incompatible change: values \texttt{swe} and
@@ -1992,13 +2020,13 @@
\RequirePackage{calc,isodate,multicol}
\end{MacroCode}
- At the end of the class definition we load a couple of very
- useful packages that improve typesetting. These are
- \pkg{microtype}, \pkg{icomma}.
+ At the end of the class definition we load a very
+ useful package that improves typesetting: \pkg{microtype}.
+ Also set \cs{frenchspacing}.
\begin{MacroCode}{class}
\AtEndOfClass{
\RequirePackage{microtype}
- \RequirePackage{icomma}
+ \frenchspacing
}
\end{MacroCode}
@@ -2584,12 +2612,17 @@
{Styling of the section title}
{Actual section title}
{Section title for TOC}
+ \changes{0.12d}{Added support for hanging titles}
\begin{MacroCode}{class}
\cs_new:Npn\__skrapport_section_nostar:nnnnnn#1#2#3#4#5#6{
\cs_set:Nn\__skrapport_saved_section:{}
\int_compare:nF{#2>\value{secnumdepth}}{
\refstepcounter{#1}
- \cs_set:Nn\__skrapport_saved_section:{\use:c{the#1}~}
+ \cs_set:Nn\__skrapport_saved_section:{
+ \bool_if:NTF\g__skrapport_hanging_titles_bool
+ {\llap{\use:c{the#1}\hspace{1ex}}}
+ {\use:c{the#1}~}
+ }
}
\__skrapport_section_star:nnnn
{#3}{#4}{#5}{\__skrapport_saved_section:}
@@ -3571,6 +3604,67 @@
\end{macro}
\end{macro}
+ \begin{macro}{\__skrapport_space_if_not_punctuation:}
+\begin{MacroCode}{class}
+\cs_new:Nn\__skrapport_space_if_not_punctuation:{
+ \clist_if_in:noF
+ {{,},:,;,!,?,-,),'}
+ {\token_to_meaning:N\l_peek_token}
+ {\ }
+}
+\end{MacroCode}
+ \end{macro}
+ \begin{macro}{\__skrapport_peek_punctuation:n}
+ \begin{macro*}{\__skrapport_peek_punctuation:x}
+\begin{MacroCode}{class}
+\cs_new_nopar:Nn\__skrapport_peek_punctuation:n{
+ \mbox{#1}
+ \peek_meaning_remove:NTF.{}{
+ \peek_meaning:NF\ {
+ \peek_after:Nw\__skrapport_space_if_not_punctuation:
+ }
+ }
+}
+\cs_generate_variant:Nn\__skrapport_peek_punctuation:n{x}
+\end{MacroCode}{class}
+ \end{macro*}
+ \end{macro}
+ \begin{macro}{\eg}
+\begin{MacroCode}{class}
+\DeclareDocumentCommand\eg{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_eg_word:}
+}
+\end{MacroCode}{class}
+ \end{macro}
+ \begin{macro}{\ie}
+\begin{MacroCode}{class}
+\DeclareDocumentCommand\ie{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_ie_word:}
+}
+\end{MacroCode}{class}
+ \end{macro}
+ \begin{macro}{\etc}
+\begin{MacroCode}{class}
+\DeclareDocumentCommand\etc{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_etc_word:}
+}
+\end{MacroCode}{class}
+ \end{macro}
+ \begin{macro}{\cf}
+\begin{MacroCode}{class}
+\DeclareDocumentCommand\cf{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_cf_word:}
+}
+\end{MacroCode}{class}
+ \end{macro}
+ \begin{macro}{\viz}
+\begin{MacroCode}{class}
+\DeclareDocumentCommand\viz{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_viz_word:}
+}
+\end{MacroCode}{class}
+ \end{macro}
+
\subsubsection{Color theme support}
Color theme setup. Start by patching commands and declaring
default colors. Not implemented: background colors for e.g.
diff --git a/Master/texmf-dist/tex/latex/skrapport/skrapport.cls b/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
index 642334ebf10..9684dc50f07 100644
--- a/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
+++ b/Master/texmf-dist/tex/latex/skrapport/skrapport.cls
@@ -272,6 +272,7 @@
\cs_new:Npn\__skrapport_setup_titles:n#1{
\str_case:nnn{#1}{
{rm}{\cs_new_protected:Nn\__skrapport_title_style:{\rmfamily}}
+ {it}{\cs_new_protected:Nn\__skrapport_title_style:{\itshape}}
{bf}{\cs_new_protected:Nn\__skrapport_title_style:{\bfseries}}
{sf}{\cs_new_protected:Nn\__skrapport_title_style:{\sffamily}}
}{
@@ -288,17 +289,6 @@
}{
\RequirePackage[british,swedish]{babel}
}
- \cs_gset:Nn\__skrapport_and_word:{och}
- \cs_gset:Nn\__skrapport_Email_word:{E-post}
- \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
- \cs_gset:Npn\contentsname{Innehåll}
- \cs_gset:Npn\refname{Referenser}
- \cs_gset:Npn\figurename{Figur}
- \cs_gset:Npn\tablename{Tabell}
- \cs_gset:Npn\appendixname{Bilaga}
- \cs_gset:Npn\abstractname{Sammanfattning}
- \cs_gset:Npn\today
- {\int_use:N\year--\int_use:N\month--\int_use:N\day}
\cs_gset:Nn\__skrapport_RFC_language:{swe}
\PassOptionsToPackage{iso,swedish}{isodate}
}
@@ -309,17 +299,6 @@
}{
\RequirePackage[swedish,british]{babel}
}
- \cs_gset:Nn\__skrapport_and_word:{and}
- \cs_gset:Nn\__skrapport_Email_word:{Email}
- \cs_gset:Nn\__skrapport_Comment_word:{Comment}
- \cs_gset:Npn\contentsname{Contents}
- \cs_gset:Npn\refname{References}
- \cs_gset:Npn\figurename{Figurr}
- \cs_gset:Npn\tablename{Table}
- \cs_gset:Npn\appendixname{Appendix}
- \cs_gset:Npn\abstractname{Abstract}
- \cs_gset:Npn\today
- {\int_use:N\year--\int_use:N\month--\int_use:N\day}
\cs_gset:Nn\__skrapport_RFC_language:{eng}
\PassOptionsToPackage{iso,british}{isodate}
}
@@ -330,23 +309,72 @@
}{
\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}
}
+ \addto\captionsswedish{
+ \cs_gset:Nn\__skrapport_and_word:{och}
+ \cs_gset:Nn\__skrapport_Email_word:{E-post}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Nn\__skrapport_eg_word:{t.ex.}
+ \cs_gset:Nn\__skrapport_ie_word:{dvs.}
+ \cs_gset:Nn\__skrapport_etc_word:{\emph{etc.}}
+ \cs_gset:Nn\__skrapport_cf_word:{jfr.}
+ \cs_gset:Nn\__skrapport_viz_word:{dvs.}
+ \cs_gset:Npn\contentsname{Innehåll}
+ \cs_gset:Npn\refname{Referenser}
+ \cs_gset:Npn\figurename{Figur}
+ \cs_gset:Npn\tablename{Tabell}
+ \cs_gset:Npn\appendixname{Bilaga}
+ \cs_gset:Npn\abstractname{Sammanfattning}
+ }
+ \cs_gset:Npn\dateswedish{
+ \cs_gset:Npn\today
+ {\int_use:N\year--\int_use:N\month--\int_use:N\day}
+ }
+ \addto\captionsbritish{
+ \cs_gset:Nn\__skrapport_and_word:{and}
+ \cs_gset:Nn\__skrapport_Email_word:{Email}
+ \cs_gset:Nn\__skrapport_Comment_word:{Comment}
+ \cs_gset:Nn\__skrapport_eg_word:{\emph{e.g.}}
+ \cs_gset:Nn\__skrapport_ie_word:{\emph{i.e.}}
+ \cs_gset:Nn\__skrapport_etc_word:{\emph{etc.}}
+ \cs_gset:Nn\__skrapport_cf_word:{\emph{cf.}}
+ \cs_gset:Nn\__skrapport_viz_word:{\emph{viz.}}
+ \cs_gset:Npn\contentsname{Contents}
+ \cs_gset:Npn\refname{References}
+ \cs_gset:Npn\figurename{Figurr}
+ \cs_gset:Npn\tablename{Table}
+ \cs_gset:Npn\appendixname{Appendix}
+ \cs_gset:Npn\abstractname{Abstract}
+ }
+ \cs_gset:Npn\datebritish{
+ \cs_gset:Npn\today
+ {\int_use:N\year--\int_use:N\month--\int_use:N\day}
+ }
+ \addto\captionsngerman{
+ \cs_gset:Nn\__skrapport_and_word:{und}
+ \cs_gset:Nn\__skrapport_Email_word:{E-Mail}
+ \cs_gset:Nn\__skrapport_Comment_word:{Kommentar}
+ \cs_gset:Nn\__skrapport_eg_word:{z.~B.}
+ \cs_gset:Nn\__skrapport_ie_word:{d.~h.}
+ \cs_gset:Nn\__skrapport_etc_word:{usw.}
+ \cs_gset:Nn\__skrapport_cf_word:{vgl.}
+ \cs_gset:Nn\__skrapport_viz_word:{\emph{viz.}}
+ \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\datengerman{
+ \cs_gset:Npn\today
+ {\int_use:N\day.\,\int_use:N\month.\,\int_use:N\year}
+ }
}
\cs_new:Npn\__skrapport_setup_font:n#1{
\PassOptionsToPackage{intlimits}{amsmath}
@@ -513,6 +541,7 @@
}
\DeclareDocumentCommand\nobreakspace{}{\leavevmode\nobreak\space}
\xetex_if_engine:TF{
+ \PassOptionsToPackage{quiet}{fontspec}
\RequirePackage{polyglossia}
\bool_gset_true:N\g__skrapport_has_polyglossia_bool
}{
@@ -521,6 +550,9 @@
}
\cs_new:Nn\__skrapport_setup_pdftex:{
\RequirePackage[T1]{fontenc}
+ \AtEndOfClass{
+ \RequirePackage{isomath}
+ }
\bool_gset_false:N\g__skrapport_has_polyglossia_bool
}
\cs_new:Nn\__skrapport_setup_engine_specific:{
@@ -581,7 +613,7 @@
fleqn .code:n =
{\__skrapport_setup_fleqn:},
titles .choices:nn =
- { rm, bf, sf }
+ { rm, it, bf, sf }
{\__skrapport_setup_titles:x{\tl_use:N\l_keys_choice_tl}},
titles .value_required:,
rmtitles .code:n =
@@ -596,6 +628,9 @@
{\msg_warning:nnnn{skrapport}{option-deprecated}
{sftitles}{titles=sf}
\keys_set:nn{skrapport}{titles=sf}},
+ hanging-titles .bool_gset:N = \g__skrapport_hanging_titles_bool,
+ hanging-titles .default:n = true,
+ hanging-titles .initial:n = false,
lang .choices:nn =
{ sv, en, de }
{\__skrapport_setup_lang:x{\tl_use:N\l_keys_choice_tl}},
@@ -750,7 +785,7 @@
\RequirePackage{calc,isodate,multicol}
\AtEndOfClass{
\RequirePackage{microtype}
- \RequirePackage{icomma}
+ \frenchspacing
}
\AtBeginDocument{
\cs_if_exist:NT\urlstyle{\urlstyle{same}}
@@ -1056,7 +1091,11 @@
\cs_set:Nn\__skrapport_saved_section:{}
\int_compare:nF{#2>\value{secnumdepth}}{
\refstepcounter{#1}
- \cs_set:Nn\__skrapport_saved_section:{\use:c{the#1}~}
+ \cs_set:Nn\__skrapport_saved_section:{
+ \bool_if:NTF\g__skrapport_hanging_titles_bool
+ {\llap{\use:c{the#1}\hspace{1ex}}}
+ {\use:c{the#1}~}
+ }
}
\__skrapport_section_star:nnnn
{#3}{#4}{#5}{\__skrapport_saved_section:}
@@ -1467,6 +1506,36 @@
{\IfBooleanTF{#1}{\comment*{#2}}{\comment{#2}}}
\ProvideDocumentCommand\note{sm}
{\IfBooleanTF{#1}{\comment*{#2}}{\comment{#2}}}
+\cs_new:Nn\__skrapport_space_if_not_punctuation:{
+ \clist_if_in:noF
+ {{,},:,;,!,?,-,),'}
+ {\token_to_meaning:N\l_peek_token}
+ {\ }
+}
+\cs_new_nopar:Nn\__skrapport_peek_punctuation:n{
+ \mbox{#1}
+ \peek_meaning_remove:NTF.{}{
+ \peek_meaning:NF\ {
+ \peek_after:Nw\__skrapport_space_if_not_punctuation:
+ }
+ }
+}
+\cs_generate_variant:Nn\__skrapport_peek_punctuation:n{x}
+\DeclareDocumentCommand\eg{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_eg_word:}
+}
+\DeclareDocumentCommand\ie{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_ie_word:}
+}
+\DeclareDocumentCommand\etc{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_etc_word:}
+}
+\DeclareDocumentCommand\cf{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_cf_word:}
+}
+\DeclareDocumentCommand\viz{}{
+ \__skrapport_peek_punctuation:x{\__skrapport_viz_word:}
+}
\bool_if:NT\g__skrapport_color_bool{
\apptocmd{\bfseries}
{\color{skrapport@boldcolor}}{}