diff options
author | Karl Berry <karl@freefriends.org> | 2022-11-02 22:05:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-11-02 22:05:11 +0000 |
commit | 20da625641eeff7bcd0b989d1a90df4d62655afb (patch) | |
tree | c8b344afa99436835074d36ef5a753cff682bcf9 /Master/texmf-dist/tex/latex/hep-float | |
parent | 441973d492db92d882743010c0ceb5c36fec9fa4 (diff) |
hep-float (2nov22)
git-svn-id: svn://tug.org/texlive/trunk@64904 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/hep-float')
-rw-r--r-- | Master/texmf-dist/tex/latex/hep-float/hep-float.sty | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/hep-float/hep-float.sty b/Master/texmf-dist/tex/latex/hep-float/hep-float.sty index db86ff4e97f..f23be0f008c 100644 --- a/Master/texmf-dist/tex/latex/hep-float/hep-float.sty +++ b/Master/texmf-dist/tex/latex/hep-float/hep-float.sty @@ -16,7 +16,7 @@ %% LaTeX version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[2005/12/01] -\ProvidesPackage{hep-float}[2021/08/01 v1.0 Float adjustments ] +\ProvidesPackage{hep-float}[2022/11/01 v1.1 Float adjustments ] \RequirePackage{kvoptions} \SetupKeyvalOptions{ @@ -51,35 +51,49 @@ \hep@table\centering% }{\end@hep@table} \fi% -\RequirePackage[subrefformat=parens]{subcaption} +\PassOptionsToPackage{subrefformat=parens}{subcaption} +\RequirePackage{subcaption} \captionsetup{font=small} \captionsetup[sub]{font=small} +\RequirePackage{xparse} \providecommand*\subcaption@minipage[2]{% \minipage#1{#2}\setcaptionsubtype\relax% } -\newcommand{\hep@panels@space}{20} +\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]{% - \caption@withoptargs\subcaption@minipage[##1]{##2}% + \subcaptionblock[##1]{##2}% \centering\vskip 0pt% - } + }% \ifdim#2pt>1pt% - \newcommand{\hep@panel@space}{% - (1-#2+\hep@panels@space)/\hep@panels@space% - }% + \newcommand{\hep@panel@space}{\panelhspace\linewidth/#2}% \newcommand{\panel}[1][b]{% \endminipage\hfill\begin@subcaption@minipage[#1]{% - \linewidth/#2*\hep@panel@space% + \linewidth/#2-\hep@panel@space% }% }% - \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}% + \endminipage\hfill\begin@subcaption@minipage[#1]{% + ##2\linewidth-##2\linewidth*\real{\panelhspace}% + }% + }% + \begin@subcaption@minipage[#1]{% + #2\linewidth-#2\linewidth*\real{\panelhspace}% }% - \begin@subcaption@minipage[#1]{#2\linewidth}% \fi% -}{\endminipage} +}{ +\endsubcaptionblock +\vspace{-\panelvspace} +} \RequirePackage{booktabs} \RequirePackage{multirow} |