Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@roma1.infn.it>2015-07-23 15:19:30 +0000
committerIan Jauslin <ian.jauslin@roma1.infn.it>2015-07-23 15:21:15 +0000
commit6e6a5d8d7d3c9fa38e105be275cfac6f6b8bf4fd (patch)
tree0633d578a2208f3109fb2095517803f77873c18b /BBlog.sty
Initial commitv0.0
Diffstat (limited to 'BBlog.sty')
-rw-r--r--BBlog.sty38
1 files changed, 38 insertions, 0 deletions
diff --git a/BBlog.sty b/BBlog.sty
new file mode 100644
index 0000000..46ca7a0
--- /dev/null
+++ b/BBlog.sty
@@ -0,0 +1,38 @@
+%%
+%% BBlog bibliography related commands
+%%
+
+%% length used to display the bibliography
+\newlength{\rw}
+\setlength{\rw}{1.75cm}
+
+%% read header
+\IfFileExists{header.BBlog.tex}{\input{header.BBlog}}{}
+
+%% cite a reference
+\def\cite#1{%
+\ref{cite#1}%
+%% 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}}
+}