Skip to content

Commit

Permalink
Added option nobiblatex to supress the loading of the biblatex pa…
Browse files Browse the repository at this point in the history
…ckage

Added documentation to README.md and abstract-templatex.tex
  • Loading branch information
sieversMartin committed Apr 20, 2016
1 parent 9e4defd commit 0dcbbb0
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 23 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@ License: Released under the LaTeX Project Public License v1.3c or later
See: http://www.latex-project.org/lppl.txt
----------------------------------------------------------------------------
This is an adoption of the MS Word template made available by the organizers
of the DH Benelux 2016 in Luxembourg.
To use this LaTeX style file, please copy "dhbenelux.sty" and
"abstract-template.tex" to a directory. Edit "abstract-template.tex" and call
"xelatex" on that file (either via the shell or via your editor). Then call
biber (which is a modern substitute for BibTeX) and "xelatex" again (maybe
twice).
```

## Changelog

### 0.2 to 0.3

* Added support for ``hyperref`` package (options ``print`` and ``electronic``)
* Added option ``nobiblatex`` to allow alternative ways for bibliography (BibTeX or own bibliography environment)
* split up files to distribute it via Github

### 0.1 to 0.2
Expand Down
25 changes: 22 additions & 3 deletions abstract-template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,30 @@
% www.makeuseof.com/tag/how-to-install-microsoft-core-fonts-in-ubuntu-linux/
% or www.pcworld.com/article/2863497/how-to-install-microsoft-fonts-in-linux-office-suites.html
%
% By default the biblatex package is used in conjenction with biber.
% Therefore you have to call ``xelatex'', then ''biber'' and then
% ``xelatex'' again (maybe twice)
%
% If you have any comments or questions, please let me know.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,11pt]{article}
\usepackage[]{dhbenelux}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Load style file for DH Benelux
%%% Available options:
%%% - electronic: create a document using hyperref with colors (default)
%%% - print: do not use colored links
%%% - biblatex: load biblatex package with backend biber (default)
%%% - nobiblatex: do not load biblatex -> user has to provide it own
%%% thebibliography environment, e.g. with bst+bibtex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[biblatex]{dhbenelux}

% Default: biblatex+biber
\addbibresource{YOURFILE.bib} %%%<--- ENTER your .bib file here

% Otherwise provide your own thebibliography environment or use bst
% files together with bibtex
%
\begin{document}
\title{Title of Your Paper in Title Case}
\author{Author name 1}{Affil}{[email protected]}
Expand All @@ -46,7 +63,7 @@
\maketitle


Please enter for text.
Please enter your text.
\begin{figure}
Place graphic here
\caption{Fractal island construction}
Expand All @@ -55,6 +72,8 @@

Please enter other text here. Use \parencite{key}, \cite{key} or \textcite{key} for references to your BibTeX database.

%%% Outputs bibliography
%%% Outputs bibliography (for default biblatex usage)
%%% You can use \bibliographystyle and \bibliography here instead if you want.
\printbibliography

\end{document}
50 changes: 30 additions & 20 deletions dhbenelux.sty
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@
% This work consists of the files dhbenelux.sty and abstract-template.tex
%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dhbenelux}[2016/04/14 v0.3 A small style file for the DH Benelux]
\ProvidesPackage{dhbenelux}[2016/04/20 v0.3 A small style file for the DH Benelux]
\RequirePackage{ifxetex}
\RequireXeTeX
\newif\if@print
\newif\if@usebiblatex
\DeclareOption{electronic}{\@printfalse}
\DeclareOption{print}{\@printtrue}
\ExecuteOptions{electronic}
\DeclareOption{biblatex}{\@usebiblatextrue}
\DeclareOption{nobiblatex}{\@usebiblatexfalse}
\ExecuteOptions{biblatex,electronic}
\ProcessOptions\relax
\usepackage{fontspec}
\setmainfont{Calibri}
Expand All @@ -44,24 +47,31 @@
format=hang,justification=raggedright,%
singlelinecheck=false}
\usepackage[autostyle]{csquotes}
\usepackage[backend=biber,style=authoryear]{biblatex}
%%%
\ExecuteBibliographyOptions{firstinits=true,uniquename=init,doi=false,isbn=false}

\DeclareNameAlias{sortname}{last-first}

\setlength{\bibitemsep}{0pt}
\setlength{\bibhang}{2em}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand{\labelnamepunct}{\addspace}
\renewbibmacro*{in:}{}
\renewcommand{\bibfont}{\normalfont\fontsize{10pt}{11.5pt}\selectfont\raggedright}
\defbibheading{bibliography}[\refname]{%
\removelastskip%
\vspace*{8mm}%
{\bfseries\fontsize{12pt}{13.8pt}\selectfont\color{GrayForReferences} #1\par}%
\vspace*{-0.5\baselineskip}}%
%%%
\if@usebiblatex
\PackageInfo{dhbenelux}{Package biblatex loaded. Please use\MessageBreak biber instead of bibtex to connect your .bib file.}
\usepackage[backend=biber,style=authoryear]{biblatex}
%%%
\ExecuteBibliographyOptions{firstinits=true,uniquename=init,doi=false,isbn=false}
%
\DeclareNameAlias{sortname}{last-first}
%
\setlength{\bibitemsep}{0pt}
\setlength{\bibhang}{2em}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand{\labelnamepunct}{\addspace}
\renewbibmacro*{in:}{}
\renewcommand{\bibfont}{\normalfont\fontsize{10pt}{11.5pt}\selectfont\raggedright}
\defbibheading{bibliography}[\refname]{%
\removelastskip%
\vspace*{8mm}%
{\bfseries\fontsize{12pt}{13.8pt}\selectfont\color{GrayForReferences} #1\par}%
\vspace*{-0.5\baselineskip}}%
\else
\PackageInfo{dhbenelux}{You deactivated biblatex. Please provide your\MessageBreak own bibliography or use BiBTeX instead.}
\newcommand*{\addbibresource}{\PackageError{dhbenelux}{You can not use \string\addbibresource, because\MessageBreak you deactivated biblatex.}{Please remove the option ``nobiblatex'' from the \string\usepackage\space call}}
\newcommand*{\addbibresource}{\PackageError{dhbenelux}{You can not use \string\printbibliography, because\MessageBreak you deactivated biblatex.}{Please remove the option ``nobiblatex'' from the \string\usepackage\space call}}
\RequirePackage{url}
\fi%
\urlstyle{same}

\usepackage{multicol}
Expand Down

0 comments on commit 0dcbbb0

Please sign in to comment.