0

I'm using LaTeX to write school assignments and discussion posts, and I rely on Zotero for managing references. My workflow is LaTeX + Zotero in VS Code, which is more accessible with a screen reader than most other setups I’ve tried.

My school uses Brightspace, which allows discussion posts in either rich text or HTML. I’m trying to convert my .tex files to HTML so I can paste them into the discussion editor, and I want to include APA-style references.

I’m using Pandoc with this command:

pandoc main.tex \ --bibliography=references. Bib \ --csl=apa.csl \ --standalone \ -o main.html 

The HTML file is generated, but the references section is missing.

I’ve also tried converting to .docx and copying from there, but formatting gets messy. Copying from the PDF loses all formatting.

How can I get a clean HTML version of my LaTeX document with the references included?

Any help would be appreciated!

2
  • 1
    Welcome! Please do not cross post (reddit). It simply wastes people's time. And if you really feel the need to, please provide a link at least so that people can check if you have an answer at the other place. Commented Jun 5 at 6:47
  • I apologize. I've had experiences in the past with other communities where it took forever to get an answer, so I tend to post everywhere that might be relevant so my post gets seen by more people. Commented Jun 5 at 7:41

1 Answer 1

1

I figured it out thanks to a suggestion on Reddit!

To generate an HTML file from a LaTeX document with APA-style references using Pandoc, I needed to:

  • Use --citeproc to process citations.
  • Remove any \\bibliography or \\bibliographystyle commands from the .tex file.
  • Use \\cite{} commands for citations (not raw BibTeX).
  • Make sure my .bib file and apa.csl file are up to date.

Here’s the working command:

pandoc main.tex \ --bibliography=references.bib \ --csl=apa.csl \ --citeproc \ --standalone \ -o main.html 

This gave me a clean HTML file with both in-text citations and a full references section. I was already doing most of this right—the missing piece was the --citeproc flag.


Tips:

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.