Automattic / Automattic/jetpack

Beautiful Math Feature Request: Ability To Increase DPI

Open
#7,392 5 comments 0 reactions 0 assignees View on GitHub
[Feature] Beautiful Math [Feature] Photon [Pri] Low Customer Report [LEGACY] Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Related to: https://github.com/Automattic/jetpack/issues/2360

#### Steps to reproduce the issue

Looking at this code:
https://github.com/Automattic/jetpack/blob/master/modules/latex.php

And this doc:
https://jetpack.com/support/beautiful-math-with-latex/

I see that I can render in "Huge" mode by setting `s=4`.

#### What I expected

A high quality image suitable for printing in a book.

#### What happened instead

Unfortunately, even at this setting, the image is is not high quality enough for print.

#### Feature request

Assuming the underlying toolset behind `wp.com/latex.php` is the same as [this plugin](https://github.com/wp-plugins/wp-latex/blob/master/automattic-latex-dvipng.php#L255), would it be possible to expose the `-D` flag for `AUTOMATTIC_LATEX_DVIPNG_PATH` up to a reasonable maximum? Like, I could call your API with `d=300` or something?

Thank you for your consideration.

Contributor guide

Open the contributing guide

Research direction

Read modules/latex.php and compare the linked wp-latex implementation, especially automattic-latex-dvipng.php. Determine where rendering options are handled and how an API value such as d should map to the -D flag. Done means a bounded DPI value can request higher-quality output, with the Beautiful Math documentation updated to describe the option.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, php
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.