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

Markdown doesn't recognize \operatorname anymore #1688

Open
kasparthommen opened this issue May 3, 2023 · 11 comments
Open

Markdown doesn't recognize \operatorname anymore #1688

kasparthommen opened this issue May 3, 2023 · 11 comments

Comments

@kasparthommen
Copy link

Until a short while ago (approximately 1-3 months, can't say for sure), using \operatorname in github gists worked just fine. Now it doesn't work anymore, see e.g. the following gist of mine:

https://gist.github.com/kasparthommen/d996b49b965a44dbfedc8677575a70ec

In fact, it doesn't work in this issue text either, see below.

$\operatorname{P}(A) = 1$

@kasparthommen kasparthommen changed the title Gists don't recognice \operatorname anymore Markdown doesn't recognize \operatorname anymore May 9, 2023
@mdehling
Copy link

mdehling commented Jun 9, 2023

I have the same issue -- latex code I wrote last year no longer renders correctly:

https://github.com/mdehling/kolkin-style-transport/blob/679ca79ded0d53963f69a883c40b561b439a4c42/README.md

Can this be fixed?

@3f6a
Copy link

3f6a commented Aug 28, 2023

Also seeing this. Please fix.

@WesleyMcGinn
Copy link

Yes, this is very strange. The \operatorname function in MathJax Markdown is extremely important, especially when using operators like floor() and ceiling(), which are typically not recognized as common math functions (so \floor cannot be used like \cos can).

Until Github fixes this, here is a temporary solution:
You can use \text instead of \operatorname...

Does Not Work:

Code:

$$ \operatorname{floor}(x) $$

Output:

$$ \operatorname{floor}(x) $$

Works (sort of):

Code:

$$ \text{floor}(x) $$

Output:

$$ \text{floor}(x) $$

The downsides to using this method are:

  1. It doesn't look exactly the same as other mathematical operators such as sin() and cos().
  2. It doesn't have built-in spacing around it like other mathematical operators do.
  3. It is somewhat unprofessional to put annotation text into an equation where an operator is supposed to be, for those who are actually looking into the markdown code.

This could be working on some computers but not others. For those of you who don't see any error in the section labeled "Does Not Work", here is an image of what we are seeing:
image

Please fix this very soon. People shouldn't have to use PDFs instead of markdown files just so that they can show a simple math function in an equation.

@mdehling
Copy link

As a workaround, you can use \mathop with \text to get the correct spacing for an operator:

$$ 2 \mathop{\text{tanh}} x = 0 $$

results in

$$ 2 \mathop{\text{tanh}} x = 0 $$

Flopsky added a commit to Flopsky/sga that referenced this issue Nov 3, 2023
\operatorname is deprecated 

ref : github/markup#1688
Copy link

Stale issue message

@3f6a
Copy link

3f6a commented Jul 13, 2024

The issue is not resolved

Copy link

Stale issue message

@NathanielJS1541
Copy link

This issue is still not fixed. Bumping to stop it from being automatically closed.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 11, 2024
@3f6a
Copy link

3f6a commented Nov 11, 2024

This issue has not been fixed. Please keep open.

@github-actions github-actions bot removed the Stale label Nov 12, 2024
@kmanu225
Copy link

I got the same issue 12/24/2024. Please fix it.

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

6 participants