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

BUG: Adding a back of note card breaks latex equations in existing card #2296

Open
2 tasks done
Jeanot-Zubler opened this issue Mar 19, 2025 · 0 comments
Open
2 tasks done

Comments

@Jeanot-Zubler
Copy link

Have you searched for existing issues (including closed ones)?

  • Yes, I have searched the existing issues.

Does this bug persist in a new vault with only Excalidraw installed?

  • Yes, I have verified the issue persists.

Your environment

SYSTEM INFO:
Obsidian version: v1.8.9
Installer version: v1.6.7
Operating system: Windows 10 Pro 10.0.19045
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Excalidraw v2.9.2

Your NotebookLM query

Query

When I add a latex equation, e.g. $$1 + 1 = 2$$ to the most recently created back-of-note card, then create a new back-of-note card, one set of dollar signs is removed from the equation. This leaves just $1 + 1 = 2$. Why could this be, is this a bug? Answer in english

Response

Es scheint, dass es sich bei dem Entfernen eines Satzes von Dollarzeichen beim Erstellen einer neuen Back-of-Note-Karte, nachdem Sie eine LaTeX-Gleichung mit $$ hinzugefügt haben, um ein unerwartetes Verhalten handeln könnte, da die Quellen keine derartige automatische Entfernung beschreiben.

Hier sind mögliche Gründe für dieses Verhalten, basierend auf den Informationen in den Quellen und allgemeinem Wissen über Markdown und Obsidian:

• Interpretation als Inline-LaTeX: Es ist möglich, dass beim Erstellen einer neuen Back-of-Note-Karte der Inhalt der vorherigen Karte oder die Art und Weise, wie er intern verarbeitet wird, dazu führt, dass $$1 + 1 = 2$$ fälschlicherweise als Block-LaTeX interpretiert und dann beim Speichern oder bei der Erstellung der neuen Karte zu Inline-LaTeX $1 + 1 = 2$ reduziert wird. Normalerweise kennzeichnen doppelte Dollarzeichen Block-LaTeX, während einzelne Dollarzeichen Inline-LaTeX kennzeichnen

• Fehler im Plugin: Dieses Verhalten könnte ein Fehler (Bug) im Excalidraw-Plugin selbst sein. Die Quellen erwähnen verschiedene Fehlerbehebungen in neueren Versionen, aber dieses spezifische Problem wird nicht genannt
. Es ist möglich, dass ein solcher Fehler existiert, insbesondere im Zusammenhang mit der Verarbeitung von Markdown-Inhalten in Back-of-Note-Karten

• Interaktion mit anderen Plugins: Es besteht die Möglichkeit, dass ein anderes Obsidian-Plugin, das Sie verwenden, in den Prozess der Back-of-Note-Karten oder die Verarbeitung von LaTeX-Gleichungen eingreift und dieses unerwünschte Verhalten verursacht.

Da die Quellen keine direkte Erklärung für dieses spezifische Problem liefern, und es sich um ein unerwartetes Verhalten handelt, ist es wahrscheinlich, dass es sich um einen Fehler im Excalidraw-Plugin oder eine Interaktion mit einem anderen Plugin handelt.

Um dieses Problem weiter zu untersuchen, könnten Sie folgende Schritte unternehmen:

• Überprüfen Sie die Excalidraw-Plugin-Version: Stellen Sie sicher, dass Sie die neueste Version des Excalidraw-Plugins verwenden, da Fehler in neueren Versionen behoben sein könnten

• Testen Sie mit einer einfachen Gleichung: Versuchen Sie, nur eine sehr einfache LaTeX-Gleichung (z. B. $$a = b$$) hinzuzufügen und zu beobachten, ob das gleiche Problem auftritt.

• Deaktivieren Sie andere Plugins: Deaktivieren Sie vorübergehend alle anderen Obsidian-Plugins außer Excalidraw und prüfen Sie, ob das Problem weiterhin besteht. Wenn nicht, aktivieren Sie die Plugins einzeln wieder, um den potenziellen Konflikt zu identifizieren.

