和来自 egreg 的帮助,我在文件中有以下包和宏的集合standardopsaetning.sty
:
\NeedsTeXFormat{LaTeX2e}[2014/05/01]
\ProvidesPackage{standardopsaetning}[2015/01/04 Standardopsætning]
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{babel}
\RequirePackage[
hmargin = 2.4cm,
vmargin = 3cm
]{geometry}
\RequirePackage{mathtools}
\RequirePackage[
bottom,
hang,
stable
]{footmisc}
\RequirePackage{fancyhdr}
\RequirePackage{caption}
\RequirePackage{siunitx}
\RequirePackage{pstricks-add}
\RequirePackage{booktabs}
\RequirePackage{enumitem}
\RequirePackage{upgreek}
\RequirePackage[
lastpage
]{zref}
\RequirePackage{microtype}
\mathtoolsset{
showonlyrefs
}
\DeclareCaptionLabelSeparator{tilpasning}{:\quad}
\captionsetup{
labelsep = tilpasning,
figureposition = bottom,
tableposition = top,
font = small,
labelfont = sc
}
\sisetup{
locale = DE,
per-mode = symbol-or-fraction,
range-phrase = --
}
\psset{
dimen = m
}
\newif\ifprint
\newif\ifsubscript
\addto\extrasdanish{
\renewcommand*\pageautorefname{side}
\renewcommand*\figureautorefname{\textsc{Figur}}
\renewcommand*\tableautorefname{\textsc{Tabel}}
}
\providecommand*\setfloatlocations[2]{\@namedef{fps@#1}{#2}}
\setfloatlocations{figure}{htbp}
\setfloatlocations{table}{htbp}
\DisableLigatures[f]{encoding = T1}
\setlength\footnotemargin{6pt}
\pagestyle{fancy}
\renewcommand*\headrulewidth{0pt}
\setlength\headheight{14.5pt}
\zref@newprop*{numpage}{\the\value{page}}
\zref@addprop{main}{numpage}
\fancyhf{}
\fancyfoot[C]{%
\ifnum \zref@extractdefault{LastPage}{numpage}{0} > 1
\thepage
\fi
}
\begingroup\lccode`\~=`\_
\lowercase{\endgroup
\protected\def~{\@ifnextchar|\subtextup\sb}%
}
\def\subtextup|#1|{\sb{\textup{#1}}}%
\AtBeginDocument{\catcode`\_=12 \mathcode`\_=\string"8000 }
\ExplSyntaxOn
\cs_new_eq:NN \calc \fp_eval:n
\NewDocumentCommand\SIexpr{ O{,} m m }
{
\SIextension_siexpr:nnn { #1 } { #2 } { #3 }
}
\cs_new_protected:Npn \SIextension_siexpr:nnn #1 #2 #3
{
\seq_set_split:Nnn \l_SIextension_siexpr_input_seq { #1 } { #2 }
\seq_pop_left:NN \l_SIextension_siexpr_input_seq \l_SIextension_siexpr_first_tl
\seq_clear:N \l_SIextension_siexpr_output_seq
\seq_put_right:Nx \l_SIextension_siexpr_output_seq
{
\fp_compare:nTF { \l_SIextension_siexpr_first_tl > 0 }
{ \num { \l_SIextension_siexpr_first_tl } }
{ - \num { \tl_tail:V \l_SIextension_siexpr_first_tl } }
}
\seq_map_inline:Nn \l_SIextension_siexpr_input_seq
{
\seq_put_right:Nx \l_SIextension_siexpr_output_seq
{
\fp_compare:nTF { ##1 > 0 }
{ + \num { ##1 } }
{ - \num { \tl_tail:n { ##1 } } }
}
}
\SI[
parse-numbers = false,
quotient-mode = fraction,
input-product = *,
output-product = \cdot
]
{
\sisetup{parse-numbers}
\left( \seq_use:Nn \l_SIextension_siexpr_output_seq { } \right)
}
{ #3 }
}
\ExplSyntaxOff
\endinput
然后我.tex
使用以下内容启动一个文件:
\RequirePackage{fixltx2e}
\documentclass[
a4paper,
12pt,
danish
]{article}
\usepackage{standardopsaetning}
...
问题:这是“正确的”吗,或者有更好的加载顺序,或者我应该改变其他的东西?(例如,我不确定是否lmodern
在最佳位置加载。)