wjschne / apaquarto

A quarto extension for creating APA7 documents in .docx, .html, and .pdf formats
https://wjschne.github.io/apaquarto/
Creative Commons Zero v1.0 Universal
170 stars 15 forks source link

A couple new issues with tables & figures #30

Closed themaymon closed 10 months ago

themaymon commented 10 months ago

Hello again!

I've encountered a couple problems I wanted to ask about:

  1. I was receiving an error message when I attempted to include figures or tables. I used the example in your helpful example QMD file. The error message is: Error in knitr::opts_current$lock(): ! attempt to apply non-function Backtrace:
  2. global .main()
  3. global <fn> (before = TRUE, option = <kntr_st_>)

Curiously, I decided to try rendering your QMD document showing all the features and I encountered the same error message for chunk 8/17 [apafg-myplot]. Next, I tried rendering the document with only one of the example tables or figures (so removing all others) and can confirm this happens for any of the types of tables or figures you provide.

  1. I have noticed that sometimes shortitle: in the YAML will work for putting text in the running head. But in some projects it won't work (and the running head will just say "Running Head") when rendering to docx.

  2. I was looking through your README and i noticed you list the include statement as: {{{< include _extensions/wjschne/apaquarto/_apa_title.qmd >}}} with 3 {{{. This is what I had copied that led to my last issue. So, I thought you might want to update that to correct to only 2 {{.

wjschne commented 10 months ago

Thanks for letting me know what errors and problems you are encountering.

  1. The error should go away if you update to the latest version of knitr. Let me know if it does not.
  2. The running head issue should be resolved as well with the next release. It no longer relies on the officer package to recreate the reference template with each render.
  3. I am currently reworking the extension so that no include statement will be necessary.
themaymon commented 10 months ago

You were correct about needing to update knitr. Problem solved!

I will be eagerly awaiting the new release. Thank you again for all your hard work!