summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hep-text/hep-text.sty
blob: 692f6244f99f2279c30a12172f78cfecdd233bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%%
%% This is file `hep-text.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hep-text-implementation.dtx  (with options: `package')
%% This is a generated file.
%% Copyright (C) 2019-2020 by Jan Hajer
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. The latest version of this license is in:
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.

\NeedsTeXFormat{LaTeX2e}[2005/12/01]
\ProvidesPackage{hep-text}[2021/09/01 v1.0 Some text macros]

\RequirePackage{kvoptions}
\SetupKeyvalOptions{
  family=heptext,
  prefix=heptext@
}
\DeclareStringOption[british]{lang}
\ProcessKeyvalOptions*
\RequirePackage[\heptext@lang]{babel}
\RequirePackage[autostyle]{csquotes}
\RequirePackage{soulutf8}
\let\underline\textul
\RequirePackage{pdftexcmds}
\ifnum\pdf@strcmp{\heptext@lang}{american}=0
  \newcommand{\heptext@lang@foreign}{USenglish}
\else
  \ifnum\pdf@strcmp{\heptext@lang}{USenglish}=0
    \newcommand{\heptext@lang@foreign}{USenglish}
  \else
    \newcommand{\heptext@lang@foreign}{british}
  \fi
\fi
\RequirePackage[all, \heptext@lang@foreign]{foreign}
\DeclareRobustCommand\vs{\xperiodafter{{\foreignabbrfont{vs}}}}
\xspaceaddexceptions{\csq@qclose@i}
\newcommand{\no}[1]{\textnumero~#1}
\RequirePackage{relsize}
\newcommand{\software}[2][\hspace{-\fontdimen2\font}]{%
  {\smaller[.5]\textsc{#2}~#1}%
}
\providecommand{\online}[2]{\texttt{#2}}%
\providecommand{\hep@email}[1]{\online{mailto:#1}{#1}}
\providecommand\email{\hep@email}
\AtBeginDocument{\@ifpackageloaded{hyperref}{%
    \renewcommand{\online}[2]{\href{#1}{\nolinkurl{#2}}}%
  }{}
}
\newcommand{\prefix}[2]{(#1\mbox{-)}\allowbreak #2}
\RequirePackage[inline]{enumitem}
\newlist{inlinelist}{enumerate*}{1}
\setlist*[inlinelist,1]{%
  label=\roman*), itemjoin={,\ }, itemjoin*={, and\ }, after=.%
}
\newlist{enum@descript}{enumerate}{2}
\setlist[enum@descript]{label=\arabic*.}
\newenvironment{enumdescript}[1][]{
\begin{enum@descript}[#1]
  \let\hep@item\item
  \renewcommand{\item}[2][]{
    \ifx&##1&\hep@item\else\hep@item[##1]\fi
    \textbf{##2}\ifx##2\empty\else~\fi\@ifnextchar\par\@gobble\relax
  }
}{\end{enum@descript}}

\endinput
%%
%% End of file `hep-text.sty'.