PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : BibLaTex: chapter* anders behandeln als chapter



Tim77
26-09-2012, 17:30
Hallo,

gegeben sei folgendes Minimalbeispiel

\documentclass[]{scrbook}

\usepackage{nameref}
\usepackage[american]{babel}
\usepackage[babel]{csquotes}
\usepackage[backend=biber,style=apa,babel=hyphen,natbib=true]{biblatex}

\DeclareLanguageMapping{american}{american-apa}

\bibliography{MyBib}

\defbibheading{subbibliography}{%
\section*{Chapter \therefsection: \nameref{refsection:\therefsection}}
}

\begin{document}

\chapter*{Preface}
\begin{refsection}
Text \citep{Hebb:1949}.
\end{refsection}

\chapter{First Chapter}
\begin{refsection}
Text \citep{Goldberg.et.al:1992}.
\end{refsection}

\chapter{Second Chapter}
\begin{refsection}
Text \citep{Brin+Page:1998}.
\end{refsection}


\printbibheading
%\printbibliography
\bibbysection[heading=subbibliography]

\end{document} und folgende MyBib.bib
@article{Brin+Page:1998,
Address = {Amsterdam, The Netherlands},
Author = {Sergey Brin AND Lawrence Page},
Journal = {Computer Networks and ISDN Systems},
Number = {1-7},
Pages = {107--117},
Title = {The Anatomy of a Large-Scale Hypertextual Web Search Engine},
Volume = {30},
Year = {1998},
}

@book{Hebb:1949,
Address = {New York, NY, USA},
Author = {Hebb, Donald. O.},
Publisher = {Wiley},
Title = {The Organization of Behavior: A Neuropsychological Theory},
Year = {1949}
}


@article{Goldberg.et.al:1992,
Address = {New York, NY, USA},
Author = {David Goldberg AND David Nichols AND Brian M. Oki AND Douglas Terry},
Journal = {Communications of the ACM},
Number = {12},
Pages = {61--70},
Publisher = {ACM},
Title = {Using Collaborative Filtering to Weave an Information Tapestry},
Volume = {35},
Year = {1992}
}
Das ganze wird mit pdflatex bzw. biber xyz kompiliert. Für die "Bibliography" beginnt der Kapitel-Counter leider bei dem chapter*{Preface}. Stattdessen hätte ich gerne dort so was stehen wie:

Preface:
...

Chapter 1: First Chapter
...

Geht das irgendwie? Falls ja: Hat jemand einen Tipp für mich? Vermutlich bräuchte ich für das Preface eine andere bibheading!?

mechanicus
30-09-2012, 11:32
Hi,


\defbibheading{subbibliography}{%
\setbox0=\hbox{\ref{refsection:\therefsection}}%
\section*{Chapter\ifdim\wd0=0pt:\else~\ref{refsect ion:\therefsection}:\fi~\nameref{refsection:\there fsection}}%
}

Marco