From b8e4df1b8475b6a83de0227f98098eb742e9d7bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 17 Sep 2021 20:03:57 +0200 Subject: [PATCH] add option for other include filepaths --- wip/mkessler-bibliography.sty | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/wip/mkessler-bibliography.sty b/wip/mkessler-bibliography.sty index 0a022fd..d66c6ae 100644 --- a/wip/mkessler-bibliography.sty +++ b/wip/mkessler-bibliography.sty @@ -2,16 +2,24 @@ \ProvidesPackage{mkessler-bibliography}[2021-09-06 - Package to easily print bibliography and image attributions in document] %%%%%%%%%%%%%%%%%% +\RequirePackage{xkeyval} + \newif\ifenglish\englishtrue -\DeclareOption{german}{\englishfalse} -\DeclareOption{english}{\englishtrue} -\DeclareOption*{\PackageWarning{mkessler-bibliography}{Unknown '\CurrentOption'}} -\ProcessOptions\relax +\DeclareOptionX{german}{\englishfalse} +\DeclareOptionX{english}{\englishtrue} + +\def\mkessler@bibliography@bibfile{bibliography.bib} +\def\mkessler@bibliography@imagefile{images.bib} +\DeclareOptionX{bibfile}[bibliography.bib]{\def\mkessler@bibliography@bibfile{#1}} +\DeclareOptionX{imagefile}[images.bib]{\def\mkessler@bibliography@imagefile{#1}} + +\DeclareOptionX*{\PackageWarning{mkessler-bibliography}{Unknown '\CurrentOption'}} +\ProcessOptionsX\relax %%%%Bibliography management \RequirePackage[backend=biber,style=alphabetic]{biblatex} -\addbibresource{bibliography.bib} -\addbibresource{images.bib} +\addbibresource{\mkessler@bibliography@bibfile} +\addbibresource{\mkessler@bibliography@imagefile} %Provide simpler commands to properly print image attributions and literature \DeclareRobustCommand*{\printimageattributions}{