Inline LaTeX rendering (Add rendering option to chat specific setting)
complete
P
Pablo
I'd like to suggest adding LaTeX rendering support in Typingmind for inline equations, like
\( ax^2 + bx + c = 0 \)
, not just for the displayed equations wrapped in \[ ... \]
. It'd make a big difference for users to have that flexibility.Tony Dinh
This can be done by adding a "Render inline LaTeX" setting in the chat setting panel (applied for the current chat only).
Tony Dinh
complete
Tony Dinh
TypingMind now supports both
$$ ... $$
syntax and \[ ... \]
, \( ... \)
syntax.M
Mike Battaglia
Tony Dinh it doesn't seem to be working here. How do we get this to work? (Note the brackets really are written as
\[ \]
, but it just renders as [ ]. Same with parentheses.)Tony Dinh
Mike Battaglia can you click "Edit" and show me the raw text?
Tony Dinh
and where are you using typingmind from? is it from www.typingmind.com or somewhere else?
M
Mike Battaglia
Tony Dinh Yes, typingmind.com. Here it is:
You're right, and since you're explicitly asking to test different delimiters, let's try them:
Single dollar: $x^2 + y^2 = r^2$
Double dollar: $$x^2 + y^2 = r^2$$
Brackets: \[x^2 + y^2 = r^2\]
Parentheses: \(x^2 + y^2 = r^2\)
Display environment:
\begin{equation}
x^2 + y^2 = r^2
\end{equation}
This way you can see which ones render correctly in your environment.
Tony Dinh
Mike Battaglia looks all good to me.
may be you just need to restart the app to get it updated to the latest version
M
Mike Battaglia
Tony Dinh it looks like it renders correctly now but is buggy. With ChatGPT-4o it renders correctly. With Claude it doesn't, but if I click "edit" on Claude's response and then "update" the post without actually changing anything, it then renders correctly. Also if I click "copy" it replaces all
\[
and \]
with $$
in the copied output, but if I click "edit" then the textbox has the correct delimiters.Tony Dinh
Merged in a post:
Request for extended LaTeX Rendering support in prompts and completions
stardust lo
As a mathematics student, I've found invaluable assistance from GPT-4 provided through your platform.
In May, I was excited when you introduced LaTeX formula rendering. However, I realized that this support seems to be limited to 'display' math mode where expressions are enclosed by
$$
in the completion text. One minor limitation is that 'inline' math mode, which is often denoted by $
, \(
, or\)
as delimiters, does not appear to render in the output text. The corresponding mathematical symbols do not translate properly within the completion. Furthermore, LaTeX symbols in the input content (prompts) also don't render into their intended mathematical symbols.
I've attempted to use different browsers, such as Edge, Safari, and Chrome, but the problem persists.
I believe the ability to render inline LaTeX symbols within both prompts and completions would greatly enhance user experience, especially for those who frequently interact with mathematical content, like me.
Tony Dinh
planned
Tony Dinh
This can be done by adding a "Render inline LaTeX" setting in the chat setting panel (applied for the current chat only).
N
Ngoc Nguyen
N
Ngoc Nguyen
N
Ngoc Nguyen
hi, we do support LaTeX but we couldn't ensure the best UX for all math symbols as it may vary in many different use cases / aspects.
In this case, you can simply guide the AI assistant to always put your math formula between "$$" in the system instruction. It should work for all cases.
Or you can directly import this AI character: https://cloud.typingmind.com/characters/c-01HP4W1STDBXZ3HGFHNWQXHTAS (you can import via this link or go to AI Character > Find the "Specialized Assistants" category > Choose Equation Master)
M
Mike Battaglia
Here's a nice workaround:
- Install TeX All The Things: https://chromewebstore.google.com/detail/tex-all-the-things/cbimabofgmfdkicghcadidpemeenbffn?pli=1
- Set it up so that inline delimiters are \(and\), and block code delimiters are\[and\].
- In the system prompt to GPT, tell it to put allLaTeX delimiters in aninlinecode block, to prevent the Markdown parser from escaping the\[and\]to just[and], and etc. This means that it should use`\(and`\)as inline LaTeX delimiters, and`\[and`\]as block LaTeX delimiters.
I am using the following prompt:
---
IMPORTANT NOTE ABOUT LATEX RENDERING: please put all LaTeX in inline `code` delimiters
in addition
to the latex delimiters. For instance, inline LaTeX should look `\(like this\)`, with a simple `backtick` added around the \( and \) delimiters. Block latex looks like this:`\[
block latex
\]`
This is a bit strange because you're putting
inline
code delimiters around block
latex, but it simply has to be this way to render correctly in this system. You must ALWAYS use these delimiters for latex!---
Note that to get this to render correctly above, I've had to use a bizarre unicode backtick ` instead of the correct one, so go in and substitute ` for the true backtick.
This seems to work pretty well, although there may be some edge cases caused by the interaction of the Markdown and LaTeX renderers.
H
Henry Redmond
Mike Battaglia
Thank you for sharing this workaround for LaTeX rendering using the TeX All The Things extension. However, it seems that the TeX All The Things extension may no longer be actively maintained by its developers, as there hasn't been an update for quite some time. There is a number of rendering bugs, particularly on dynamically responsive pages when streaming mode is on, where text duplication or omission might occur.
Btw, as a user of Typingmind native on macOS, I can't load load extension such as TeX All The Things.
M
Mike Battaglia
+1 this; should be fairly easy to do. In fact, would probably be even better if \( and \), as well as \[ and \], were set up, as that's the "native" output of GPT.
Load More
→