summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/notes2bib
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-10-28 22:19:43 +0000
committerKarl Berry <karl@freefriends.org>2007-10-28 22:19:43 +0000
commit8194be0d381007aea01bfe7bce63ad7d10291d66 (patch)
tree1578ed5767160ebe84a0acdfd9fe88f420ae0ef7 /Master/texmf-dist/tex/latex/notes2bib
parent2dda0af8aa0d9601d3e62134b33289044aed6ad5 (diff)
notes2bib update (27oct07)
git-svn-id: svn://tug.org/texlive/trunk@5298 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/notes2bib')
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty49
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty149
2 files changed, 140 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty b/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty
index 71327c89cb7..f568592299f 100644
--- a/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty
+++ b/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty
@@ -15,13 +15,14 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{jawltxdoc}
- [2007/09/28 v1.0]
+ [2007/10/23 v1.0 Formatting for .dtx files (JAW)]
\usepackage[T1]{fontenc}
\usepackage[english,UKenglish]{babel}
\usepackage[scaled=0.95]{helvet}
\usepackage[version=3]{mhchem}
\usepackage[final]{microtype}
-\usepackage{mathpazo,booktabs,array,url,graphicx,courier,unitsdef}
+\usepackage[osf]{mathpazo}
+\usepackage{booktabs,array,url,graphicx,courier,unitsdef}
\usepackage{upgreek,ifpdf,listings}
\ifpdf
\usepackage{embedfile}
@@ -38,7 +39,7 @@
\newlength\LaTeXgap
\setlength\LaTeXgap{1em}
\setlength\LaTeXoutdent{-0.15\textwidth}
-\def\typesetexampleandcode{
+\def\typesetexampleandcode{%
\begin{list}{}{%
\setlength\itemindent{0pt}
\setlength\leftmargin\LaTeXoutdent
@@ -49,7 +50,33 @@
\begin{minipage}[c]{\textwidth-\LaTeXwidth-\LaTeXoutdent-\LaTeXgap}
\lst@sampleInput
\end{minipage}%
- \hfill%%
+ \hfill%
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \end{list}
+}
+\def\typesetcodeandexample{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin{0pt}
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \begin{minipage}[c]{\LaTeXwidth}%
+ \hbox to\linewidth{\box\lst@samplebox\hss}%
+ \end{minipage}%
+ \lst@sampleInput
+ \end{list}
+}
+\def\typesetfloatexample{%
+ \begin{list}{}{%
+ \setlength\itemindent{0pt}
+ \setlength\leftmargin{0pt}
+ \setlength\rightmargin{0pt}
+ }
+ \item
+ \lst@sampleInput
\begin{minipage}[c]{\LaTeXwidth}%
\hbox to\linewidth{\box\lst@samplebox\hss}%
\end{minipage}%
@@ -67,7 +94,7 @@
\end{minipage}%
\end{list}
}
-\makeatletter
+\edef\LaTeXexamplefile{\jobname.tmp}
\lst@RequireAspects{writefile}
\newbox\lst@samplebox
\lstnewenvironment{LaTeXexample}[1][\typesetexampleandcode]{%
@@ -78,8 +105,12 @@
breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,%
keywordstyle=\color{blue},%
morekeywords={bibnote,citenote,bibnotetext,bibnotemark,%
- thebibnote,bibnotename}}
- \lst@BeginAlsoWriteFile{\jobname.tmp}
+ thebibnote,bibnotename,includegraphics,schemeref,%
+ floatcontentsleft,floatcontentsright,floatcontentscentre,%
+ schemerefmarker,compound,schemerefformat,color,%
+ startchemical,stopchemical,chemical,setupchemical,bottext,%
+ listofschemes}}
+ \lst@BeginAlsoWriteFile{\LaTeXexamplefile}
}{%
\lst@EndWriteFile\egroup
\setlength\LaTeXwidth{\wd\lst@samplebox}
@@ -90,10 +121,10 @@
\small%
{\setkeys{lst}{SelectCharTable=\lst@ReplaceInput{\^\^I}%
{\lst@ProcessTabulator}}%
- \leavevmode \input{\jobname.tmp}}%
+ \leavevmode \input{\LaTeXexamplefile}}%
\MakePercentIgnore%
}
-\makeatother
+\hyphenation{PDF-LaTeX}
\endinput
%%
%% End of file `jawltxdoc.sty'.
diff --git a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
index 760db640055..4ec2fdfce2a 100644
--- a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
+++ b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
@@ -15,7 +15,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notes2bib}
- [2007/09/29 v1.1 Integrating notes into the bibliography]
+ [2007/10/26 v1.2 Integrating notes into the bibliography]
\@ifundefined{eTeXversion}
{\PackageError{notes2bib}
{Not running under e-TeX}
@@ -24,7 +24,7 @@
pdfTeX, try `pdfelatex'\MessageBreak instead of `pdflatex'}%
\endinput}
{}
-\RequirePackage{elatex}[2007/07/13]
+\RequirePackage{etoolbox}
\newif\ifniib@fn\niib@fnfalse
\DeclareOption{footnotes}{%
\niib@fntrue
@@ -47,7 +47,7 @@
\newif\ifniib@head\niib@headfalse
\DeclareOption{tail}{\niib@tailtrue}
\DeclareOption{head}{\niib@headtrue}
-\ProcessOptions
+\ProcessOptions\relax
\ifniib@fn
\let\niib@fnmark\footnotemark
\let\niib@fntext\footnotetext
@@ -164,15 +164,9 @@
body\MessageBreak Not modifying citation macro \@nameuse{#1}}
}
\ifniib@tail
- \newrobustcmd*\citenote[2][\relax]{%
- \begingroup%
- \@fileswfalse%
- \ifx#1\relax%
- \niibcite{#2}%
- \else
- \niibcite[#1]{#2}%
- \fi
- \endgroup%
+ \newrobustcmd*\citenote{%
+ \niib@cnfalse%
+ \niibcite%
}%
\else
\newrobustcmd*\citenote{\niibcite}%
@@ -197,44 +191,104 @@
This file may safely be deleted. It will be recreated as
required.^^J}
\let\niib@stack\relax
-\newif\ifniib@cn\niib@cnfalse
+\newif\ifniib@cn\niib@cnfalse%
+\newif\ifniib@citing\niib@citingfalse%
+\newif\ifniib@filesw\niib@fileswfalse%
+\newif\ifniib@orig@filesw
+\if@filesw
+ \niib@orig@fileswtrue%
+\else
+ \niib@orig@fileswfalse%
+\fi
+\def\niib@head@filesw{%
+ \let\@fileswtrue\niib@orig@fileswtrue%
+ \let\@fileswfalse\niib@orig@fileswfalse%
+ \def\if@filesw{%
+ \ifniib@orig@filesw
+ \niib@fileswtrue%
+ \else
+ \niib@fileswfalse%
+ \fi
+ \ifniib@citing
+ \ifniib@cn\else
+ \niib@fileswfalse%
+ \fi
+ \fi
+ \global\niib@cnfalse%
+ \global\niib@citingfalse%
+ \ifniib@filesw%
+ }
+}
+\ifniib@head
+ \niib@head@filesw%
+\fi
+\def\niib@tail@filesw{%
+ \let\@fileswtrue\niib@orig@fileswtrue%
+ \let\@fileswfalse\niib@orig@fileswfalse%
+ \def\if@filesw{%
+ \ifniib@orig@filesw
+ \niib@fileswtrue%
+ \else
+ \niib@fileswfalse%
+ \fi
+ \ifniib@cn
+ \niib@fileswfalse%
+ \fi
+ \global\niib@cnfalse%
+ \ifniib@filesw%
+ }
+}
+\ifniib@tail
+ \niib@tail@filesw%
+\fi
\newrobustcmd*\niib@delaycite[1]{%
\@ifundefined{#1}{%
- \PackageWarning{notes2bib}
- {Citation macro \@nameuse{#1}undefined\MessageBreak
- \protect\delaycite\space cannot operate on this macro}
+ \PackageWarning{notes2bib}
+ {Citation macro \@nameuse{#1}undefined\MessageBreak
+ \protect\delaycite\space cannot operate on this macro}
}{%
\@ifundefined{niib@orig@#1}{%
\expandafter\expandafter\expandafter\let\expandafter%
\csname niib@orig@#1\expandafter\endcsname\csname #1\endcsname%
- \expandafter\renewcommand\csname #1\endcsname[2][\relax]{%
- \ifniib@cn%
- \csname niib@orig@#1\endcsname{##2}%
- \else%
- \begingroup%
- \@fileswfalse%
- \ifx##1\relax%
- \csname niib@orig@#1\endcsname{##2}%
- \else%
- \csname niib@orig@#1\endcsname[##1]{##2}%
- \fi%
- \endgroup%
- \edef\niib@temp{##2}%
- \ifx\niib@stack\relax%
- \xdef\niib@stack{\niib@temp}%
- \else%
- \xdef\niib@stack{\niib@stack,\niib@temp}%
- \fi%
- \fi%
- }%
- \PackageInfo{notes2bib}%
- {Modifying citation type \@nameuse{#1}}%
+ \expandafter\renewcommand\csname #1\endcsname{%
+ \niib@citingtrue%
+ \@ifnextchar[%]
+ {\@nameuse{niib@optarg@#1}}
+ {\@nameuse{niib@noarg@#1}}
+ }
+ \expandafter\def\csname niib@optarg@#1\endcsname[##1]{%
+ \@ifnextchar[%]
+ {\@nameuse{niib@twoopt@#1}[##1]}
+ {\@nameuse{niib@oneopt@#1}[##1]}
+ }
+ \expandafter\def\csname niib@oneopt@#1\endcsname[##1]##2{%
+ \niib@stackup{##2}%
+ \@nameuse{niib@orig@#1}[##1]{##2}%
+ }
+ \expandafter\def\csname niib@twoopt@#1\endcsname[##1][##2]##3{%
+ \niib@stackup{##3}%
+ \@nameuse{niib@orig@#1}[##1][##2]{##3}%
+ }
+ \expandafter\def\csname niib@noarg@#1\endcsname##1{%
+ \niib@stackup{##1}%
+ \@nameuse{niib@orig@#1}{##1}%
+ }
}{%
\PackageInfo{notes2bib}%
{Already delayed \@nameuse{#1}}%
- }%
+ }
}
}
+\def\niib@stackup#1{%
+ \ifniib@cn\else
+ \edef\niib@temp{#1}%
+ \ifx\niib@stack\relax%
+ \xdef\niib@stack{\niib@temp}%
+ \else
+ \xdef\niib@stack{\niib@stack,\niib@temp}%
+ \fi
+ \fi
+}
\long\def\niib@bibnote[#1]#2{%
\niib@text{#1}{#2}%
\niib@cite{#1}%
@@ -244,20 +298,17 @@
\def\niib@cite#1{%
\niib@cntrue%
\niibcite{#1}%
- \niib@cnfalse%
}%
\else%
\ifniib@tail%
\def\niib@cite#1{%
- \ifx\niib@stack\relax%
- \xdef\niib@stack{#1}%
- \else%
- \xdef\niib@stack{\niib@stack,#1}%
- \fi%
- \begingroup
- \@fileswfalse%
+ \ifx\niib@stack\relax%
+ \xdef\niib@stack{#1}%
+ \else%
+ \xdef\niib@stack{\niib@stack,#1}%
+ \fi%
+ \niib@cntrue%
\niibcite{#1}%
- \endgroup%
}%
\else%
\def\niib@cite#1{\niibcite{#1}}%
@@ -283,7 +334,7 @@
}
\@ifpackageloaded{biblatex}{%
\expandafter\bib@gadd\expandafter\blx@bibfiles\expandafter%
- {\niibprefix\jobname}%
+ {,\niibprefix\jobname}%
}{%
\let\niib@bib\bibliography%
\renewcommand{\bibliography}[1]{%