Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible LaTeX syntax #6650

Open
dreamerblue opened this issue Mar 7, 2024 · 3 comments
Open

Incompatible LaTeX syntax #6650

dreamerblue opened this issue Mar 7, 2024 · 3 comments

Comments

@dreamerblue
Copy link

dreamerblue commented Mar 7, 2024

To Reproduce
Steps to reproduce the behavior:

  1. input regular inline/block LaTeX or copy markdown text containing LaTeX from other editors.
  2. Outline doesn't use the general LaTeX syntax ($ for inline, $$ for block) to render.

Expected behavior
use $ for inline, $$ for block. This is the widely used LaTeX syntax. Please DO NOT use custom syntax like $$ or $$$, which is not compatible.

Outline's custom syntax is not recognized by most other markdown editors when copying from other editors or pre-existing markdown documents for import, or export to markdown. This caused a lot of problems for us.

The biggest issues at hand are:

  1. LaTeX texts not recognized correctly if imported from a document source of another specification, and Outlint doesn't have any automatic conversion to fix it
image
  1. if working on Outline and using custom syntax $$ and $$$ to get a superficially acceptable rendering, when exporting as markdown and distributing it on other platforms, the exported markdown still retains the $$ and $$$, which cannot render correctly on other platforms.
image

Outline (please complete the following information):

  • Install: [self hosted]
  • Version: [7685637] (0.75.2)

Expected solution

Deprecate the custom syntax and use the general $/$$ to render LaTeX, including typing, copying and pasting, importing documents and exporting to markdown.

Test cases

### Inline

$x = y$

### Block

$$
y = x
$$

Wrong render result: copy and paste to Outline

image

Correct result: from popular markdown editors like Typora

image

Another correct result: GitHub's built-in markdown renderer

Inline

$x = y$

Block

$$ y = x $$

@dreamerblue dreamerblue added the bug label Mar 7, 2024
Copy link

linear bot commented Mar 7, 2024

@tommoor tommoor removed the bug label Mar 7, 2024
@tommoor
Copy link
Member

tommoor commented Mar 22, 2024

Deprecate the custom syntax and use the general $/$$ to render LaTeX, including typing, copying and pasting, importing documents and exporting to markdown.

Originally we used the standard syntax, however there were too many false positives with dollar signs in paragraphs being detected and converted to Latex blocks. Once #3000 is resolved we should be able to move back to the standard syntax as it would only be parsed on import/export instead of every render as it is today

@dreamerblue
Copy link
Author

dreamerblue commented Mar 22, 2024

Thanks for your reply. I agree with the refactoring of #3000, which will allow Outline to extend its functionality even more.

In the case of pasting markdown source into an editor, due to Outline's history and the fact that it has defined trigger symbols for many syntaxes that are different from markdown, it's understandable that it won't be automatically recognized as markdown when pasting because the editor is not a markdown editor semantically.

We should be responsible for converting $ and $$ to Outline's inline and block formula (like $$ and $$$) when importing markdown source to make it the correct result. The same is true for exporting. So maybe the key point of this issue is to fix the import/export issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants