texlive[45347] Master/texmf-dist: hvfloat (18sep17)

commits+karl at tug.org commits+karl at tug.org
Wed Sep 20 01:23:23 CEST 2017


Revision: 45347
          http://tug.org/svn/texlive?view=revision&revision=45347
Author:   karl
Date:     2017-09-20 01:23:23 +0200 (Wed, 20 Sep 2017)
Log Message:
-----------
hvfloat (18sep17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/hvfloat/Changes
    trunk/Master/texmf-dist/doc/latex/hvfloat/README
    trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
    trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/Changes	2017-09-19 22:22:09 UTC (rev 45346)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/Changes	2017-09-19 23:23:23 UTC (rev 45347)
@@ -1,4 +1,5 @@
 hvfloat.sty:    
+1.2a 2017-09-16  - new package for global float setting
 1.2  2017-04-28  - fix bug with caption (no entry in lof)
 1.1  2012-03-04  - added environment hvFloatEnv
                  - don't load package ifthen
@@ -7,3 +8,6 @@
 
 hvfloat.tex:    the source of the documentation
 
+
+hvfloat-fps.sty
+0.01 2017-09-16  - first CTAN version

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/README	2017-09-19 22:22:09 UTC (rev 45346)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/README	2017-09-19 23:23:23 UTC (rev 45347)
@@ -1,5 +1,10 @@
 hvfloat
+hv-float-fps
 
 Placing figures/tables with various options, like rotating
 the image/table and/or caption.
 
+
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex	2017-09-19 22:22:09 UTC (rev 45346)
+++ trunk/Master/texmf-dist/doc/latex/hvfloat/hvfloat.tex	2017-09-19 23:23:23 UTC (rev 45347)
@@ -2,7 +2,7 @@
 \documentclass{scrartcl}
 \usepackage[T1]{fontenc} 
 \usepackage{libertine}
-\usepackage[scaled=0.88]{beramono}
+\usepackage[scaled=0.85]{beramono}
 \usepackage[utf8]{inputenc} 
 \usepackage{listings}
 %
@@ -582,6 +582,25 @@
 \end{lstlisting}
 
 
+\section{Global float setting}
+Instead of writing the following sequence into the preamble:
+
+\begin{verbatim}
+\makeatletter
+\renewcommand\fps at figure{tb}   
+\renewcommand\fps at table{t}
+\makeatother 
+\end{verbatim}
+
+you can change the global setting of floats by loading the package \texttt{hvfloat-fps}. It allows 
+optional package options to set the global placement:
+
+
+\begin{verbatim}
+\usepackage[figure=tb,table=t]{hvfloat-fps}
+\end{verbatim}
+
+
 %\appendix
 %\section{Problems}
 %\begin{itemize}

Added: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty	2017-09-19 23:23:23 UTC (rev 45347)
@@ -0,0 +1,27 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{hvfloat-fps}[2017/09/16 setting float objects]
+%%
+%% IMPORTANT NOTICE:
+%%
+%% This is file `hvfloat-fps.sty',
+%%
+%% Herbert Voss <hvoss at tug.de>
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+%% DESCRIPTION:
+%%   `hvfloat-fps' offers global placement of floats
+%%
+\def\fileversion{0.01}
+\def\filedate{2017/09/16}
+\message{`hvfloat-fps' v\fileversion, \filedate\space (Herbert Voss)}
+%
+\RequirePackage{xkeyval}
+%
+\DeclareOptionX{figure}{\renewcommand*\fps at figure{#1}}
+\DeclareOptionX{table}{\renewcommand*\fps at table{#1}}
+\ProcessOptionsX\relax
+%
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat-fps.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty	2017-09-19 22:22:09 UTC (rev 45346)
+++ trunk/Master/texmf-dist/tex/latex/hvfloat/hvfloat.sty	2017-09-19 23:23:23 UTC (rev 45347)
@@ -1,12 +1,11 @@
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{hvfloat}[2012/03/04 rotating of floating objects]
+\ProvidesPackage{hvfloat}[2017/01/28 rotating of floating objects]
 %%
 %% IMPORTANT NOTICE:
 %%
 %% This is file `hvfloat.sty',
 %%
-%% Herbert Voss <voss at perce.de>
-%% march 04, 2017
+%% Herbert Voss <hvoss at tug.de>
 %%
 %% This program can be redistributed and/or modified under the terms
 %% of the LaTeX Project Public License Distributed from CTAN archives
@@ -15,8 +14,8 @@
 %% DESCRIPTION:
 %%   `hvfloat' offers rotating of captions and objects for floats
 %%
-\def\fileversion{1.2}
-\def\filedate{2017/01/28}
+\def\fileversion{1.2a}
+\def\filedate{2017/09/16}
 \message{`hvfloat' v\fileversion, \filedate\space (Herbert Voss)}
 %
 \newif\ifhv at fbox \hv at fboxfalse
@@ -25,7 +24,6 @@
 %
 \RequirePackage{graphicx}
 \RequirePackage{keyval}
-%\RequirePackage{ifthen}
 \RequirePackage{caption}
 %
 \newlength\hvObjectWidth
@@ -43,34 +41,34 @@
 %
 \def\hvSet at boolkey#1#2{\csname hv@#2\ifx\relax#1\relax true\else#1\fi\endcsname}
 %
-\define at key{hvSet}{floatPos}[htbp]{	%		LaTeX's position parameters htbp
+\define at key{hvSet}{floatPos}[htbp]{%		LaTeX's position parameters htbp
 	\def\hvSet at floatPos{#1}%
 }
-\define at key{hvSet}{rotAngle}[0]{	%		rotates caption AND image together
+\define at key{hvSet}{rotAngle}[0]{%		rotates caption AND image together
 	\def\hvSet at rotAngle{#1}%
 }
-\define at key{hvSet}{capWidth}[.8]{	%		object (w)idth)|object (h)eight|<scale of \columnwidth>
+\define at key{hvSet}{capWidth}[.8]{%		object (w)idth)|object (h)eight|<scale of \columnwidth>
 	\def\hvSet at capWidth{#1}%
 }
-\define at key{hvSet}{capAngle}[0]{	%		-360..+360
+\define at key{hvSet}{capAngle}[0]{%		-360..+360
 	\def\hvSet at capAngle{#1}%
 }
-\define at key{hvSet}{capPos}[b]{		%		(l)eft|(b)ottom|(t)op|(r)ight
-	\def\hvSet at capPos{#1}%					it is relativ to the object
+\define at key{hvSet}{capPos}[b]{%			(l)eft|(b)ottom|(t)op|(r)ight
+	\def\hvSet at capPos{#1}%			it is relativ to the object
 }
-\define at key{hvSet}{capVPos}[c]{		%		(b)ottom|(c)enter|(t)op
-	\def\hvSet at capVPos{#1}%					it is relativ to the object
+\define at key{hvSet}{capVPos}[c]{%		(b)ottom|(c)enter|(t)op
+	\def\hvSet at capVPos{#1}%			it is relativ to the object
 }
-\define at key{hvSet}{objectPos}[c]{	%		(l)eft|(c)enter|(r)ight
-	\def\hvSet at objectPos{#1}%				it is relativ to the document
+\define at key{hvSet}{objectPos}[c]{%		(l)eft|(c)enter|(r)ight
+	\def\hvSet at objectPos{#1}%		it is relativ to the document
 }
-\define at key{hvSet}{objectAngle}[0]{	%		-360..+360
+\define at key{hvSet}{objectAngle}[0]{%		-360..+360
 	\def\hvSet at objectAngle{#1}%
 }
-\define at key{hvSet}{floatCapSep}[5]{	%		a width with the unit pt
+\define at key{hvSet}{floatCapSep}[5]{%		a width with the unit pt
 	\def\hvSet at floatCapSep{#1}%
 }
-\define at key{hvSet}{useOBox}[false]{	%		use of the hvOBox contents
+\define at key{hvSet}{useOBox}[false]{%		use of the hvOBox contents
 	\lowercase{\hvSet at boolkey{#1}}{useOBox}%
 }
 \define at key{hvSet}{nonFloat}[false]{%		Do not use float environment
@@ -82,9 +80,9 @@
 %
 \newcommand{\setDefaults}{%
 \setkeys{hvSet}{%
-	floatPos=htbp, rotAngle=0, capWidth=.8, capAngle=0,%
-	capPos=b, capVPos=c, objectPos=c, objectAngle=0,%
-	floatCapSep=5, useOBox=false, nonFloat=false,%
+	floatPos=htbp, rotAngle=0, capWidth=.8, capAngle=0,
+	capPos=b, capVPos=c, objectPos=c, objectAngle=0,
+	floatCapSep=5, useOBox=false, nonFloat=false,
 	onlyText=false}%
 }
 %
@@ -118,7 +116,6 @@
   \ifx\relax#1\relax \caption{#2}\else\caption[#1]{#2}\fi}
 %
 %
-%
 \def\hvFloat{\@ifnextchar[{\do at hvFloat}{\do at hvFloat[]}}
 \def\do at hvFloat[#1]#2#3{%
   \setDefaults
@@ -129,9 +126,9 @@
   \@ifnextchar[{\do@@hvFloat}{\do@@hvFloat[]}%
 }
 \def\do@@hvFloat[#1]#2#3{%
-	\def\hv at shortCap{#1}
-	\def\hv at longCap{#2}
-	\def\hv at label{#3}
+  \def\hv at shortCap{#1}%
+  \def\hv at longCap{#2}%
+  \def\hv at label{#3}%
 %\newcommand*{\hvFloat}[5][]{%
 % [#1}: keyvalues
 % #2: type  figure | table | ...
@@ -143,34 +140,34 @@
 % \def\@tempa{#1}%
 % \ifx\@tempa\empty\else\setkeys{hvSet}{#1}\fi% set options, only when not empty
   \def\@tempa{90}%
-  \ifx\hvSet at rotAngle\@tempa \setlength{\hvMaxCapWidth}{\textheight}
-  \else                      \setlength{\hvMaxCapWidth}{\linewidth}
+  \ifx\hvSet at rotAngle\@tempa \setlength{\hvMaxCapWidth}{\textheight}%
+  \else                      \setlength{\hvMaxCapWidth}{\linewidth}%
   \fi
 %
 % First we save the object in \hvObjectBox
 %
   \ifx\hvSet at objectAngle\hv at Zero % rotate the object?
-    \savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}
+    \savebox{\hvObjectBox}{\ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}%
   \else
     \savebox{\hvObjectBox}{%
     \rotatebox{\hvSet at objectAngle}{%
-    \ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}}
+    \ifhv at useOBox\usebox{\hvOBox}\else\hv at floatObject\fi}}%
   \fi
-  \setlength{\hvObjectWidth}{\wd\hvObjectBox}
+  \setlength{\hvObjectWidth}{\wd\hvObjectBox}%
 %
 % Now we save the caption with its defined \hvCapWidth
 %
-  \ifx\hvSet at capWidth\hv at Width\setlength{\hvCapWidth}{\hvObjectWidth}
+  \ifx\hvSet at capWidth\hv at Width\setlength{\hvCapWidth}{\hvObjectWidth}%
   \else
-    \ifx\hvSet at capWidth\hv at Height\setlength{\hvCapWidth}{\ht\hvObjectBox}
+    \ifx\hvSet at capWidth\hv at Height\setlength{\hvCapWidth}{\ht\hvObjectBox}%
     \else
-      \setlength{\hvCapWidth}{\hvObjectWidth}
+      \setlength{\hvCapWidth}{\hvObjectWidth}%
       \ifx\hvSet at capPos\hv at Left\addtolength{\hvMaxCapWidth}{-\hvObjectWidth}\fi
       \ifx\hvSet at capPos\hv at Right\addtolength{\hvMaxCapWidth}{-\hvObjectWidth}\fi
       \ifdim\hvSet at capWidth\columnwidth<\hvMaxCapWidth
-	\setlength{\hvCapWidth}{\hvSet at capWidth\columnwidth}
+	\setlength{\hvCapWidth}{\hvSet at capWidth\columnwidth}%
       \else
-	\setlength{\hvCapWidth}{\hvMaxCapWidth}
+	\setlength{\hvCapWidth}{\hvMaxCapWidth}%
       \fi
     \fi
   \fi
@@ -178,7 +175,7 @@
 % now we have the object and the caption with the right
 % rotated angles saved in boxes
 %
-  \def\fps at figure{\hvSet at floatPos}
+  \def\fps at figure{\hvSet at floatPos}%
   \ifhv at nonFloat\begingroup%	Start the nonfloat part
   \else         \begin{\hv at floatType}%		Start the floating environment
   \fi
@@ -192,7 +189,7 @@
 	    \ifx\hv at floatType\hv at figure
 	      \ifx\relax#1\relax \figcaption{#2}\else\figcaption[#1]{#2}\fi
 	    \else
-	      \ifx\relax#1\relax \tabcaption{#2}\else\tabcaption[#1]{#2}\fi%
+	      \ifx\relax#1\relax \tabcaption{#2}\else\tabcaption[#1]{#2}\fi
 	    \fi
 	  \fi
 	\else
@@ -211,11 +208,11 @@
 	    \ifx\hv at floatType\hv at figure 
 	      \ifx\relax#1\relax \figcaption{#2}\else\figcaption[#1]{#2}\fi
 	    \else
-	      \ifx\relax#1\relax \tabcaption{#2}\else\tabcaption[#1]{#2}\fi%
+	      \ifx\relax#1\relax \tabcaption{#2}\else\tabcaption[#1]{#2}\fi
 	    \fi
 	  \fi
 	\else
-          \expandafter\ifx\expandafter\relax\hv at shortCap\relax \caption{#2}\else\caption[#1]{#2}\fi%
+          \expandafter\ifx\expandafter\relax\hv at shortCap\relax \caption{#2}\else\caption[#1]{#2}\fi
         \fi
         \label{#3}%
       \end{minipage}%
@@ -225,11 +222,11 @@
 %%
   \restoreCaptionSkip% save old values
   \ifx\hvSet at objectPos\hv at Right\raggedleft%
-  \else%
+  \else
     \ifx\hvSet at objectPos\hv at Center
-      \ifhv at nonFloat\hspace*{\fill}\else\centering\fi%
-    \fi%
-  \fi%
+      \ifhv at nonFloat\hspace*{\fill}\else\centering\fi
+    \fi
+  \fi
 %
 % to rotate object and caption together, we save all in another box
 % the caption comes first, if its on the left or the top
@@ -236,15 +233,15 @@
 %
   \savebox{\@tempboxa}{%
   \ifx\hvSet at capPos\hv at Left  %  caption on left side
-    \ifx\hvSet at capVPos\hv at Center%
+    \ifx\hvSet at capVPos\hv at Center
       \ifhv at fbox\fbox{\parbox{\wd\hvCaptionBox}{\usebox{\hvCaptionBox}}}%
       \else     \parbox{\wd\hvCaptionBox}{\usebox{\hvCaptionBox}}%
-      \fi%
+      \fi
     \hspace{\hvSet at floatCapSep pt}% capfloatsep
-    \ifhv at fbox\fbox{\parbox{\wd\hvObjectBox}{\usebox{\hvObjectBox}}}
-    \else     \parbox{\wd\hvObjectBox}{\usebox{\hvObjectBox}}
-    \fi%
-  \else%
+    \ifhv at fbox\fbox{\parbox{\wd\hvObjectBox}{\usebox{\hvObjectBox}}}%
+    \else     \parbox{\wd\hvObjectBox}{\usebox{\hvObjectBox}}%
+    \fi
+  \else
     \ifx\hvSet at capVPos\hv at Top % caption at top
       \ifhv at fbox\fbox{\raisebox{-\height}{\usebox{\hvCaptionBox}}}%
       \else     \raisebox{-\height}{\usebox{\hvCaptionBox}}%
@@ -252,33 +249,33 @@
       \hspace{\hvSet at floatCapSep pt}% capfloatsep
       \ifhv at fbox\fbox{\raisebox{-\height}{\usebox{\hvObjectBox}}}%
       \else     \raisebox{-\height}{\usebox{\hvObjectBox}}%
-      \fi%
+      \fi
     \else% caption on bottom
-      \ifhv at fbox\fbox{\usebox{\hvCaptionBox}}
-                \else\usebox{\hvCaptionBox}
+      \ifhv at fbox\fbox{\usebox{\hvCaptionBox}}%
+                \else\usebox{\hvCaptionBox}%
       \fi%
       \hspace{\hvSet at floatCapSep pt}%
-      \ifhv at fbox\fbox{\usebox{\hvObjectBox}}
-      \else     \usebox{\hvObjectBox}
-      \fi%
-    \fi%
-  \fi%
+      \ifhv at fbox\fbox{\usebox{\hvObjectBox}}%
+      \else     \usebox{\hvObjectBox}%
+      \fi
+    \fi
+  \fi
   \else
 				\ifx\hvSet at capPos\hv at Top
 					\ifdim\wd\hvCaptionBox>\wd\hvObjectBox
-						\begin{minipage}{\wd\hvCaptionBox}
+						\begin{minipage}{\wd\hvCaptionBox}%
 					\else
-						\begin{minipage}{\wd\hvObjectBox}
+						\begin{minipage}{\wd\hvObjectBox}%
 					\fi
 					\centering
 					\ifhv at fbox
 						\fbox{\usebox{\hvCaptionBox}}\\[\hvBelowCaptionSkip]
-						\fbox{\usebox{\hvObjectBox}}
+						\fbox{\usebox{\hvObjectBox}}%
 					\else
 						\usebox{\hvCaptionBox}\\[\hvBelowCaptionSkip]
-						\usebox{\hvObjectBox}
-					\fi%
-					\end{minipage}
+						\usebox{\hvObjectBox}%
+					\fi
+					\end{minipage}%
 				\else
 					\ifx\hvSet at capPos\hv at Bottom
 						\ifdim\wd\hvCaptionBox>\wd\hvObjectBox



More information about the tex-live-commits mailing list