framapiaf.org est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Un service Mastodon fourni par l'association d’éducation populaire Framasoft.

Administré par :

Statistiques du serveur :

1,4K
comptes actifs

#latex

14 messages14 participants0 message aujourd’hui
Suite du fil

Neat and related: When writing HTML with some math, I don't really want to write MathML by hand (let alone depend on MathJax or something like that). LaTeXML turns out to be helpful again, specifically via the latexmlmath (which btw. can be used above as well, and is faster). Either way, I have quickly hacked together a function that uses latexmlmath to convert TeX-math in a comment into MathML:

(defun mathml-from-tex ()
  "Convert TeX in a comment to MathML in a buffer.
The TeX has to be written in a single-line comment prefixed with a
\"MathML:\" string.  For example:

  <!-- MathML: \frac{-b \\pm \\sqrt{b^2 -4ac}}{2a} -->

Everything until the end of the comment (or line) is passed to
\"latexmlmath\" (part of the LaTeXML suite) and injected into the next
line of the buffer.  A comment indicating the end of the math block is
also added, so that multiple invocations of the command can replace the
old output."
  (interactive)
  (save-excursion
    (goto-char (line-beginning-position))
    (unless (search-forward-regexp
	     (rx (literal comment-start) (* space)
		 "MathML: " (group (* nonl))
		 (literal comment-end))
	     (line-end-position) t)
      (user-error "No instruction found"))
    (if (eobp)
	(insert "\n")
      (forward-line 1))
    (let ((end "EndOfMathML")		;TODO: use </math>
	  (math (match-string 1))
	  (start (point)))
      (when (search-forward-regexp (rx (literal end)) nil t)
	(delete-region start (line-end-position)))
      (save-excursion
	(insert end)
	(save-excursion
	  (insert (if (eolp) "" "\n")))
	(comment-line 1))
      (call-process-region math nil "latexmlmath" nil t t "-"))))

I also attach a quick demo, see below.

En réponse à Martin Hagmüller 🚴🚅

@mhagmuller Hatte vor vielen Jahren selbst die fragwürdige Ehre, sowohl via Word als auch via #LaTeX diverse Konferenz-Proceedings technisch zu erstellen.

Man muss hier nicht extra betonen, wie viel mehr Schmerz das mit #Word war. Aber auch bei LaTeX war der Aufwand nicht unerheblich.

Persönliches Highlight: ein Prof schickte doch tatsächlich sein Paper als ein doc-File (damals noch ohne "x") für ein (LaTeX-)Proceeding, das er einfach bei der Dateiendung auf ".tex" änderte. 🤦‍♂️

Coucou #LaTeX c'est encore moi avec mes transcriptions : comment je peux aligner le haut de mon machin multilignes avec ma ligne principale ET avoir un délimitateur type [ ou | qui ne dépasse pas ?

War jahrelang von #LaTeX überzeugt. Aber nachdem ich meine ersten Dokumente mit @typst geschrieben habe, glaube ich, dass hier erstmals ein würdiger Nachfolger aufgetaucht ist. Ich bin regelmäßig überrascht, wie einfach Sachen gehen, die in LaTeX eher umständlich waren. Und kompilieren geht so schnell.

Suite du fil

Si il y'en a qui sont au courant, je cherche un moyen d'utiliser #emacs natif sous android (pas la version console termux) + #termux + #termuxapi.

Pour les deux premiers, j'ai trouvé des builds spéciaux d'emacs et termux avec des apk signés par la même clef. Ça permet à emacs de pouvoir utiliser des programmes installés via termux (pkg install xxx), utils pour plein de fonctionnalité (#gnuplot, #gnupg, export #latex pdf, #git, etc..).
sourceforge.net/projects/andro

Par contre, je n'ai pas trouvé d'apk de termux-api avec cette même clef. Si il y a rien, je vais devoir déconstruire l'apk et la re-signer avec la bonne clef, mais j'aimerai éviter si c'est possible..

sourceforge.netAndroid ports for GNU Emacs - Browse /termux at SourceForge.net

Sonderzeichen, #ZUGFeRD #LaTeX und #XML, aaargh! Warum haben ausgerechnet Firmennamen ein typisches Sonderzeichen, das in sed, LaTeX und XML jeweils escaped werden muss, und zwar unterschiedlich?

sed …
-e "s/FIRMA/${FIRMA/&/\\\\\\&}/g"
-e "s/XMLFIRMXML/${FIRMA/&/\\&amp;}/g"

Der obere SED-Befehl ist für die Text-Anschrift im LaTeX, das untere für das XML. Der \\ ist NUR für das Escapen des & im SED.

Jetzt muss ich noch rausbekommen, wie ich die Expansion von ß in "\T1\ss " bei der Ausgabe von XML vermeide, dann ist es für Deutschland einsatzbereit (die anderen Umlaute gehen. Blöd, dass fast jede nicht abgekürzte Adresse in Deutschland ein ß enthält).

A répondu dans un fil de discussion

@KathyReid Have used other platforms like Google Docs with LaTeX documents but indeed it’s not the same. Or using version control with git, but again it’s not the same: no simultaneous editing plus comments (although when careful to write each sentence in its own line, git works very well for collaborative manuscript editing in your favourite text editor). Would like to know of alternatives too.
#LaTeX