How do I add additional LaTeX packages to render as HTML in Quarto? I can render the PDF without problems
Asked Answered
F

0

6

I am trying to render some actuarial notation using Quarto (an angle bracket over a subscript to indicate duration). I can load additional packages when outputting PDF, but the HTML LaTeX options don't allow me to do the same thing.

How can I resolve this?

Here is the start of my .qmd file.

---
title: "Actuarial Mathematics" 
author: "Dr Graham J. Murphy FIA" 
format: 
  html:
    toc: true 
    number-sections: true 
    html-math-method: katex
  pdf: 
     include-in-header:  
        - text: |
            \usepackage{amsfonts}
            \usepackage{amsmath}
            \usepackage[thickspace,nobracket]{actuarialangle}
geometry:
    - top=30mm
    - left=30mm
docx: default 
editor: visual
---

# Survival Models {#survival}
$$
\actuarialangle{n}
$$

This works fine for PDF, but not for HTML outputs.

Fayfayal answered 26/6, 2023 at 15:47 Comment(1)
This seems to be not very straightfoward for HTML output, see here.Tachygraphy

© 2022 - 2024 — McMap. All rights reserved.