0

I using Bibtex and Biber to set up my Bibliography. I have configure the alphabetic stlye. So the normal \cite{} will be shown as [XXX00] with the author and the year. The Problem what exist: I have online websites as sources and lot of them have no author or year so they will be shown up as []. Is there an oportunity to mix the alphabetic style with the numeric? So the articles which includes an author and a year will be shown up alphabetic and all others numeric?

Thanks for the answers.

5
  • Welcome to TeX.SE!
    – Mico
    Nov 27, 2019 at 10:09
  • You wrote, "I us[e] Bibtex and Biber to set up my bibliography." BibTeX and Biber are two external programs; one typically uses one or the other, but not both, to create the formatted bibliography. Please clarify what you're doing.
    – Mico
    Nov 27, 2019 at 10:11
  • Note that just because you cite material from webpages doesn't mean that no author(s) exist: If nothing else, you can always list the name of the organization that runs the website as the (corporate) author. Also, if the websites in question are related to news organizations or reporting about social issues and other current events, it's usually easy to ascertain in which year the webpage was created.
    – Mico
    Nov 27, 2019 at 10:16
  • i use only biber.
    – Fl4mer
    Nov 27, 2019 at 11:21
  • Then please edit your posting to remove the bibtex tag and all mentions of BibTeX. Or, do mention that you use the biblatex package.
    – Mico
    Nov 27, 2019 at 11:27

2 Answers 2

1

Copying the idea from Biblatex: Two bibliographies with different styles and sortings and adapting it to filter by type (@online) instead of keyword we get

\documentclass{article}

\usepackage[style = alphabetic, labelnumber, defernumbers = true,  backend = biber]{biblatex}
\usepackage{hyperref}

\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\renewbibmacro*{cite}{%
  \printtext[bibhyperref]{%
    \printfield{labelprefix}%
    \ifentrytype{online}
      {\printfield{labelnumber}}
      {\printfield{labelalpha}%
       \printfield{extraalpha}}}}

\defbibenvironment{bibliographyNUM}
  {\list
     {\printtext[labelnumberwidth]{%
        \printfield{labelprefix}%
        \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\begin{filecontents}{\jobname.bib}
@article{BookA03,
  author    = {Author Aaa},
  title     = {Some Title},
  journal   = {Some Journal},
  year      = 2003,
}
@BOOK{BookB02,
  author    = {Author Bbb},
  title     = {Some Title},
  publisher = {Some Publisher},
  year      = 2002,
}
@online{LinkC04,
  author  = {Author Ccc},  
  title   = {Some Title},
  year    = 2004,
  url     = {http://www.example.com/1},
}
@online{LinkD01,
  author  = {Author Ddd},
  title   = {Some Title},
  year    = 2001,
  url     = {http://www.example.com/2},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
The first two citations \cite{LinkD01} and \cite{BookB02}. 
The others are \cite{LinkC04} and \cite{BookA03}.

\printbibliography[title=Bibliography, nottype=online]

\newrefcontext[sorting=none]
\printbibliography[env=bibliographyNUM, title={Online References}, type=online, resetnumbers]
\end{document}

Split bibliography with alphabetic and numeric style.

0

I found out, that there is the option label for the @online{} articles. I can use this to fix my problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .