update
This commit is contained in:
@@ -169,6 +169,11 @@ def _mathe_auftraege(text: str, wo: str) -> list[str]:
|
||||
if re.search(r"\\n(?![a-zA-Z])", text): # \neq etc. bleiben unberührt
|
||||
auftraege.append(f"{wo}: literales „\\n“ im Text — durch echten"
|
||||
f" Zeilenumbruch bzw. Leerzeile ersetzen.")
|
||||
lange = [m for m in re.findall(r"\$([^$\n]+?)\$", text) if len(m) > 60]
|
||||
if lange: # Inline-Formeln brechen nie um — auf schmalen Screens Überlauf
|
||||
auftraege.append(f"{wo}: {len(lange)} überlange Inline-Formel(n)"
|
||||
f" (>60 Zeichen, z. B. „{lange[0][:40]}…“): abgesetzt"
|
||||
f" als $$…$$ setzen.")
|
||||
formeln = ([{"tex": m, "display": True} for m in re.findall(r"\$\$([\s\S]+?)\$\$", text)]
|
||||
+ [{"tex": m, "display": False} for m in re.findall(r"\$([^$\n]+?)\$", text)])
|
||||
for f in _katex_fehler(formeln):
|
||||
|
||||
Reference in New Issue
Block a user