# Include cooked Discourse-math in print view and emails

**URL:** https://meta.discourse.org/t/include-cooked-discourse-math-in-print-view-and-emails/384092
**Category:** Feature
**Tags:** email, math, ux
**Created:** [September 26, 2025, 7:46am UTC](https://meta.discourse.org/t/include-cooked-discourse-math-in-print-view-and-emails/384092 "2025-09-26T07:46:45Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [September 26, 2025, 7:46am UTC](https://meta.discourse.org/t/include-cooked-discourse-math-in-print-view-and-emails/384092/1 "2025-09-26T07:46:45Z")

</div>

**Problem**  
Discourse-math renders beautifully in the browser, but in contexts where JavaScript can’t run, math falls back to raw LaTeX source. Two high-impact cases:

- **Print view (`/print` or browser print-to-PDF):** math shows as `$...$` instead of rendered symbols.
- **Emails (digests, notifications, subscriptions):** math is delivered raw, unreadable to recipients unless they copy-paste into a LaTeX editor.

This breaks important workflows for communities that rely on Discourse for technical content.

* * *

**Why it matters**

- STEM educators and researchers often need to **print topics** or **forward emails**. If the math isn’t legible, those exports are unusable.
- Other gaps in print/emails (spoilers, oneboxes, images) have been fixed — math is a glaring omission.
- Supporting cooked math in non-JS contexts would make Discourse a first-class platform for technical communities.

* * *

**Proposed solution**

- **Lightweight step (print):**
  - Ensure `/print` view includes cooked math HTML.
  - Trigger MathJax typesetting before print.

- **Heavier step (emails):**
  - Explore server-side MathJax rendering, as [Sam suggested](https://meta.discourse.org/t/discourse-math/65770/214).
  - Render math to SVG or pre-cooked HTML so recipients see legible equations directly in email clients.

- **Optional site setting:**
  - “Use cooked math in print view/emails” → lets admins choose between raw source vs rendered math.

* * *

**Related issues / prior work**

- ✅ Math inside `[details]` panes fixed (PR #111, June 2025).
- 📝 Print view already had fixes for spoilers/oneboxes → precedent for including cooked elements.
- 📧 Emails: Sam’s comment (#214) identified server-side render as the long-term solution.

* * *

**Summary / TL;DR**  
Right now, math in print view and emails falls back to raw LaTeX. Adding cooked math rendering would make PDFs and digests **readable, professional, and consistent** with what users see in the browser.

> **Reproduce on Discourse with iOS Safari**
>
> Even when **Request Desktop Site** is enabled in Safari, Discourse still appends  
> `?mobile_view=1` when opening `/print`, which forces the stripped-down mobile print view.
> 
> Workaround: manually change to `?mobile_view=0` for the full desktop print layout.
> 
> **Example**  
> `/t/fw-the-email-subject/12345/print?mobile_view=0`

---

_[View the full topic](https://meta.discourse.org/t/include-cooked-discourse-math-in-print-view-and-emails/384092)._
