I am requested to use the apa6 package (https://ctan.org/pkg/apa6?lang=en) but cannot compile the examples provided there in the sample/ folder (by running pdflatex shortsample.tex, for example), and instead I get the error ''Missing \begin{document}'' within file apa6.cbx provided by the biblatex-apa6 package (https://ctan.org/pkg/biblatex-apa6?lang=en).
At the end of this question I paste the relevant excerpt of the log file. Below follows additional information.
In the manual apa6.pdf there is no obvious instruction on how to install the package, but in the root folder a .dtx and an .ins file are provided and after googling I found that compiling the .ins file (e.g., pdflatex apa6.ins) generates a set of files including the apa6.cls file.
After copying the apa6.cls file to the samples/ folder and running pdflatex shortsample.tex I got an error about biblatex and apa6 style. I found online the package biblatex-apa6, and in the instructions in file biblatex-apa6.pdf, section 3, it says that it can be installed by copying .cbx, .bbx and .lbx files to subfolders of <texmf>/tex/latex/biblatex/. In my computer biblatex (installed with the package texlive-bibtex-extra) the relevant <texmf> is /usr/share/texlive/texmf-dist/. I copied the files, ran texhash and I now get mentioned error.
Excerpt of shortsample.log:
Package biblatex Info: Trying to load citation style 'apa6'...
Package biblatex Info: ... file 'apa6.cbx' found.
(/usr/share/texlive/texmf-dist/tex/latex/biblatex/cbx/apa6.cbx
File: apa6.cbx 2020/05/03 v8.4 APA 6th ed. biblatex citation style
Package biblatex Info: Delimiter 'nameyeardelim' in context '' already
defined,
overwriting.
Package biblatex Info: Delimiter 'nameyeardelim' in context 'textcite'
already
defined, overwriting.
Package biblatex Info: Delimiter 'andothersdelim' in context '' already
defined
, overwriting.
Package biblatex Info: Redefining '\fullcite'.
Package biblatex Info: Redefining '\citeauthor'.
Package biblatex Info: Redefining '\citeyear'.
Package biblatex Info: Redefining '\cite'.
Package biblatex Info: Redefining '\cites'.
Package biblatex Info: Redefining '\parencite'.
Package biblatex Info: Redefining '\parencites'.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.509 ...DelimAlias*[nptextcite]{finalnamedelim}[parencite]{finalnamedelim}
[p arencite]has a space. Is that incorrect? – Cicada Jun 15 '20 at 11:57\documentclass[options]{apa6}. What code did you run to produce the errors? Are you compiling with pdflatex engine, or xelatex/lualatex? – Cicada Jun 15 '20 at 12:16\documentclassa few preamble lines and "lorem ipsum" as well as a citation in the document body.) In this case I have a hunch this could be a version problem, so the full.logfile would be nice as well. If it is too long for the question, please upload it to a text-sharing site such as https://pastebin.com/ or https://gist.github.com/ – moewe Jun 15 '20 at 14:13sudo apt install texlive-bibtex-extra). The TeX live versions shipped by Linux distributions can be quite outdated and in general don't keep up-to-date with CTAN. Then you installed the current version ofbiblatex-apa6from CTAN. That version is intended to be used with a more modern version ofbiblatexthan thebiblatexshipped by your Linux distribution. That version mismatch causes the error. – moewe Jun 15 '20 at 16:12apa6orbiblatex-apa6that is an issue. Do double check, though, if (an older version of)apa6is available viaapt, that version would presumably load an old version ofbiblatex-apa(which again should be available) instead ofbiblatex-apa6. – moewe Jun 15 '20 at 16:17apa6andbiblatex-apa6would be to remove the TeX live installed viaapt/apt-getand get a vanilla TeX live from TUG instead (https://tex.stackexchange.com/q/1092/35864). – moewe Jun 15 '20 at 16:18\documentclass[man, 12pt, a4paper]{apa6}and has later in the preamble\usepackage[style=apa6,sortcites=true,sorting=nyt,backend=biber]{biblatex}yields the problem. – Joao Jun 15 '20 at 16:47apastyle, but the journal is requesting classapa6. I checked the link you provided for the TUG installation and it seems quite involved. – Joao Jun 15 '20 at 16:57apa6and the bibliography stylebiblatex-apa6(or in older versionsbiblatex-apa). It is possible that the classapa6is available on your system in one of then manytexlive-...packages served viaapt. That version is likely to be compatible with all other packages on your system. So I suggest you completely remove the classapa6and bibliography stylebiblatex-apa6you manually installed. Instead make sure you havetexlive-publishersandtexlive-bibtex-extrainstalled. – moewe Jun 15 '20 at 17:06