summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/compactbib/compactbib.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:53:24 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:53:24 +0000
commitb971825f359fe5f097e5b4820af2174abe1f17a6 (patch)
treea0d912dce0e5c1deb43ffe51a93bce684124c1f8 /Master/texmf-dist/tex/latex/compactbib/compactbib.sty
parent581b91ecf6949dc22775e8048a2d52a2bf36475b (diff)
compactbib
git-svn-id: svn://tug.org/texlive/trunk@779 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/compactbib/compactbib.sty')
-rw-r--r--Master/texmf-dist/tex/latex/compactbib/compactbib.sty106
1 files changed, 106 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/compactbib/compactbib.sty b/Master/texmf-dist/tex/latex/compactbib/compactbib.sty
new file mode 100644
index 00000000000..d26a0f5fd3e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/compactbib/compactbib.sty
@@ -0,0 +1,106 @@
+%%% compactbib.sty
+%%% compact bibliography,
+%%% allowing many "thebibliography" environments with continuous numbering
+%%% Furthermore, the vertical space between the entries is slighty smaller.
+%%% This package may be useful for curriculum vitaes.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% version 1.0, November 2001
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Antoine LEJAY [lejay@maths.ox.ac.uk]
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% adaptation from code in latex.ltx and article.cls
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% usage
+%%% \begin{thebibliography}[Articles]{00}
+%%% \bibitem ...
+%%% \end{thebibliography}
+%%% writes "Articles" instead of "References" and start
+%%% a list of entries.
+%%% \bibitem ...
+%%% \end{thebibliographyonly}
+%%% writes nothing
+%%%
+%%% Remark : this package is not interfaced with BibTeX,
+%%% except when one uses "cut and past"ing functionalities...
+%%%
+%%% option: noname
+%%% the environment "thebibliography" acts
+%%% in fact like "thebibliographyonly" for all
+%%% its usage (no optional argument allowed).
+%%% additional commands: bibliowidth (gives a unique width
+%%% for all the labels)
+%%% ex: \bibliowidth{000}
+%%% typography of \refname. To override the standard setting :
+%%% \renewcommand{\bibliorefname}[1]{\section{#1}} for example
+%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Interseting related packages: paralist.sty, multibib.sty, bibtopic.sty...
+%%% todo: a lot (adding some flexibility, as in paralist.sty).
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% LICENCE:
+% This file may be distributed under the terms of the LaTeX Project Public
+% License, as described in lppl.txt in the base LaTeX distribution.
+% Either version 1 or, at your option, any later version.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\fileversion{1.0}
+\def\filedate{2000/11/01}
+\ProvidesPackage{compactbib}[\filedate\space\fileversion]
+
+
+\newcounter{compactbib@continuated}
+\setcounter{compactbib@continuated}{0}
+
+\newif\ifbiblioname
+\biblionametrue
+
+\DeclareOption{noname}{\biblionamefalse}
+%% the option noname does not give a name for the bibliographic list
+\ProcessOptions
+
+\newcommand{\bibliowidth}[1]{\gdef\compactbib@globalwidth{#1}}
+%% overrides the local definition of the width of a label
+%% for all the thebibliography environment
+
+%% The way \refname or the name of the list of entries is
+%% typesetted using this command.
+\newcommand{\bibliorefname}[1]{\noindent\textsc{#1}}
+
+\ifbiblioname
+\renewenvironment{thebibliography}[2][\refname]{
+\medskip
+\bibliorefname{#1}
+\@ifundefined{compactbib@globalwidth}{%
+\def\compactbib@width{#2}}{\let\compactbib@width\compactbib@globalwidth}
+\begin{thebibliographyonly}{\compactbib@width}}{\end{thebibliographyonly}}
+\else
+\renewenvironment{thebibliography}[1]{%
+\@ifundefined{compactbib@globalwidth}{%
+\def\compactbib@width{#1}}{\let\compactbib@width\compactbib@globalwidth}
+\begin{thebibliographyonly}{\compactbib@width}}{\end{thebibliographyonly}}
+\fi
+
+\newenvironment{thebibliographyonly}[1]
+ {\list{\@biblabel{\@arabic\c@enumiv}}%
+ {\settowidth\labelwidth{\@biblabel{#1}}%
+ \leftmargin\labelwidth
+ \advance\leftmargin\labelsep
+ \setlength{\itemsep}{0pt}
+ \setlength{\parsep}{0pt}
+ \@openbib@code
+ \usecounter{enumiv}%
+ \setcounter{enumiv}{\arabic{compactbib@continuated}}
+ \let\p@enumiv\@empty
+ \renewcommand\theenumiv{\@arabic\c@enumiv}}%
+ \sloppy
+ \clubpenalty4000
+ \@clubpenalty \clubpenalty
+ \widowpenalty4000%
+ \sfcode`\.\@m}
+ {\def\@noitemerr
+ {\@latex@warning{Empty `thebibliography' environment}}%
+ \setcounter{compactbib@continuated}{\@arabic\c@enumiv}
+ \endlist}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% End of the file compactbib.sty
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%