-1

[EDIT]

I am having issues changing the citation style to my document. I am currently working with this preamble. There are a lot of packages, but I need them to organise the entire file. The current code works ok, but the citation style is not correct. I need to change it to apa 6th edition.

Preamble:

\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\usepackage{xspace}
\usepackage{subcaption}
\usepackage{placeins}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\usepackage{adjustbox} 
\usepackage{booktabs,caption} 
\usepackage[flushleft]{threeparttable}
\usepackage{ragged2e}
\usepackage{floatrow}
\usepackage{graphicx,wrapfig,lipsum}
\graphicspath{{../figs/}}
\usepackage{pdfcomment}
\usepackage{geometry}
\newgeometry{left=2.5cm,right=2.5cm,bottom=2.5cm}
\usepackage[english]{babel}
\usepackage{CJKutf8}
\pagestyle{headings}
\usepackage{blindtext}
\usepackage{csquotes}
\setcounter{secnumdepth}{4}
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\makeindex[columns=3, title=Alphabetical Index]
\usepackage{array}
\usepackage{tikzpagenodes}
\usepackage[format=plain, labelfont={bf,it}, textfont=it]{caption}
\usepackage{fancyhdr}
\usepackage[toc,nopostdot, nonumberlist,style=long,automake,acronym]{glossaries}
\usepackage{subfiles}
\usepackage{nicematrix}
\usepackage{amsmath,mathabx}
\usepackage{hyperref}
\usepackage{lscape}

\newcommand{\sectionbreak}{\phantomsection}
\hypersetup{
    colorlinks=true,
    linkcolor=black,
    filecolor=black,      
    urlcolor=black,
    citecolor=olive,
    pdftitle={PhD Dissertation},
    pdfpagemode=FullScreen,
    }

\urlstyle{same}

%\bibliographystyle{abbrvnat}
%\usepackage[authoryear]{natbib}%/bibliography apa
%\setcitestyle{authoryear,open={(},close={)}} %Citation-related commands

The bibliography file called bib.bib Example:

@article{henriquez_alternative_2017,
    title = {An alternative objective microscopic method for the identification of linear enamel hypoplasia ({LEH}) in the absence of visible perikymata},
    volume = {14},
    doi = {10.1016/j.jasrep.2017.05.040},
    journal = {Journal of Archaeological Science: Reports},
    author = {Henriquez, Alejandra Cares and Oxenham, Marc F.},
    year = {2017},
    pages = {76--84},
    file = {Full Text:C\:\\Users\\xello\\Zotero\\storage\\MV7QMSWQ\\Henriquez and Oxenham - 2017 - An alternative objective microscopic method for th.pdf:application/pdf},
}

Example of text citing something

\begin{document}
\begin{CJK*}{UTF8}{min}

\citep{henriquez_alternative_2017}, \citet{henriquez_alternative_2017}.

\end{CJK*}
\end{document}

I need to change the citation style to apa6: https://www.ctan.org/pkg/apa6. When Io tried to add this package. It entered into conflict with other packages like titlesec and amsmath, mathabx.

I get errors like

...ex/titlesec/titlesec.sty, 1642. Argument of \subparagraph has an extra }. or Runaway argument?

or

eric/mathabx/mathabx.sty, 67. Latex Error: Too many symbol fonts declared.

respectively.

I am not sure how to add this citation style to my current project. Maybe there is an alternative way? I need the packages I am using (like titlesec) to order my document.

Any help will be welcomed.

Thank you,

Flor
  • 1
  • 1
  • You're probably getting downvoted because your problem statement is "didn't work". This is not a helpful problem description; see [ask]. What happens when you compile the code, and what did you expect to happen instead? Any errors or relevant warnings? You may also get faster help with a [mcve]. You use a lot of (potentially distracting) packages. Good luck! – Robert Jul 22 '22 at 16:13
  • Thank you. I will add details of the errors I have. The packages are necessary for the document which is pretty long. It might not be relevant for this small portion I am showing, but they are important. It is important in my opinion to show all the packages because they could be could be in conflict with the citation style I want to use. One of the errors I got was related to the titlesec package. However, I cannot remove the package without undoing a large part of the document. I will rewrite the question entirely. – Flor Jul 22 '22 at 22:09
  • After puzzling your code fragments together and guessing enough code to complete the document, it compiles without the errors you describe. – samcarter_is_at_topanswers.xyz Aug 15 '22 at 19:09

1 Answers1

-1

[EDIT] Solved it. I used Biblatex (https://ctan.org/pkg/biblatex-apa6?lang=en) which also has an apa6 option. Solved additional errors. Works well.

Flor
  • 1
  • 1