From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/compactbib/compactbib.sty | 106 +++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 macros/latex/contrib/compactbib/compactbib.sty (limited to 'macros/latex/contrib/compactbib') diff --git a/macros/latex/contrib/compactbib/compactbib.sty b/macros/latex/contrib/compactbib/compactbib.sty new file mode 100644 index 0000000000..d26a0f5fd3 --- /dev/null +++ b/macros/latex/contrib/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 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit v1.2.3