4

A similar question was asked here before and I found DIN 1505 conform .bbx and .cbx but it doesn't look like the alphadin. The BibLaTeX alphabetic style sadly won't do it for my purposes.

So I tried to modify the files but failed.

I'm aiming for a look like this. It's basically din .bbx and .cbx combined with the alphabetic style.

enter image description here

Moreover the label for entries without an author should be the first 3 characters of the cite-key - just like alphadin would do it but alphabetic won't.

Does anyone know how to modify the files or a workaround for this problem?

  • 1
    There's a a DIN 1505 style for biblatex on Github, though I have no idea how complete this implementation is. Not too much work seems to have been done on it. – Simifilm Jul 17 '13 at 21:54
  • yea thats the one I referenced up there - it doesn't do the full job – eratio Jul 18 '13 at 10:00
  • 1
    Perhaps it would be helpful to add in your question what exactly is missing? Or with other words can you provide a minimal working example (MWE) including a bib file (use package filecontentsfor this) showing what you tried? – Mensch Jul 18 '13 at 15:28
4

More information is certainly needed to specify an alphabetic style, but the document below gives a start. It requires biber as the backend.

Here \DeclareLabelalphaTemplate specifies an alphabetic label format that largely corresponds to one of the following, ordered by precedence:

  • shorthand field
  • the label field, plus the last two digits in year
  • first three letters of the surname in the (truncated) labelname list when it contains only one item, plus the last two digits in year
  • first letter of each surname in the (truncated) labelname, plus the last two digits in year
  • first three letters of the entry key

If the length of labelname exceeds maxalphanames it is truncated to a list of length minalphanames. The default option settings are minalphanames=1 and maxalphanames=3. Truncation is indicated in the label via the \labelalphaothers character:

\newcommand*{\labelalphaothers}{+}
\newcommand*{\sortalphaothers}{\labelalphaothers}

These can be redefined with \renewcommand*. The \sortalphaothers variant is used only for sorting and should be redefined if \labelalphaothers uses any formatting commands. Details on \DeclareLabelalphaTemplate and \defbibenvironment can be found in the biblatex manual.

\documentclass{article}
\usepackage[backend=biber,citestyle=alphabetic,bibstyle=din]{biblatex}

% Use cite/entry key as fallback label
\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1]{labelname}
    \field[strwidth=1,strside=left]{labelname}
    \field[final,strwidth=3]{citekey}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{year}    
  }
}

% Add labels to bibliography - taken from alphabetic.bbx
\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelalphawidth]{%
        \printfield{prefixnumber}%
        \printfield{labelalpha}%
        \printfield{extraalpha}}}
     {\setlength{\labelwidth}{\labelalphawidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1\hss}}
  {\endlist}
  {\item}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{bit:kiel,
  title = {Arbeitsgruppe Angewandte Informatik (Wirtschaftsinformatik)},
  url = {http://www.informatik.uni-kiel.de/bit/},
  year = 2012}
\end{filecontents}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{knuth:ct,companion,aksin,cms,kant:ku,bit:kiel}
\printbibliography
\end{document}

enter image description here

  • this looks right - thank you - I will try that out - if this works it should be added to the 'din'-style so that it would be the new 'alphadin' for 'biblatex'! – eratio Jul 22 '13 at 8:46
0

Use [style=alphabetic] when importing, like:

\usepackage[style=alphabetic]{biblatex}

Note that his solution does not comply to DIN 1505. It simply achieves a similar style to that of

\bibliographystyle{alphadin}

So this does not answer the question asked above, but since I found this question when trying to find the solution my answer provides (I figured it out somehow), it might help other people landing here.

  • 3
    could you show an example on how this could be applied? – Raaja Jul 4 at 7:33
  • Note that that will only give you something that is broadly the same as alphadin, in that it is an alphabetic style. Many details will differ from alphadin by default and if you really want DIN 1505, some more work is needed. See Audrey's answer and github.com/domhardt/BibLaTeX-DIN1505 – moewe Jul 4 at 22:25
  • @moewe thank you for clearing this up. I was not aware of the requirement to comply to DIN 1505. – felixmp Jul 5 at 8:03
  • @Raaja this answer is for People that are already using biblatex but want to use the style of \bibliographystyle{alphadin}in bibtex. Simply add [style=alphabetic] to the import. – felixmp Jul 5 at 8:05
  • @felixmp Can this be used by anyone who uses a biblatex? Please make your solution complete. Right now this is just a piece of script, which only a few knows or understands where/how to use it. – Raaja Jul 5 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.