all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: mousebot <mousebot@riseup.net>
Cc: 63518@debbugs.gnu.org
Subject: bug#63518: 28.2; shr.el seems to break inline latex (mathjax) in html
Date: Mon, 15 May 2023 17:29:36 +0300	[thread overview]
Message-ID: <83cz311xdb.fsf@gnu.org> (raw)
In-Reply-To: <6843949b-5e22-de5e-2e6f-e9e951bbe1ff@riseup.net> (message from mousebot on Mon, 15 May 2023 16:14:47 +0200)

[Please use Reply All to keep the bug tracker CC'ed.]

> Date: Mon, 15 May 2023 16:14:47 +0200
> From: mousebot <mousebot@riseup.net>
> 
> Thanks for your response Eli.
> 
> Yes, I'm aware of that the function does that. What I meant is I don't understand how the kinsoku functions in the when clause work, so I don't feel qualified to hack around with them.
> 
> > 
> > The question is whether we can reliably determine that we are inside
> > inline latex, so that we augment the conditions for a break point.
> > Turning that off unconditionally is not an option.  Do you happen to
> > know about some criteria to be applied to distinguish this special
> > case?
> 
> I wondered if we couldn't modify the functionality to flag that the html being rendered (may) contain inline latex? (An optional argument say, so that it only tries to render inline latex if specified.)

The problem is that HTML that includes inline latex can also include
other text that needs the kinsoku treatment.  So this cannot be a
global flag, it must be raised only while processing the inline latex
part.

> Re inline latex, I don't know much about it myself. From what I have seen on the mathjax website and the examples in the thread I shared, it is enclosed in \[...\] or \(...\). I also read that it can be enclosed in $...$, but I haven't seen that on mathstodon.xyz.
> 
> I wrote a (probably *un*reliable!) fill-predicate function with regexes, one set to check if we were in between the \ and ( or [, and one to check if we were somewhere in between a \( or \[ and a \) or \]. But then I realized that shr seemingly doesn't working with fill-predicates, but makes its own filling decisions.
> 





      parent reply	other threads:[~2023-05-15 14:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 11:21 bug#63518: 28.2; shr.el seems to break inline latex (mathjax) in html mousebot
2023-05-15 14:01 ` Eli Zaretskii
     [not found]   ` <6843949b-5e22-de5e-2e6f-e9e951bbe1ff@riseup.net>
2023-05-15 14:29     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83cz311xdb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=63518@debbugs.gnu.org \
    --cc=mousebot@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.