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
166 stars 14 forks source link

Problems with code listings #62

Closed filippogambarota closed 5 months ago

filippogambarota commented 5 months ago

I have tried to add captions and cross referencing for code listings (https://quarto.org/docs/authoring/cross-references.html#code-listings) but I have an error:

In the default qmd file I've simply added:

#| echo: true
#| lst-label: lst-code
#| lst-cap: My code
print("hello world")

But during rendering I have

LaTeX Error: Environment codelisting undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

I have tried also to add \usepackage{codelisting} in the header but without success.

wjschne commented 5 months ago

Is it fixed now?

wjschne commented 5 months ago

Should code listing captions have the same format as figures and tables?

filippogambarota commented 5 months ago

Thank you now it works perfectly!