BibTeX, biblatex and biberSpecial request for my bibliography and footnote

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Dave Miller
Posts: 1
Joined: Fri Jun 26, 2015 11:39 pm

Special request for my bibliography and footnote

Post by Dave Miller »

Hi,
I have to write my bachelor thesis and I need to change some special things in my bibliography and for my footnotes. But first, thanks to Johannes_B, who helped me already very well in another forum with the same topic.

Now, here is what I need:
- change the first name with the second name and separate them with "," (i can do this in the .bib, too..but i think its not the right way to do it)
- delete "Hrsg." after the names
- Footnote: after author ": shorttitle,"

Whole structure:

Bibliography:
name, first name [shorttile] title, edition, publisher, adress, year
Footnote:
Vgl. name: shorttitle, year, page.


This is my actual code:

Code: Select all

\documentclass[ngerman]{article} 
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{babel} 
\usepackage[autocite=footnote,bibstyle=standard,citestyle=authoryear]{biblatex} 

\renewcommand*{\finentrypunct}{\addspace} %entfernt Punkt am Ende des Lit.Verz.
\renewcommand{\labelnamepunct}{\addspace} %entfernt ":" bzw. ","   Lit.Verz.
\DeclareFieldFormat{title}{#1}%<-titel nicht kursiv (standard)
%\renewcommand*{\labelnamepunct}{\addcolon\addspace}%<- : nach letztem namen

\renewbibmacro*{prenote}{% 
  \iffieldundef{prenote} 
    {\printtext{Vgl.}% 
     \setunit{\prenotedelim}} 
    {\iffieldequalstr{prenote}{XX} %\footcite[xx]{key}
     {} 
    {\printfield{prenote}% 
      \setunit{\prenotedelim}}}} 

\addbibresource{MeineLiteratur.bib} 
\DeclareBibliographyDriver{book}{% 
  \usebibmacro{bibindex}% 
  \usebibmacro{begentry}% 
  \usebibmacro{author/editor+others/translator+others}% 
  \setunit{\labelnamepunct}\newblock 
  \addspace 
  \iffieldundef{shorttitle}{}{% 
     \mkbibbrackets{\thefield{shorttitle}}% 
  }% 
  \setunit{\labelnamepunct}\newblock 
  \usebibmacro{maintitle+title}% 
  \newunit 
  \printlist{language}% 
  \newunit\newblock 
  \usebibmacro{byauthor}% 
  \newunit\newblock 
  \usebibmacro{byeditor+others}% 
  \newunit\newblock 
  \printfield{edition}% 
  \newunit 
  \iffieldundef{maintitle} 
    {\printfield{volume}% 
     \printfield{part}} 
    {}% 
  \newunit 
  \printfield{volumes}% 
  \newunit\newblock 
  \usebibmacro{series+number}% 
  \newunit\newblock 
  \printfield{note}% 
  \newunit\newblock 
  \usebibmacro{publisher+location+date}% 
  \newunit\newblock 
  \usebibmacro{chapter+pages}% 
  \newunit 
  \printfield{pagetotal}% 
  \newunit\newblock 
  \iftoggle{bbx:isbn} 
    {\printfield{isbn}} 
    {}% 
  \newunit\newblock 
  \usebibmacro{doi+eprint+url}% 
  \newunit\newblock 
  \usebibmacro{addendum+pubstate}% 
  \setunit{\bibpagerefpunct}\newblock 
  \usebibmacro{pageref}% 
  \newunit\newblock 
  \iftoggle{bbx:related} 
    {\usebibmacro{related:init}% 
     \usebibmacro{related}} 
    {}% 
  \usebibmacro{finentry}} 
\newbibmacro*{publisher+location+date}{% 
  \printlist{publisher}% 
  \iflistundef{location} 
    {\setunit*{\addcomma\space}} 
    {\setunit*{\addcomma\space}}% 
  \printlist{location}% 
  \setunit*{\addcomma\space}% 
  \usebibmacro{date}% 
  \newunit} 



%\renewbibmacro*{cite}{% 
%  \iffieldundef{shorthand} 
%    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}} 
%       {\usebibmacro{cite:label}% 
%        \setunit{\addspace}} 
%       {\printnames{labelname}% 
%        \setunit{\colon}}% 
%%   \addspace 
%%   \iffieldundef{shorttitle}{}{% 
%%      \mkbibbrackets{\thefield{shorttitle}}% 
%%   } 
%     \usebibmacro{cite:labelyear+extrayear}} 
%    {\usebibmacro{cite:shorthand}}% 
%    } 

