[cig-commits] [commit] devel: doc: Remove unused commands and packages. (f056c19)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Feb 6 06:09:26 PST 2014


Repository : ssh://geoshell/specfem2d

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/24dca31bf087ee51d2d1db912640d58ade2df07c...a3880316a04510a6c88ed36ceee2fab3c0169f6e

>---------------------------------------------------------------

commit f056c191478276f57a436a4a9356dd4c91648c0a
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Thu Jan 23 19:54:04 2014 -0500

    doc: Remove unused commands and packages.
    
    * epsfig is unused since we're using graphicx+epstopdf.
    * The wrapfig package does not appear used anywhere.
    * Changes to the @ character code seem unnecessary.
    * Also, move packages together instead of between command definitions.


>---------------------------------------------------------------

f056c191478276f57a436a4a9356dd4c91648c0a
 doc/USER_MANUAL/manual_SPECFEM2D.tex |  58 ++--
 doc/USER_MANUAL/wrapfig.sty          | 516 -----------------------------------
 2 files changed, 18 insertions(+), 556 deletions(-)

diff --git a/doc/USER_MANUAL/manual_SPECFEM2D.tex b/doc/USER_MANUAL/manual_SPECFEM2D.tex
index 5fd8319..528f837 100644
--- a/doc/USER_MANUAL/manual_SPECFEM2D.tex
+++ b/doc/USER_MANUAL/manual_SPECFEM2D.tex
@@ -1,34 +1,39 @@
-%% LyX 1.5.1 created this file.  For more info, see http://www.lyx.org/.
-%% Do not edit unless you really know what you are doing.
-\documentclass[oneside,english,onecolumn]{book}
+\documentclass[oneside,english,onecolumn,letterpaper]{book}
 \usepackage[T1]{fontenc}
 \usepackage[latin1]{inputenc}
