Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@roma1.infn.it>2015-06-23 17:09:50 +0000
committerIan Jauslin <ian.jauslin@roma1.infn.it>2015-06-23 17:09:50 +0000
commit0334c43102e38fa770b58ad5830dc6f8411d9642 (patch)
tree6e0c0440e3c1e74892492c800482883c6f4e04e0 /bibliography.sty
Initial commitv0.0
Diffstat (limited to 'bibliography.sty')
-rw-r--r--bibliography.sty44
1 files changed, 44 insertions, 0 deletions
diff --git a/bibliography.sty b/bibliography.sty
new file mode 100644
index 0000000..6125499
--- /dev/null
+++ b/bibliography.sty
@@ -0,0 +1,44 @@
+%%
+%% bibliography related commands
+%%
+
+%% length used to display the bibliography
+\newlength{\rw}
+\setlength{\rw}{1.5cm}
+
+%% read header
+\IfFileExists{header.BBlog.tex}{\input{header.BBlog}}{}
+
+%% cite a reference
+\def\cite#1{%
+%% check whether the reference exists
+\ifcsname cite#1\endcsname%
+\csname cite#1\endcsname%
+\else%
+{\bf??}%
+\fi%
+%
+%% add entry to citelist after checking it has not already been added
+\ifcsname if#1cited\endcsname%
+\expandafter\if\csname if#1cited\endcsname%
+\else%
+\csname if#1citedtrue\endcsname%
+\immediate\write\@auxout{\noexpand\BBlogcite{#1}}%
+\fi%
+\else%
+\expandafter\newif\csname if#1cited\endcsname%
+\csname if#1citedtrue\endcsname%
+\immediate\write\@auxout{\noexpand\BBlogcite{#1}}%
+\fi%
+}
+%% an empty definition for the aux file
+\def\BBlogcite#1{}
+
+%% display the bibliography
+\long\def\BBlography{
+ \newlength{\colw}
+ \setlength{\colw}{\textwidth}
+ \addtolength{\colw}{-\rw}
+ \IfFileExists{bibliography.BBlog.tex}{
+ \input{bibliography.BBlog}}{{\tt error: missing BBlog bibliography file}}
+}