diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-18 00:35:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-18 00:35:34 +0000 |
commit | 74d55563b30d30bfd028a202f79a3e67184db5c4 (patch) | |
tree | c7901c598c3e41913d684d311f142806b4d49e25 /Master/texmf-dist/doc/latex/miniplot/miniplot.tex | |
parent | 258a92c6240edcd757f6626fff6ef3dad0f045a3 (diff) |
miniplot update (15mar10)
git-svn-id: svn://tug.org/texlive/trunk@17483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/miniplot/miniplot.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/miniplot/miniplot.tex | 887 |
1 files changed, 584 insertions, 303 deletions
diff --git a/Master/texmf-dist/doc/latex/miniplot/miniplot.tex b/Master/texmf-dist/doc/latex/miniplot/miniplot.tex index 57c17f32d37..0de1d9d16e6 100644 --- a/Master/texmf-dist/doc/latex/miniplot/miniplot.tex +++ b/Master/texmf-dist/doc/latex/miniplot/miniplot.tex @@ -16,10 +16,11 @@ \usepackage{rotfloat} %\usepackage{showkeys} +\usepackage{flafter} % personal adjustments \newcommand{\comm}[1]{\texttt{#1}} -\renewcommand{\floatpagefraction}{0.8} % default = 0.5, see "The LaTeX Companion, page 142" +\renewcommand{\floatpagefraction}{0.8} % default = 0.5, see "The LaTeX Companion, page 142 \setcounter{plotFigures}{1} @@ -28,25 +29,25 @@ %\pagestyle{myheadings} %\markright{Section \thesection} -\title{MiniPlot -- A Package For Easy Figure Arrangements} +\title{MiniPlot -- A Package For Easy Figure Arrangements\footnote{Version 0.3}} \author{Tobias Wahl\footnote{I'd like to thank all the people helping me in \comm{comp.text.tex} for answering my dull questions.}} -\date{15th June 2001} +\date{1st July 2001} \maketitle \begin{abstract} MiniPlot is a package to help \LaTeX's user to typeset eps figures -using an easy-to-use interface. +using an easy-to-use command-interface. -Figures can be arranged as one-figure-only or as a collection of +Figures can easily be arranged as one-figure-only or as a collection of figure in columns and rows which can contain itself sub-figures in -columns and rows. Also wrapped figures are supported. +columns and rows. Also wrapped and sideways figures are supported. This package provides commands to display a framebox instead of the figure as the graphics package does already but additionally it writes useful information such as the label and scaling factor -into these boxes. +into these boxes. The content of these boxes can be customized. \end{abstract} \tableofcontents @@ -55,7 +56,7 @@ into these boxes. %================================================================= \section{Motivation} -This section is only to show what MiniPlot is about. MiniPlot is a +This section is to show what MiniPlot is about. MiniPlot is a strong tool for plotting multiple figures and sub-figure as the following figures show. It's easy to use interface allows easy and fast access to professional looking figure presentation. @@ -141,7 +142,7 @@ file \usepackage{rotfloat} % personal adjustments -\setcounter{plotFigures}{0} +%\setcounter{plotFigures}{0} \renewcommand{\floatpagefraction}{0.8} \end{verbatim} @@ -153,9 +154,10 @@ Rotfloat, and rotating which is loaded by rotfloat, is needed when one likes to use the side-way-figure capabilities of MiniPlot. I recommend to install all packages. -Putting the line \comm{setcounter{plotFigures}{0}} is not necessary but is +Putting the line \comm{setcounter\{plotFigures\}\{0\}} is not necessary but is recomended for editing a document with loads of figures or when one likes -to obtain the label of figures for refences. +to obtain the label of figures for refences. Enable this line when you learned +how to deal with this package. The last line is very much my own personal style and not needed for using MiniPlot. @@ -253,7 +255,7 @@ width.}{singleStandard2} to obtain Figure \ref{fig:singleStandard2}. We can see that the scaling factor is no more equals one. Other usefull information -is given by the label. +is given by the label. \setcounter{plotFigures}{0} \includeStandardGraph{figures/1}{Simple figure included with @@ -261,9 +263,9 @@ scaling factor calculated to scale figure to meet specified width.}{singleStandard2} \setcounter{plotFigures}{1} -Of course there is also a side-ways version of a figure, see +Of course, there is also a side-ways version of a figure, see Figure \ref{fig:singleStandard3}. This figure is implemented using -the include-standrd-side-ways-graph command. +the include-standard-side-ways-graph command. \begin{verbatim} \setcounter{plotFigures}{0} @@ -290,82 +292,46 @@ Note that the width of the side-ways-figure is now determined by Note that there is also an include-side-ways-eps command where you have to set a scaling factor. +The user can customize the width of the caption relative to the figure's width +simply by changing the folowing length. +\begin{verbatim} +\setlength{\captionWidthPenalty}{0mm} +\end{verbatim} +Setting this length has only an effect to the figures which are introduced as a single +figure +\begin{itemize} + \item \verb+\includeEps+ + \item \verb+\includeEpsNow+ + \item \verb+\includeSideWaysEps+ + \item \verb+\includeSideWaysEpsNow+ + \item \verb+\includeStandardGraph+ + \item \verb+\includeStandardGraphNow+ + \item \verb+\includeStandardSideWaysGraph+ + \item \verb+\includeStandardSideWaysGraphNow+ +\end{itemize} +It has no effect to the wrapped figure environments and the arranged figure environments. +Normally the captions of the listed figure commands and environments have the +width of the figure. In case the figure's width is smaller than a specified value +then it will be set to the defined caption minimum width - - - -\clearpage - -%---------------------------------------------------------------- -\section{Including wrapped figures} - - -The use of the include-Eps-Wrap command is similar to the -include-Eps command. By writing - -\includeEpsWrap[20]{l}{figures/wrapMe}{Example of an wrapped figure}{wrappedFigure1}{1} - -\begin{verbatim} \includeEpsWrap[20]{l}{figures/wrapMe}{Example of an -wrapped figure}{wrappedFigure1}{1} \end{verbatim} - -we obtain Figure \ref{fig:wrappedFigure1}. - -The general form is given by - -\begin{verbatim} -\includeEpsWrap[lines]{side}{path} -{caption}{label}{scaling factor} +\begin{verbatim} +\setlength{\minimumCaptionWidth}{\linewidth * 4 / 6} +\setlength{\minimumSideWaysCaptionWidth}{\textheight * 4 / 6} \end{verbatim} -where lines stands for the number of narrow lines and side stands -for left (l) or right (r) as specified in the documentation of the -wrapfig package. -Of course, if the counter \comm{plotFigures} equals 0 then this figure is -replaced by a framebox containing some useful information: -\begin{verbatim} -\setcounter{plotFigures}{0} -\includeEpsWrap[20]{l}{figures/wrapMe} -{Example of an wrapped figure} -{wrappedFigure2}{1} -\setcounter{plotFigures}{1} -\end{verbatim} - -The counter \comm{plotFigures} is inteded to be \comm{0} in -draft mode to improve browsing speed through the document and -to provide information for referencing. However, when a figure -is to be implemented the first time one like to see the result. -This can be done without changing the counter \comm{plotFigures}. -Simple one can add the term \comm{Now} to any command provided -to include figures. Therefore the following command would show the -figure and not the framebox: +\clearpage -\begin{verbatim} -\setcounter{plotFigures}{0} -\includeEpsWrapNow{l}{figures/wrapMe} -{Example of an wrapped figure} -{wrappedFigure3}{1} -\setcounter{plotFigures}{1} -\end{verbatim} -To customize the figure there is the width which is added to the wrapped figure -in oder to have some space between figure and text -\begin{verbatim} -\setlength{\extraWrapWidth}{2mm} -\end{verbatim} -The space above the wrapped figure is set to be -\begin{verbatim} -\setlength{\aboveWrapFigureSpace}{0mm} -\end{verbatim} @@ -413,12 +379,12 @@ A simple example might be given by Figure \ref{fig:arranged11} to \ref{fig:arran The first parameter to the \comm{arrangedFigure} environment is the number of columns of sub-figures, the second one specifies the number of columns of sub-sub-figures. The next parameters is the label and then the caption to the immediate -following sub-sub-figures. +following sub-figures. The command \comm{subFig} should actually be called \comm{subSubFig} since it inserts the sub-sub-figure specified by the path of the figure to be included. \emph{It is important to enter the \%-signs after the \comm{subFig} command in order to avoid introducing -unwanted spaces between the sub-sub-figures.} +undesired horizontal spaces between the sub-sub-figures.} The command \comm{newSubFig} opens the next que to fill up a sub-figure with sub-sub-figures. The parameter is the label and the caption for the immediately following sub-figure. @@ -444,11 +410,13 @@ Another example could be given by Figure \ref{fig:arranged2} \end{arrangedFigure} Note that the number of columns of sub-figures changed to one and that we arrange four -sub-sub-figures in the width of one sub-figure. +sub-sub-figures in the width of one sub-figure column. -Also the \comm{subFig} command got now an empty optional command leading to the indexing +Additionally, the \comm{subFig} command got now an empty optional command leading to the indexing of the sub-sub-figures from a to d. This behavior is identically with the one of the -subfigure package. +subfigure package\footnote{The only exception is that if one enters \comm{[noParMiniPlot]} it would be +as if no optional parameter is given. This shouldn't be a major problem since there might be little +desire to have a caption like \comm{(a)noParMiniPlot} .}. To complete a list of examples a last one is given by Figure \ref{fig:arranged31} to \ref{fig:arranged33} @@ -458,7 +426,6 @@ To complete a list of examples a last one is given by Figure \ref{fig:arranged31 \begin{verbatim} \renewcommand{\subfigbottomskip}{0pt}% \renewcommand{\subfigcapskip}{0pt}% -\renewcommand{\subfigcapskip}{0pt}% \renewcommand{\subcapsize}{\scriptsize}% \begin{arrangedFigure}{2}{4}{arranged31}{top left} @@ -485,18 +452,26 @@ To complete a list of examples a last one is given by Figure \ref{fig:arranged31 \subFig[]{figures/3}% \subFig[]{figures/4}% \end{arrangedFigure} + +\renewcommand{\subfigbottomskip}{10pt}% +\renewcommand{\subfigcapskip}{10pt}% +\renewcommand{\subcapsize}{\footnotesize}% \end{verbatim} +The redefinition of commands introduced by the subfigure package makes the figure +look nicer but are not necessary to run the code. After the redefinition they are reset to +their default values. + In this figure we have an odd ratio of sub-figures to sub-figure-columns -and we see that the remaining sub-figure is shifted to the right. +and we see that the remaining sub-figure \ref{fig:arranged33} is shifted +to the right. -The same happens to the sub-sub-figures included in the top row of -sub-figures. +The same happens to the sub-sub-figures included in the bottom row of +sub-figures \ref{fig:arranged31} and \ref{fig:arranged32}. \renewcommand{\subfigbottomskip}{0pt}% \renewcommand{\subfigcapskip}{0pt}% - \renewcommand{\subfigcapskip}{0pt}% \renewcommand{\subcapsize}{\scriptsize}% \begin{arrangedFigure}{2}{4}{arranged31}{top left} @@ -526,26 +501,15 @@ sub-figures. \renewcommand{\subfigbottomskip}{10pt}% \renewcommand{\subfigcapskip}{10pt}% - \renewcommand{\subfigcapskip}{10pt}% \renewcommand{\subcapsize}{\footnotesize}% The reader certainly notices that it takes longer to load the page when a lot -of sub-sub-figures are arranged. This is an important reason to set the counter -\comm{plotFigures} to zero to save time as the reader might notice when loading -Figure \ref{fig:arranged41} to \ref{fig:arranged42}. - -\begin{verbatim} -\setcounter{plotFigures}{0} -\end{verbatim} - -At the same time an example of the arranged-side-ways-figure is shown. That -this page loads faster is not theonly difference one can notice. The label for -reference is now added to the caption in order to be easier accessible. A disadvantage -is that the caption might become bigger and that might influence the document layout. -This might be changed in later versions and the label migth be moved to the margin or so. - +of sub-sub-figures are arranged, Figure \ref{fig:arranged41} to \ref{fig:arranged42}. +This is an important reason to set the counter \comm{plotFigures} to zero to save +time when browsing through a document on the computer. +As another example an arranged-side-ways-figure is shown, Figure \ref{fig:arranged41}. \begin{verbatim} \setcounter{plotFigures}{0} @@ -582,11 +546,203 @@ This might be changed in later versions and the label migth be moved to the marg \setcounter{plotFigures}{1} +That this page loads faster is not the only difference one can notice. The label for +reference is now added below the caption in order to be easier accessible. A disadvantage +is that an extra space might be included and that might influence the document layout. In order to +compensate for that effect the following length has been introduced + +\begin{verbatim} +\setlength{\labelPenalty}{-1.5mm} +\end{verbatim} + +which is valid if the following command is design to produce a single line in small font. + +\begin{verbatim} +\newcommand{\printLabel}[1]{\centerline{\small{\emph{Label}: \texttt{fig:#1}}}} +\end{verbatim} + +If one redefines \verb+\printLabel+ one has to figure out what value might be appropriate +for \verb+\labelPenalty+. + +Furthermore, only the most basic information is included in the frameboxes. This is +because the arranged sub-sub-figures can become quiet small. First the basic filename +without path is contained. In the next row the scaling factor is shown, than the suffix +to the label shown below the sub-fig caption is included. + +So far referencing to sub-sub-figures does not work but as soon as someone tells me how +to extract \comm{a} fromm \comm{(a)}, which comes from the \verb+\thesubfigure+ command, I +would like to implement that. :) + + \clearpage + + + + + + + +%---------------------------------------------------------------- +\section{Including wrapped figures} + + +The use of the include-Eps-Wrap command is similar to the +include-Eps command. By writing + +\setWrapFigOverhang[2cm] +\includeEpsWrap[20]{l}{figures/wrapMe}{Example of an wrapped figure}{wrappedFigure1}{1} +\setWrapFigOverhang + +\begin{verbatim} +\setWrapFigOverhang[2cm] +\includeEpsWrap[20]{l}{figures/wrapMe}{Example of an +wrapped figure}{wrappedFigure1}{1} +\setWrapFigOverhang +\end{verbatim} + +we obtain Figure \ref{fig:wrappedFigure1}. + +The general form is given by + +\begin{verbatim} +\includeEpsWrap[lines]{side}{path} +{caption}{label}{scaling factor} +\end{verbatim} + +where \comm{lines} stands for the number of narrow lines and \comm{side} stands +for left (\comm{l}) or right (\comm{r}) as specified in the documentation of the +wrapfig package. + +The command \verb+setWrapFigOverhang+ sets the wrap figures overhang to the given optinal +parameter. Calling this command without a parameter resets the overhang to its default value + +\begin{verbatim} +\setlength{\wrapFigOverhangDefault}{0mm} +\end{verbatim} + +Of course, if the counter \comm{plotFigures} equals 0 then this figure is +replaced by a framebox containing some useful information: + +\begin{verbatim} +\setcounter{plotFigures}{0} +\includeEpsWrap[20]{l}{figures/wrapMe} +{Example of an wrapped figure} +{wrappedFigure2}{1} +\setcounter{plotFigures}{1} +\end{verbatim} + +The counter \comm{plotFigures} is inteded to be \comm{0} in +draft mode to improve browsing speed through the document and +to provide information for referencing. However, when a figure +is to be implemented the first time one likes to see the result. +This can be done without changing the counter \comm{plotFigures}. +Simply one can add the term \comm{Now} to any command provided +to include figures. Therefore the following command would show the +figure and not the framebox: +% +\begin{arrangedWrapFigure}[15]{l}{3cm}{1}{2}{arranged511w}{top sub-figure} + \subFig[]{figures/1}% + \subFig[]{figures/2}% + \subFig[]{figures/3}% + \subFig[]{figures/4}% +\newSubFig{arranged512w}{bottom sub-figure} + \subFig[]{figures/1}% + \subFig[]{figures/2}% + \subFig[]{figures/3}% + \subFig[]{figures/4}% +\end{arrangedWrapFigure} + +\begin{verbatim} +\setcounter{plotFigures}{0} +\includeEpsWrapNow{l}{figures/wrapMe} +{Example of an wrapped figure} +{wrappedFigure3}{1} +\setcounter{plotFigures}{1} +\end{verbatim} + +To customize the figure there is the width which is added to the wrapped figure +in oder to have some space between figure and text + +\begin{verbatim} +\setlength{\extraWrapWidth}{2mm} +\end{verbatim} + +The space above the wrapped figure is set to be + +\begin{verbatim} +\setlength{\aboveWrapFigureSpace}{0mm} +\end{verbatim} + +The space below the wrapped figure can be set, obviously, by setting +the number of \comm{linnes} in the optional parameter. + + + + + + + + +%---------------------------------------------------------------- +\section{Including wrapped-arranged figures} + + +To include arranged figures in an wrapped figure environment one has to use the +following environment, \comm{arrangedWrapFigure} + +\begin{verbatim} +\begin{arrangedWrapFigure}[15]{l}{3cm}{1}{2} + {arranged511w}{top sub-figure} + \subFig[]{figures/1}% + \subFig[]{figures/2}% + \subFig[]{figures/3}% + \subFig[]{figures/4}% +\newSubFig{arranged512w}{bottom sub-figure} + \subFig[]{figures/1}% + \subFig[]{figures/2}% + \subFig[]{figures/3}% + \subFig[]{figures/4}% +\end{arrangedWrapFigure} +\end{verbatim} + +The general form is given by + +\begin{verbatim} +\begin{arrangedWrapFigure}[lines]{position}{width} + {sub-columns}{sub-sub-columns} + {label}{caption} +\end{arrangedWrapFigure} +\end{verbatim} + + + + + + + + + +\clearpage + + + + + + + + + %---------------------------------------------------------------- \section{Customizing arranged figures} +As for the single figures the widths of the arranged-figure and +arranged-side-ways-figure environments are given by + +\begin{verbatim} +\setlength{\myStandardFigureWidth}{\linewidth} +\setlength{\myStandardSideWaysFigureWidth}{\textheight} +\end{verbatim} For cutomizing purposes one should know that the space between each sub-figure is specified by @@ -601,8 +757,8 @@ whereas the space between each sub-sub-figure is specified by \setlength{\interSubSubFigSpace}{2.5mm} \end{verbatim} -The horizontal position of the numvering of sub-sub-figures -\emph{(a)-(..)} can be changed by changing the following length +The horizontal positioning of the numbers of sub-sub-figures, +\emph{(a)-(..)}, can be changed by changing the following length which default value is \begin{verbatim} @@ -610,11 +766,11 @@ which default value is \end{verbatim} This has only an effect if the \comm{subFig} command is issued with -an empty optional parameter. +an empty optional parameter. Otherwise the subfigure package's default +value will be assumed: \verb+\renewcommand{\subfigcapmargin}{10pt}+. If a sub-sub-caption is given as in the following example - \begin{verbatim} \begin{arrangedFigure}{2}{2}{arranged511}{left sub-figure} \subFig[]{figures/1}% @@ -639,9 +795,7 @@ If a sub-sub-caption is given as in the following example \subFig[]{figures/2}% \subFig[]{figures/3}% \subFig[]{figures/4}% -\end{arrangedFigure} - -\begin{arrangedFigure}{2}{2}{arranged521}{left sub-figure} +\newSubFig{arranged521}{left sub-figure} \subFig[]{figures/1}% \subFig[]{figures/2}% \subFig[This is a very long sub-sub-caption]{figures/3}% @@ -669,9 +823,9 @@ then the following length can be set in order to compensate for the extra space \subFig[]{figures/2}% \subFig[]{figures/3}% \subFig[]{figures/4}% -\setlength{\subFigureAboveCaptionSpace}{7mm} +\setlength{\subFigureAboveCaptionSpace}{7mm} % watch this \end{arrangedFigure} -\setlength{\subFigureAboveCaptionSpace}{0mm} +\setlength{\subFigureAboveCaptionSpace}{0mm} % watch this \end{verbatim} @@ -687,10 +841,10 @@ then one could set \subFig[]{figures/3}% \subFig[]{figures/4}% \newSubFig{arranged532}{right sub-figure} - \setlength{\horizontalSubSubFigSpace}{4mm} + \setlength{\horizontalSubSubFigSpace}{4mm} % watch this \subFig[]{figures/1}% \subFig[]{figures/2}% - \setlength{\horizontalSubSubFigSpace}{0mm} + \setlength{\horizontalSubSubFigSpace}{-1mm} % watch this \subFig[]{figures/3}% \subFig[]{figures/4}% \end{arrangedFigure} @@ -710,9 +864,7 @@ to achieve Figure \ref{fig:arranged531} and \ref{fig:arranged532}. \subFig[]{figures/2}% \subFig[]{figures/3}% \subFig[]{figures/4}% -\end{arrangedFigure} - -\begin{arrangedFigure}{2}{2}{arranged531}{left sub-figure} +\newSubFig{arranged531}{left sub-figure} \subFig[]{figures/1}% \subFig[This is a very long sub-sub-caption]{figures/2}% \subFig[]{figures/3}% @@ -721,7 +873,7 @@ to achieve Figure \ref{fig:arranged531} and \ref{fig:arranged532}. \setlength{\horizontalSubSubFigSpace}{4mm} \subFig[]{figures/1}% \subFig[]{figures/2}% - \setlength{\horizontalSubSubFigSpace}{0mm} + \setlength{\horizontalSubSubFigSpace}{-1mm} \subFig[]{figures/3}% \subFig[]{figures/4}% \end{arrangedFigure} @@ -731,7 +883,7 @@ to achieve Figure \ref{fig:arranged531} and \ref{fig:arranged532}. Another parameter for modifying the look is given by \begin{verbatim} -\setlength{\subFigureBelowCaptionSpace}{3mm} +\setlength{\subFigureBelowCaptionSpace}{5mm} \end{verbatim} which sets the space below the main sub-figure caption and the next @@ -748,33 +900,45 @@ of the definition is given below. \begin{verbatim} \newcommand{\resetMiniPlot}% {% - \setcounter{printCaption}{1} - \setlength{\extraWrapWidth}{2mm} - \setlength{\aboveWrapFigureSpace}{0mm} - \renewcommand{\standardGraphScale}{1} - \setcounter{scaleToStandardFigureWidth}{1} - \setcounter{isFirstStandardFigure}{1} - \setcounter{scaleFigureIndividual}{1} - \setlength{\frameBoxPenalty}{2.4mm} - \setlength{\myStandardFigureWidth}{\linewidth} - \setlength{\myStandardSubFigureWidth}{\myStandardFigureWidth} - \setlength{\myStandardSideWaysFigureWidth}{\textheight} - \renewcommand{\isFirstSubFig}{false} - \setlength{\subFigPenalty}{0mm} - \setlength{\subSubFigPenalty}{0.001mm} - \setlength{\interSubFigSpace}{8mm} - \setlength{\interSubSubFigSpace}{2.5mm} - \setlength{\subFigureAboveCaptionSpaceDefaultOffset}{0mm} - \setlength{\subFigureAboveCaptionSpaceDefault}{0mm} - \setlength{\subFigureAboveCaptionSpace}{\subFigureAboveCaptionSpaceDefault - + \subFigureAboveCaptionSpaceDefaultOffset} - \setlength{\horizontalSubSubFigSpace}{0mm} - \setlength{\subFigureBelowCaptionSpace}{3mm} - \setlength{\subCaptionPenalty}{0mm} + \setcounter{printCaption}{1}% + \setcounter{scaleToStandardFigureWidth}{1}% + \setcounter{isFirstStandardFigure}{1}% + \setcounter{scaleFigureIndividual}{1}% + \setlength{\extraWrapWidth}{2mm}% + \setlength{\aboveWrapFigureSpace}{0mm}% + \setlength{\frameBoxPenalty}{2.4mm}% + \setlength{\myStandardFigureWidth}{\linewidth}% + \setlength{\myStandardSideWaysFigureWidth}{\textheight}% + \setlength{\subFigPenalty}{0mm}% + \setlength{\subSubFigPenalty}{0.001mm}% + \setlength{\interSubFigSpace}{8mm}% + \setlength{\interSubSubFigSpace}{2.5mm}% + \setlength{\subFigureAboveCaptionSpaceDefaultOffset}{0mm}% + \setlength{\subFigureAboveCaptionSpaceDefault}{0mm}% + \setlength{\subFigureAboveCaptionSpace} + {\subFigureAboveCaptionSpaceDefault + + \subFigureAboveCaptionSpaceDefaultOffset}% + \setlength{\horizontalSubSubFigSpace}{0mm}% + \setlength{\subFigureBelowCaptionSpace}{3mm}% + \setlength{\subCaptionPenalty}{0mm}% + \setlength{\minimumCaptionWidth}{\linewidth * 4 / 6}% + \setlength{\minimumSideWaysCaptionWidth}{\textheight * 4 / 6}% + \renewcommand{\standardGraphScale}{1}% + \renewcommand{\isFirstSubFig}{false}% }% \end{verbatim} +With this one could define a function to set one's own default values, e.g. +\begin{verbatim} +\necommand{\myResetMiniPlot}% + {% + \resetMiniPlot% + % + % personal settings: + \setlength{\myStandardFigureWidth}{\linewidth - 20mm}% + } +\end{verbatim} \clearpage @@ -789,7 +953,8 @@ of the definition is given below. Normally it shouldn't be necessary to do any debugging but in case there is I'd like to mention some tweaks here. -If one is unluky one might find something like the following graph +If unluky one might find something as shown in Figure \ref{fig:arranged51d} and +\ref{fig:arranged52d}. \setlength{\subSubFigPenalty}{-1mm} @@ -819,7 +984,7 @@ If one is unluky one might find something like the following graph \subFig[]{figures/4}% \end{arrangedFigure} -from which one would expect to yield two columns of sub-figures and +From the coding shown above one would expect to yield two columns of sub-figures and inside those again two columns of sub-sub-figures. However, Figure \ref{fig:arranged51} to \ref{fig:arranged51} have only one column of sub-sub-figures. This is because the sub-sub-figures plus the space @@ -838,7 +1003,7 @@ sub-sub-figures have to be made a little bit narrower. The above length is to compensate for the numerical error. By increasing the above length one can yield a satisfactory figure layout as -can be seen in Figure +can be seen in Figure \ref{fig:arranged51dd} and \ref{fig:arranged52dd}. \begin{arrangedFigure}{2}{2}{arranged51dd}{left sub-figure} \subFig[]{figures/1}% @@ -853,18 +1018,19 @@ can be seen in Figure \end{arrangedFigure} -Another thing which is unlikely but not impossible to occur is that on has -the displacment of figure as described above only when \comm{plotFigures} -is equals zeros, meaning the framebox(es) are shown with the information -in it. The reason then is that the following length needs to be increased -from its default value. +Another case which is unlikely but not impossible to occur is that one has +the displacment of the sub-sub-figures as described above but +only when \comm{plotFigures} is equals zeros. That means the actual figures +are alright but the frameboxes are shifted down. Then it is that +the following length needs to be increased from its default value \begin{verbatim} \setlength{\frameBoxPenalty}{2.4mm} \end{verbatim} The reason is that the framebox is drawn around the actual size of the -eps-figure, this space needs to be substracted. +eps-figure, this space needs to be substracted again in order to obtain the +actual figure size. \clearpage @@ -875,33 +1041,176 @@ eps-figure, this space needs to be substracted. +%---------------------------------------------------------------- +\section{Customizing content of substituted framed boxes} + +If the counter \comm{plotFigures} is set to be equals \comm{0} then a framed +box with some information is shown. The commands to show information, however can +be redefined in order to be more customizable for the user. + +Three commands are used to disply the content for the different environments: + +\begin{itemize} + \item \verb+\epsContent[placement]{path}{caption}{label}{scaling}+\par\verb+{figure width}{figure height}+ + \item \verb+\arrangedFigContent[sub-sub-caption]{path}{figure width}+\par\verb+{figure height}+ + \item \verb+\wrappedEpsContent[lines]{position}{path}{caption}+\par\verb+{label}{scaling}{figure width}{figure height}+ +\end{itemize} + +The first command prints the content to the single eps figures. First the \verb+\frameBoxPenaly+ is substracted +from the figures height and width. Then a picture environment is created within a \comm{framebox}. The information +is contained within a table. More information could be added or the whole structure completely renewed. + +\begin{itemize} + \item file name with path and extension + \item scaling factor for this eps figure + \item label of that figure + \item position in terms of \comm{htbp} +\end{itemize} + +\begin{verbatim} +\newcommand{\epsContent}[7][htpb]% + {% + \setlength{\figWidth}{#6 - \frameBoxPenalty}% + \setlength{\figHeight}{#7 - \frameBoxPenalty}% + % + \setlength{\figTabWidth}{\figWidth - 31mm}% + \setlength{\figTabMiddle}{\figHeight / 2}% + % + \centerline{\framebox{% + % + \setlength{\unitlength}{1sp}%% + \begin{picture}(\number\figWidth,\number\figHeight)%% + \put(655360,\number\figTabMiddle)%% + {% + \begin{tabular}{lp{\the\figTabWidth}}% + \emph{Source:} & #2.eps \\%% + \emph{Scaling:} & #5 \\%% + \emph{Label:} & \labelPrefix#4 \\%% + \emph{Position:} & #1%% + \end{tabular}% + }% + \end{picture}%% + }}% + }% +\end{verbatim} + +The second command is to include the content for arranged figures. The structure is +the same as in the above command. Because there is less space for arranged figures the +content had to be shortend. The filename is shown without path and extension. Furthermore, +there is nor description what the information is. Therefore this is listed here + +\begin{itemize} + \item base name of file without path and extension + \item scaling factor for this eps figure + \item suffix to be attached to the base label of that figure to refence this sub-sub-figure +\end{itemize} + +\begin{verbatim} +\newcommand{\arrangedFigContent}[4][noParMiniPlot]% + {% + \setlength{\figWidth}{#3 - \frameBoxPenalty}% + \setlength{\figHeight}{#4 - \frameBoxPenalty}% + % + \setlength{\figTabMiddle}{\figHeight / 2}% + % + \framebox{% + \setlength{\unitlength}{1sp}% + \tiny% + \begin{picture}(\number\figWidth,\number\figHeight)% + \put(0,\number\figTabMiddle)%% + {% + \begin{tabular}{p{\the\figWidth}}% + \extractminiplotpath{#2} \\%% + \subFigScale \\%% + \subLabelSuffix%% + \end{tabular}% + }% + \end{picture}% + }% + }% +\end{verbatim} + +The third and last command to determine the content of substituted figures is the one which can +be seen in single-eps wrapped figures. Since I expect a wrapped figure rather high than wide I +rotate the shown information by \comm{90} degrees. The information is + +\begin{itemize} + \item base name of file without path but with extension + \item scaling factor for this eps figure + \item label to this figure +\end{itemize} + +\begin{verbatim} +\newcommand{\wrappedEpsContent}[8][noPar]% + {% + \setlength{\figWidth}{#7 - \frameBoxPenalty}% + \setlength{\figHeight}{#8 - \frameBoxPenalty}% + % + \setlength{\figTabMiddle}{\figWidth / 2 - 6.6mm}% + % + \centerline{\framebox{% + % + \setlength{\unitlength}{1sp}%% + \begin{picture}(\number\figWidth,\number\figHeight)%% + \scriptsize% + \put(\number\figTabMiddle,65536)%% + {% + \rotatebox{90}{% + \begin{tabular}{p{\the\figHeight}}% + \extractminiplotpath{#3}.eps \\%% + #6 (scale) \\%% + \labelPrefix#5 \\%% + \end{tabular}% + }% + }% + \end{picture}%% + }}% + }% +\end{verbatim} + + + + + + %---------------------------------------------------------------- \section{Referencing to figures} +When passing on a lebal to a MiniPlot-function or environment it is not +necessary to write \comm{fig:} or something else. When citing the reference, +however, one needs to write that prefix. The prefix is defined by + +\begin{verbatim} +\newcommand{\labelPrefix}{fig:} +\end{verbatim} + Suppose the label given to a figure is \comm{arranged51dd} then the actual label -assign is \comm{fig:arranged51dd} and thats what needs to be referenced to +assign is \comm{fig:arranged51dd} and that is what needs to be referenced to \begin{verbatim} ... see Figure \ref{fig:arranged51dd} ... \end{verbatim} -... see Figure \ref{fig:arranged51dd} +... see Figure \ref{fig:arranged51dd}...\smallskip -Referencing to sub-sub-figures is not implemented yet but will be done in future -versions as done as the subfigure package describes. That -is for example +Referencing to sub-sub-figures is implemented. The subfigures are labeled by, first the +label prefix, second the base label given by the user and third the position in that specific +sub-figure given by \comm{-a}, \comm{-b}, ... . \begin{verbatim} -... see Figure \ref{fig:arranged51dd-c} ... +\label{\labelPrefix\myLabel-\alph{subfigure}} \end{verbatim} -However, this does not work yet but if somebody knows how to extract the -\comm{a} from \comm{(a)} then it wouldn't be a problem to implement it. - +The reference can be called by simply typing +\begin{verbatim} +... see Figure \ref{fig:arranged51dd-c} ... +\end{verbatim} +... see Figure \ref{fig:arranged51dd-c}...\smallskip +The format of the above reference can be changed by redefining the subfigure-packages definition. @@ -912,7 +1221,7 @@ However, this does not work yet but if somebody knows how to extract the %---------------------------------------------------------------- -\section{Recommendation for working with MiniPlot} +\section{Recommendations for working with MiniPlot} The only recommendation there is is only to set @@ -946,18 +1255,17 @@ When the whole document is finished one simply sets and all the figures will be shown. -Another thing regarding the subfig package is that I would suggest to use -the following setting when implementing loads of figures in an arranged figure -like Figure \ref{fig:arranged31} to \ref{fig:arranged33}. +Another subject regarding the subfig package is that I would suggest to use +the following settings when implementing loads of figures in an arranged figure +environment like Figure \ref{fig:arranged31} to \ref{fig:arranged33}. \begin{verbatim} \renewcommand{\subfigbottomskip}{0pt}% \renewcommand{\subfigcapskip}{0pt}% -\renewcommand{\subfigcapskip}{0pt}% \renewcommand{\subcapsize}{\scriptsize}% \end{verbatim} -These settings are not used for this manual. +These settings are not used in this manual. @@ -969,12 +1277,9 @@ These settings are not used for this manual. \section{The code} I'd like to excuse that the code is not pasted in and not explained as -proper package writers do. I just hope that the comments might give some clue -when trying to understand pieces of \comm{miniplot.sty}. - - - - +proper package writers tend to do. I just hope that the comments in +\comm{miniplot.sty} might give some clue when trying to understand +pieces of it. @@ -982,144 +1287,48 @@ when trying to understand pieces of \comm{miniplot.sty}. %---------------------------------------------------------------- \section{Restrictions when using MiniPlot} -One restriction is that the underscore \_ is not permitted in the +One restriction is that the underscore \_ is not desired in the labels of the figures. This is due to to the fact that MiniPlot displays -the labels and I need to find a proper way of doing this. The simplyfied -explanation would trying to write - -\begin{verbatim} -\newcommand{\examplea}{label_lab} -\examplea -\end{verbatim} - -either MiniPlot cannot display the underscore in text mode or in mathmode -the underscore has a different function and is not displayed neither. I could -imagine there is something like a temporary solution like using the let command -but this goes beyond my \LaTeX \hspace{0mm} capabilities. - -Another restriction is that the path to an arranged figure cannot contain the +the labels and needs to find a proper way of doing this. This is done by the following +command. \begin{verbatim} -\ +\newcommand{\printLabel}[1]{\centerline{ + \small{\emph{Label}: $\mathtt{fig:#1}$}}} \end{verbatim} -sign. This might not be a major restriction. - +In mathmode the underscore has a different function and is not displayed as an underscore. +I could imagine there is a solution like using the \verb+\let+ command +but this goes beyond my \LaTeX \hspace{0mm} capabilities. +Another restriction is that the path to an arranged figure cannot contain the \verb+\+-sign. +This might not be a major restriction. If it is let me know. +Finally, when including a \verb+\subFig[sub-sub-caption]{...+ the sub-sub-caption cannot +be equals \comm{noParMiniPlot}. This shouldn't be too much of a problem. - - - -%---------------------------------------------------------------- -\section{Known bugs} - -There is only one (fixable) bug known which is that when the -columns of the sub-figures are not evenly filled up with -sub-sub-figures the sub-figure shift a little bit as in Figure -\ref{fig:arranged541} to \ref{fig:arranged543}. Compare the upper boundaries -of the two top sub-figures. There is a little vertical shift. - -\begin{arrangedFigure}{2}{4}{arranged541}{top left} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\newSubFig{arranged542}{top right} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% -\newSubFig{arranged543}{bottom} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\end{arrangedFigure} - -However, this can be solved by typing +The number of sub-sub-figures per sub-figure is restriced by the subfigure package to maximum +26 sub-sub-figures. If one needs to have more sub-sub-figures one can redefine \begin{verbatim} -\begin{arrangedFigure}{2}{4}{arranged551}{top left} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\newSubFig{arranged552}{top right} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \setlength{\subFigureAboveCaptionSpace}{2.5mm} -\newSubFig{arranged553}{bottom} - \setlength{\subFigureAboveCaptionSpace}{0mm} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\end{arrangedFigure} +\def\thesubfigure{(\arabic{subfigure})} +\renewcommand{\subLabelSuffix}{-\arabic{subfigure}} \end{verbatim} -using \comm{subFigureAboveCaptionSpace} -and it follows Figure \ref{fig:arranged551} and \ref{fig:arranged553} +Then the sub-sub-figure caption and the sub-label is no more \comm{(a)}, \comm{(b)}, ... but \comm{(1)}, \comm{(2)}, ... . +This allows for more than 26 sub-sub-figures. If one doesn't like the arabic numbering maybe +someone can come up with an algorithm which counts up to \comm{(z)} and then starts with \comm{(aa)} and so on. -\begin{arrangedFigure}{2}{4}{arranged551}{top left} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\newSubFig{arranged552}{top right} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \setlength{\subFigureAboveCaptionSpace}{2.5mm} -\newSubFig{arranged553}{bottom} - \setlength{\subFigureAboveCaptionSpace}{0mm} - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% - \subFig[]{figures/1}% - \subFig[]{figures/2}% - \subFig[]{figures/3}% - \subFig[]{figures/4}% -\end{arrangedFigure} - -This bug might be removed one time in the future. Sugestions are very much welcome! -\clearpage +%---------------------------------------------------------------- +\section{Known bugs} +There is actually just one real bug known. That is that an overhang for an +wrapped-arranged-figure cannot be applied properly. Generally bugs can please be reported to \emph{enxtw1@nottingham.ac.uk} or \emph{tobias\_wahl@gmx.de}. @@ -1130,13 +1339,13 @@ I would be happy to implement it. There are just few awkward things about the code and maybe somebody has an idea how solve things. One thing is that in the following -function the first line seems to introduce a vertical length even if one -simply writes \comm{vspace\{0pt\}}. Due to this strange behavior I had to -introduce the length \comm{subFigureAboveCaptionSpaceDefaultOffset} equals -3mm\footnote{I have to note that this behavior happened at one point and +function the first line seemed\footnote{I have to note that this behavior happened at one point and does not occur annymore. So that \comm{subFigureAboveCaptionSpaceDefaultOffset} is set to zero. However, I decided to leave this in the code in case it might -occur again??}. +occur again??} to introduce a vertical length even if one +simply writes \comm{vspace\{0pt\}\%}. Due to this strange behavior I had to +introduce the length \comm{subFigureAboveCaptionSpaceDefaultOffset} equals +3mm. \begin{verbatim} @@ -1157,23 +1366,74 @@ occur again??}. }% \end{verbatim} -Furthermore in the above command the following command is called +Furthermore, in the above command the following command is called \begin{verbatim} \newcommand{\aboveCaptionSpace}[1]{\setlength{\subFigureAboveCaptionSpace} {#1 + \subFigureAboveCaptionSpaceDefaultOffset}} \end{verbatim} -For some strange reason does the length \comm{subFigureAboveCaptionSpace} -keep its value only in the minipage where I define it. I also cannot set the -length outside the minipage since it did not recognize the cange within it. I -would think that this has something to do with local and global variables but I -normally would have expected the the length in question is a global variable and -known everywhere. +For some strange reason the length \comm{subFigureAboveCaptionSpace} does not +keep its value. Maybe I need to have a look at this again. The command \comm{aboveCaptionSpace} was initially thought to be used instead of setting the length \comm{subFigureAboveCaptionSpace} directly. +In the \verb+\subFig+ command above it was thought to be a replacement of + +\begin{verbatim} + . + \setlength{\subFigureAboveCaptionSpace}{2.5mm} +\newSubFig{arranged553}{bottom} + \setlength{\subFigureAboveCaptionSpace}{0mm} + . +\end{verbatim} + +by typing + +\begin{verbatim} + . +\newSubFig[2.5mm]{arranged553}{bottom} + . +\end{verbatim} + +However, maybe it will work one time. Until then one shouldn't use this +optional parameter. + + +\clearpage + + + + + + + + + +%---------------------------------------------------------------- +\section{Recources} + +One can obtain this and the required package from the following ftp-sites + +\begin{itemize} + \item ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/miniplot + \item ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/subfigure + \item ftp://ftp.dante.de/tex-archive/macros/latex/contrib/other/misc/wrapfig.sty + \item ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/rotating + \item ftp://ftp.dante.de/tex-archive/macros/latex/contrib/supported/rotfloat +\end{itemize} + +or if only the basic sty-files are needed one can obtain them from + +\begin{itemize} + \item ftp://miniplot@128.243.122.176 +\end{itemize} + +The required username and password is \comm{miniplot}. + + + @@ -1207,20 +1467,25 @@ are useful for the user. \setlength{\myStandardFigureWidth}{\linewidth} \setlength{\myStandardSideWaysFigureWidth}{\textheight} +\setlength{\captionWidthPenalty}{0mm} +\setlength{\minimumCaptionWidth}{\linewidth * 4 / 6} +\setlength{\minimumSideWaysCaptionWidth}{\textheight * 4 / 6} + \setlength{\aboveWrapFigureSpace}{0mm} \setlength{\interSubFigSpace}{8mm} \setlength{\interSubSubFigSpace}{2.5mm} -\setlength{\horizontalSubSubFigSpace}{0mm} +\setlength{\horizontalSubSubFigSpace}{-1mm} \setlength{\subFigureAboveCaptionSpaceDefault}{0mm} \setlength{\subFigureAboveCaptionSpace}{0mm} -\setlength{\subFigureBelowCaptionSpace}{3mm} +\setlength{\subFigureBelowCaptionSpace}{5mm} \setlength{\subFigPenalty}{0mm} \setlength{\subSubFigPenalty}{0.001mm} \setlength{\subCaptionPenalty}{0mm} \setlength{\frameBoxPenalty}{2.4mm} +\setlength{\labelPenalty}{-1.5mm} \end{verbatim} @@ -1230,6 +1495,9 @@ are useful for the user. \underline{Commands:} \begin{verbatim} +\newcommand{\labelPrefix}{fig:} +\newcommand{\subLabelSuffix}{-\alph{subfigure}} + \newcommand{\isFirstSubFig}{false} \newcommand{\standardGraphScale}{1} @@ -1246,11 +1514,24 @@ are useful for the user. \includeEpsWrap[narrow lines]{position}{path}{caption}{label}{scaling} \includeEpsWrapNow[narrow lines]{position}{path}{caption}{label}{scaling} -\newcommand{\printLabel}[1]{; \large\textsc{Label}$\Rightarrow$\texttt{fig:#1} +\epsContent[placement]{path}{caption}{label}{scaling}{figure width} + {figure height} +\arrangedFigContent[sub-sub-caption]{path}{figure width}{figure height} +\wrappedEpsContent[lines]{position}{path}{caption}{label}{scaling} + {figure width}{figure height} + +\newcommand{\printLabel}[1]{\centerline{ + \small{\emph{Label}: $\mathtt{fig:#1}$}}} \newSubFig[\subFigureAboveCaptionSpace]{label}{caption} \subFig[sub-sub-caption]{path}% \resetMiniPlot + +\epsContent[placement]{path}{caption}{label}{scaling}{figure width} + {figure height} +\arrangedFigContent[sub-sub-caption]{path}{figure width}{figure height} +\wrappedEpsContent[lines]{position}{path}{caption}{label}{scaling} + {figure width}{figure height} \end{verbatim} |