Seite 1 von 1

Biblatex - Literaturverzeichnis anpassen

Verfasst: Sa 18. Sep 2010, 11:45
von IrenaSekuta
Hallo zusammen,

einbei ein funktionierendes Minimalbeispiel, an dem ich gerne mein Vorhaben zeigen möchte:
\documentclass{scrreprt} 
\usepackage[T1]{fontenc} 
\usepackage[ansinew]{inputenc} 
\usepackage[ngerman]{babel} 
\usepackage{filecontents} 

%%%%%%%%%%%%%%%%%%%%%% 
% Literaturstil % 
%%%%%%%%%%%%%%%%%%%%%% 

\begin{filecontents}{Literaturstil.bbx} 

% $Id: draft.bbx,v 0.9d 2010/09/03 20:11:58 lehman beta $ 

\ProvidesFile{Literaturstil.bbx} 
[\abx@bbxid $Id: draft.bbx,v 0.9d 2010/09/03 20:11:58 lehman beta $] 

\RequireBibliographyStyle{standard} 
\ExecuteBibliographyOptions{sorting=debug} 

\DeclareNameAlias{author}{default} 
\DeclareNameAlias{editor}{default} 
\DeclareNameAlias{translator}{default} 

\DeclareFieldFormat{shorthandwidth}{#1} 

\defbibenvironment{bibliography} 
  {\list 
     {\printfield{entrykey}} 
     {\setlength{\labelwidth}{1cm}% 
      \setlength{\itemindent}{-\rightmargin}% 
      \setlength{\itemsep}{\bibitemsep}% 
      \setlength{\parsep}{\bibparsep}% 
      \renewcommand*{\makelabel}[1]{% 
   \hspace\labelsep##1}}} 
  {\endlist} 
  {\item} 

\defbibenvironment{shorthands} 
  {\list 
     {\printfield[shorthandwidth]{shorthand}} 
     {\setlength{\labelwidth}{\shorthandwidth}% 
      \setlength{\leftmargin}{\labelwidth}% 
      \setlength{\labelsep}{\biblabelsep}% 
      \addtolength{\leftmargin}{\labelsep}% 
      \setlength{\itemsep}{\bibitemsep}% 
      \setlength{\parsep}{\bibparsep}% 
      \renewcommand*{\makelabel}[1]{##1\hss}}} 
  {\endlist} 
  {\item} 

\endinput 
\end{filecontents}

%%%%%%%%%%%%%%%%%%%%%% 
% Zitierstil         % 
%%%%%%%%%%%%%%%%%%%%%% 

\begin{filecontents}{Zitierstil.cbx} 
% $Id: Zitierstil.cbx, v 0.1 2010/08/25 08:49:00 $ 

\ProvidesFile{Zitierstil.cbx} 
[\abx@cbxid $Id: Zitierstil.cbx, v 0.1 2010/08/25 08:49:00 $] 

\DeclareFieldFormat{citekey}{#1} 

\newbibmacro*{cite}{% 
  \printtext[bibhyperref]{\printfield[citekey]{entrykey}}} 

\DeclareCiteCommand{\cite} 
  {\printtext{\addslash}% 
   \usebibmacro{prenote}} 
  {\usebibmacro{cite}} 
  {\multicitedelim} 
  {\usebibmacro{postnote}% 
   \printtext{\addslash}% 
}

\endinput
\end{filecontents} 

%%%%%%%%%%%%%%%%%%%%%% 
% Bibtex Datei       % 
%%%%%%%%%%%%%%%%%%%%%% 
\begin{filecontents}{Literatur.bib} 
@TECHREPORT{99, 
   author = {{Hans Mustermann}}, 
   title = {Titel zu Hans Mustermann}, 
   institution = {Test GmbH}, 
   year = {1973-11-05}, 
   number = {A99}, 
   sortkey = {0099}, 
   shorthand = {0099}, 
   presort = {0099} 
} 

@TECHREPORT{4108, 
   author = {{Mark Bertold}}, 
   title = {Titel zu Gabi Golata}, 
   institution = {Neuer Test AG}, 
   year = {1973-08-08}, 
   number = {A4108}, 
   sortkey = {4108}, 
   shorthand = {4108}, 
   presort = {4108} 
} 

@TECHREPORT{108, 
   author = {{Gabi Opla}}, 
   title = {Titel zu Hans Mustermann}, 
   institution = {Test GmbH}, 
   year = {1973-11-05}, 
   number = {A108}, 
   sortkey = {0108}, 
   shorthand = {0108}, 
   presort = {0108} 
} 

@TECHREPORT{7009, 
   author = {{Rüdiger Hins}}, 
   title = {Titel zu Rüdger Hins}, 
   institution = {Egal}, 
   year = {1973-07-03}, 
   number = {A7009}, 
   sortkey = {7009}, 
   shorthand = {7009}, 
   presort = {7009} 
} 

@TECHREPORT{44, 
   author = {{Vorname Nachname}}, 
   title = {Titel zu A44}, 
   institution = {Egal}, 
   year = {1973-07-03}, 
   number = {A44}, 
   sortkey = {0044}, 
   shorthand = {0044}, 
   presort = {0044} 
} 
\end{filecontents} 

\usepackage[% 
   bibstyle=Literaturstil,    % Aussehen des Literaturverzeichnisses 
   citestyle=Zitierstil,      % Zitierstil 
   natbib = true,% 
   sortcites = true, 
   sorting = debug,% 
   sortcase=true, 
   block=par,               % Einträge im LitVerz durch Absätze trennen 
   hyperref = auto,      % Kompabilität mit Hyperref-Paket 
]{biblatex} 
% Literaturverzeichnis angeben 
\bibliography{Literatur} 



%%%%%%%%%%%%%%%%%%%%%% 
% Dokument           % 
%%%%%%%%%%%%%%%%%%%%%% 
\begin{document} 
Hier steht nun \cite[Anhang 1.2]{7009} ein sinnloser Satz \cite{99}, der nichts anderes \cite{4108} bewirken soll als  \cite{44} ein paar Zitate \cite{108} zu demonstrieren. 

% Literatur ausgeben 
\printbibliography   % Für Biblatex 

\end{document}
Nun möchte ich gerne das Aussehen meines Literaturverzeichnisses anpassen. Alle meine Berichte sind vom Type "@TECHREPORT". Ich möchte folgende Bibtex-Felder wie folgt ausgeben lassen:
citekey   author
          title
          number
          institution, year

Mein bibstyle "Literaturstil" ist weitgehendst identisch mit dem Literaturstil "draft" von Biblatex. Es soll nichts fett oder kursiv dargestellt werden, sondern genauso wie es in der bibtex-Datei angegeben ist.

Kann jemand behilflich sein?

Gruß,

Irena

Verfasst: Sa 18. Sep 2010, 12:54
von Mechanicus
Hallo,

nutze anstatt techreport den Eintragstyp report.

Gruß
Marco

Verfasst: Sa 18. Sep 2010, 20:21
von IrenaSekuta
Okay, einiges habe ich nun verstanden. Anbei das angepasst Minimalbeispiel
\documentclass{scrreprt} 
\usepackage[T1]{fontenc} 
\usepackage[ansinew]{inputenc} 
\usepackage[ngerman]{babel} 
\usepackage{filecontents}

%%%%%%%%%%%%%%%%%%%%%%%%%
% Eigener Literaturstil % 
%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{filecontents}{Literaturstil.bbx} 

% $Id: Literaurstil.bbx, v0.1 2010/10/17 20:21$ 

\ProvidesFile{Literaturstil.bbx} 
[\abx@bbxid $Id: draft.bbx,v 0.9d 2010/09/03 20:11:58 lehman beta $] 

\RequireBibliographyStyle{standard} 
\ExecuteBibliographyOptions{sorting=debug} 

\DeclareFieldFormat{title}{#1}

\defbibenvironment{bibliography} 
  {\list 
     {\printfield{entrykey}}
     {\setlength{\labelwidth}{1cm}% 
      \setlength{\itemindent}{-\rightmargin}% 
      \setlength{\parsep}{\bibparsep}% 
      \renewcommand*{\makelabel}[1]{\hspace\labelsep##1}}} 
  {\endlist} 
  {\item}

\endinput 
\end{filecontents}

%%%%%%%%%%%%%%%%%%%%%% 
% Zitierstil         % 
%%%%%%%%%%%%%%%%%%%%%% 

\begin{filecontents}{Zitierstil.cbx} 
% $Id: Zitierstil.cbx, v 0.1 2010/08/25 08:49:00 $ 

\ProvidesFile{Zitierstil.cbx} 
[\abx@cbxid $Id: Zitierstil.cbx, v 0.1 2010/08/25 08:49:00 $] 

\DeclareFieldFormat{citekey}{#1} 

\newbibmacro*{cite}{% 
  \printtext[bibhyperref]{\printfield[citekey]{entrykey}}} 

\DeclareCiteCommand{\cite} 
  {\printtext{\addslash}% 
   \usebibmacro{prenote}} 
  {\usebibmacro{cite}} 
  {\multicitedelim} 
  {\usebibmacro{postnote}% 
   \printtext{\addslash}% 
}

\endinput
\end{filecontents} 

%%%%%%%%%%%%%%%%%%%%%% 
% Bibtex Datei       % 
%%%%%%%%%%%%%%%%%%%%%% 
\begin{filecontents}{Literatur.bib} 
@REPORT{99, 
   author = {{Hans Mustermann}}, 
   title = {Titel zu Hans Mustermann}, 
   institution = {Test GmbH}, 
   year = {1973-11-05}, 
   number = {A99}, 
   sortkey = {0099}, 
   shorthand = {0099}, 
   presort = {0099} 
} 

@REPORT{4108, 
   author = {{Mark Bertold}}, 
   title = {Und hier steht nun ein Titel, der eventuell etwas länger ausfallen kann und somit sich über mehr als eine Zeile erstreckt.}, 
   institution = {Neuer Test AG}, 
   year = {1973-08-08}, 
   number = {A4108}, 
   sortkey = {4108}, 
   shorthand = {4108}, 
   presort = {4108} 
} 

@REPORT{108, 
   author = {{Gabi Opurtus}}, 
   title = {Titel zu Hans Mustermann}, 
   institution = {Test GmbH}, 
   year = {1973-11-05}, 
   number = {A108}, 
   sortkey = {0108}, 
   shorthand = {0108}, 
   presort = {0108} 
} 

@REPORT{7009, 
   author = {{Rüdiger Hins}}, 
   title = {Titel zu Rüdger Hins}, 
   institution = {Egal}, 
   year = {1973-07-03}, 
   number = {A7009}, 
   sortkey = {7009}, 
   shorthand = {7009}, 
   presort = {7009} 
} 

@REPORT{44, 
   author = {{Xaver Zander}}, 
   title = {Titel zu A44}, 
   institution = {Egal}, 
   year = {1973-07-03}, 
   number = {A44}, 
   sortkey = {0044}, 
   shorthand = {0044}, 
   presort = {0044} 
} 
\end{filecontents} 

\usepackage[% 
   bibstyle=Literaturstil,    % Aussehen des Literaturverzeichnisses 
   citestyle=Zitierstil,      % Zitierstil 
   natbib = true,% 
   sortcites = true, 
   sorting = debug,% 
   sortcase=true, 
   block=par,               % Einträge im LitVerz durch Absätze trennen 
   hyperref = auto,      % Kompabilität mit Hyperref-Paket 
]{biblatex} 
% Literaturverzeichnis angeben 
\bibliography{Literatur} 



%%%%%%%%%%%%%%%%%%%%%% 
% Dokument           % 
%%%%%%%%%%%%%%%%%%%%%% 
\begin{document} 
Hier steht nun \cite[Anhang 1.2]{7009} ein sinnloser Satz \cite{99}, der nichts anderes \cite{4108} bewirken soll als  \cite{44} ein paar Zitate \cite{108} zu demonstrieren. 

% Literatur ausgeben 
\printbibliography   % Für Biblatex 

\end{document}
Jetzt bleiben nur noch drei Dinge zu tun:

1. Wie bekomme ich den Punkt hinter jeder Zeile weg?
2. Wie kann ich die Zahlen rechts ausrichten, sodass dort steht:
  44 ...
  99 ...
 108 ...
4108 ...
7009
3. Das Datum soll in der Form dd.mm.yyyy ausgegeben werden

Gruß,

Irena[/i]

Verfasst: Sa 18. Sep 2010, 20:43
von Mechanicus
IrenaSekuta hat geschrieben: 1. Wie bekomme ich den Punkt hinter jeder Zeile weg?
Es gibt die Möglichkeit
\renewcommand{\newunitpunct}{}
zu nutzen. Das Problem, es wirkt auf alle Einträge. Pauschal würde mir nur einfallen, \DeclareBibliographyDriver{report} anzupassen.
IrenaSekuta hat geschrieben: 2. Wie kann ich die Zahlen rechts ausrichten, sodass dort steht:
\defbibenvironment{bibliography}
  {\list
     {\printfield{entrykey}}
     {\setlength{\labelwidth}{1cm}%
      \setlength{\itemindent}{-\rightmargin}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{\hfill\hspace\labelsep##1}}}
  {\endlist}
  {\item}
IrenaSekuta hat geschrieben: 3. Das Datum soll in der Form dd.mm.yyyy ausgegeben werden
hierzu musst du nicht das Feld year nehmen sondern date. Dann kannst du es anpassen:
@REPORT{44,
   author = {{Xaver Zander}},
   title = {Titel zu A44},
   institution = {Egal},
   date = {1973-07-03},
   number = {A44},
   sortkey = {0044},
   shorthand = {0044},
   presort = {0044}
}
Gruß
Marco

Danke schön!

Verfasst: Mo 20. Sep 2010, 13:14
von IrenaSekuta
Hallo Marco,

alle deine Tipps funktionieren!

Herzlichen Dank.

Gruß,

Irena