diff options
author | Norbert Preining <norbert@preining.info> | 2023-01-04 03:02:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-01-04 03:02:24 +0000 |
commit | b2ede2da5ece936a9be421f2b6fbdb6c65cb225a (patch) | |
tree | 52e56df44d458efa71d7de971f576d61dbdb2123 /macros/latex/contrib/keyfloat/keyfloat.dtx | |
parent | 660cf44d2a0aee74bd6e69615fedfc57c966a260 (diff) |
CTAN sync 202301040302
Diffstat (limited to 'macros/latex/contrib/keyfloat/keyfloat.dtx')
-rw-r--r-- | macros/latex/contrib/keyfloat/keyfloat.dtx | 100 |
1 files changed, 43 insertions, 57 deletions
diff --git a/macros/latex/contrib/keyfloat/keyfloat.dtx b/macros/latex/contrib/keyfloat/keyfloat.dtx index edd35cb03b..738124bb8f 100644 --- a/macros/latex/contrib/keyfloat/keyfloat.dtx +++ b/macros/latex/contrib/keyfloat/keyfloat.dtx @@ -1,7 +1,7 @@ % % \iffalse meta-comment % -% Copyright 2016--2022 Brian Dunn +% Copyright 2016--2023 Brian Dunn % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -17,7 +17,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{keyfloat} -%<package> [2022/01/10 v2.07 Key/value interface for floats and subfloats.] +%<package> [2023/01/03 v2.08 Key/value interface for floats and subfloats.] % %<*driver> \documentclass{ltxdoc} @@ -108,22 +108,6 @@ \usepackage{caption} \usepackage{newfloat} -\DeclareFloatingEnvironment[ -fileext=lox, -listname={List of Examples}, -name=Example, -placement=hbp -]{example} - -\captionsetup*[example]{ -format=hang, -font=bf, -justification=raggedright, -singlelinecheck=false, -skip=0pt, -position=top, -} - \captionsetup{labelfont={small,bf},textfont={small,bf}} \captionsetup*[figure]{ @@ -152,12 +136,6 @@ position=top, position=top } -\captionsetup*[example]{ - format=plain, justification=justified, - margin=0pt, parskip=0pt, skip=0ex, - labelfont={bf},textfont={bf} -} - \captionsetup*[wrapfigure]{ style=default, justification=centering, margin=0pt, parskip=0pt, skip=2ex, @@ -225,7 +203,7 @@ frametitlerulewidth=1pt,frametitleaboveskip=5pt,% % Indexing, logos, \Describexxxx, etc: -\usepackage{dtxdescribe}[2021/09/02] +\usepackage{dtxdescribe}[2023/01/03] @@ -282,17 +260,22 @@ D & E & F \\ \usepackage{\mypackagename} -\usepackage[pdftex,bookmarks=true,hidelinks,% -colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,% -pageanchor=true,hyperindex=true, -]{hyperref} +%\usepackage[pdftex,bookmarks=true,hidelinks,% +%colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,% +%pageanchor=true,hyperindex=true, +%]{hyperref} +\AtBeginDocument{ \hypersetup{% pdfinfo={% Title={The LaTeX \mypackagename\ package},% Author={Brian Dunn},% Subject={A key/value interface for LaTeX floats.},% Keywords={LaTeX, floats, key/val, subcaption, rows}% +colorlinks,% +linkcolor=mylinkcolor,% +urlcolor=myurlcolor,% +pageanchor=true, }} \pdfstringdefDisableCommands{ @@ -312,9 +295,12 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% \def\element#1{#1} \def\attribute#1{#1} } +}% AtBeginDocument +\AddToHook{begindocument/before}{% Before .aux file is loaded. + \usepackage{cleveref}% If needed. +} -\usepackage{cleveref} @@ -339,23 +325,6 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% %<*package> % \fi % -% \CheckSum{1400} -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % \changes{v0.10}{2016/12/01}{\ 2016/12/01 Initial ver.} % \changes{v0.11}{2016/12/02}{\ 2016/12/02} @@ -382,7 +351,8 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % \changes{v2.06}{2021/06/29}{2021/06/29} % \changes{v2.07}{2021/08/30}{Docs: Show macro and environment nesting.} % \changes{v2.07}{2022/01/10}{2022/01/10} - +% \changes{v2.08}{2023/01/03}{Docs updated for \pkg{dtxdescribe}.} +% \changes{v2.08}{2023/01/03}{2023/01/03} % \GetFileInfo{\mypackagename.sty} @@ -405,7 +375,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % % \bigskip % -% {\small\textcopyright{} 2016--2022} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com} +% {\small\textcopyright{} 2016--2023} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com} % % \vspace{.5in} % @@ -431,8 +401,8 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % \noindent % The \pkg{keyfloat} package provides a key/value user interface for quickly % creating figures with a single image each, figures with arbitrary contents, -% tables, subfloats, rows of floats, floats located [H]ere, -% floats in the [M]argin, and floats with text [W]rapped around them. +% tables, subfloats, rows of floats, floats located |[H|]ere, +% floats in the |[M]|argin, and floats with text |[W]|rapped around them. % % Key/value combinations may specify a caption and label, a width proportional % to \cs{linewidth}, a fixed width and/or height, rotation, scaling, a @@ -490,7 +460,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % \clearpage % % \tableofcontents -% \listofexamples +% \listofdtxexamplefloats % \listoffigures % \listoftables % @@ -1175,7 +1145,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % % \Cref{fig:linewidth} is half of \cs{linewidth} in size. % \margintag{\cs{linewidth}} -% \gindex{image>\cs{linewidth}}\gindex{\cs{linewidth}} +% \gindex{image>linewidth=\cs{linewidth}}\gindex{linewidth=\cs{linewidth}} % \gindex{subfloat>\cs{linewidth}}\gindex{keyfloats>\cs{linewidth}} % When the |lw| key is used inside a \env{keyfloats} or \env{keysubfigs} environment, % the \cs{linewidth} will be proportional to the sub-box for each element. @@ -1224,7 +1194,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % Unless a width is given, a box is the full \cs{linewidth}. % \margintag{rotated whitespace} % When rotated, this extra horizontal space is rotated into extra vertical space. -% \gindex{rotate>box width and vertical space}\gindex{\cs{linewidth}>with rotation} +% \gindex{rotate>box width and vertical space}\gindex{linewidth=\cs{linewidth}>with rotation} % \trouble{rotate>extra space} % To avoid this extra space, set a |w| or |lw| to be wide enough % \watchout[box width] @@ -1373,7 +1343,7 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % Note that \cs{linewidth} is adjusted for each row and nested row, % \watchout[\cs{linewidth}] % so the |lw| key may need to be changed if a float is moved to a different nesting level. -% \trouble{\cs{linewidth}}\gindex{\cs{linewidth}>subfloats} +% \trouble{linewidth=\cs{linewidth}}\gindex{linewidth=\cs{linewidth}>subfloats} % \gindex{subfloat>\cs{linewidth}} % % Fixed-width or fixed-height floats may be too large to fit @@ -1608,9 +1578,20 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % % % \clearpage +% % \subsubsection{Wrapped floats} % \changes{v0.12}{2016/12/03}{Docs: Wrapped float examples.} % +% Note: If you see the warning: +% \watchout[\pkg{wrapfig} warning]\gindex{wrapfig=\pkg{wrapfig} collision warning} +% \begin{center} +% |Package wrapfig Warning: Collision between wrapping environments| +% \end{center} +% then \pkg{wrapfig} was not able to wrap the paragraph correctly. +% Try adding \cs{clearpage} or \cs{newpage} before the wrapped object, +% or see the \pkg{needspace} package to automatically insert +% a \cs{newpage} if necessary. +% % \begin{dtxexample}[\Cref{fig:keyfigw,tab:keytabw}] % {Using \cs{keyfig}\optn{[W]} and \cs{keytab}\optn{[W]}\label{ex:keyfigw}} % \keyfig[W]{c={A \cs{keyfig}\optn{[W]}}, @@ -1626,16 +1607,21 @@ Keywords={LaTeX, floats, key/val, subcaption, rows}% % % \begin{dtxexample}[\Cref{fig:keyfigboxw} and the \cs{keyparbox}.] % {Using \cs{keyfigbox}\optn{[W]} and \cs{keyparbox}\optn{[W]}\label{ex:keyfigboxw}} -% \keyfigbox[W]{c={A \cs{keyfigbox}\optn{[W]}}, +% \keyfigbox[W]{ +% c={A \cs{keyfigbox}\optn{[W]}}, % l=fig:keyfigboxw,f,lw=.25,wp=I, wn=7, % t=Text text text text text text text text text % }{The contents.} % \blindtext -% \keyparbox[W]{w=1in}{A \cs{keyparbox}[W] and some more text.} +% \keyparbox[W]{w=1in}{ +% A \cs{keyparbox}[W] and some text. +% No caption or numbering. +% } % \blindtext % \end{dtxexample} % +% \clearpage % % \begin{dtxexample}[\Cref{fig:keyfigurew,tab:keytablew}] % {Using \cs{keyfigure}\optn{[W]} and \cs{keytable}\optn{[W]}\label{ex:keyfiguretablew}} |