• Melden Sie das Problem: Wenn das Problem weiterhin besteht, auch mit der neuesten Version des Plugins und ohne andere aktive Plugins, sollten Sie dieses Verhalten als potenziellen Fehler im GitHub-Repository des Excalidraw-Plugins melden
. Geben Sie dabei so viele Details wie möglich an, einschließlich der Excalidraw- und Obsidian-Versionen sowie eine detaillierte Beschreibung der Schritte zur Reproduktion des Problems.

Die Back-of-Note-Karten sind als Markdown-Abschnitte am Anfang Ihrer Excalidraw-Datei gespeichert
, und LaTeX-Formeln werden in Markdown normalerweise mit Dollarzeichen umschlossen. Eine automatische Entfernung eines Satzes von Dollarzeichen beim Erstellen einer neuen Karte ist kein erwartetes Verhalten.

Response, translated

Even though I asked it to answer in English, it answered in german. Here is a ChatGPT translation

It seems that the removal of a set of dollar signs when creating a new back-of-note card after adding a LaTeX equation with $$ could be an unexpected behavior, as the sources do not describe such automatic removal.

Here are possible reasons for this behavior, based on the information in the sources and general knowledge about Markdown and Obsidian:

  • Interpretation as Inline LaTeX: When creating a new back-of-note card, the content of the previous card or the way it is internally processed might cause $$1 + 1 = 2$$ to be mistakenly interpreted as block LaTeX and then reduced to inline LaTeX $1 + 1 = 2$ when saving or generating the new card. Normally, double dollar signs denote block LaTeX, while single dollar signs denote inline LaTeX.

  • Bug in the Plugin: This behavior could be a bug in the Excalidraw plugin itself. The sources mention various bug fixes in recent versions, but this specific issue is not listed. Such a bug may exist, especially in connection with processing Markdown content in back-of-note cards.

  • Interaction with Other Plugins: It is possible that another Obsidian plugin you are using is interfering with the back-of-note card process or the handling of LaTeX equations, causing this unwanted behavior.

Since the sources do not provide a direct explanation for this specific issue and it appears to be unexpected behavior, it is likely a bug in the Excalidraw plugin or an interaction with another plugin.

To further investigate this issue, you could take the following steps:

  • Check the Excalidraw Plugin Version: Ensure that you are using the latest version of the Excalidraw plugin, as bugs may have been fixed in newer versions.

  • Test with a Simple Equation: Try adding only a very simple LaTeX equation (e.g., $$a = b$$) and observe whether the same issue occurs.

  • Disable Other Plugins: Temporarily disable all other Obsidian plugins except for Excalidraw and check if the issue persists. If not, enable the plugins one by one to identify the potential conflict.

  • Report the Issue: If the issue persists, even with the latest version of the plugin and no other active plugins, you should report this behavior as a potential bug in the Excalidraw plugin's GitHub repository. Provide as many details as possible, including the Excalidraw and Obsidian versions, along with a detailed description of the steps to reproduce the issue.

Back-of-note cards are stored as Markdown sections at the beginning of your Excalidraw file, and LaTeX formulas are typically enclosed in dollar signs in Markdown. The automatic removal of a set of dollar signs when creating a new card is not expected behavior.

Describe the bug

When I add a latex equation (e.g. $$1 + 1 = 2$$) to the most recently created back-of-note card, then create a new back-of-note card, one set of dollar signs is removed from the equation. In the example this leaves just $1 + 1 = 2$.

This is a minor inconvenience when dealing with simple equation, but breaks the whole equation if it spans multiple lines.

Steps to reproduce

  1. Create a new drawing
  2. Right-click -> Add back-of-note card
  3. Enter a title, e.g. card1
  4. Enter some text into the card (without the backticks):
    Sample text
    
    $$
    2 + 2 = 5
    - 1  
    $$
    
    more sample text
    
  5. Add another back-of-note card and enter a title, e.g. card2
  6. The multiline equation should now be broken

Expected behavior

I would expect that adding a new back-of-note card does not change the content of previous cards

Additional context

No response

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

1 participant