summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-04-03 03:00:36 +0000
committerNorbert Preining <norbert@preining.info>2022-04-03 03:00:36 +0000
commit506de1e2d3515161cdbc7018b4ccc9e49d7f86e8 (patch)
tree45724bd3d77239b332b9251b099af3b16e8b8108 /macros
parent0a334de875944625912f2bf2d918122bb55c0dad (diff)
CTAN sync 202204030300
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem-doc.pdfbin117509 -> 117843 bytes
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem-doc.tex126
-rw-r--r--macros/latex/contrib/create-theorem/create-theorem.sty105
-rw-r--r--macros/latex/contrib/hvfloat/Changes2
-rw-r--r--macros/latex/contrib/hvfloat/doc/hvfloat.pdfbin5029031 -> 5031955 bytes
-rw-r--r--macros/latex/contrib/hvfloat/doc/hvfloat.tex28
-rw-r--r--macros/latex/contrib/hvfloat/latex/hvfloat.sty120
7 files changed, 221 insertions, 160 deletions
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf b/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
index 4f64d0b5d5..58aaba6d86 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
+++ b/macros/latex/contrib/create-theorem/create-theorem-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/create-theorem/create-theorem-doc.tex b/macros/latex/contrib/create-theorem/create-theorem-doc.tex
index 526eb15385..cefc160ade 100644
--- a/macros/latex/contrib/create-theorem/create-theorem-doc.tex
+++ b/macros/latex/contrib/create-theorem/create-theorem-doc.tex
@@ -1,64 +1,76 @@
%! TEX program = xelatex
\documentclass[classical]{einfart}
-% \linenumbers
-
\usepackage{ProjLib}
%%================================
%% For typesetting code
%%================================
\usepackage{listings}
-\definecolor{maintheme}{RGB}{70,130,180}
-\definecolor{forestgreen}{RGB}{21,122,81}
-\definecolor{lightergray}{gray}{0.99}
-\lstset{language=[LaTeX]TeX,
- keywordstyle=\color{maintheme},
- basicstyle=\ttfamily,
- commentstyle=\color{forestgreen}\ttfamily,
- stringstyle=\rmfamily,
- showstringspaces=false,
- breaklines=true,
- frame=lines,
- backgroundcolor=\color{lightergray},
- flexiblecolumns=true,
- escapeinside={(*}{*)},
- % numbers=left,
- numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
- % firstnumber=last,
+\usepackage{xcolor}
+\usepackage{setspace}
+\definecolor{code-main}{RGB}{70,130,180}
+\definecolor{code-expl3}{RGB}{240,50,60}
+\definecolor{code-option}{RGB}{40,110,20}
+\definecolor{code-keys}{RGB}{100,130,150}
+\definecolor{code-comment}{RGB}{20,120,80}
+\definecolor{code-background}{gray}{0.99}
+\lstset{
+ language = [LaTeX]TeX,
+ basicstyle = \ttfamily,
+ keywordstyle = \color{code-main},
+ commentstyle = \color{code-comment},
+ showstringspaces = false,
+ breaklines = true,
+ frame = lines,
+ backgroundcolor = \color{code-background},
+ flexiblecolumns = true,
+ escapeinside = {(*}{*)},
+ alsoletter = {_,:},
+ % numbers = left,
+ % firstnumber = last,
+ numberstyle = \scriptsize\ttfamily,
+ stepnumber = 1,
+ numbersep = 5pt,
}
-\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
-\lstset{moretexcs=%
- {
+\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
+\lstset{% LaTeX2 commands
+ classoffset = 0,
+ texcsstyle =* \color{code-main},
+ moretexcs =
+ {
cref,crefname,
Cref,Crefname,
crefformat,
- crefthe,crefthename,crefthemark,
+ crefthe,crefthename,
Crefthe,Crefthename,
+ crefthemark,
selectlanguage,
theoremstyle,
NameTheorem,
CreateTheorem,
SetTheorem,
- regexpatchcmd,
- }
-}
-\lstnewenvironment{code}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{columns=fullflexible,keepspaces=true}%
+ }
}
-{\ResumeLineNumbers\vspace{-.25\baselineskip}}
-\lstnewenvironment{code*}%
-{\setstretch{1.07}\LocallyStopLineNumbers%
-\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}%
+\lstset{% LaTeX3 commands
+ classoffset = 1,
+ texcsstyle =* \color{code-expl3},
+ moretexcs =
+ {
+ }
}
-{\ResumeLineNumbers}
+\lstnewenvironment{code}{\setstretch{1.05}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
+
+\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
+\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}
%%================================
%% tip
%%================================
\usepackage[many]{tcolorbox}
-\newenvironment{tip}[1][Tip]{%
+\newenvironment{tip}[1][Tip]
+ {%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -74,18 +86,18 @@
top = 2.5mm,
bottom = 1.5mm,
title={\scshape\sffamily #1}]%
-}{\end{tcolorbox}\ResumeLineNumbers}
-
-
-\newcommand{\packageoption}[1]{\texttt{\textcolor{black!67!green}{#1}}}
-\newcommand{\commandoption}[1]{\texttt{\textcolor{black!67!cyan}{#1}}}
+ }
+ {%
+ \end{tcolorbox}%
+ \ResumeLineNumbers%
+ }
\newcommand{\createtheorempackage}{\textsf{create-theorem}}
\begin{document}
-\def\PackageVersion{2022/03/18}
+\def\PackageVersion{2022/04/02}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
@@ -119,7 +131,7 @@ First, you need a backend to provide the command \lstinline|\newtheorem| with th
\medskip
It has the following options:
-\begin{itemize}
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
% \item \packageoption{draft} or \packageoption{fast}
% \begin{itemize}
% \item Fast mode. The functionality will be appropriately reduced to get faster compilation speed, recommended to use during the writing stage.
@@ -148,7 +160,7 @@ It has the following options:
\section{How to use it}
-\subsection[Naming theorem-like environments]{Naming theorem-like environments with \texttt{\textbackslash\textcolor{maintheme}{NameTheorem}}}
+\subsection[Naming theorem-like environments]{Naming theorem-like environments with \texttt{\textbackslash\textcolor{code-main}{NameTheorem}}}
The syntax of \lstinline|\NameTheorem| is as follows:
\begin{code}
@@ -157,7 +169,7 @@ The syntax of \lstinline|\NameTheorem| is as follows:
Supported keys are:
\vspace{-.2\baselineskip}
-\begin{itemize}
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
\item \commandoption{heading}\lstinline| = |\meta{configuration}
\begin{itemize}
\item The heading of the environment, where \meta{configuration} can be:
@@ -215,18 +227,13 @@ Supported keys are:
\end{itemize}
\end{itemize}
-\medskip
-\begin{center}
- \itshape
- If you're feeling confused, don't worry, there is an Examples section later illustrating its usage.
-\end{center}
-
+\vspace{-.3\baselineskip}
\begin{tip}
You can also define the names within \lstinline|\CreateTheorem| while initializing the theorem-like environments. \lstinline|\NameTheorem| is especially useful for package or class authors who wish to preset suitable names (with styles) in their packages or classes.
\end{tip}
-\subsection[Initializing theorem-like environments]{Initializing theorem-like environments with \texttt{\textbackslash\textcolor{maintheme}{CreateTheorem}}}
+\subsection[Initializing theorem-like environments]{Initializing theorem-like environments with \texttt{\textbackslash\textcolor{code-main}{CreateTheorem}}}
The syntax of \lstinline|\CreateTheorem| is as follows:
\begin{code}
@@ -235,7 +242,7 @@ The syntax of \lstinline|\CreateTheorem| is as follows:
Supported keys are:
\vspace{-.2\baselineskip}
-\begin{itemize}
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
\item \commandoption{name}\lstinline| = |\meta{configuration}
\begin{itemize}
\item Setting the names. Same as \lstinline|\NameTheorem{|\meta{name of environment}\lstinline|}{|\meta{configuration}\lstinline|}|.
@@ -281,11 +288,6 @@ Supported keys are:
\end{itemize}
\end{itemize}
-\begin{center}
- \itshape
- If you're feeling confused, don't worry, there is an Examples section later illustrating its usage.
-\end{center}
-
\begin{tip}
The names for the following environments have been preset: \texttt{assertion}, \texttt{assumption}, \texttt{axiom}, \texttt{conclusion}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, \texttt{definition-theorem}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{postulate}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark} and \texttt{theorem}. If you are fine with the preset names, then you don't need to specify the key ``\commandoption{name}'' while creating them, otherwise you shall have to use the package option ``\packageoption{no preset names}'' to disable the presets and then define your own ones.
\end{tip}
@@ -296,7 +298,7 @@ Please note that, by default, an normal environment \meta{env} and its starred r
\bigskip
-\subsection[Configuring theorem-like environments]{Configuring theorem-like environments with \texttt{\textbackslash\textcolor{maintheme}{SetTheorem}}}
+\subsection[Configuring theorem-like environments]{Configuring theorem-like environments with \texttt{\textbackslash\textcolor{code-main}{SetTheorem}}}
The previous two commands are especially useful for package or class writers, while this one is more for the users. If you are not satisfied with preset name styles or numbering settings, then even after initializing the environments, you can still further configure them by means of \lstinline|\SetTheorem|, the syntax of which is as follows:
@@ -310,7 +312,7 @@ The previous two commands are especially useful for package or class writers, wh
Supported keys are:
\vspace{-.2\baselineskip}
-\begin{itemize}
+\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
\item \commandoption{name}\lstinline| = |\meta{configuration} and \commandoption{name style}\lstinline| = |\meta{configuration}
\begin{itemize}
\item Same as \lstinline|\NameTheorem{|\meta{name of environment}\lstinline|}{|\meta{configuration}\lstinline|}|.
@@ -331,6 +333,12 @@ Supported keys are:
\end{itemize}
\end{itemize}
+\bigskip
+\begin{center}
+ \itshape
+ If you're feeling confused, don't worry. Let's now take a look at some examples.
+\end{center}
+
\section{Examples}
diff --git a/macros/latex/contrib/create-theorem/create-theorem.sty b/macros/latex/contrib/create-theorem/create-theorem.sty
index b86af841ee..2156f23ecd 100644
--- a/macros/latex/contrib/create-theorem/create-theorem.sty
+++ b/macros/latex/contrib/create-theorem/create-theorem.sty
@@ -13,7 +13,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{create-theorem}
- {2022/03/18} {}
+ {2022/04/02} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -611,20 +611,6 @@
\cs_new:Nn \crthm_create_theorem:nn
{
- \cs_if_exist:cTF { #1 }
- {
- \bool_if:NF \l__crthm_creating_quiet_bool
- {
- \msg_warning:nnn { create-theorem } { env-not-created } { #1 }
- }
- }
- {
- \__crthm_create_theorem:nn { #1 } { #2 }
- }
- }
-
-\cs_new:Nn \__crthm_create_theorem:nn
- {
\tl_set:Nn \l__crthm_current_env_tl { #1 }
\bool_set_false:N \l__crthm_creating_apply_style_bool
\bool_set_false:N \l__crthm_creating_numberless_bool
@@ -633,72 +619,81 @@
\keys_set:nn { create-theorem-creating } { #2 }
\bool_if:NTF \l__crthm_creating_copy_existed_bool
{
- \__crthm_define_env:en { #1 } { \l__crthm_creating_copy_existed_tl }
+ \__crthm_copy_env:ee { \l__crthm_current_env_tl } { \l__crthm_creating_copy_existed_tl }
\bool_if:NT \l__crthm_creating_create_starred_bool
{
- \__crthm_define_env:en { #1 * } { \l__crthm_creating_copy_existed_tl * }
+ \__crthm_copy_env:ee { \l__crthm_current_env_tl * } { \l__crthm_creating_copy_existed_tl * }
}
}
{
- \cs_if_exist:cTF { c@ #1 }
+ \cs_if_exist:cTF { #1 }
{
- \group_begin:
- \bool_if:NTF \l__crthm_creating_apply_style_bool
+ \bool_if:NF \l__crthm_creating_quiet_bool
{
- \exp_args:No \theoremstyle { \l__crthm_creating_apply_style_tl }
+ \msg_warning:nnn { create-theorem } { env-not-created } { #1 }
}
+ }
+ {
+ \cs_if_exist:cTF { c@ #1 }
{
- \tl_if_exist:cT { c_crthm_theorem_style_preset_ #1 _tl }
+ \group_begin:
+ \bool_if:NTF \l__crthm_creating_apply_style_bool
{
- \exp_args:Nv \theoremstyle { c_crthm_theorem_style_preset_ #1 _tl }
+ \exp_args:No \theoremstyle { \l__crthm_creating_apply_style_tl }
}
- }
- \bool_if:NTF \l__crthm_creating_numberless_bool
- {
- \newtheorem*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
- }
- {
- \newtheorem { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
- }
- \group_end:
- \NewDocumentEnvironment { #1 } { O{} }
- % In "regionalref" mode, the counter received by the referencing system is "#1 _crthm_regional"
- % while in "originalref" mode, the counter received is "#1 _crthm_original_\languagename"
- {
- \tl_if_blank:eTF { ##1 }
{
- \begin{ #1 _crthm_regional }
+ \tl_if_exist:cT { c_crthm_theorem_style_preset_ #1 _tl }
+ {
+ \exp_args:Nv \theoremstyle { c_crthm_theorem_style_preset_ #1 _tl }
+ }
}
+ \bool_if:NTF \l__crthm_creating_numberless_bool
{
- \begin{ #1 _crthm_regional }[##1]
+ \newtheorem*{ #1 _crthm_regional } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
}
- \bool_if:NF \l__crthm_regionalref_bool
- {
- \addtocounter { #1 _crthm_original_\languagename } { -1 }
- \refstepcounter { #1 _crthm_original_\languagename }
- }
- }
- {
- \end{ #1 _crthm_regional }
+ {
+ \newtheorem { #1 _crthm_regional } [#1] { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ }
+ \group_end:
+ \NewDocumentEnvironment { #1 } { O{} }
+ % In "regionalref" mode, the counter received by the referencing system is "#1 _crthm_regional"
+ % while in "originalref" mode, the counter received is "#1 _crthm_original_\languagename"
+ {
+ \tl_if_blank:eTF { ##1 }
+ {
+ \begin{ #1 _crthm_regional }
+ }
+ {
+ \begin{ #1 _crthm_regional }[##1]
+ }
+ \bool_if:NF \l__crthm_regionalref_bool
+ {
+ \addtocounter { #1 _crthm_original_\languagename } { -1 }
+ \refstepcounter { #1 _crthm_original_\languagename }
+ }
+ }
+ {
+ \end{ #1 _crthm_regional }
+ }
+ \bool_if:NT \l__crthm_creating_create_starred_bool
+ {
+ \newtheorem*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ }
+ \keys_set:nn { create-theorem-creating / counter-management } { #2 }
}
- \bool_if:NT \l__crthm_creating_create_starred_bool
{
- \newtheorem*{ #1 * } { \tl_use:c { g_crthm_name_heading_ #1 _ \languagename _tl } }
+ \msg_error:nnn { create-theorem } { env-not-named } { #1 }
}
- \keys_set:nn { create-theorem-creating / counter-management } { #2 }
- }
- {
- \msg_error:nnn { create-theorem } { env-not-named } { #1 }
}
}
}
-\cs_new:Nn \__crthm_define_env:nn
+\cs_new:Nn \__crthm_copy_env:nn
{
\cs_set_eq:cc { #1 } { #2 }
\cs_set_eq:cc { end #1 } { end #2 }
}
-\cs_generate_variant:Nn \__crthm_define_env:nn { en }
+\cs_generate_variant:Nn \__crthm_copy_env:nn { ee }
\cs_new:Nn \crthm_counter_within:nn
{
diff --git a/macros/latex/contrib/hvfloat/Changes b/macros/latex/contrib/hvfloat/Changes
index 578c9be771..5cd0c94e9d 100644
--- a/macros/latex/contrib/hvfloat/Changes
+++ b/macros/latex/contrib/hvfloat/Changes
@@ -1,4 +1,6 @@
hvfloat.sty:
+2.38 2022-04-02 - added option l for capWidth to get a caption with linewidth,
+ if also using the option wide for the object
2.37 2022-02-28 - fix bug for doublepage floats in twoside and twocolumn mode
and captions after the image
2.36 2022-02-22 - fix bug for outer captions (was wrong)
diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
index 10e1519bf1..856cdd1ffb 100644
--- a/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
+++ b/macros/latex/contrib/hvfloat/doc/hvfloat.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvfloat/doc/hvfloat.tex b/macros/latex/contrib/hvfloat/doc/hvfloat.tex
index 70113c0a7e..820136ff36 100644
--- a/macros/latex/contrib/hvfloat/doc/hvfloat.tex
+++ b/macros/latex/contrib/hvfloat/doc/hvfloat.tex
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.tex 318 2021-11-20 07:30:54Z herbert $
+%% $Id: hvfloat.tex 488 2022-04-02 19:32:17Z herbert $
\listfiles
\errorcontextlines=100
\documentclass[twoside,paper=a4,usegeometry]{scrartcl}
@@ -1038,8 +1038,6 @@ change its side due to the setting \Lkeyset{capPos=outer}.
\hvblindtext
-
-
\begin{lstlisting}
\hvFloat[wide,
capPos=inner,
@@ -1086,6 +1084,30 @@ the option \texttt{wide}.}{fig:812}
\endgroup
+With the optional argument \Lkeyset{capWidth=l} the caption can be terminated
+to the current line width. With the optional argument \Lkeyset{capHPos=right} one cat set
+the caption to the left, center, or right of the full width which is linewidth and margin width.
+
+
+\begin{lstlisting}
+\hvFloat[capPos=bottom,capWidth=l,wide,capHPos=right]{figure}
+ {\includegraphics[width=0.49\hvWideWidth]{images/CTAN}\quad
+ \includegraphics[width=0.49\hvWideWidth]{images/CTAN}}
+ {\hvblindtext}
+ {label}
+\end{lstlisting}
+
+
+\marginnote{Fig.~\ref{label}}
+\hvFloat[capPos=bottom,capWidth=l,wide,capHPos=right]{figure}
+ {\includegraphics[width=0.49\hvWideWidth]{images/CTAN}\quad
+ \includegraphics[width=0.49\hvWideWidth]{images/CTAN}}
+ {\hvblindtext}
+ {label}
+
+
+\hvblindtext
+
\section{The star version \Lcs{hvFloat*}}\label{star-version0}
In the \Index{twocolumn} mode the floating environment can be set over both
diff --git a/macros/latex/contrib/hvfloat/latex/hvfloat.sty b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
index 739d759994..c3d8d0e57d 100644
--- a/macros/latex/contrib/hvfloat/latex/hvfloat.sty
+++ b/macros/latex/contrib/hvfloat/latex/hvfloat.sty
@@ -1,4 +1,4 @@
-%% $Id: hvfloat.sty 392 2022-01-09 10:20:33Z herbert $
+%% $Id: hvfloat.sty 488 2022-04-02 19:32:17Z herbert $
%%
%%
%% IMPORTANT NOTICE:
@@ -15,8 +15,8 @@
%% `hvfloat' offers rotating of captions and objects for floats
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{2.36}
-\def\filedate{2022/02/22}
+\def\fileversion{2.38}
+\def\filedate{2022/04/02}
%\message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
\ProvidesPackage{hvfloat}[\filedate\space v\fileversion\space special floating objects (hv)]
\let\hvFloatFileVersion\fileversion
@@ -68,6 +68,8 @@
\newlength\hvMaxCapWidth
%\AtBeginDocument{%
% \setlength\hv@BottomSpace{\dimexpr\paperheight-1in-\topmargin-\headheight-\headsep-\textheight}}
+\newlength\hvFullWidth % only for user purpose
+\setlength\hvFullWidth{\dimexpr\textwidth+\marginparwidth+\marginparsep}
\newsavebox\hvObjectBox
\newsavebox\hvCaptionBox
@@ -92,6 +94,7 @@
\def\hv@Even{evenPage}
\def\hv@Odd{oddPage}
\def\hv@Natural{n}
+\def\hv@LineWidth{l}
\def\hv@Width{w}
\def\hv@Height{h}
\def\hv@Zero{0}
@@ -104,7 +107,7 @@
\define@key{hvSet}{rotAngle}[0]{% rotates caption AND image together
\def\hvSet@rotAngle{#1}%
}
-\define@key{hvSet}{capWidth}[n]{% (n)atural width|object (w)idth)|object (h)eight|<scale of \columnwidth>
+\define@key{hvSet}{capWidth}[n]{% (l)inewidth|(n)atural width|object (w)idth)|object (h)eight|<scale of \columnwidth>
\def\hvSet@capWidth{#1}%
}
\define@key{hvSet}{capAngle}[0]{% -360..+360, only integers
@@ -619,37 +622,42 @@
\ifx\hvSet@capWidth\hv@Height% captionwidth=objectheight
\setlength\hvCapWidth{\ht\hvObjectBox}%
\else
- \ifx\hvSet@capWidth\hv@Natural% captionwidth=\linewidth-\objectwidth-separation
- \ifhv@capbeside
- \ifhv@wide
- \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
- \else
- \ifhv@star
- \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \ifx\hvSet@capWidth\hv@LineWidth% captionwidth=objectheight
+ \setlength\hvCapWidth{\linewidth}%
+ \typeout{>>>>\the\hvCapWidth}%
+ \else
+ \ifx\hvSet@capWidth\hv@Natural% captionwidth=\linewidth-\objectwidth-separation
+ \ifhv@capbeside
+ \ifhv@wide
+ \setlength\hvCapWidth{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\else
- \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \ifhv@star
+ \setlength\hvCapWidth{\the\dimexpr\textwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \else
+ \setlength\hvCapWidth{\the\dimexpr\linewidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \fi
\fi
- \fi
- \else
- \setlength\hvCapWidth{\columnwidth}%
- \fi
- \else
- \ifhv@capbeside
- \ifhv@wide
- \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
- \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
\else
- \setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
- \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
- \fi
- \ifdim\hvCapWidth>\@tempdima
- \setlength\hvCapWidth{\@tempdima}%
+ \setlength\hvCapWidth{\columnwidth}%
\fi
\else
- \ifhv@wide
- \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
+ \ifhv@capbeside
+ \ifhv@wide
+ \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
+ \setlength\@tempdima{\the\dimexpr\hvWideWidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \else
+ \setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
+ \setlength\@tempdima{\the\dimexpr\columnwidth-\hvObjectWidth-\hv@floatCapSep\relax}%
+ \fi
+ \ifdim\hvCapWidth>\@tempdima
+ \setlength\hvCapWidth{\@tempdima}%
+ \fi
\else
- \setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
+ \ifhv@wide
+ \setlength\hvCapWidth{\hvSet@capWidth\hvWideWidth}%
+ \else
+ \setlength\hvCapWidth{\hvSet@capWidth\columnwidth}%
+ \fi
\fi
\fi
\fi
@@ -658,6 +666,7 @@
\saveCaptionSkip% we put this space ourselve
\ifnum\hvSet@capAngle=0 % need rotation?
\savebox\hvCaptionBox{% NO rotation
+ \typeout{>>>>\the\hvCapWidth}%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
\ifhv@nonFloat
@@ -688,9 +697,9 @@
\fi
\fi
\endminipage
- }%
+ }% end CaptionBox without rotation
\else
- \savebox\hvCaptionBox{% Rotation
+ \savebox\hvCaptionBox{% with Rotation
\rotatebox{\hvSet@capAngle}{%
\minipage[b]{\hvCapWidth}%% minipage, to get hyphenation
% \ifx\relax\hv@caption@format\relax\else\expandafter\captionsetup\expandafter{\hv@caption@format}\fi
@@ -777,11 +786,12 @@
\ifoddpageoroneside\hv@@capPos=0\else\hv@@capPos=2\fi
\else
\ifx\hvSet@capPos\hv@Outer
- \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
+ \ifoddpage\hv@@capPos=2\else\hv@@capPos=0\fi
+% \ifoddpageoroneside\hv@@capPos=2\else\hv@@capPos=0\fi
% even page (left=0) | odd page (oneside) (right=2)
\else
\ifx\hvSet@capPos\hv@Before
- \hv@@capPos=0% same as cappos=right
+ \hv@@capPos=0% same as cappos=left
\else
\ifx\hvSet@capPos\hv@After
\hv@@capPos=2% same as capPos=right
@@ -796,7 +806,8 @@
%%%%
%\typeout{>>>>>>>>>Pos: \the\hv@@capPos}%
\savebox{\@tempboxa}{% ***** @tempbox start
- \expandafter\ifcase\the\hv@@capPos% 0 is LEFT START \ifcase
+ \expandafter%
+ \ifcase\the\hv@@capPos % 0 is LEFT START \ifcase
\ifx\hvSet@capVPos\hv@Center
\put@CaptionBox
\hspace{\hv@floatCapSep}% capfloatsep
@@ -846,7 +857,7 @@
\hspace{\hv@floatCapSep}% capfloatsep
\put@CaptionBox[1]%
\else
- \put@ObjectBox[2]%
+ \put@ObjectBox[2]% bottom
\hspace{\hv@floatCapSep}% capfloatsep
\put@CaptionBox[2]%
\fi
@@ -1122,12 +1133,17 @@
\ifoddpage
\if@twocolumn
\if@firstcolumn
+ \hv@typeout{do@hvFloat@doublePage:oddpage->twocolumn->firstcolumn}%
\ifhv@switchType
+ \hv@typeout{hvfloat: switched to floattype p}%
\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
\else
- \afterpage{\afterpage{\do@hvFloat@doublePageCaptionRight{#1}}}%
+ \hv@typeout{calling do@hvFloat@doublePageCaptionRight}%
+ %\afterpage{
+ \afterpage{\do@hvFloat@doublePageCaptionRight{#1}}%}%
\fi
\else
+ \hv@typeout{do@hvFloat@doublePage:oddpage->twocolumn->secondcolumn}%
\ifhv@tugboat
\do@hvFloat@doublePageCaptionRight{#1}%
\else
@@ -1174,19 +1190,20 @@
}
%
\def\do@hvFloat@doublePageCaptionRight#1{% image on left and right page with caption on the right page ----------------------------------
- \do@hvFloat@doublePageCaptionRightObjectLeft{0pt}%
+ \hv@typeout{do@hvFloat@doublePageCaptionRight->start}%
+ \do@hvFloat@doublePageCaptionRightObjectLeft{0pt}%
\afterpage{\do@hvFloat@doublePageCaptionRightObjectRight{#1}}%
}
%
\def\do@hvFloat@doublePageCaptionRightObjectLeft#1{% left part of the object
+ \hv@typeout{do@hvFloat@doublePageCaptionRightObjectLeft: start}%
\begin{\hv@floatType*}[!t]
\hv@set@noverticalSpace
\hfuzz=\maxdimen
\let\c@hv@tempCNTfigA\c@figure
\let\c@hv@tempCNTtabA\c@table
\expandafter\hvFloatSet\expandafter{\hv@save@setting}%
- \expandafter\hvFloatSet\expandafter{\hv@save@setting}%
- \hv@typeout{Floatpositionsparameter: !t}%
+ \hv@typeout{Float position parameter is for left page: !t}%
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\clipbox*{0 -\depth{} \hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
\ifx\hv@label\@empty
@@ -1295,16 +1312,20 @@
\expandafter\global\expandafter\savebox\expandafter\hv@boxRightPage\expandafter{\clipbox*{\hv@leftPageObjectWidth{} -\depth{} \width{} \height}{\usebox\hvObjectBox}}%
\checkoddpage
\ifoddpage
+ \hv@typeout{do@hvFloat@doublePAGE: oddpage}%
\if@twocolumn
\if@firstcolumn
+ \hv@typeout{do@hvFloat@doublePAGE: ifoddpage->twocolumn->firstcolumn}%
\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}%
\else
+ \hv@typeout{do@hvFloat@doublePAGE: ifoddpage->twocolumn->secondcolumn}%
\do@hvFloat@doublePAGECaptionRight{#1}%
\fi
\else
\do@hvFloat@doublePAGECaptionRight{#1}%
\fi
\else
+ \hv@typeout{do@hvFloat@doublePAGE: evenpage}%
\if@twocolumn
\if@firstcolumn
\afterpage{\afterpage{\afterpage{\do@hvFloat@doublePAGECaptionRight{#1}}}}%
@@ -1320,6 +1341,7 @@
%
\def\do@hvFloat@doublePAGECaptionRight#1{% image on left and right page with caption on the right ----------------------------------
% #1-> 0/1 caption under/right
+ \hv@typeout{do@hvFloat@doublePAGECaptionRight->start}%
\afterpage{%
\hfuzz=\maxdimen
\expandafter\hvFloatSet\expandafter{\hv@save@setting}%
@@ -1395,10 +1417,15 @@
% \savebox\hv@rightBox{\clipbox*{\the\hv@leftPageObjectWidth{} \depth{} \width{} \height}{\usebox\hvObjectBox}}%
% \expandafter\captionsetup\expandafter{\hv@caption@format}%
\ifoddpage
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: ifoddpage=true}%
\ifcase\hv@@capPos % =0 Caption before
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: caption before}%
\if@twocolumn
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: twocolumn=true}%
\if@firstcolumn
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: firstcolumn=true}%
\ifhv@twoColumnCaption
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: twoColumnCaption=true}%
\set@Normal@Bottom@Caption*
\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionBefore}%
\else
@@ -1413,10 +1440,14 @@
\do@hvFloat@doubleFULLPAGE@CaptionBefore
\fi
\or % =1 Caption after
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: caption after}%
\ifhv@twoColumnCaption
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: twoColumnCaption=true}%
\if@firstcolumn
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: firstcolumn=true}%
\afterpage{\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol}%
\else
+ \hv@typeout{do@hvFloat@doubleFULLPAGE: firstcolumn=false}%
\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol
\fi
\else
@@ -1573,8 +1604,7 @@
\refstepcounter{hv@tempCNTtabA}% before caption
\fi
\ifx\hv@label\@empty\else\label{\hv@label}\fi
- \newpage
- \if@twocolumn\null\newpage\fi
+ \newpage\if@twocolumn\null\newpage\fi
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\thispagestyle{empty}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
@@ -1606,7 +1636,9 @@
}
\def\do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol{%
+ \hv@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: start} %
\afterpage{%
+ \hv@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: afterpage start} %
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% no interlineskip
\hspace*{\the\dimexpr-\evensidemargin-\parindent-1in}%
@@ -1618,7 +1650,8 @@
\fi
\ifx\hv@label\@empty\else\label{\hv@label}\fi
\clipbox*{0 0 \the\hv@leftPageObjectWidth{} \height}{\usebox\hvObjectBox}%
- \newpage\if@twocolumn\null\newpage\fi
+ \newpage\if@twocolumn\null\newpage\fi
+ \hv@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: insert newpage} %
\global\savebox{\hvObjectBox}{\ifhv@useOBox\usebox{\hvOBox}\else\hv@floatObject\fi}%
\thispagestyle{empty}%
\vspace*{\the\dimexpr-1in-\voffset-\topmargin-\headheight-\headsep-\baselineskip-\parskip+1.5\lineskip}% -0.5\paperheight+0.5\ht\hvObjectBox
@@ -1631,7 +1664,7 @@
\refstepcounter{hv@tempCNTtabB}% before caption
\fi
\ifx\hv@label\@empty\else\label{\hv@label-2}\fi
- \newpage
+ \newpage\if@twocolumn\null\newpage\fi
\begin{\hv@floatType*}[!b]
\hv@twoColumnCaptiontrue
\ifhv@separatorLine\drawSepLine\fi
@@ -1648,6 +1681,7 @@
\ifx\hv@label\@empty\else\label{\hv@label-cap}\fi
\end{\hv@floatType*}%
}%
+ \hv@typeout{do@hvFloat@doubleFULLPAGE@CaptionAfterTwoCol: afterpage done} %
}
\def\do@hvFloat@doubleFULLPAGE@CaptionOther#1{%