\setlength{\textheight}{8cm} 
\renewcommand*{\newunitpunct}{\addcomma\space} 
\begin{document} 

Super\autocite[S.122f]{Irgang.2000}%\par 
%Super\autocite[S.122f]{Irgang.20000} 
%\newpage% unnötig mit scrreprt 
\printbibliography[heading=bibintoc, title=Quellenverzeichnis] 
\end{document} 
with my .bib

Code: Select all

   @book{Irgang.20000, 
      year       = {2000}, 
      title      = {Entwicklung eines computergestuetzten Werkzeuges zur vernetzten Absatzplanung}, 
      address    = {Muenchen}, 
      edition    = {1.Auflage}, 
      publisher  = {Grin Verlag}, 
      editor     = {Irgang, Thorstena} 
   } 
   @book{Irgang.2000, 
      year       = {2000}, 
      shorttitle = {Vernetzte Absatzplanung}, 
      title      = {Entwicklung eines computergestuetzten Werkzeuges zur vernetzten Absatzplanung}, 
      address    = {Muenchen}, 
      edition    = {1. Auflage}, 
      publisher  = {Grin Verlag}, 
      editor     = {Irgang, Thorsten} 
   } 

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Special request for my bibliography and footnote

Post by Johannes_B »

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Special request for my bibliography and footnote

Post by Johannes_B »

A guest answered the question and provided the solution. I'll add a a rough translation.
It's not that easy writing an own bibliographystyle, especially if there aren't many information.

Now to the problem. The editor is printed, because the name is input as the editor, not the author.

The naming can be handled with \DeclareNameAlias{sortname}{last-first}.

You should also thhink about placing the short title within the shorttitle field.

Adding an automated Vgl (compare) isn't a good idea, i don't add this.

Below a different approach, without redefining the bibdriver.

Code: Select all

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage{filecontents}
\usepackage[style=authortitle]{biblatex}
\begin{filecontents*}{\jobname.bib}
@book{Irgang.2000,
 year = {2000},
 shorttitle = {Vernetzte Absatzplanung},
 title = {Entwicklung eines computergestützten Werkzeuges zur vernetzten Absatzplanung},
 address = {München},
 edition = {1},
 publisher = {Grin Verlag},
 author = {Irgang, Thorsten}
}
\end{filecontents*}

\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\labelnamepunct}{\addspace}
\renewcommand*{\nametitledelim}{\addcolon\space}
\renewcommand*{\finentrypunct}{\addspace}

\DeclareNameAlias{sortname}{last-first}

% Reihenfolge ändern und Standardtrenner
\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \newunit
  \printlist{location}%
  \newunit
  \usebibmacro{date}%
  \newunit}

% Kurztitel (shorttitle) hinzufügen
\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
    {}
    {\printfield[brackets]{shorttitle}%
     \setunit{\addspace}%
     \printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \newunit}%
  \printfield{titleaddon}}

% Jahr hinzufügen
\newbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifnameundef{labelname}
       {}
       {\printnames{labelname}%
        \setunit{\nametitledelim}}%
     \usebibmacro{cite:title}%
     \newunit
     \printfield{year}}%
    {\usebibmacro{cite:shorthand}}}

\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\begin{document}

BLABLABLABLA\footcite{worman}
Super\footcite{Irgang.2000}
\printbibliography
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply