Fix LaTeX dollars
Bereinigt $-Zeichen in Markdown: escaped Währungsangaben, lässt Mathe-Formeln und Shell-Variablen unangetastet.
Bereinigt $-Zeichen in Markdown: escaped Währungsangaben, lässt Mathe-Formeln und Shell-Variablen unangetastet.
Der Prompt
Investigate and fix the actual $ usages in Markdown content.
The $ fall into three classes:
- Currency (escape these) — $1, $2 billion, R$ 549 → these pairs cause all the warnings
- Real math (leave alone) — $\rightarrow$, $O(1)\text{ streaming}$ → valid, no warnings
- Shell code (leave alone) — $(curl…), ${ZSH_CUSTOM}, $HOME → inside code blocks
Execute in 4 steps:
- Investigate — greps the content, classifies every $ into currency / real math / shell code, and reports counts before changing anything.
- Apply — checks the tree is clean, then writes and runs the exact tested Python script (code-fence-, inline-code-, frontmatter-, and math-span-aware; idempotent via the (?<!\\) lookbehind so re-running never double-escapes).
- Verify the diff — the safety net: greps that must print nothing for real math ($\rightarrow$, \text) and shell vars ($HOME, $(…), ${VAR}). If anything legit was touched, it tells you to git checkout -- . and stops.
- Print instructions — outputs the build-verify and commit/push commands for user to run.
Do not autonomously run any build, commit, or push.
Variablen & Platzhalter
Vor dem Einsatz diese Stellen durch eigene Angaben ersetzen:
ZSH_CUSTOMVAR
So nutzt du es
Den Prompt-Text kopieren (Button oben) und als System-Prompt bzw. erste Nachricht in ChatGPT, Claude oder einem lokalen Modell einfügen. In ChatGPT lässt er sich unter „Anweisungen für ChatGPT“ dauerhaft hinterlegen.
Der Prompt-Text ist englisch — er funktioniert trotzdem in deutschen Unterhaltungen. Für deutsche Antworten einfach am Ende ergänzen: „Antworte auf Deutsch.“
Im Detail
Dieser Prompt löst ein lästiges Problem in Markdown-Dokumenten mit Mathe-Support: Jedes $-Zeichen wird als Formel-Begrenzer interpretiert, weshalb Währungsangaben wie „5 $“ oder „$2 billion“ die Warnungen produzieren. Statt blind alles zu escapen, klassifiziert er jedes Dollarzeichen in drei Klassen – Währung (wird escaped), echte Mathe-Formeln wie $\rightarrow$ (bleiben unangetastet) und Shell-Variablen in Code-Blöcken wie $HOME oder $(curl …) (bleiben ebenfalls stehen). Das Ganze läuft in vier kontrollierten Schritten: erst untersuchen und zählen, dann ein getestetes Python-Skript anwenden, danach per Grep verifizieren, dass keine legitime Formel beschädigt wurde. Das Skript ist idempotent – ein erneuter Lauf escaped nichts doppelt. Lohnt sich für alle, die technische Doku mit gemischtem Inhalt pflegen.
Praxis-Tipp
Lass den Investigate-Schritt erst mitlaufen, bevor etwas geändert wird – die Klassifizierung zeigt dir, wie viele Währungs-, Mathe- und Shell-Vorkommen überhaupt existieren. So erkennst du sofort, ob sich der Aufwand lohnt.
Lizenz & Quelle
- Lizenz: CC0-1.0 (Public Domain)
- Quelle: awesome-chatgpt-prompts (GitHub)
Inhalt ansehen (fix-latex-dollars.txt)
Lade …
Erfahrungen & Kommentare.
Funktioniert der Prompt bei Ihnen? Tipps, Stolperfallen, Varianten — teilen Sie es mit der Community.
Lade Kommentare …
Passt dazu.
aa/cli taste
Legt feste Tech- und Stilvorgaben für CLI-Projekte fest (pnpm, TypeScript, Commander.js, Ordnerstruktur).
Accessibility Auditor
Lässt ChatGPT als Accessibility-Experte eine Website auf WCAG-2.2- und Section-508-Konformität prüfen.
Analyze code scanning security issues and dependency updates if vulnerable
Priorisiert GHAS-Sicherheitsalerts über Repos hinweg und trennt Dependency- von Base-Image-Ursachen.
