blob: f23be0f008cdfdd648ca99bafaa3d8abef0ab06e (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
%%
%% This is file `hep-float.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hep-float-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-float}[2022/11/01 v1.1 Float adjustments ]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{
family=hepfloat,
prefix=hepfloat@
}
\DeclareBoolOption[true]{manualplacement}
\ProcessKeyvalOptions*
\setcounter{bottomnumber}{0} % 1
\setcounter{topnumber}{1} % 2
\setcounter{dbltopnumber}{1} % 2
\renewcommand{\topfraction}{.9} % .7
\renewcommand{\dbltopfraction}{.9} % .7
\renewcommand{\textfraction}{.1} % .2
\renewcommand{\floatpagefraction}{.8} % .5
\let\hep@figure\figure%
\let\end@hep@figure\endfigure%
\let\hep@table\table%
\let\end@hep@table\endtable%
\ifhepfloat@manualplacement%
\renewenvironment{figure}[1][tbp]{%
\hep@figure[#1]\centering%
}{\end@hep@figure}%
\renewenvironment{table}[1][tbp]{%
\hep@table[#1]\centering%
}{\end@hep@table}%
\else%
\renewenvironment{figure}[1][]{%
\hep@figure\centering%
}{\end@hep@figure}%
\renewenvironment{table}[1][]{%
\hep@table\centering%
}{\end@hep@table}
\fi%
\PassOptionsToPackage{subrefformat=parens}{subcaption}
\RequirePackage{subcaption}
\captionsetup{font=small}
\captionsetup[sub]{font=small}
\RequirePackage{xparse}
\providecommand*\subcaption@minipage[2]{%
\minipage#1{#2}\setcaptionsubtype\relax%
}
\ProvideDocumentEnvironment{subcaptionblock}{O{b}m}{%
\caption@withoptargs\subcaption@minipage[#1]{#2}%
}{\endminipage}
\RequirePackage{calc}
\RequirePackage{etoolbox}
\newcommand{\panelhspace}{0.0333}
\newcommand{\panelvspace}{.5\baselineskip}
\newenvironment{panels}[2][b]{%
\addtolength{\belowcaptionskip}{\panelvspace}%
\newcommand{\begin@subcaption@minipage}[2][b]{%
\subcaptionblock[##1]{##2}%
\centering\vskip 0pt%
}%
\ifdim#2pt>1pt%
\newcommand{\hep@panel@space}{\panelhspace\linewidth/#2}%
\newcommand{\panel}[1][b]{%
\endminipage\hfill\begin@subcaption@minipage[#1]{%
\linewidth/#2-\hep@panel@space%
}%
}%
\begin@subcaption@minipage[#1]{\linewidth/#2-\hep@panel@space}%
\else%
\newcommand{\panel}[2][b]{%
\endminipage\hfill\begin@subcaption@minipage[#1]{%
##2\linewidth-##2\linewidth*\real{\panelhspace}%
}%
}%
\begin@subcaption@minipage[#1]{%
#2\linewidth-#2\linewidth*\real{\panelhspace}%
}%
\fi%
}{
\endsubcaptionblock
\vspace{-\panelvspace}
}
\RequirePackage{booktabs}
\RequirePackage{multirow}
\RequirePackage{graphicx}
\providecommand{\tikzsetnextfilename}[1]{}
\newcommand{\graphic}[2][1]{\tikzsetnextfilename{#2}{%
\centering\includegraphics[width=#1\linewidth]{#2}\par%
}}
\newcommand{\graphics}[1]{\graphicspath{{./#1/}}}
\endinput
%%
%% End of file `hep-float.sty'.
|