LaTeX forum ⇒ BibTeX, biblatex and biberIssues with formatting bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
thomashightower
Posts: 2
Joined: Fri May 19, 2017 11:51 am

Issues with formatting bibliography

Postby thomashightower » Fri May 19, 2017 12:00 pm

Hi There

We are compiling our thesis, in that matter we have created a bibliography list which contains several lines.
When we have computed our thesis we have used the cite command.

Now we want to split the list into
- Articles
- Books
- Journals

No matter what we do we cant get this to work properly.

We have used below code:

  1. \documentclass[]{bachelor}
  2. \usepackage[danish]{babel}
  3. \usepackage{apacite}
  4. \usepackage[utf8]{inputenc}
  5. \usepackage[T1]{fontenc}
  6. \usepackage[]{blindtext}
  7. \usepackage{fancyhdr}
  8. \usepackage[]{parskip}
  9. \usepackage[]{caption}
  10. \usepackage[]{amsmath}
  11. \usepackage[]{multirow}
  12. \usepackage[pdftex]{graphicx}
  13. \usepackage{boldline}
  14. \usepackage[table,xcdraw]{xcolor}
  15. \usepackage{array}
  16. \usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
  17. \usepackage{apacite}
  18. \bibliographystyle{apacite}
  19. \usepackage[acronym, toc]{glossaries}
  20. \usepackage[toc,page]{appendix}
  21. \usepackage{booktabs}
  22. \usepackage{pdflscape}
  23. \usepackage{pgfplots}
  24. \pgfplotsset{compat=newest}
  25. \usepgfplotslibrary{units}
  26. \usepackage{threeparttable}
  27. \usepackage{url}
  28. \usepackage{filecontents}
  29. \usepackage{tikz}
  30. \def\checkmark{\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;}
  31. \usepackage{pifont}
  32. \newlength\tindent
  33. \setlength{\tindent}{\parindent}
  34. \setlength{\parindent}{0pt}
  35. \renewcommand{\indent}{\hspace*{\tindent}}
  36. \newcommand{\xmark}{\ding{55}}
  37. \usepackage{pgfplots, pgfplotstable}
  38. \usepackage{bm}
  39. \usepackage[normalem]{ulem}
  40. \useunder{\uline}{\ul}{}
  41. \usepackage{scrextend}
  42. \deffootnote{0em}{1.6em}{\thefootnotemark.\enskip}
  43. \renewcommand{\appendixname}{Bilag}
  44. \usepackage{relsize}
  45. \usepackage{titlesec}
  46. \usepackage{multicol}
  47. \definecolor{swotS}{RGB}{184,59,38}
  48. \definecolor{swotW}{RGB}{184,59,38}
  49. \definecolor{swotO}{RGB}{184,59,38}
  50. \definecolor{swotT}{RGB}{184,59,38}
  51. \usepackage[raster]{tcolorbox}
  52. \usepackage{multirow}
  53.  
  54. % referencer: mailkorrespondancer: Jesper fra dst {JesperDST}, Damodaran {AswathMail}, SaraLaFever BioMedTracker {SaraLaFever}
  55.  
  56. % her definerer vi lige bta så det kan være med fed skrift i overskriften
  57.  
  58. \def\hmath$#1${\texorpdfstring{{\rmfamily\textit{#1}}}{#1}}
  59. \setlength{\aboverulesep}{0pt}
  60. \setlength{\belowrulesep}{0pt}
  61. \interfootnotelinepenalty=10000
  62.  
  63. \linespread{1.3}
  64.  
  65. % Det her er headeren
  66. \pagestyle{fancy}
  67. \lhead{\empty}
  68. \chead{\empty}
  69. \rhead{\rightmark}
  70. \lfoot{\empty}
  71. \cfoot{\empty}
  72. \rfoot{Side \thepage}
  73. \assignpagestyle{\chapter}{fancy}
  74.  
  75.  
  76. % thesis title
  77. % note \\[1ex] is a line break in the title
  78. \title{Værdiansættelse af\\[0.5ex]
  79. Bavarian Nordic}
  80.  
  81. % end the preamble and start the document
  82. \begin{document}
  83.  
  84. % set the number of sectioning levels that get number and appear in the contents
  85. \setcounter{secnumdepth}{3}
  86. \setcounter{tocdepth}{3}
  87.  
  88. % denne kan ændres til maketitle, men så skal forsiden defineres under cls
  89. \input{forside}
  90. \include{forord} % include an forord.tex
  91. \include{abstract} % include the abstract.tex
  92.  
  93. \begin{romanpages} % start roman page numbering
  94. \tableofcontents % generate and include a table of contents
  95. \listoffigures % generate and include a list of figures
  96. \listoftables
  97. \end{romanpages} % end roman page numbering
  98.  
  99. % Inkludering af kapitler og sektioner
  100. \include{1.0Kapitel}
  101. \include{2.0Preliminerrapportgrundlag}
  102. \include{3.0Verdiansettelsesmetoder}
  103. \include{4.0Fundamentalanalyse}
  104. \include{5.0Kapitalomkostningskomponenter}
  105. \include{6.0Verdiansettelse}
  106. \include{7.0Folsomhedsanalyse}
  107.  
  108. %now enable appendix numbering format and include any appendices
  109.  
  110. \bibliography{ref.bib}
  111.  
  112. \begin{appendices}
  113. \include{appendix1}
  114. \include{appendix2}
  115. \end{appendices}
  116.  
  117.  
  118. \end{document}


We have tried adding below codes in various ways, but we cant solce the issue for this.. :shock:


  1. \printbibliography[title={Whole bibliography}]
  2.  
  3. \printbibliography[type=article,title={Articles}]
  4. \printbibliography[type=book,title={Books}]



Can someone assist on this matter??

rgds
Thomas
Last edited by Stefan Kottwitz on Fri May 19, 2017 12:03 pm, edited 1 time in total.
Reason: code marked

thomashightower
Posts: 2
Joined: Fri May 19, 2017 11:51 am

Postby thomashightower » Fri May 19, 2017 3:13 pm

I have reached next step for this issue containing the split up of bibliography.
  1. %now enable appendix numbering format and include any appendices
  2. \printbibliography[
  3. heading=bibintoc,
  4. title={Litteraturliste}
  5. ] %Prints the entire bibliography with the titel "Whole bibliography"
  6.  
  7. %Filters bibliography
  8. \printbibliography[heading=subbibintoc,type=article,title={Videnskabelige artikler}]
  9. \printbibliography[heading=subbibintoc,type=book,title={Bøger}]

Whenever we are using above code, we kind a getting the bibliography mentioned 2 times in our thesis.
- 1st time with a complete list
- 2nd devided into Books and Journals

If we want the bibliography mentioned on the table of contents and we only want the bibliography mentioned once in a seperated form.

- How do we do that?? and what are we doing wrong.

User avatar
Johannes_B
Site Moderator
Posts: 3493
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat May 20, 2017 6:51 am

You are showing a lot of code, but nobody can compile it. It is always better to start with a small example, see that everything works and include the part into the bigger document.
Your documentclass is unknown to us, i don't know what is in there. What you need to know, there are diferent ways to generate a bibliography with LaTeX, each incompatible with the other. Please have a look at it.
You are using two different things from different lines.

In general, the modern biblatex is very fine to create a bibliography, your documentclass might be incompatible though. If that is the case, you could consider using a minimal template. As in the linked article, parts of your preamble are also outdated.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: ExecutorElassus and 5 guests