Open GregForkutza opened 8 months ago
I found the solution here: https://github.com/Zettlr/Zettlr/issues/4879
Specifically i made the following replacement in template.tex
I replaced lines 125-153 with
$if(csl-refs)$ % definitions for citeproc citations \NewDocumentCommand\citeproctext{}{} \NewDocumentCommand\citeproc{mm}{% \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} \makeatletter % allow citations to break across lines \let\@cite@ofmt\@firstofone % avoid brackets around text for \cite: \def\@biblabel#1{} \def\@cite#1#2{{#1\if@tempswa , #2\fi}} \makeatother \newlength{\cslhangindent} \setlength{\cslhangindent}{1.5em} \newlength{\csllabelwidth} \setlength{\csllabelwidth}{3em} \newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing {\begin{list}{}{% \setlength{\itemindent}{0pt} \setlength{\leftmargin}{0pt} \setlength{\parsep}{0pt} % turn on hanging indent if param 1 is 1 \ifodd #1 \setlength{\leftmargin}{\cslhangindent} \setlength{\itemindent}{-1\cslhangindent} \fi % set entry spacing \setlength{\itemsep}{#2\baselineskip}}} {\end{list}} \usepackage{calc} \newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}} \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} $endif$
I decided to reopen this , so that when you have the chance you can see if the template.tex file should be updated or not to reflect this. Its not clear to me what the exact issue is because some machines and not others have this bug. sample size is n= 4 and its a 50% split of experiencing the bug or not.
stumbled onto this today because i sometimes have similar issues over in mandown. Not sure how the R side of things handles pandoc et al, but the underlying issue (afaict) is that pandoc updates its latex templates (and template args) and you sometimes need to pull those changes into your custom template
so the csl handling as you have it
needs to look like this with newer versions of pandoc. But if you're on an old pandoc, you still need the old template
... the underlying issue (afaict) is that pandoc updates its latex templates (and template args) and you sometimes need to pull those changes into your custom template
That's actually the root-cause of many such errors, afaics. Thanks for pointing this out!
I finally had a chance to look at this error. I first found it in package {vitae} and now I think I fixed it. I used the solution seen here:
https://github.com/Zettlr/Zettlr/issues/4879
It seems to have fixed the problem with the Lonely \item, but I am not closing this issue yet until I test it with students in the next week.
I am using the cloned repo as is and no changes are made initially. I try to knit index. Rmd. The pdf does not compile. I get the following Errors in the Render window
I made sure tlmgr is fully upgraded.
There is further related behaviour I cannot explain.
If I remove both line 15 from 01-chap1.Rmd
and lines 35-38 from 99-references.Rmd
then the pdf compiles directly from index.Rmd
However If I leave the above lines in and knit Index.Rmd and then compile the thesis.tex file directly it produces a thesis.pdf file that contains the in text citation and the references list is filled, both correctly formatted. However Figure 2.1 now is missing its content but its caption is present.
Here is the errors from the thesis.log from trying to compile thesis.tex
This is for Language 'nil' not supported:
This is for _Line 450LaTeX Error: File `thesisfiles/figure-latex/ch1-scatterplot-1' not found.
and further downstream
and