Skip to main content

Inline LaTeX rendering (Add rendering option to chat specific setting)

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.

Status: Completed16 comments

Log in to comment and vote

Comments16

  • Tony Dinh

    Team•

    Oct 20, 2024

    TypingMind now supports both $$ ... $$ syntax and \[ ... \], \( ... \) syntax.

    • Salmon Yogurt

      •

      Oct 23, 2024

      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

      Team•

      Oct 24, 2024

      Mike Battaglia can you click "Edit" and show me the raw text?

    • Tony Dinh

      Team•

      Oct 24, 2024

      and where are you using typingmind from? is it from www.typingmind.com or somewhere else?

    • Tony Dinh

      Team•

      Oct 26, 2024

      Mike Battaglia looks all good to me.

      may be you just need to restart the app to get it updated to the latest version

  • Tony Dinh changed status to Completed
    Team•

    Oct 20, 2024

  • Tony Dinh changed status to Planned
    Team•

    Mar 2, 2024

  • Tony Dinh

    Team•

    Mar 2, 2024

    This can be done by adding a "Render inline LaTeX" setting in the chat setting panel (applied for the current chat only).

  • Ngoc Nguyen

    Team•

    Feb 22, 2024

    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)

  • Salmon Yogurt

    •

    Dec 17, 2023

    Here's a nice workaround:

    1. Install TeX All The Things: https://chromewebstore.google.com/detail/tex-all-the-things/cbimabofgmfdkicghcadidpemeenbffn?pli=1

    2. Set it up so that inline delimiters are \( and \), and block code delimiters are \[ and \].

    3. In the system prompt to GPT, tell it to put all LaTeX delimiters in an inline code 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.

    • Violet Marker

      •

      Mar 28, 2024

      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.

  • Salmon Yogurt

    •

    Dec 17, 2023

    +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.

  • Tony Dinh changed status to In Review
    Team•

    Nov 4, 2023