diff options
author | Karl Berry <karl@freefriends.org> | 2013-09-21 21:37:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-09-21 21:37:42 +0000 |
commit | f5628028710fc1360a0446b4c92ae214d08ef20f (patch) | |
tree | 521b743e01d336bae4f05bcd69e75f78288d81af /Master/texmf-dist/tex/latex/skrapport | |
parent | 74e7c8b0e6d77f0d143fac7754168b84747ef59b (diff) |
skrapport (21sep13)
git-svn-id: svn://tug.org/texlive/trunk@31718 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/skrapport')
-rw-r--r-- | Master/texmf-dist/tex/latex/skrapport/skrapport.cls | 141 |
1 files changed, 105 insertions, 36 deletions
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}}{} |