Adressverzeichnis mit biblatex - erforderliche Kommandos auslagern
Hallo! Könnte man den den im Dokument besonders markierten Kram irgendwie auslagern? Am besten in die `dbx`-Datei (siehe unten). *(siehe unten)*. Gibt es dazu eine Möglichkeit?
**main.tex**
% arara: pdflatex
% arara: biber
% arara: pdflatex
% arara: pdflatex
\documentclass[parskip=half-,toc=flat,
fontsize=9pt,DIV = 9, paper=a5,pagesize,headings=normal]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[autostyle]{csquotes}
\usepackage[datamodel=ufischer,defernumbers
]{biblatex}
\addbibresource{MeineAdressen.bib}
% Diesen Kram %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
\DeclareBibliographyDriver{adresse}{%
\printnames{name}\setunit{\addcomma\addspace}%
\printfield{strasse}\setunit{\addcomma\addspace}%
\printfield{plz}\setunit{\addspace}\printfield{ort}%
\usebibmacro{finentry}}
\DeclareNameFormat[adresse]{anrede}{#1}
\DeclareCiteCommand{\citeanrede}{}{%
\iffieldequalstr{gender}{sm}
{\printtext{Herr}}{\printtext{Frau}}%
\setunit{\addspace}\printnames[anrede]{name}}
{}{}
\DeclareCiteCommand{\citeadresse}{}{%
\printtext{\par\noindent}%
\iffieldequalstr{gender}{sm}{\printtext{Herrn}}{\printtext{Frau}}%
\setunit{~}\printnames{name}%
\setunit{\\}\printfield{strasse}%
\setunit{\\}\printfield{plz}\setunit{\addspace}\printfield{ort}}
{}{}
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
% Diesen Kram %%%%%%%%%%%%%%
\begin{document}
\citeadresse{max}
\citeadresse{eva}
\bigskip
Lieber \citeanrede{max}, liebe \citeanrede{eva},
schaut euch doch mal \cite{dante} an und
lest \cite{input1}
\printbibliography[type=adresse,title=Verteilerliste]
\printbibliography[nottype=adresse,resetnumbers]
\end{document}
**ufischer.dbx**
\DeclareDatamodelEntrytypes{adresse}
\DeclareDatamodelFields[type=list,
datatype=name]
{name}
\DeclareDatamodelFields[type=field,
datatype=literal]
{strasse,ort,plz}
\DeclareDatamodelEntryfields[adresse]{%
name,strasse,ort,plz,gender}
**MeineAdressen.bib**
@adresse{max,
name ={Muster, Max},
strasse ={Im Versuchsweg 10},
ort ={Testgelände},
plz ={X01234},
gender ={sm}
}
@adresse{eva,
name ={Muster, Eva},
strasse ={Im Versuchsweg 10},
ort ={Testgelände},
plz ={X01234},
gender ={sf}
}