-\usepackage{geometry}
-\geometry{letterpaper,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
+\usepackage[margin=1in]{geometry}
 \setcounter{secnumdepth}{3}
 \setcounter{tocdepth}{3}
 \usepackage{float}
 \usepackage{textcomp}
 \usepackage{amsmath}
+\usepackage{amssymb}
 
 % figures
-\usepackage[pdftex]{graphicx}
+\usepackage{graphicx}
 
 % we are running pdflatex, so convert .eps files to .pdf
 \usepackage{epstopdf}
 
-\usepackage{amssymb}
 \IfFileExists{url.sty}{\usepackage{url}}
                       {\newcommand{\url}{\texttt}}
 \usepackage[authoryear]{natbib}
 
-\makeatletter
+% fonts
+\usepackage{times}
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
-\newcommand{\noun}[1]{\textsc{#1}}
-%% A simple dot to overcome graphicx limitations
-\newcommand{\lyxdot}{.}
+% hyperlinks to sections and references
+\usepackage[bookmarks=true,%
+            bookmarksnumbered=true,%
+            pdfborder={0 0 0},%
+            pdfstartview=FitH,%
+            pdfpagemode=UseNone,%
+            pdfpagelayout=SinglePage]{hyperref}
 
+% colors to show the corrections
+\usepackage[dvipsnames,usenames]{xcolor}
+
+\usepackage{babel}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 \newenvironment{lyxcode}
@@ -43,19 +48,6 @@
 {\end{list}}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
-%\renewcommand{\baselinestretch}{1.5}
-
-% figures
-\usepackage[dvips]{epsfig}
-
-\usepackage{wrapfig}
-
-
-% fonts
-\usepackage{times}
-
-% hyperlinks to sections and references
-\usepackage[pdftex,bookmarks=true,bookmarksnumbered=true,pdfpagemode=None,pdfstartview=FitH,pdfpagelayout=SinglePage,pdfborder={0 0 0}]{hyperref}
 
 \newcommand{\urlwithparentheses}[1]{(\url{#1})}
 
@@ -73,15 +65,6 @@
 \newcommand{\toalessia}[1]{\textbf{*** Alessia: #1 ***}}
 \newcommand{\todimitri}[1]{\textbf{*** Dimitri: #1 ***}}
 
-\newcommand{\nexxi}{\mbox{\texttt{NEX\_XI\/}}}
-\newcommand{\nexeta}{\mbox{\texttt{NEX\_ETA\/}}}
-\newcommand{\nprocxi}{\mbox{\texttt{NPROC\_XI\/}}}
-\newcommand{\nproceta}{\mbox{\texttt{NPROC\_ETA\/}}}
-\newcommand{\nchunks}{\mbox{\texttt{NCHUNKS\/}}}
-
-% colors to show the corrections
-\usepackage[dvipsnames,usenames]{color}
-
 % colors to show the corrections
 \newcommand{\red}[1]{\textbf{\textcolor{Red}{#1}}}
 \newcommand{\blue}[1]{\textbf{\textcolor{Blue}{#1}}}
@@ -89,13 +72,8 @@
 \newcommand{\green}[1]{\textbf{\textcolor{Green}{#1}}}
 \newcommand{\magenta}[1]{\textbf{\textcolor{Magenta}{#1}}}
 \newcommand{\orange}[1]{\textbf{\textcolor{Orange}{#1}}}
-%\newcommand{\red}[1]{#1}
-%\newcommand{\blue}[1]{#1}
-%\newcommand{\cyan}[1]{#1}
-
-\usepackage{babel}
-\makeatother
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Start of document.
 \begin{document}
 \begin{center}
 \thispagestyle{empty}%
diff --git a/doc/USER_MANUAL/wrapfig.sty b/doc/USER_MANUAL/wrapfig.sty
deleted file mode 100644
index 3da6ba7..0000000
--- a/doc/USER_MANUAL/wrapfig.sty
+++ /dev/null
@@ -1,516 +0,0 @@
-%  W R A P F I G . S T Y    ver 3.3  (Oct 12, 1999)
-%
-%  Copyright (C) 1991,1992,1995,1999   by Donald Arseneau   <asnd at Triumf.ca>
-%  This software is released under the terms of the LaTeX Project 
-%  public license.
-%
-%  Environments "wrapfigure" and "wraptable" place a figure or table
-%  at the side of the page and wrap text around it.
-%
-%  \begin{wrapfigure}[12]{r}[34pt]{5cm} <figure> \end{wrapfigure}
-%                     --  -  ----  ---
-%  [number of narrow lines] {placement} [overhang] {width of figure}
-%
-%  Placement is one of   r, l, i, o, R, L, I, O,  for right, left,
-%  inside, outside, (here / FLOAT).
-%  The figure sticks into the margin by `overhang', if given, or by the
-%  length \wrapoverhang, which is normally zero.
-%  The number of wrapped text lines is normally calculated from the height
-%  of the figure, but may be specified manually ("12" above).
-%
-%  More detailed instructions are given below, following the definitions.
-%  Please direct any problem reports to asnd at Triumf.ca
-
-%%%%%  ----- Begin definitions ----- %%%%%
-
-\@ifundefined{c at WF@wrappedlines}{}{\endinput}
-
-\newdimen\wrapoverhang \wrapoverhang\z@
-\newdimen\WF at size
-\newcount\c at WF@wrappedlines % used globally
-\newbox\WF at box
-\newtoks\WF at everypar
-\newif\ifWF at float
-\let\@@parshape\parshape
-\let\WF@@everypar\everypar
-
-\def\wrapfigure{\def\@captype{figure}\@ifnextchar[\WF at wr{\WF at wr[]}}
-\def\wraptable{\def\@captype{table}\@ifnextchar[\WF at wr{\WF at wr[]}}
-
-\def\WF at wr[#1]#2{% first two args: #1=num lines, #2=placement
-  \xdef\WF at wfname{wrap\@captype\space}%
-  \ifvoid\WF at box\else \WFclear \WF at collision \fi
-  \xdef\WF at place{\string`\@car#2r\@nil}%
-  \ifnum\lccode\WF at place=\WF at place \global\WF at floatfalse
-    \else \global\WF at floattrue \fi
-  \ifx\parshape\WF at fudgeparshape \ifWF at float\else\WF at collision\fi \else
-   \ifx\par\@@par \ifnum\@@parshape>\z@\WF at conflict\fi \else \WF at conflict\fi
-  \fi \gdef\WF at wli{#1}%
-  \@ifnextchar[\WF at rapt{\WF at rapt[\wrapoverhang]}}
-
-\def\WF at rapt[#1]#2{% final two args: #1 = overhang,  #2 = width,
-  \gdef\WF at ovh{#1}% hold overhang for later, when \width is known
-  \global\setbox\WF at box\vtop\bgroup \setlength\hsize{#2}%
-  \ifdim\hsize>\z@ \@parboxrestore \else 
-  \setbox\z@\hbox\bgroup \let\wf@@caption\caption \let\caption\wf at caption 
-  \ignorespaces \fi}
-
-\def\wf at caption{\relax 
-  \ifdim\hsize>\z@ \let\caption\wf@@caption \else
-  \unskip \egroup \hsize\wd\z@ \@parboxrestore \box\z@ \fi \caption}
-
-\def\endwrapfigure{%
-  \ifdim\hsize>\z@ \par\hrule\@width\hsize\@height\z@ % force width
-  \else \unskip \egroup \box\z@ \fi % or end hbox
-  \egroup % end the \vtop; width is known so now is "later"
-  \def\width{\wd\WF at box}\setlength\wrapoverhang{\WF at ovh}%
-  \xdef\WF at ovh{\the\wrapoverhang}% save until wrapping
-  \ifdim\ht\WF at box>\topskip \ht\WF at box\z@ \fi % too much height, set flag.
-  \ifdim\ht\WF at box<.5\p@ % too tall (starts with \vbox) or too short
-   \global\setbox\WF at box\vtop{\vskip-1.4ex\unvbox\WF at box}\fi
-  \global\WF at size\dp\WF at box % box is guaranteed to have little height.
-  \global\advance\WF at size1.5\baselineskip \global\advance\WF at size\tw@\intextsep
-  \aftergroup\WF at startfloating % even when not really floating!
-  \ifWF at float\else \ifhmode
-     {\unskip \parfillskip\z at skip \par \vskip-\parskip}\aftergroup\noindent
-  \fi\fi \global\@ignoretrue}
-\let\endwraptable\endwrapfigure
-
-% Subvert \everypar to float fig and do wrapping.  Also for non-float.
-\def\WF at startfloating{%
- \WF at everypar\expandafter{\the\everypar}\let\everypar\WF at everypar
- \WF@@everypar{\ifvoid\WF at box\else\WF at floathand\fi \the\everypar
- \WF at wraphand
-}}
-
-\def\WF at floathand{%
-\ifx\parshape\WF at fudgeparshape \WF at fltmes\else
-  \ifx\par\@@par\ifnum\@@parshape=\z@\ifdim\hangindent=\z@
-    \setbox\z@\lastbox \begingroup
-    \@@par \WF@@everypar{}\WF at putfigmaybe
-    \endgroup % start wrapping
-    \ifvoid\z@\else\box\z@\fi % replace indentation
-  \else\WF at fltmes\fi\else\WF at fltmes\fi\else\WF at fltmes\fi\fi}
-
-% Put fig here if it fits or if it can't float
-\def\WF at putfigmaybe{%
-\ifinner
-  \vskip-\parskip \global\WF at floatfalse
-  \let\pagetotal\maxdimen % kludge flag for "not top of page"
-\else % outer page
-  \@tempdima\pagedepth % save page depth
-   {\advance\parskip\@tempdima\vskip-\parskip}% back up to baseline
-   \penalty\interlinepenalty % update pg. parameters
-   \@tempdimb\pagegoal \advance\@tempdimb-\pagetotal % room left on page
-   \ifdim\@tempdimb<\z@ % \WF at info{Page overfull already;}%
-      \global\WF at floatfalse
-      \ifdim-\@tempdimb>\pageshrink \else \pagebreak \fi
-   \else
-      \ifdim\WF at size>\@tempdimb
-%        \WF at info{Size \the\WF at size\space does not fit in \the\@tempdimb}%
-         \ifWF at float \dimen at .5\baselineskip \else \dimen@ 2\baselineskip\fi
-         \ifdim\pagestretch>\dimen@ \dimen@\pagestretch \fi
-         \ifdim\pagefilstretch>\z@ \dimen@\@tempdimb \fi
-         \ifdim\pagefillstretch>\z@ \dimen@\@tempdimb \fi
-         \advance\dimen at .5\baselineskip
-         \ifdim\dimen@>\@tempdimb % \WF at info{Page nearly full; can stretch}%
-            \global\WF at floatfalse \pagebreak
-         \fi
-      \else % \WF at info{Fits in \the\@tempdimb;}%
-         \global\WF at floatfalse
-   \fi\fi
-   \vskip\@tempdima\relax % (return erased page depth)
-\fi
-\noindent
-\ifWF at float
-  \WF at fltmes
-\else % putting here;
-  \WF at info{Put \WF at wfname here:}%
-  {\ifodd\if at twoside\c at page\else\@ne\fi % assign l/r to i/o placement
-    \lccode`i`l\lccode`o`r\else \lccode`i`r\lccode`o`l\fi
-    \xdef\WF at place{\the\lccode\lccode\WF at place}}% twice to get only l or r
-  \hbox to\z@{% llap or rlap depending on {l} or {r}; calc effective width
-   \@tempdima\wd\WF at box \@tempdimb\WF at ovh
-   \advance\@tempdima-\@tempdimb \advance\@tempdima\columnsep
-   \@tempdimb\hsize \advance\@tempdimb-\@tempdima
-   \ifnum `l=\WF at place % fig on left
-    \hss % figure overlaps space to the left
-    \def\@tempa{\kern\columnsep}% position to left of the gap
-   \else  %  fig on right
-    \@tempdima\z@ % no left indentation
-    \kern\@tempdimb \kern\columnsep
-    \def\@tempa{\hss}% figure overlaps space to the right
-   \fi
-   \ifdim\@tempdimb<\hsize
-    \xdef\WF at wrapil{\the\@tempdima \the\@tempdimb}% indentation and length
-   \else
-    \xdef\WF at wrapil{\z@ \the\hsize}%
-   \fi
-   \ifdim\pagetotal=\z@ % \WF at info{Put \WF at wfname at top of p.\thepage}%
-    \global\advance\WF at size-\intextsep
-   \else % \WF at info{Putting \WF at wfname in middle of page}%
-    \setbox\WF at box\hbox{\lower\intextsep\box\WF at box}%
-   \fi \dp\WF at box\z@ \box\WF at box \@tempa
-  }% end \hbox to 0pt
-  \aftergroup\WF at startwrapping % after the \endgroup which immediately follows
-\fi}
-
-\def\WF at startwrapping{%
- \ifx\WF at wli\@empty
-  {\advance\WF at size1.1\baselineskip
-  \divide\WF at size\baselineskip \global\c at WF@wrappedlines\WF at size}%
- \else
-  \setcounter{WF at wrappedlines}{\WF at wli}\global\advance\c at WF@wrappedlines\@ne
- \fi
- \ifnum\c at WF@wrappedlines>\@ne
-  \let\parshape\WF at fudgeparshape \let\WF at pspars\@empty \let\WF@@par\par
-  \def\@setpar##1{\def\WF@@par{##1}}\def\par{\@par}\let\@par\WF at mypar
-  \xdef\WF at restoretol{\tolerance\the\tolerance}\tolerance9999
- \fi}
-
-\def\WF at wraphand{%
-\ifnum\c at WF@wrappedlines<\tw@ \WF at finale
-\else \begingroup % Create \parshape command:
- \@tempcnta\@ne \let\WF at wrapil\relax \gdef\WF at ps{}%
- \@whilenum \@tempcnta<\c at WF@wrappedlines\do{% repeated indentation, length
-  \xdef\WF at ps{\WF at ps\WF at wrapil}\advance\@tempcnta\@ne
- }\endgroup
- \ifx\WF at pspars\@empty
-  \@@parshape\c at WF@wrappedlines \WF at ps \WF at noil
- \else % use external `parshape' values to modify my parshape
-  \WF at modps
-\fi\fi}
-
-\def\WF at mypar{\relax
- \WF@@par % what the rest of LaTeX expects \par to be (usually \@@par)
- \ifnum\@@parshape=\z@ \let\WF at pspars\@empty \fi % reset `parshape'
- \global\advance\c at WF@wrappedlines-\prevgraf \prevgraf\z@
- \ifnum\c at WF@wrappedlines<\tw@ \WF at finale \fi}
-
-\def\WF at modps{\begingroup
-  \afterassignment\@tempdimb \@tempdima\WF at pspars % a=ind, b=wid
-  \afterassignment\dimen@\advance\@tempdima\WF at wrapil
-  \advance\@tempdimb\dimen@ \advance\@tempdimb-\hsize
-  \def\WF at wrapil{\the\@tempdima \the\@tempdimb}%
-  \edef\@tempb{\@@parshape\c at WF@wrappedlines \WF at ps \WF at pspars}%
-  \expandafter\endgroup\@tempb}
-
-\let\@@setpar\@setpar
-\def\WF at noil{\z@ \hsize}
-\let\WF at pspars\@empty
-
-\def\WF at fudgeparshape{\relax \ifnum\c at WF@wrappedlines<\tw@ \WF at finale
-  \else \afterassignment\WF at fudgeparshapee \fam \fi}
-\def\WF at fudgeparshapee{\ifnum\fam=\@ne \expandafter \WF at parshapeee \else
-  \WF at conflict \@@parshape\fam \fi}
-\def\WF at parshapeee#1#2{\begingroup
-  \delimitershortfall#1\nulldelimiterspace#2\edef\@tempa{%
-   \def\noexpand\WF at pspars{\the\delimitershortfall \the\nulldelimiterspace}}%
-  \expandafter\endgroup\@tempa \WF at wraphand}
-
-\def\WF at finale{\ifx\parshape\WF at fudgeparshape
- \WF at restoretol \let\@setpar\@@setpar \let\par\WF@@par
- \WF at info{Finish wrapping text}%
- \ifx\par\@@par \def\@par{\let\par\@@par\par}\else \let\@par\WF@@par \fi
- \let\parshape\@@parshape
- \parshape\ifx\WF at pspars\@empty \z@ \else \@ne \WF at pspars\fi \fi
- \ifvoid\WF at box \ifx\everypar\WF at everypar
-  \let\everypar\WF@@everypar \everypar\expandafter{\the\WF at everypar}%
- \fi\fi}
-
-\newcommand{\WFclear}{\par 
- \ifvoid\WF at box\else \vskip\bigskipamount \box\WF at box
- \let\everypar\WF@@everypar \everypar\expandafter{\the\WF at everypar}%
- \fi \global\c at WF@wrappedlines\z@ \WF at finale}
-
-\begingroup
- \toks0={\let\everypar\WF@@everypar \everypar\expandafter{\the\WF at everypar}%
-   \let\parshape\@@parshape \let\@setpar\@@setpar }
- \toks1=\expandafter{\@arrayparboxrestore}
- \toks2=\expandafter{\clearpage}
- \edef\@tempa{\def\noexpand\@arrayparboxrestore{\the\toks0 \the\toks1}%
-      \def\noexpand\clearpage{\noexpand\protect\noexpand\WFclear \the\toks2}}
- \expandafter
-\endgroup\@tempa
-
-\@ifundefined{@capwidth}{\let\@capwidth\hsize}{}% Pamper RevTeX's Stupidity
-
-\def\WF at conflict{\WF at warning
- {\WF at wfname used inside a conflicting environment}}
-\def\WF at collision{\WF at warning{Collision between wrapping environments}}
-\def\WF at fltmes{\ifWF at float \WF at info{\WF at wfname floats}%
- \else \WF at warning{Stationary \WF at wfname forced to float}\fi}
-
-\let\WF at warning\@warning
-\let\WF at info\@gobble
-
-\@ifundefined{DeclareOption}{\endinput}{}
-
-\def\WF at warning{\PackageWarning{wrapfig}}
-\ProvidesPackage{wrapfig}[1999/10/12 \space  v 3.3]
-\DeclareOption{verbose}{\def\WF at info{\PackageInfo{wrapfig}}}
-\ProcessOptions
-\AtEndDocument{\WFclear}
-
-\endinput
-
-%%%%%  ----- End definitions ----- %%%%%
-
-%%%%%  ----- Begin Instructions ----- %%%%%
-
-
-W R A P F I G . S T Y  \ \  ver 3.3 \ \ (Oct 12, 1999)
-
-Copyright (C) 1991,1992,1995,1999 by Donald Arseneau  (asnd at Triumf.ca)
-
-Wrapfig.sty provides the environments "wrapfigure" and "wraptable" for
-typesetting a narrow float at the edge of the text, and making the text
-wrap around it.  The "wrapfigure" and "wraptable" environments interact
-properly with the "\caption" command to produce proper numbering, but
-they are not regular floats like "figure" and "table", so (beware!) they
-may be printed out of sequence with the regular floats.  There are four
-parameters for "\begin{wrapfigure}", two optional and two required, plus
-the text of the figure, with a caption perhaps:
-
-   \begin{wrapfigure}[12]{r}[34pt]{5cm} <figure> \end{wrapfigure}
-                      ==  =  ====  ===
-   [number of narrow lines] {placement} [overhang] {width}
-
-Some idiosyncrasies:
-
-  - You must not specify a wrapfigure in any type of list environment or
-    or immediately before or immediately after one.  It is OK to follow
-    a list if there is a blank line ("\par") in between.
-
-  - If you put a wrapfigure in a parbox or a minipage, or any other type
-    of grouping, the text wrapping should end before the group does.
-
-  - It does work in two-column format, but are your figures that small?
-
-  - It may be out of sequence with regular floats.
-
-  - The hlines that may be printed above and below floats are ignored;
-    you must insert them manually if desired.
-
-  - "\linewidth" is not adjusted within the wrapped text (because it can
-    only be set for whole paragraphs at a time).  It is set within the
-    figure.
-
-\section{Placement and Floating}
-
-Parameter "#2" (required) is the figure placement code, but the valid
-codes are different from regular figures.  They come in pairs: an
-uppercase version which allows the figure to float, and a lowercase
-version that puts the figure ``exactly here''.
-
-  r  R  -  the right side of the text
-  l  L  -  the left side of the text
-  i  I  -  the inside edge--near the binding (if "[twoside]" document)
-  o  O  -  the outside edge--far from the binding
-
-You should specify one code only, not a list.  The figure or table must
-be on one side or the other; it cannot be in the middle with text on
-both sides.  The "i" and "o" options refer to the inside and outside of
-the whole page, not individual columns.
-
-The ability to float is somewhat restricted, and you will get best results
-by giving exact manual placement, but floating is more convenient while
-revising the document.  Any changes to the formatting can ruin your manual
-positioning so you should adjust the placement just before printing a
-final copy.  Here are some tips for good placement:
-
-  - The environment should be placed so as to not run over a page break.
-
-  - The environment must not be placed in special places like lists.
-
-  - For esthetic reasons, only plain text should wrap around the figure.
-    Section titles and big equations look bad; lists are bad if the figure 
-    is on the left.  (All these function properly, they just don't look 
-    very good.)  Small equations look fine.
-
-  - It is convenient to begin the environment between paragraphs, but if
-    you want placement in the middle of a paragraph, you must put the
-    environment between two words where there is a natural line break.
-
-When floating, \LaTeX\ tries to apply these rules.  More specifically,
-a floated wrapping environment will only begin...
-
-  - at the beginning of a paragraph,
-
-  - when there is enough room on the page, or it is possible to go on
-    the next page,
-
-  - if the `paragraph' is not in a section title or a list,
-
-  - if the paragraph is not wrapping around another figure,
-
-  - in the main text (not in a minipage etc.)
-
-It is possible that a non-floating wrapfigure will be forced to float
-when an earlier one is still being processed.  A warning will be written
-in that case.  You can have more information about the floating process
-written to the log file by specifying "\usepackage[verbose]{wrapfig}".
-
-If there is a lot of flexibility on a page, a floating wrapfigure may
-be placed badly; you must turn to manual placement.  A rare problem is
-that floats and footnotes specified within the wrapping text can also
-cause poor placement and bad formatting.
-
-
-\section {Sizing and optional overhang}
-
-Parameter "#4" (the second required parameter) is the width of the figure
-or table.  Given the way that \LaTeX\ puts just about everything into boxes 
-with the current line-width, the width parameter will take precedence over 
-whatever natural width the figure has.  In particular, the caption is always 
-typeset with the specified width.  If the figure is wider than the space 
-allotted, you will get an ``overfull box'' warning.
-
-However, if you specify a width of *zero* ("0pt"), the actual width of
-the figure will determine the wrapping width.  A following "\caption"
-should have the same width as the figure, but it might fail badly; it
-is safer to specify a width when you use a caption.
-
-\LaTeX\ will wrap surrounding text around the figure, leaving a gap of
-"\intextsep" at the top and bottom, and "\columsep" at the side, by
-producing a series of shortened text lines beside the figure.  The
-indentation (shortening) of the text is the figure width plus "\columnsep"
-minus overhang (if any; see below).
-
-\LaTeX\ calculates the number of short lines needed based on the height
-of the figure and the length "\intextsep".  You can override this guess
-by giving the first optional argument (parameter "#1") specifying the
-number of shortened lines (counting each displayed equation as 3 lines).
-This is particularly useful when the surrounding text contains extra
-vertical spacing that is not accounted for automatically.
-
-The second optional parameter ("#3") tells how much the figure should
-hang out into the margin. The default overhang is given by the length
-"\wrapoverhang", which is "0pt" normally but can be changed using
-"\setlength".  For example, to have all wrapfigures use the space
-reserved for marginal notes,
-
-    \setlength{\wrapoverhang}{\marginparwidth}
-    \addtolength{\wrapoverhang}{\marginparsep}
-
-When you do specify the overhang explicitly for a particular figure, you
-can use a special unit called "\width" meaning the width of the figure.
-For example, "[0.5\width]" makes the center of the figure sit on the
-edge of the text, and "[\width]" puts the figure entirely in the margin
-(and the adjacent text is indented by just "\columnsep").  This "\width"
-is the actual width of the wrapfigure, which may be greater than the 
-declared width.
-
-
-\section{Some Random Implementation Notes}
-
-Unfortunately, \LaTeX's system of setting "\everypar" and "\par" is
-unable to coexist peacefully with a wrapping environment, so I was
-forced to subvert the "\@setpar" mechanism and "\everypar".  ("\everypar"
-is already subverted once by NFSS.)
-
-When checking the room left on the page, remember that if there is less
-than "\baselineskip" the new paragraph will begin on the next page, even
-if there is no page stretch. If non-floating, I force a bad page break
-rather than have the figure hang into the bottom margin.
-
-Here are notes on various variables and some macros; what info they
-store and how they are used.
-
-  \WF at wli - number-of-wrapped-lines parameter, saved for start of wrapping.
-     Set globally by "\WF at wr" (set empty if no optional parameter given).
-     The floating mechanism ignores this and uses the real size.
-
-  \WF at ovh - margin overhang set globally by "\WF at rapt", saved until placing
-     figure (but not reset).  Actually, the setting is very tricky so that
-     the expected values are used when a figure floats. First, the expression
-     is saved without evaluation by "\WF at rapt" ("\begin{wrapfigure}") because
-     "\width" is still unknown.  Soon after that, "\endwrapfigure" executes
-     "\WF at ovh" to evaluate the overhang and save the result (so that changes
-     to "\wrapoverhang" while this figure is floating won't affect this
-     figure). Finally, it is used by "\WF at putfigmaybe" when printing the fig.
-
-  \WF at place - a macro that is used as a number, giving the placement code.
-     It might start out as "`I" and later be converted to "114" (r).
-
-  \WF at box - tested for void at "\begin{wrapfigure}", to avoid collisions,
-     by "\everypar" to do floating, and by "\WF at finale" before resetting
-     "\everypar".  Voided globally when used by "\WF at putfigmaybe" (or by
-     "\WF at wr" if an old figure must be dumped prematurely).
-
-  \par - test if it is "\@@par" by "\begin{wrapfigure}" and "\WF at floathand"
-     to float past special environments.  It is set to "\@par" ("\WF at mypar")
-     by "\WF at startwrapping", and restored by an end-group (bad!) or by
-     "\WF at finale" (good).  It is protected from change by redefining
-     "\@setpar".
-
-  \parshape - let to "\WF at fudgeparshape" by "\WF at startwrapping", so lists
-     will continue wrapping; "\@@parshape" preserves the real "\parshape"
-     command, and it is restored by "\WF at finale" or "\@parboxrestore".
-     "\WF at floathand" and "\WF at wr" test if old wrapping is still in progress
-     with "\ifx\parshape\WF at fudgeparshape". The value of "\@@parshape" is
-     also tested to float past lists and other wrapping environments.
-
-  \hangindent - tested to float past section titles etc.
-
-  \c at WF@wrappedlines - the number of shortened lines + 1; set globally by
-     "\WF at startwrapping" and decremented by "\par" ("\WF at mypar").  It is > 1
-     only when wrapping is incomplete.  "\WF at wraphand", "\WF at fudgeparshape",
-     and "\WF at mypar" test the number for calling "\WF at finale".  It may get
-     stuck at some high value if "\par" is restored by an end-group, (and
-     wrapping is terminated prematurely) so it is unwise to use this as a
-     test for wrapping-complete.
-
-  \pagetotal - one of many parameters used to compute floating.  When
-     putting a wrapfigure in a parbox, I assign "\let\pagetotal\maxdimen"
-     (locally!) to signal not-top-of-page and no floating.
-
-  \WF at pspars - the "\parshape" parameters as LaTeX sets them for lists
-     ("\WF at fudgeparshape"); when wrapping I test it and use it to modify my
-     own real params for the paragraph.  They are also used when "\parshape"
-     is restored after wrapping.
-
-  \WF at finale - is performed by "\par" when wrapping should end.  However,
-     that might happen inside a group (a list especially), so the subverted
-     versions of "\par", "\parshape" etc. will be reinstated when the group
-     ends.  Thus, they must themselves test "\c at WF@wrappedlines" < 2 to see
-     when wrapping is over, and if so, they should just do "\WF at finale" again.
-
-These are the tests to see if a floating wrapfigure will fit at a particular
-spot.  These tests are performed at the beginning of every paragraph after
-the figure, except in lists etc.  ("\pagegoal" - "\pagetotal" is the room
-left on the page.)
-
-  >
-  room_left := \pagegoal - \pagetotal
-  if  room_left < 0  then page overfull already: put figure (on next page)
-  else
-     if  figure_size > room_left  then does not fit
-        if  max(min_stretch, \pagestretch) + extra > room_left
-           then page can stretch until full: put figure (at top of next page)
-        fi
-     else figure fits: put figure
-  fi fi
-  <
-
-Even if a wrapfigure is not floating, it will go through the same logic
-to generate a "\pagebreak", and maybe an underfull page, when the current
-page can stretch until full.  The "min_stretch" depends on whether it is
-floating or not: ".5\baselineskip" (floating) "2\baselineskip" (not). The
-"extra" is ".5\baselineskip" in either case.  These values can be adjusted.
-
-There are some other `magic numbers' for floating that aren't really so
-special, but you must change them together if you change them at all.
-To make floating wrapfigures float less and fit on pages more frequently,
-but not change the number of wrapped lines, decrease the "1.5" in
-"\global\advance\WF at size1.5\baselineskip" and increase the "1.1" in
-"\advance\WF at size1.1\baselineskip" by the same amount (and vice versa).
-To make more (or fewer) wrapped lines for the same size figure, without
-changing the floating, change "1.1" in "\advance\WF at size1.1\baselineskip"
-unilaterally.
-
-%%%%%  ----- End Instructions ----- %%%%%
-
-Test file integrity:  ASCII 32-57, 58-126:  !"#$%&'()*+,-./0123456789
-:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
-



More information about the CIG-COMMITS mailing list