summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdfmarginpar
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-11-20 10:42:18 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-11-20 10:42:18 +0000
commit727025f920d13bfa0292fb04ac97117b07a02ae2 (patch)
treed67c44171e33da9ef231711e2bf4b84c65faf711 /Master/texmf-dist/tex/latex/pdfmarginpar
parent64e6072a5dad1d9eb63e27bbb1a00ff4278e49fe (diff)
pdfmarginpar update 0.9
git-svn-id: svn://tug.org/texlive/trunk@16102 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfmarginpar')
-rw-r--r--Master/texmf-dist/tex/latex/pdfmarginpar/pdfmarginpar.sty56
1 files changed, 50 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmarginpar/pdfmarginpar.sty b/Master/texmf-dist/tex/latex/pdfmarginpar/pdfmarginpar.sty
index 6dfaf05324a..eab76a03b5f 100644
--- a/Master/texmf-dist/tex/latex/pdfmarginpar/pdfmarginpar.sty
+++ b/Master/texmf-dist/tex/latex/pdfmarginpar/pdfmarginpar.sty
@@ -36,7 +36,7 @@
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%
%--------------------------------------------
-\ProvidesPackage{pdfmarginpar}[2008/09/21 Version 0.8]
+\ProvidesPackage{pdfmarginpar}[2009/10/13 Version 0.9]
\RequirePackage{pgfkeys}
@@ -45,15 +45,24 @@
\pgfqkeys{/pdfmarginpar}{
Subtype/.is choice,
Subtype/Text/.code={\def\pdfmarginpar@SubType{/Text}},
+ Subtype/FreeText/.code={\def\pdfmarginpar@SubType{/FreeText}\pgfkeysalso{Name=none}},
+ Subtype/Other/.code={\def\pdfmarginpar@SubType{/#1}},
Subtype=Text,
Open/.is choice,
Open/true/.code={\def\pdfmarginpar@OPEN{true}},
Open/false/.code={\def\pdfmarginpar@OPEN{false}},
- Open=false,
+ Open=true,
+ FreeText/.style={Subtype/FreeText},
+ %
+ caption/.code={\def\pdfmarginpar@textlabel{#1}},
%
voffset/.initial=0pt,
hoffset/.initial=0pt,
%
+ width/.initial=,
+ height/.initial=,
+ depth/.initial=,
+ %
Name/.is choice,
Name/Comment/.code={\def\pdfmarginpar@NAME{/Comment}},
Name/Key/.code={\def\pdfmarginpar@NAME{/Key}},
@@ -62,6 +71,7 @@
Name/NewParagraph/.code={\def\pdfmarginpar@NAME{/NewParagraph}},
Name/Paragraph/.code={\def\pdfmarginpar@NAME{/Paragraph}},
Name/Insert/.code={\def\pdfmarginpar@NAME{/Insert}},
+ Name/none/.code={\def\pdfmarginpar@NAME{}},
%
Comment/.style={Name=Comment,voffset=1.3\baselineskip},
Key/.style={Name=Key,voffset=\baselineskip},
@@ -70,15 +80,17 @@
Paragraph/.style={Name=Paragraph,voffset=\baselineskip},
Insert/.style={Name=Insert,voffset=0pt,hoffset=-1.5ex},
NewParagraph/.style={Name=NewParagraph,voffset=0pt,hoffset=-1.5ex,CA=0.7},
+ none/.style={},
%
Comment,
- C/.initial={[1 0 0]},
+ C/.initial={[1 1 0]},
color/.style={C={#1}},
CA/.initial=0.5,
opacity/.style={CA={#1}},
Subj/.store in=\pdfmarginpar@Subj,
Subject/.style={Subj={#1}},
Subj={Comment},
+ caption=Author's Note,
}
% Usage:
@@ -89,27 +101,59 @@
\pgfqkeys{/pdfmarginpar}{#1}%
\toks0={#2}%
\toks1=\expandafter{\pdfmarginpar@Subj}%
+ \toks2=\expandafter{\pdfmarginpar@textlabel}%
\pgfkeysgetvalue{/pdfmarginpar/voffset}\pdfmarginpar@voffset
\pgfkeysgetvalue{/pdfmarginpar/hoffset}\pdfmarginpar@hoffset
+ \pgfkeysgetvalue{/pdfmarginpar/width}\pdfmarginpar@wd
+ \pgfkeysgetvalue{/pdfmarginpar/height}\pdfmarginpar@ht
+ \pgfkeysgetvalue{/pdfmarginpar/depth}\pdfmarginpar@dp
+ \def\pdfmarginpar@rulespec{}%
+ \ifx\pdfmarginpar@wd\pgfutil@empty
+ \else
+ \expandafter\def\expandafter\pdfmarginpar@rulespec\expandafter{%
+ \pdfmarginpar@rulespec
+ width \pdfmarginpar@wd\space
+ }%
+ \fi
+ \ifx\pdfmarginpar@ht\pgfutil@empty
+ \else
+ \expandafter\def\expandafter\pdfmarginpar@rulespec\expandafter{%
+ \pdfmarginpar@rulespec
+ height \pdfmarginpar@ht\space
+ }%
+ \fi
+ \ifx\pdfmarginpar@dp\pgfutil@empty
+ \else
+ \expandafter\def\expandafter\pdfmarginpar@rulespec\expandafter{%
+ \pdfmarginpar@rulespec
+ depth \pdfmarginpar@dp\space
+ }%
+ \fi
+ %
%\ifvmode\noindent\fi
\vbox to 0pt{\hsize=0pt
- \vss
\noindent
\raise\pdfmarginpar@voffset
\hbox to 0pt{\vsize=0pt%
\hskip\pdfmarginpar@hoffset
- \pdfannot {
+ \expandafter\pdfannot \pdfmarginpar@rulespec {
/Subtype \pdfmarginpar@SubType
/Open \pdfmarginpar@OPEN
- /Name \pdfmarginpar@NAME
+ \ifx\pdfmarginpar@NAME\pgfutil@empty
+ \else
+ /Name \pdfmarginpar@NAME
+ \fi
+ /T (\the\toks2)
/C \pgfkeysvalueof{/pdfmarginpar/C}
/CA \pgfkeysvalueof{/pdfmarginpar/CA}
/Subj (\the\toks1)
/Contents (\the\toks0)
+ /F 4 % print it!
}%
\hss
}%
%\hss
+ \vss
}%
}}%