0

I use TexMaker to write my thesis. I have a Bibliography in the end of my thesis, and inside the text, I also want to show footcite, but if I use \footcite, in footnote it only shows only last name of one author, but I need both authors´ full name. How can I solve this?

And the website link in the citation is too long, how to make line feed before a text end? As the website link goes out of the width of my defined text width.

Thank you

My script:

    \documentclass[12pt]{article}
    \usepackage[english]{babel}
    \usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
    \usepackage[sfdefault]{ClearSans}
    \usepackage[utf8]{inputenc}
    \setlength{\parskip}{1.2ex}
    \setlength{\parindent}{0em}
    \usepackage{filecontents}
    \usepackage[backend=bibtex,
            style=authortitle-comp,
            natbib=true, 
            ]{biblatex}
    \begin{filecontents}{\jobname.bib}
@Electronic{unintentional,
  Title                    = {Accidents or Unintentional Injuries},
  Author                   = {Altiok,Tayfur; Melamed, Benjamin},
  Note                     = {[Accessed on August 10, 2016]. Available on: \textcolor{blue}{http://www.cdc.gov/nchs/fastats/accidental-injury.htm}}
}

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

    here is just a test \cite{unintentional} .

\printbibliography
   \end{document}
  • It is not unusual to give only last names in citations (\footcite and friends), often the full name is only given in the bibliography. Please note that Author = {Altiok,Tayfur; Melamed, Benjamin}, is wrong, see How should I type author names in a bib file?. – moewe Dec 14 '16 at 7:58
  • ... Since you use biblatex you should do what you do with your note field (Note = {[Accessed on August 10, 2016]. Available on: \textcolor{blue}{http://www.cdc.gov/nchs/fastats/accidental-injury.htm}}) as follows: urldate = {2016-08-10}, url={http://www.cdc.gov/nchs/fastats/accidental-injury.htm}. biblatex will take care of everything else. – moewe Dec 14 '16 at 7:59
  • I realise you have been told some of that before: tex.stackexchange.com/a/340310/35864. Maybe you should have a look at tex.stackexchange.com/q/13509/35864 as well as one of the introductory guides suggested there. I happen to like dag.at.ifi.uio.no/public/doc/biblatex-guide.pdf – moewe Dec 14 '16 at 8:03
  • @samcarter I just noted you deleted your answer. I thought you might like edit your answer with the suggestions in my comment. – moewe Dec 14 '16 at 18:41
  • @moewe I also had other reasons to delete my answer, but please feel free to convert your comment into an answer. I will certainly upvote your non-hacky solution! – samcarter_is_at_topanswers.xyz Dec 14 '16 at 22:08
2

You should give author names in the format explained in How should I type author names in a bib file?. That is, separate all authors by and. Furthermore, you should use the url and urldate field instead of note.

@online{unintentional,
  title   = {Accidents or Unintentional Injuries},
  author  = {Altiok, Tayfur and Melamed, Benjamin},
  url     = {http://www.cdc.gov/nchs/fastats/accidental-injury.htm},
  urldate = {2016-08-10},
}

What you then want comes own to changing the labelname format, which is used in citations, and sortname, which is used in the bibliography, to

\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{labelname}{family-given}

Then you can get semicolons with

\renewcommand*{\multinamedelim}{\addsemicolon\space}
\renewcommand*{\finalnamedelim}{\multinamedelim}

Then

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authortitle-comp]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{unintentional,
  title   = {Accidents or Unintentional Injuries},
  author  = {Altiok, Tayfur and Melamed, Benjamin},
  url     = {http://www.cdc.gov/nchs/fastats/accidental-injury.htm},
  urldate = {2016-08-10},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{labelname}{family-given}

\renewcommand*{\multinamedelim}{\addsemicolon\space}
\renewcommand*{\finalnamedelim}{\multinamedelim}

\begin{document}
\cite{unintentional}
\printbibliography
\end{document}

gives

example output

| improve this answer | |
  • Thank you for your answer. I have tried this solution, but in bibliography, it comes out " AltiokA.BenjaminB.Tayfur; MelamedT.M" as author name. What can be the reason for this? Can you add the complete script, so I can check what was wrong from my script? Thank you! – Vivian Dec 16 '16 at 22:34
  • @Vivian I have added a full MWE. Did you get any errors or warnings in when you tried the solution? – moewe Dec 18 '16 at 17:07
  • Thank you very much! I tried your complete solution, but still have the same problem : author name is not correct, still get "AltiokA.BenjaminB.Tayfur; MelamedT.M"". And I tried again without labelname and sortname, then it works in bibliography, but not in cite – Vivian Dec 19 '16 at 21:01
  • @Vivian As you can see it works for me. Maybe your biblatex is not up to date (the solution above will work for biblatex >= 3.3, the current version is 3.7). But you should get errors and warnings in that case. Of course if you leave out code, the output will not be as expected. – moewe Dec 20 '16 at 8:34

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.