0

I am using an unofficial LaTeX template (officially there is only Word :() with biber, biblatex and alphabetic style. However, alphabetic is not completely correct. As an example, the font should be identical throughout the reference and not italic for some parts. Therefore I would like to make some adaptions and would like to check the configuration of the alphabetic style as some of my changes are not working. Could someone give me a hint where I can locate the definition?

To give you some ideas what I am talking about:

Example 1:

\DeclareFieldFormat[misc]{title}{#1} works (title normal, not italic; also works for booktitle of inproceedings), \DeclareFieldFormat[techreport]{title}{#1} does not work (titel still italic; same for journal of article).

Example 2:

\ifentrytype{book}{
    \clearfield{url}                                   
    \clearfield{urldate}
}{}
\ifentrytype{article}{
    \clearfield{url}                               
    \clearfield{urldate}
}{}
}

removes the url both from articles and books (when citation data is taken from a website), but there is still an output for when it was accessed.

1 Answers1

0

Most relevant definitions for (standard) biblatex styles live in

  • biblatex.def - basic definitions for bibmacros and field formats
  • standard.bbx - drivers and higher-level bibmacros for all standard styles
  • <style>.bbx (alphabetic.bbx) - bibliography-specific changes of <style>
  • <style>.cbx (alphabetic.cbx) - citation-specific changes of <style>

The .bbx and .cbx files may refer to other .bbx and .cbx files in some styles, so you may have to chase a few files.

You can find the location of these files on your machine by typing

kpsewhich <filename>

in the command line


For your first issue have a look at Remove Quotation Marks from Style. Presumably

\DeclareFieldFormat*{title}{#1}

could help you as you want to override all type-specific formatting. (\DeclareFieldFormat[techreport]{title}{#1} does not work as expected, because @techreport it is just a convenience alias for what is internally called @report.)


For your second issue the problem is that internally there is no field called urldate. urldate is parsed into its date components. So you would have to delete urlyear. Personally, I find these cascading \ifentrytype definitions every inelegant and they can introduce lots of unwanted space if you do not protect the line ends properly (What is the use of percent signs (%) at the end of lines? (Why is my macro creating extra space?)). A nicer solution is to get rid of stuff via a sourcemap

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pertype{article}
      \pertype{book}
      \step[fieldset=url, null]
      \step[fieldset=urldate, null]
    }
  }
}

or presumably more something like

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \pernottype{online}
      \step[fieldset=url, null]
      \step[fieldset=urldate, null]
    }
  }
}

This gets rid of the fields as early as possible.

Alternatively you can use that the url option can be set per-type.

\ExecuteBibliographyOptions{url=false}
\ExecuteBibliographyOptions[online]{url=true}

(though the latter is the default anyway, so need not be made explicit).

moewe
  • 175,683
  • Perfect, thank you so much! Found the files, but did not dig through them yet as you already solved the most pressing issues. \DeclareFieldFormat*{title}{#1} and \DeclareFieldFormat*{citetitle}{#1} fixed all entries in the bibliography. And adding your last suggestion fixed the URL issue. – user10636601 Jul 03 '22 at 20:56