summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-18 22:32:09 +0000
committerKarl Berry <karl@freefriends.org>2011-10-18 22:32:09 +0000
commitd24a85e142ac2face2c46d8d9bb21b7225bc5707 (patch)
treea4f9ce38502f72ec9e711a1ae414e1bf2b414623 /Master/texmf-dist/tex
parentfede1540ce6f021bff42a29058b2a86f9f5af5e5 (diff)
marginfix (17oct11)
git-svn-id: svn://tug.org/texlive/trunk@24320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/marginfix/marginfix.sty35
1 files changed, 1 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/latex/marginfix/marginfix.sty b/Master/texmf-dist/tex/latex/marginfix/marginfix.sty
index f05168d0661..673b38a8765 100644
--- a/Master/texmf-dist/tex/latex/marginfix/marginfix.sty
+++ b/Master/texmf-dist/tex/latex/marginfix/marginfix.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% marginfix.dtx (with options: `package,debug')
+%% marginfix.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
@@ -27,8 +27,6 @@
\chardef\@ight=8
\chardef\f@ur=4
\chardef\@c=100
-\def\MFX@debug{\@ifstar\message{\message{^^JMFX:}\message}}
-\errorcontextlines=20
\newif\ifmfx@ypos
\DeclareOption{ypos}{\mfx@ypostrue}
\ProcessOptions\relax
@@ -42,14 +40,11 @@
\newdimen\marginposadjustment
\def\@addmarginpar{%
\@next\@marbox\@currlist{}\MFX@bug
-\MFX@debug{addmarginpar (running insert) \@marbox/\@currbox at
- \the\c@page:\the\@pageht, marginlist=\meaning\mfx@marginlist}%
\MFX@getypos
\MFX@cons\mfx@marginlist{% TODO: later this will be a run@marginlist
\noexpand\mfx@margin@note\@marbox\@currbox{\mfx@ypos}% (^i.e. for phantoms)
\noexpand\mfx@margin@skip{\the\marginparpush}%
}%
-\MFX@debug{addmarginpar (exit): marginlist=\meaning\mfx@marginlist}%
}
\def\MFX@cons#1#2{%
\edef\temp@{#2}%
@@ -83,7 +78,6 @@
\Mfx@marginheight\marginheightadjustment
}
\def\MFX@attachmargin{%
-\MFX@debug{attachmargin}%
\ifdim\ht\@outputbox<\ht\Mfx@marginbox
\setbox\@outputbox\vbox to \ht\Mfx@marginbox{%
\box\@outputbox
@@ -108,13 +102,10 @@
}
\def\MFX@buildmargin{%
\advance\Mfx@marginheight\@colroom
-\MFX@debug{buildmargin: marginheight=\the\Mfx@marginheight}%
\MFX@buildmargin@down
\MFX@buildmargin@up
}
\def\MFX@buildmargin@down{%
-\MFX@debug{buildmargin@down: ENTRY}%
-\MFX@debug{marginlist=\meaning\mfx@marginlist}%
\let\mfx@margin@note\MFX@margin@note@down
\let\mfx@margin@skip\@gobble
\let\mfx@margin@clear\MFX@margin@clear@down
@@ -122,28 +113,20 @@
\expandafter\global\expandafter\let
\expandafter\mfx@marginlist\expandafter\@empty
\mfx@marginlist
-\MFX@debug{buildmargin@down: RETURN}%
-\MFX@debug{marginlist=\meaning\mfx@marginlist}%
}
\def\MFX@margin@note@down#1#2#3{%
-\MFX@debug{note@down: ENTRY: #1/#2 at #3}%
\ifdim#3>\Mfx@marginpos
\dimen@\dimexpr#3-\Mfx@marginpos\relax
-\MFX@debug{note@down: adding compressible \the\dimen@}%
\MFX@snoc\mfx@marginout{\noexpand\mfx@margin@compressible{\the\dimen@}}%
\advance\Mfx@marginpos\the\dimen@
\fi
\MFX@whichbox#1#2%
\advance\Mfx@marginboxspace\dimexpr\ht\@marbox+\dp\@marbox\relax
\ifdim\Mfx@marginboxspace>\Mfx@marginheight
-\MFX@debug{note@down: out of space:
- \the\Mfx@marginboxspace>\the\Mfx@marginheight}%
\advance\Mfx@marginboxspace\dimexpr-\ht\@marbox-\dp\@marbox\relax
\mfx@margin@clear
\mfx@margin@note#1#2{#3}%
\else
-\MFX@debug{note@down: adding \@marbox
- ht \the\ht\@marbox dp \the\dp\@marbox}%
\advance\Mfx@marginpos\dimexpr\ht\@marbox+\dp\@marbox\relax
\MFX@snoc\mfx@marginout{%
\noexpand\mfx@margin@note\@marbox
@@ -152,8 +135,6 @@
}%
\fi
\let\mfx@margin@skip\MFX@margin@skip@down
-\MFX@debug{note@down: RETURN space=\the\Mfx@marginboxspace,
- pos=\the\Mfx@marginpos}%
}
\def\MFX@whichbox#1#2{%
\if\MFX@leftmargin
@@ -161,16 +142,13 @@
\else
\def\@marbox{#2}%
\fi
-\MFX@debug{whichbox: \@marbox}%
}
\def\MFX@margin@skip@down#1{%
-\MFX@debug{skip@down #1}%
\advance\Mfx@marginpos#1\relax
\advance\Mfx@marginboxspace#1\relax
\MFX@snoc\mfx@marginout{\noexpand\mfx@margin@skip{#1}}%
}
\def\MFX@margin@clear@down{%
-\MFX@debug{clear@down}%
\def\mfx@margin@note##1##2##3{%
\MFX@cons\mfx@marginlist{\noexpand\mfx@margin@note##1##2{\MFX@minus@inf}}}%
\def\mfx@margin@skip##1{%
@@ -190,35 +168,26 @@
\if@reversemargin
\@tempcnta-\@tempcnta
\fi
-\MFX@debug{margin on \ifnum\@tempcnta<\z@ left\else right\fi}%
\ifnum\@tempcnta<\z@ % start a new \if
}
\def\MFX@buildmargin@up{%
-\MFX@debug{buildmargin@up: excess=\the\dimexpr
- \Mfx@marginpos-\Mfx@marginheight\relax}%
-\MFX@debug{marginout=\meaning\mfx@marginout}
\let\mfx@margin@note\MFX@margin@note@up
\let\mfx@margin@compressible\MFX@margin@skip@gobble@up
\let\mfx@margin@skip\MFX@margin@skip@gobble@up
\mfx@marginout
}
\def\MFX@margin@skip@gobble@up#1{%
-\MFX@debug{skip@gobble@up: #1}%
\advance\Mfx@marginpos-#1\relax
}
\def\MFX@margin@note@up#1{%
-\MFX@debug{note@up: #1}%
\setbox\Mfx@marginbox\vbox{\box#1\unvbox\Mfx@marginbox}%
\let\mfx@margin@skip\MFX@margin@skip@up
\let\mfx@margin@compressible\MFX@margin@compressible@up
}
\def\MFX@margin@skip@up#1{%
-\MFX@debug{skip@up: #1}%
\setbox\Mfx@marginbox\vbox{\vskip#1\relax\unvbox\Mfx@marginbox}%
}
\def\MFX@margin@compressible@up#1{%
-\MFX@debug{compressible@up: #1, excess=\the\dimexpr
- \Mfx@marginpos-\Mfx@marginheight\relax}%
\dimen@#1\relax
\ifdim\Mfx@marginpos>\Mfx@marginheight
\advance\dimen@\dimexpr\Mfx@marginheight-\Mfx@marginpos\relax
@@ -232,14 +201,12 @@
\fi
}
\def\dumpmargins{%
-\MFX@debug{dumpmargins}%
\loop
\unless\ifx\mfx@marginlist\@empty
\let\temp@\mfx@marginlist
\vbox{}\clearpage
\ifx\temp@\mfx@marginlist
\PackageError{marginfix}{lost some margin notes%
-: \meaning\mfx@marginlist
}\@eha
\let\mfx@marginlist\@empty % be nicer by just dropping one?
% TODO: also, set an emergency mode to allow oversized notes