BibTeX, biblatex and biberIssues with formatting bibliography

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

Issues with formatting bibliography

Post by thomashightower »

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:

Code: Select all

\documentclass[]{bachelor}
\usepackage[danish]{babel}
\usepackage{apacite}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[]{blindtext}
\usepackage{fancyhdr}
\usepackage[]{parskip}
\usepackage[]{caption}
\usepackage[]{amsmath}
\usepackage[]{multirow}
\usepackage[pdftex]{graphicx}
\usepackage{boldline}
\usepackage[table,xcdraw]{xcolor}
\usepackage{array}
\usepackage[a4paper,left=3cm,right=3cm,top=3cm,bottom=3cm]{geometry}
\usepackage{apacite}
\bibliographystyle{apacite}
\usepackage[acronym, toc]{glossaries}
\usepackage[toc,page]{appendix}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{units}
\usepackage{threeparttable}
\usepackage{url}
\usepackage{filecontents}
\usepackage{tikz}
\def\checkmark{\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;} 
\usepackage{pifont}
\newlength\tindent
\setlength{\tindent}{\parindent}
\setlength{\parindent}{0pt}
\renewcommand{\indent}{\hspace*{\tindent}}
\newcommand{\xmark}{\ding{55}}
\usepackage{pgfplots, pgfplotstable}
\usepackage{bm}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
 \usepackage{scrextend}
 \deffootnote{0em}{1.6em}{\thefootnotemark.\enskip}
\renewcommand{\appendixname}{Bilag}
\usepackage{relsize}
\usepackage{titlesec}
\usepackage{multicol}
\definecolor{swotS}{RGB}{184,59,38}
\definecolor{swotW}{RGB}{184,59,38}
\definecolor{swotO}{RGB}{184,59,38}
\definecolor{swotT}{RGB}{184,59,38}
\usepackage[raster]{tcolorbox}
\usepackage{multirow}

% referencer: mailkorrespondancer: Jesper fra dst {JesperDST}, Damodaran {AswathMail}, SaraLaFever BioMedTracker {SaraLaFever}

% her definerer vi lige bta så det kan være med fed skrift i overskriften

\def\hmath$#1${\texorpdfstring{{\rmfamily\textit{#1}}}{#1}}
\setlength{\aboverulesep}{0pt}
\setlength{\belowrulesep}{0pt}
\interfootnotelinepenalty=10000

\linespread{1.3}

% Det her er headeren
\pagestyle{fancy}
\lhead{\empty}
\chead{\empty}
\rhead{\rightmark}
\lfoot{\empty}
\cfoot{\empty}
\rfoot{Side \thepage}
\assignpagestyle{\chapter}{fancy}


% thesis title
% note \\[1ex] is a line break in the title
    \title{Værdiansættelse af\\[0.5ex]    
    Bavarian Nordic}  

% end the preamble and start the document
\begin{document}

% set the number of sectioning levels that get number and appear in the contents
    \setcounter{secnumdepth}{3}
    \setcounter{tocdepth}{3}

% denne kan ændres til maketitle, men så skal forsiden defineres under cls
    \input{forside}
    \include{forord}            % include an forord.tex
    \include{abstract}          % include the abstract.tex

    \begin{romanpages}          % start roman page numbering
    \tableofcontents            % generate and include a table of contents
    \listoffigures              % generate and include a list of figures
    \listoftables
    \end{romanpages}            % end roman page numbering

% Inkludering af kapitler og sektioner
    \include{1.0Kapitel}
    \include{2.0Preliminerrapportgrundlag}
    \include{3.0Verdiansettelsesmetoder}
    \include{4.0Fundamentalanalyse}
    \include{5.0Kapitalomkostningskomponenter}
    \include{6.0Verdiansettelse}
    \include{7.0Folsomhedsanalyse}

%now enable appendix numbering format and include any appendices
  
    \bibliography{ref.bib}
       
    \begin{appendices}
    \include{appendix1}
    \include{appendix2}
    \end{appendices}


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

Code: Select all

\printbibliography[title={Whole bibliography}]

\printbibliography[type=article,title={Articles}]
\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.

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

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

Issues with formatting bibliography

Post by thomashightower »

I have reached next step for this issue containing the split up of bibliography.

Code: Select all

%now enable appendix numbering format and include any appendices
\printbibliography[
heading=bibintoc,
title={Litteraturliste}
] %Prints the entire bibliography with the titel "Whole bibliography"

%Filters bibliography
\printbibliography[heading=subbibintoc,type=article,title={Videnskabelige artikler}]
\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: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Issues with formatting bibliography

Post by Johannes_B »

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.
Post Reply