Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

References don't work! #18

Open
RussellAndrewEdson opened this issue Jul 30, 2024 · 2 comments
Open

References don't work! #18

RussellAndrewEdson opened this issue Jul 30, 2024 · 2 comments

Comments

@RussellAndrewEdson
Copy link
Member

In the Rmarkdown template, references/citations don't work. What a mess...

Given this and probably related issues #12 and #13, it almost feels like a rewrite-from-scratch might be in order for AAGI.sty and AAGI_markdown.tex (e.g., part of #13 looks to be caused by duplication between the .tex file and the .sty file, as well as things not being in the 'proper' order for includes, etc). @rogerssam, thoughts?

@rogerssam
Copy link
Member

Yeah, unfortunately I think it's probably worth starting from scratch. The more we can use the default templates and just change some styles etc, I think the smoother it will be. This goes for the translation to quarto as well. Because it all goes through Pandoc, the more we can use the Pandoc approach, I think the better it will be.

@RussellAndrewEdson
Copy link
Member Author

Fixed for the short report template in d5c7741 (I've also gone ahead and included the basic AAGI Palette colours as in #16 and made some additions to the Rmd YAML to control things). Effectively it was a rewrite of the AAGI_markdown.tex file using the latest pandoc template as the starting point:

  • I've cut out all of the beamer stuff from the latex pandoc template, as well as all of the luatex/xetex bizo (the latter for brevity and trying to keep the template small and manageable, but we can copy/paste those in later if we have people that need luatex/xetex support).
  • At the moment the referencing is done entirely through pandoc-citeproc, which is the way it normally happens by default for new Rmarkdown documents. natbib no longer gets (explicitly) loaded at all. (Again, we can add that stuff back in later if desired, but I don't think it's necessary.)
  • I added the Note environment I use often into the template: \begin{note} ... \end{note}. This is useful for eye-catching notes that you want the reader to notice/respond to. I use it when asking questions for specific follow-up from clients, etc.
  • I've moved everything into the AAGI_markdown.tex template and gotten rid of the AAGI.sty file entirely. This happened naturally: I'd started out trying to keep the two segregated (e.g., "maybe the AAGI palette colours should be in the style file, that makes sense!"), but I quickly found myself coming up against ludicrous roundabouts and unnecessarily duplicated code to justify the separate file (e.g., "Well since we can't be sure the AAGI palette exists if AAGI.sty wasn't loaded, then maybe the template file should check if AAGI.sty was loaded and if not, define a whole bunch of 'placeholder' colours for aagiteal, aagiblue, etc?"). I actually wonder if there's a point to having the AAGI.sty file at all for the other templates, but I'll see if there's a reasonable segregation that can be made as I continue with the other templates.
  • I set the font-size as 12pt (configurable from the Rmd YAML header now), not realising that the old one was probably 10pt. I'm okay with this: the 12pt matches up better with the Word version of the short report anyway, and is arguably easier for people to read.

I'm sure the referencing is probably broken for the other Rmarkdown templates too, so I'll keep working my way through the fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants