summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/csplain
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-17 22:11:53 +0000
committerKarl Berry <karl@freefriends.org>2015-04-17 22:11:53 +0000
commitad061cff36845f52688d6a879d2fa86145e6ea84 (patch)
tree4791ad25c71d68a06581428a88b530b39314af8c /Master/texmf-dist/tex/csplain
parent277463648965be21e215d982f6623c11a2e154ee (diff)
csplain (17apr15)
git-svn-id: svn://tug.org/texlive/trunk@36895 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/csplain')
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-bib-iso690.tex32
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-bib-simple.tex19
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex10
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex19
-rw-r--r--Master/texmf-dist/tex/csplain/opmac/opmac.tex41
5 files changed, 81 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-bib-iso690.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-bib-iso690.tex
index 66d1890a422..050d83bbd40 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-bib-iso690.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-bib-iso690.tex
@@ -1,5 +1,5 @@
% opmac-bib-iso690 ... the OPmac bib style for reading .bib databases
-% Petr Olsak, Apr. 2014c (beta)
+% Petr Olsak, Apr. 2015 (beta)
%
% The bibliography printing from .bib files by ISO 690 standard is defied here.
% See the end of this file and the file opmac-bib.tex for more information.
@@ -79,6 +79,15 @@
\ifx\sc\undefined \def\upper{\uppercase\expandafter}\else \def\upper#1{{\sc#1}}\fi
\fi
+% Preparing bib-mark (used when \nonumcitations is set):
+
+\def\setbibmark{%
+ \ifx\dobibmark\undefined \def\dobibmark{}\fi
+ \RetrieveFieldIn{bibmark}\tmp
+ \ifx\tmp\empty \RetrieveFieldIn{year}\tmp \edef\tmp{\dobibmark, \tmp}\fi
+ \bibmark=\expandafter{\tmp}%
+}
+
% Multilinguals: English Czech Slovak
\mtdef{bib.and} {, and } { a } {}
@@ -132,6 +141,7 @@
\CreateField {issn}
\CreateField {doi}
\CreateField {url}
+\CreateField {bibmark}
% Sorting:
@@ -204,9 +214,7 @@
}
\sdef{print:END}{%
\bprinta [note] {*.}{}%
- \ifx\dobibmark\undefined \def\dobibmark{}\fi
- \def\lowercase##1{##1}%
- \edef\tmp{\bibmark ={\dobibmark, \RetrieveField{year}}}\tmp
+ \setbibmark
}
\def\bookgeneric#1{%
\bprinta [howpublished] {[*].\ }{}%
@@ -330,7 +338,7 @@ more information (abstract, for example).
There are ``standard fields'' used in ancient bibTeX (author, title, editor, edition,
etc., see http://en.wikipedia.org/wiki/BibTeX). The iso690 style introduces
several ``non-standard'' fields: ednote, numbering, isbn, issn, doi, url,
-citedate. They are documented here.
+citedate, key, bibmark. They are documented here.
Moreover, there are two optional special fields:
@@ -781,6 +789,20 @@ cannot use these entries from the old databases without warnings and without
some additional work in the .bib file.
+The cite-marks (bibmark) used when \nonumcitations is set
+---------------------------------------------------------
+
+When \nonumcitations is set then \cite prints the cite-marks (called
+bibmark) instead numbers. This style file autogenerates these marks in the
+form "Lastname of the first author, comma, space, the year" if bibmark field
+isn't declared. If you need to set an exception from this common format,
+then you can use bibmark field.
+
+The OPmac trick http://petr.olsak.net/opmac-tricks-e.html#bibmark
+describes how to redefine the algorithm for bibmark auto-generating when you
+need the short form of the type [Au13].
+
+
Sorting
-------
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-bib-simple.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-bib-simple.tex
index 67f15a224e0..642c6d84825 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-bib-simple.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-bib-simple.tex
@@ -1,5 +1,5 @@
% opmac-bib-simple ... the OPmac bib style for reading .bib databases
-% Petr Olsak, version Apr. 2014c (beta)
+% Petr Olsak, version Apr. 2015 (beta)
% See the end of the file opmac-bib.tex for more information.
% You can compare this file with the old Forth-like BibTeX .bst files.
% What seems to be more understandable?
@@ -21,12 +21,21 @@
\ifnum\NameCount>1
\ifnum0\namecount=\NameCount \mtext{bib.and}\else , \fi
\else
- \edef\dobibmark{\Lastname}%
+ \ifx\dobibmark\undefined \edef\dobibmark{\Lastname}\fi
\fi
\bprintc\Firstname{* }\bprintc\Von{* }\Lastname\bprintc\Junior{, *}%
}
\let\editorname=\authorname
+% Preparing bib-mark (used when \nonumcitations is set):
+
+\def\setbibmark{%
+ \ifx\dobibmark\undefined \def\dobibmark{}\fi
+ \RetrieveFieldIn{bibmark}\tmp
+ \ifx\tmp\empty \RetrieveFieldIn{year}\tmp \edef\tmp{\dobibmark, \tmp}\fi
+ \bibmark=\expandafter{\tmp}%
+}
+
% Multilinguals: English Czech Slovak
\mtdef{bib.and} {, and } { a } {}
@@ -34,6 +43,7 @@
\mtdef{bib.masterthesis} {Master's Thesis} {Diplomová práce} {Diplomová práca}
\mtdef{bib.phdthesis} {Ph.D. Thesis} {Disertační práce} {Dizertačná práca}
+
\def\preurl{\hfil\break}
% Non-standard fieldnames:
@@ -41,6 +51,7 @@
\CreateField {isbn}
\CreateField {doi}
\CreateField {url}
+\CreateField {bibmark}
% Sorting:
@@ -51,9 +62,7 @@
\sdef{print:END}{%
\bprinta [note] {*.}{}%
- \ifx\dobibmark\undefined \def\dobibmark{}\fi
- \def\lowercase##1{##1}%
- \edef\tmp{\bibmark ={\dobibmark, \RetrieveField{year}}}\tmp
+ \setbibmark
}
\sdef{print:book}{%
\bprinta [!author] {*\.\ }{\bibwarning}%
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
index 7269b8c25d9..a2f542d97a0 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-bib.tex
@@ -1,6 +1,6 @@
% opmac-bib
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Petr Olsak, version Apr. 2014h (beta)
+% Petr Olsak, version Apr. 2015 (beta)
% This is module for OPmac macros, see http://petr.olsak.net/opmac.html
% The command:
@@ -120,6 +120,10 @@
\def\MakeReference{\par \ifnum\bibnum>0 \bibskip \fi
\advance\bibnum by1
+ \isdefined{bim:\the\bibnum}\iftrue
+ \edef\tmpb{\csname bim:\the\bibnum\endcsname}%
+ \bibmark=\expandafter{\tmpb}%
+ \else \bibmark={}\fi
\noindent \edef\tmpb{\EntryKey}%
\printbib \dest[cite:\the\bibnum]%
\bgroup
@@ -257,6 +261,10 @@ end of each <entrytype>. The formatting does not solve the numbering and
paragraph indentation of the entry. This is processed by \printbib macro
used in OPmac (and may be redefined by the author or document designer).
+You can declare \bimark={something} in the print:END macro. This bibmark is
+saved to the .ref file (created by OPmac) and used in the next TeX run as \cite
+marks when \nonumcitations is set.
+
The whole style file is read in the group during \usebib command is executed
before typesetting the reference list. Each definition or setting is local
here.
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex b/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
index 3760e34d647..9df65b02326 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac-xetex.tex
@@ -1,6 +1,6 @@
% opmac-xetex.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Petr Olsak, 2013, 2014
+%% Petr Olsak, 2013, 2014, 2015
% OPmac features (such as hyperlinks, outlines, colors, transformations,
% pictures) are based on pdfTeX primitives. Unfortunately, these pdfTeX
@@ -45,8 +45,7 @@
% \special{pdf:dest (LABEL) [@thispage /XYZ @xpos @ypos null]}
% has to be used instead of \pdfdest name{LABEL} xyz :
-\def\destbox[#1]{\vbox to0pt{\kern-\destheight
- \special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}\vss}}
+\def\pdfdest name#1#2#3#4{\special{pdf:dest (#1) [@thispage /XYZ @xpos @ypos null]}}
% \special{pdf:literal CODE} has to be used instead of \pdfliteral{CODE}:
@@ -66,19 +65,13 @@
\def\pdfsave{\pdfliteral{q}}
\def\pdfrestore{\pdfliteral{Q}}
-% \special{pdf:outline LEVEL <</Title(TEXT)/A<</S/GoTo/D(LABEL)>>>>}
+% \special{pdf:out [MINUS] LEVEL <</Title(TEXT)/A<</S/GoTo/D(LABEL)>>>>}
% has to be used instead of
-% \pdfoutline goto name{LABEL} count CHILDS {TEXT}.
+% \pdfoutline goto name{LABEL} count MINUS-CHILDS {TEXT}.
% Note, we needn't calculate CHILDS, simply LEVEL of outline is used.
-\def\insertoutline#1{\global\advance\oulnum by1
- \special{pdf:dest (oul:\the\oulnum) [@thispage /XYZ @xpos @ypos null]}%
- \special{pdf:outline 0<</Title(#1)/A<</S/GoTo/D(oul:\the\oulnum)>>>>}%
-}
-\def\pdfoutline goto name#1 count #2#3<#4\relax{%
- \special{pdf:out [\ifnum#3<\outlinelevel\space\else-\fi] #3
- <</Title(\tmp)/A<</S/GoTo/D(#1)>>>>}%
-}
+\def\outlinesC#1#2#3#4#5{\special{pdf:out [#3] #1 <</Title(#5)/A<</S/GoTo/D(#2)>>>>}}
+\def\pdfoutline goto name#1#2#{\outlinesC{0}{#1}{}{}}
% \special{pdf:docview<<CODE>>} has to be used instead of \pdfcatalog{CODE}:
diff --git a/Master/texmf-dist/tex/csplain/opmac/opmac.tex b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
index 767fa843c72..a643ce92856 100644
--- a/Master/texmf-dist/tex/csplain/opmac/opmac.tex
+++ b/Master/texmf-dist/tex/csplain/opmac/opmac.tex
@@ -5,7 +5,7 @@
%% The history of versions is at the end of this file, after \endpinput
\ifx\OPmacversion\undefined \else \endinput \fi
-\def\OPmacversion{Dec. 2014c}
+\def\OPmacversion{Apr. 2015}
\immediate\write16{This is OPmac (Olsak's Plain macros), version <\OPmacversion>}
%%%%%%%%%%%%%% Basic macros, sec. 3.1 in opmac-d.pdf
@@ -54,7 +54,7 @@
\let\\=\undefined
{\lccode`\?=`\% \lowercase{\gdef\percent{?}}}
{\lccode`\?=`\\ \lowercase{\gdef\bslash{?}}}
-\def\,{\ifmmode \mskip\thinmuskip \else \thinspace \fi}
+\def\,{\relax\ifmmode \mskip\thinmuskip \else \thinspace \fi}
\addprotect\percent \addprotect\bslash \addprotect\, \addprotect\exfont
\bgroup \catcode`!=3 \catcode`?=3
@@ -343,22 +343,28 @@
\def\chap#1\par{\ifnonum\else \global\advance\chapnum by1 \fi
\chaphook {\globaldefs=1 \secnum=0 \seccnum=0 \tnum=0 \fnum=0 \dnum=0}\relax
\edef\thechapnum{\the\chapnum}\let\thetocnum=\thechapnum
- \def\dotocnumafter{\wcontents\Xchap{#1}}%
+ \def\dotocnumafter{\wtotoc0\bfshape{#1}}%
\printchap{#1\unskip}\resetnonumnotoc
}
\def\sec#1\par{\ifnonum\else \global\advance\secnum by1 \fi
\sechook {\globaldefs=1 \seccnum=0 \tnum=0 \fnum=0 \dnum=0}\relax
\edef\thesecnum{\othe\chapnum.\the\secnum}\let\thetocnum=\thesecnum
- \def\dotocnumafter{\wcontents\Xsec{#1}}%
+ \def\dotocnumafter{\wtotoc1\rm{#1}}%
\printsec{#1\unskip}\resetnonumnotoc
}
\def\secc#1\par{\ifnonum\else \global\advance\seccnum by1 \fi
\secchook {}\relax
\edef\theseccnum{\othe\chapnum.\the\secnum.\the\seccnum}\let\thetocnum=\theseccnum
- \def\dotocnumafter{\wcontents\Xsecc{#1}}%
+ \def\dotocnumafter{\wtotoc2\rm{#1}}%
\printsecc{#1\unskip}\resetnonumnotoc
}
-\def\wcontents#1#2{% #1: sequence to REF, #2: titletext
+\def\wtotoc#1#2#3{% #1 = level, #2 = info, #3 = titletext
+ \ifnotoc\else
+ \def\act{\wref{\Xtoc{#1}{\noexpand#2}}}%
+ \expandafter\act\expandafter{\expandafter{\thetocnum}{#3}{\the\pageno}}%
+ \fi
+}
+\def\wcontents#1#2{% #1 = sequence to REF, #2 = titletext
\ifnotoc\else
\expandafter\wref\expandafter#1\expandafter
{\expandafter{\thetocnum}{#2}{\the\pageno}}%
@@ -367,7 +373,7 @@
\def\dotocnum#1{%
\leavevmode
{\ifnonum \global\advance\nonumnum by1 \edef\thetocnum{!\the\nonumnum}\fi
- \wlabel\thetocnum \dest[toc:\thetocnum]%
+ \wlabel\thetocnum \dest[toc:\tocilabel.\thetocnum]%
\dotocnumafter}\ifnonum\else#1\fi
\global\let\dotocnumafter=\relax
}
@@ -462,9 +468,8 @@
\def\toclist{} \newif\ifischap \ischapfalse
-\def\Xchap#1#2#3{\ischaptrue\addto\toclist{\tocline{0}{\bfshape}{#1}{#2}{#3}}}
-\def\Xsec#1#2#3{\addto\toclist{\tocline{1}{\rm}{#1}{#2}{#3}}}
-\def\Xsecc#1#2#3{\addto\toclist{\tocline{2}{\rm}{#1}{#2}{#3}}}
+\def\Xtoc#1#2#3#4#5{\ifnum#1=0 \ischaptrue\fi \addto\toclist{\tocline{#1}{#2}{#3}{#4}{#5}}}
+\def\Xchap{\Xtoc0\bfshape} \def\Xsec{\Xtoc1\rm} \def\Xsecc{\Xtoc2\rm}
\def\tocline#1#2#3#4#5{{\leftskip=#1\iindent \rightskip=2\iindent
\ifischap\advance\leftskip by\iindent\fi
@@ -910,13 +915,14 @@
\def\hyperlinks#1#2{%
\let\dest=\destactive \let\link=\linkactive
- \def\toclink##1{\link[toc:##1]{\localcolor#1}{\toclinkA{##1}}}%
- \def\pglink##1{\link[pg:##1]{\localcolor#1}{\pgfolioA{##1}}}%
+ \def\toclink##1{\link[toc:\tocilabel.##1]{\localcolor#1}{\toclinkA{##1}}}%
+ \def\pglink##1{\link[pg:\pgilabel.##1]{\localcolor#1}{\pgfolioA{##1}}}%
\def\citelink##1##2{\link[cite:##1]{\localcolor#1}{##2}}%
\def\reflink[##1]##2{\link[ref:##1]{\localcolor#1}{##2}}%
\def\ulink[##1]##2{\urllink[url:##1]{##2}}%
\def\urlcolor{\localcolor#2}%
}
+\def\tocilabel{} \def\pgilabel{}
\def\pdfborder#1{\if^#1^\else \isdefined{#1border}\iftrue
\if^\csname#1border\endcsname^\else attr{/C[\csname#1border\endcsname] /Border[0 0 .6]}\fi
@@ -985,9 +991,10 @@
\protectlist \def~{ }\setcnvcodesA
\expandafter \setlccodes \toasciidata{}{}%
\cnvhook \lowercase{\gdef\tmp{#4}}%
- \pdfoutline goto name{toc:#3} count
- \ifnum#1<\outlinelevel\space\else-\fi\tmpnum {\tmp}\relax
+ \outlinesC{#1}{toc:\tocilabel.#3}{\ifnum#1<\outlinelevel\space\else-\fi}{\tmpnum}{\tmp}%
}
+\def\outlinesC#1#2#3#4#5{\pdfoutline goto name{#2} count #3#4{#5}\relax}
+
\def\setcnvcodesA{\global\let\setcnvcodesA=\relax % I am working only once
\ifx\r\undefined
\gdef\toasciidata{}
@@ -1518,7 +1525,7 @@
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
\def\doprotect#1{\let#1=\relax}
-\def\prepage{\def\destheight{25pt}\dest[pg:\the\pageno]}
+\def\prepage{\def\destheight{25pt}\dest[pg:\pgilabel.\the\pageno]}
\def\preboxcclv{} \def\postboxcclv{}
{\catcode`\@=11
@@ -1705,12 +1712,14 @@ Oct. 2014 \pdfborder corrected: /Border [0 0 0] set for AR users.
Nov. 2014 \sortingdata corrected, \specsortingdata introduced.
\replacestrings uses \replacestringsA instead \tmp
\bfshape used in \titfont and \Xchap
- \adef{ }{\ } in verbatim environment (instead \adef{ }[ }).
+ \adef{ }{\ } in verbatim environment (instead \adef{ }{ }).
\fnotemark+\fnotetext+\runningfnotes bug fixed.
\flushcolumns, \iiparams removed, \mullines introduced.
Dec. 2014 Color features rewritten using \pdfcolorstack.
Unwanted spaces in \dosorting removed.
Better definition of \frame.
\margins/\setpagedimens improved, \isnextchar: \bgroup\egroup added.
+Apr. 2015 \wtotoc, \Xtoc, \tocilabel, \pgilabel introduced.
+ \outlinesC introduced
%%%%%%%%%%%%%% End of opmac.tex