BibTeX, biblatex and biberreferencing webpages with URL and accessed date

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Franzi_LaTeX
Posts: 10
Joined: Sun Jun 24, 2018 1:24 am

referencing webpages with URL and accessed date

Post by Franzi_LaTeX »

Hi! :)

I am trying to cite / reference my webpages with biber. For all my other references (books, articles) I need apa. Unfortunately, it only showed me the title, author, editor, etc. However, I also need the URL and accessed date. Because I could not find any citation style or command that contains these information, I cheated a bit as you will see below (I know, maybe that wasn´t so clever...).
Actually, it´s working quite well. The only problem is that the webpage URL in the pdf goes beyond the end of the page, so it doenst stop or goes on in the next line.
Do you know how to solve this problem or even which command or citation style is possible?
Thank you for your help!

I´ve tried to do an minimal example. Unfortunately, now it does not give me the webpage references at all and I don´t understand why. Maybe you can help me...

Code: Select all

\documentclass[a4paper,12pt]{scrartcl} 
     
    \usepackage[nottoc]{tocbibind}
    \usepackage[backend=biber, 
    style=authoryear-icomp, 
    sorting=nyt, 
    url=true,
    natbib=true, 
    hyperref=true, 
    ]{biblatex}
     
    \DeclareLanguageMapping{english}{american-apa}
    \bibliography{test1.bib} 
     
    \usepackage{tocstyle} 
    \newtocstyle[KOMAlike][leaders]{chapterwithdot}{
      \settocfeature{pagenumberbox}{\makebox[1em][r]}
      \settocfeature[-1]{leaders}{\hfill}
      \settocfeature[-1]{pagenumberbox}{\phantom}
      }
    \usetocstyle{chapterwithdot}
    \usepackage[automark,autooneside]{scrlayer-scrpage}
    \clearpairofpagestyles
    \ohead{\headmark}
    \ofoot*{\pagemark}
     
    \usepackage[utf8]{inputenc}
    \usepackage[english]{babel}
    \usepackage[T1]{fontenc}
    \usepackage{blindtext}
    \usepackage{hyperref}
    \usepackage{setspace}
    \setlength{\parindent}{0mm}
    \usepackage[paper=a4paper,left=30mm,right=30mm,top=30mm,bottom=30mm]{geometry} 
    \usepackage{graphicx}
    \deffootnote{1em}{1em}{\textsuperscript{\thefootnotemark\ }}
     
    \setcounter{tocdepth}{3}
    \setcounter{secnumdepth}{3}
     
    \begin{document}
     
    \pagenumbering{roman}
    \clearpage
    \tableofcontents
     
    \clearpage
     
     
    \onehalfspacing
    \pagestyle{plain}
    \pagenumbering{arabic}
    \setcounter{page}{3}
     
    \section{Introduction}
    introduction xx
    \section{Definition}
    just \footnote{Woodis in \cite[p.60]{coady1985morality}.} some\footnote{cf. \cite [772]{coady2004terrorism}.} footnotes\footnote\cite{sep-war}.} to\footnote\cite{sep-relativism}.} get the\footnote{\cite[253]{walzer2000just}.} references. 
     
     
    \clearpage
     
    \addcontentsline{toc}{section}{List of References}
    \printbibliography[title={Book references},type=book]
    \printbibliography[title={Article references},type=article]
    \printbibliography[title={Webpage references}, nottype=article, nottype=book]
    \end{document}

The biber document is: test1.bib

Code: Select all

@article{coady2004terrorism,
      title={Terrorism, morality, and supreme emergency},
      author={Coady, Cecil AJ},
      journal={Ethics},
      volume={114},
      number={4},
      pages={772--789},
      year={2004},
      publisher={The University of Chicago Press}
    } 
     
    @book{walzer2000just,
      title={Just and unjust wars: A moral argument with historical illustrations},
      author={Walzer, Michael},
      year={2000},
      publisher={New York: Basic books}
    }
     
    @article{coady1985morality,
      title={The morality of terrorism},
      author={Coady, Cecil AJ},
      journal={Philosophy},
      volume={60},
      number={231},
      pages={47--69},
      year={1985},
      publisher={Cambridge University Press}
    }
     
     
    @InCollection{sep-war,
    	author       =	{Lazar, Seth},
    	title        =	{War},
    	booktitle    =	{The Stanford Encyclopedia of Philosophy}, \\
    	howpublished =	{\url{https://plato.stanford.edu/archives/spr2017/entries/war}},
    	year         =	{2017},
    	edition      =	{https://plato.stanford.edu/entries/war},
    publisher    =	{(Date accessed: 25.06.2018)}
     
    }
     
    @InCollection{sep-relativism,\\
    	author       =	{Baghramian, Maria and Carter, J. Adam},
    	title        =	{Relativism},
    	booktitle    =	{The Stanford Encyclopedia of Philosophy},
    	howpublished =	{\url{https://plato.stanford.edu/archives/sum2017/entries/relativism}},
    	year         =	{2017},
    	edition      =	{https://plato.stanford.edu/entries/relativism},
    publisher    =	{(Date accessed: 28.06.2018)}
    }
     
    \end

If possible, I would like to get something like:
Lazar, S. (2017): „War“; in: The Stanford Encyclopedia of Philosophy; https://plato.stanford.edu/entries/relativism (Date accessed 22. 06. 2018).

I hope, you understand what I mean... Thanks a lot! :)

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

referencing webpages with URL and accessed date

Post by Johannes_B »

As stated in the other thread, you are not using the right fields, nor the correct date format. Also, if they are online only, you should use the online[latex] entry type. Please have a [url=https://golatex.de/wichtige-hinweise-erstellung-von-literaturverzeichnissen-t11964.html]look at this[/url] and the links given therein.
[code]@InCollection{sep-war,
author = {Lazar, Seth},
title = {War},
booktitle = {The Stanford Encyclopedia of Philosophy},
url = {https://plato.stanford.edu/archives/spr2017/entries/war},
year = {2017},
urldate = {2018-06-25}
}

@InCollection{sep-relativism,
author = {Baghramian, Maria and Carter, J. Adam},
title = {Relativism},
booktitle = {The Stanford Encyclopedia of Philosophy},
url = {https://plato.stanford.edu/archives/sum2017/entries/relativism},
year = {2017},
urldate = {2018-06-28}
}[/code]
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