From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33378 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Guillaume Dehaene Newsgroups: gmane.text.pandoc Subject: Re: Show-and-tell: equation annotation for MathJax Date: Thu, 23 Nov 2023 09:53:47 +0100 Message-ID: References: <4704092c-08bc-4755-a676-2f403166a3e3n@googlegroups.com> <57a7749f-72bf-4d76-9422-296e57e80e42n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000cda20c060acdfac7" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30303"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBC7JVCW5SUMBBN5G7SVAMGQEG34IRJI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 23 09:54:21 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f188.google.com ([209.85.208.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r65TZ-0007iQ-0l for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 23 Nov 2023 09:54:21 +0100 Original-Received: by mail-lj1-f188.google.com with SMTP id 38308e7fff4ca-2c876d239e6sf4958751fa.1 for ; Thu, 23 Nov 2023 00:54:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700729660; cv=pass; d=google.com; s=arc-20160816; b=ahe9l1xs8BuEJc43b+udHVMKZiJnieHtaSm3DMl6MGZXvjiW6IFjcP6EvdRv1LoGeB T7d7NBENn/zzfITEgtH6QonVKqupJSpKpM0CvhVQb4vampqyQyerl5YRLlsYzWlO8eth WIOPixaTeaVgEQcMMF78qOmAup7gXXO0CzM+xgY/u2e0qfIHsKUdgafw/gsXgwjTiijr BUXCP1FujcjwnW3BzxW7VwKOYB7nGug9YSo+HY3yov9njx2ra1TV2IZL0uK2AoOpSSvi QrsmTf3F/m6I6fJdcItV8J+FPxNrCWstcYAqmLCRN8ZqYEKKv6EjmlVvDzxUiMAK3dlX gEpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=iebUKMtGcy4QZc6cAX+y/HjP8QPtz+/GIMDlTRBblp4=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=aY0RINMms4eHFpekOlNvdmsy9kwDg6b6kJMeht//511NzDg7MLW1kM39xt9r5jePmZ 3jIR6uG+qIOxeM9vlT7/aDLWcXxcQS7MciJ6we2jKPr81TLyGYV/Q7U7FJp57D5eX+9s kuti4FAruGmpKy9KPpVmBG6Ar7TV58Cb/MJEPXQ1iOFcZbvLo8r2cbg6VBn4q5cPwi2b bdaCoBL6ouK89Zpg53/bqTc/da3CDFmCUIEpGvp49gG+ajydzgxlY1qRybKx8gA1kCTW 4XT1+Ht3KneHJBYEDlVY4kThZA6u0lltxc1QUCdr5hkPf8fFw9bAFF4FwP7M1LPKPRbr RQog== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fAKDog/X"; spf=pass (google.com: domain of guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12e as permitted sender) smtp.mailfrom=guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700729660; x=1701334460; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:sender :from:to:cc:subject:date:message-id:reply-to; bh=iebUKMtGcy4QZc6cAX+y/HjP8QPtz+/GIMDlTRBblp4=; b=rrkbqqxFXTPpvIW0O9fQPq19mnFDg9DlOby4Pjr3ltl6xgjVpji5mVke3TA4k7ekw5 C5RmAof+/TnnY1rT/0Ygs8l48UtXcagndfB5JJO0Bib08AtTmuPW7lILB3TRaaFa6baL cqx+hTp1M4kGOT8oTJ4oSi2UkmmiL5UhUKk1fb69k9vWCjyIiquhNS82Bdoy7PgVIlWi mJEgbVS5re8p13H6Y8sq7gmOO/PxkCPDgbYyn3VE2Iw9+Gh3YyXWHsz89zM9B+Uo/iqW G1Yt/Wd20eWXcdlmaUVgnh9OTCMt7tG07s4aNg9LOW3flDOErmWK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700729660; x=1701334460; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=iebUKMtGcy4QZc6cAX+y/HjP8QPtz+/GIMDlTRBblp4=; b=XjK48qxn+Mn77qZUXsn57GNYhTSZu0L4ksWnP5TP2NgZJovFx5+J2hSjszwT7EXDSJ ax1AF3uhaYXeJKbJf55BU5ZfeY9teH4YQoynORm581Tv0cBDEcXe52zjH6BFkOAPfS7e E51MtWM7wL9jS5YTO1mjpag2Din2RH84Imu7sCdyplFW9WcQytmwFBAAqQmkMMuF6OyG bYS5neZyRZK6qQdPvfFgNEE+3UIbib3P6uhgDpYtfiPIYjHCGw5Hbg7MPYYblsHbc/a9 0owzxsEtg0dnsA4xVNvNcnPP7iXEDbENnQ1L3jRn2qUqV8abMPp+3CsbyOncmbsmIr X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700729660; x=1701334460; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=iebUKMtGcy4QZc6cAX+y/HjP8QPtz+/GIMDlTRBblp4=; b=C1wz0ZHvlA+YaZ/EJBezy2JPBE7Kbw9tRlmsh/MGN+nnvNBkkS3D9T7fo2eadxPCWA C5kj8Flr1yxZUgV3rco698a4T/rgkgsah+xNGjWaLWy6c7WCJMoTxEkV7B7879mOQ/cW ERjTULM2HNcmm9gIFM4ctqpnJSLqJQi+THnGP4yKDJvg2Vf+qToC9fzKg5aB+9XjOhk4 vpIE8dErHQWlGntyeisInDrrJWSypL4oO2e8o0ESCwYIROdHBuD/hDp+jidb7OPqoIR0 fJbVnZ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YzWfuytnAp69pBGUXYbCP5yXDp9puz0KmyeVN3tlIzDy5TcGXcd 2CooCxOwxHD+JBEaSEYCK1Y= X-Google-Smtp-Source: AGHT+IGgJvUihbYw5ZYaBZyHE2todAEd2PSRLPopMA+fWeQmScwbquaf8pLoUSbMsERNW/8063fSAw== X-Received: by 2002:a2e:a794:0:b0:2c0:20c4:925a with SMTP id c20-20020a2ea794000000b002c020c4925amr4410579ljf.26.1700729659643; Thu, 23 Nov 2023 00:54:19 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:651c:c95:b0:2b9:5450:e122 with SMTP id bz21-20020a05651c0c9500b002b95450e122ls331105ljb.0.-pod-prod-03-eu; Thu, 23 Nov 2023 00:54:13 -0800 (PST) X-Received: by 2002:a2e:aa14:0:b0:2bc:c004:cc22 with SMTP id bf20-20020a2eaa14000000b002bcc004cc22mr2864461ljb.33.1700729653509; Thu, 23 Nov 2023 00:54:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700729653; cv=none; d=google.com; s=arc-20160816; b=0fn5pQ1ABFLz/AlYhUTGXlM7e5Qg/brToqTGuC/IsUIQ5rMD4MKUI8J40j1Z7+RchA umYud8Qr20dFK4wxFg318fyOsxbemVuwq0OP8HkEOE5Gg/n8iK/t2wJfNlmOSJHn3qxK IlHqtjtvJuxIErsMc8v9URmMiY+7z/G5/8P6a14Ac8+XbA4LfIIZ1CqrrhSnfQ0WI1fs wtt7aXItwdOUXeaAYa90hPCMTgN2ATGqOaYXKCsPqzmRbLUBDcbCTanjChUo1uDDGAof z3wJ9PGzY3G7AiFzDnvXSF5q75OH9RN6k7HHOowSFHh6zjKKmx4+ZPxE8ZvMiri0XoFj rONQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GbhKNCtXMtRp554oauu8gL95TvNoQVV6HdntL8smUbk=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=w12cTD6pfTg+mXvnRdt804OmVR4bI5UPv5bFanoPp3nKCci+s0bCU1QXANUPks1Mdq dRzDJq/a7TRt9sNKV8HOIB8rMYvHZ0vfjJdjIrd7d+aAGoDOqeSypVEXCj/2fGQDCfWx wOHOtfOwkV/wLTmsIB8urbFtNYX+0hp+SupeLUqZWnloSZUhHYwI7Chwc5poGAGY/Hyj 3lmAjMuhoFULEeM8fxiWGxYgcgFBqCDSFTyOX7/jBciHh3QEuEkOh1E+N58PGt2MF9QR 1/En1EErHJSPTRU+tIR32zh4LmCZUI3UG9v/dbvPm+McbaRWSJaauG6jd8HYoHgSdkIi lFNw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fAKDog/X"; spf=pass (google.com: domain of guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12e as permitted sender) smtp.mailfrom=guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com. [2a00:1450:4864:20::12e]) by gmr-mx.google.com with ESMTPS id y6-20020a05651c154600b002c83697a2d8si39857ljp.2.2023.11.23.00.54.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Nov 2023 00:54:13 -0800 (PST) Received-SPF: pass (google.com: domain of guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12e as permitted sender) client-ip=2a00:1450:4864:20::12e; Original-Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso859374e87.1 for ; Thu, 23 Nov 2023 00:54:13 -0800 (PST) X-Received: by 2002:a05:6512:23a5:b0:4ff:a04c:8a5b with SMTP id c37-20020a05651223a500b004ffa04c8a5bmr4884668lfv.47.1700729652616; Thu, 23 Nov 2023 00:54:12 -0800 (PST) In-Reply-To: <57a7749f-72bf-4d76-9422-296e57e80e42n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="fAKDog/X"; spf=pass (google.com: domain of guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::12e as permitted sender) smtp.mailfrom=guillaume.dehaene-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33378 Archived-At: --000000000000cda20c060acdfac7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That was fast: I was in the middle of brainstorming some ideas to help you out! I love how your solution is super terse, compared to my own super heavy code. Maybe I can find some improvement ideas. Have you checked that your alignments are correct with a wide variety of test cases? What happens for me is that, when my JS function runs, the mathjax elements do not necessarily have their final size, producing misalignment. If that's the case, an easy solution is to simply repeat the alignment code after a small delay. Do you mind if I add this as an annotation style to my extension? Cheers Guillaume Le jeu. 23 nov. 2023 =C3=A0 09:41, Hypatia a =C3=A9crit : > Hacked it: > https://github.com/quarto-dev/quarto-cli/discussions/7679#discussioncomme= nt-7649554 > ! > > On Thursday, November 23, 2023 at 12:04:36=E2=80=AFAM UTC-5 Hypatia wrote= : > >> *I can >> >> Sorry for the misleading typo... I didn't mean you to do that... lol >> >> On Thursday, November 23, 2023 at 12:03:51=E2=80=AFAM UTC-5 Hypatia wrot= e: >> >>> I just asked about a similar thing: >>> https://github.com/quarto-dev/quarto-cli/discussions/7679. >>> >>> I'm going to see if you can hack up something based on your code. Thank= s >>> a lot! >>> >>> On Tuesday, November 14, 2023 at 3:27:53=E2=80=AFAM UTC-5 Guillaume Deh= aene >>> wrote: >>> >>>> Yes, that's correct. This is a smart-margin feature. >>>> >>>> It wouldn't be too hard technically and probably desirable to annotate >>>> individual elements of an equation block >>>> (for example, consider highlighting a term being moved from one side o= f >>>> the equal side to the other in two successive equations) >>>> However, I've run into two design / UX issues when considering this >>>> case: >>>> - in the final HTML, how would the user interact with the annotation: >>>> - to see that an element is annotated (needs to work with nested >>>> annotations, with multiple annotations, etc) >>>> - to see which elements are concerned by the currently-displayed >>>> annotation (without interfering with the "is annotated" styling of the >>>> other elements of the equation block) >>>> etc >>>> - how would the writer specify the annotation, in a way that isn't too >>>> disruptive of their normal workflow? >>>> - this is the bigger issue for me. without a rich-text editor which >>>> supports highlighting of individual math elements, I don't know how to >>>> handle this >>>> >>>> even If I had a great answer, there remains the issue of hacking it >>>> inside of MathJax. >>>> At this point, it might be better to actually fork their code, instead >>>> of writing something a posteriori >>>> >>>> I'd love to have it as a feature someday, but it's in the distant >>>> future. >>>> >>>> Le lun. 13 nov. 2023 =C3=A0 17:32, Gwern Branwen a = =C3=A9crit : >>>> >>>>> So this does not let you annotate individual elements of the equation >>>>> to provide popups/links or color them, but is only whole-equation lev= el and >>>>> basically a way to a margin-note/sidenote that aligns nicely with the >>>>> equation? >>>>> >>>>> -- >>>>> gwern >>>>> https://gwern.net >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "pandoc-discuss" group. >>>>> To unsubscribe from this group and stop receiving emails from it, sen= d >>>>> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/pandoc-discuss/CAMwO0gzAOVy1QkYuR1M= RwnGix%2BKsJJKfSMdFQka97jTUabQLQg%40mail.gmail.com >>>>> >>>>> . >>>>> >>>> -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/57a7749f-72bf-4d76-9422-= 296e57e80e42n%40googlegroups.com > > . > --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/CAKOoOVUh%3DseSfpScCGywuvuTRxG1Tk4p00dSHCFacagw5DqXtw%40mail= .gmail.com. --000000000000cda20c060acdfac7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That was fast: I was in the middle of brainstorming some i= deas to help you out!

I love how your solution is super = terse, compared to my own super heavy code.
Maybe I can find some improv= ement ideas.

Have you checked that your alignments are co= rrect with a wide variety of test cases?
What happens for me is t= hat, when my JS function runs, the mathjax elements do not necessarily have= their final size, producing misalignment.
If that's the case, an ea= sy solution is to simply repeat the alignment code after a small delay.
=
Do you mind if I add this as an annotation style to my extension?

Cheers
Guillaume


Le=C2=A0jeu. 23 nov.= 2023 =C3=A0=C2=A009:41, Hypatia <knight.of.lambda.calculus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> a =C3=A9crit= =C2=A0:
Hacked i= t: https://github.com/quarto-dev/qua= rto-cli/discussions/7679#discussioncomment-7649554!

On Thursday, Novemb= er 23, 2023 at 12:04:36=E2=80=AFAM UTC-5 Hypatia wrote:
*I can

Sorry for the misleading typo... I didn't mean you to do that... lol<= br>

On Thursday, November 23, 2023 at 12:03:51=E2=80=AFAM UTC-5 Hypatia wro= te:

I&#= 39;m going to see if you can hack up something based on your code. Thanks a= lot!

On Tuesday, November 14, 2023 at 3:27:53=E2=80=AFAM UTC-5 Guillau= me Dehaene wrote:
Yes, that's correct. This is a smart-margin feature.=

It wouldn't be too hard technically and probably de= sirable to annotate individual elements of an equation block
(for exampl= e, consider highlighting a term being moved from one side of the equal side= to the other in two successive equations)
However, I've run into tw= o design / UX issues when considering this case:
- in the final H= TML, how would the user interact with the annotation:
=C2=A0 - to= see that an element is annotated (needs to work with nested annotations, w= ith multiple annotations, etc)
=C2=A0 - to see which elements are= concerned by the currently-displayed annotation (without interfering with = the "is annotated" styling of the other elements of the equation = block)
=C2=A0 etc
- how would the writer specify the an= notation, in a way that isn't too disruptive of their normal workflow?<= /div>
=C2=A0 - this is the bigger issue for me. without a rich-text edi= tor which supports highlighting of individual math elements, I don't kn= ow how=C2=A0to handle this

even If I had a great a= nswer, there remains the issue of hacking it inside of MathJax.
At this = point, it might be better to actually fork their code, instead of writing s= omething a posteriori

I'd love to have it as a feature someday, = but it's in the distant future.

L= e=C2=A0lun. 13 nov. 2023 =C3=A0=C2=A017:32, Gwern Branwen <gw...-v26ZT+9V8bxeoWH0uzbU5w@public.gmane.org> a =C3=A9crit=C2=A0:
So this does not let you annotate individual elements of the= equation to provide popups/links or color them, but is only whole-equation= level and basically a way to a margin-note/sidenote that aligns nicely wit= h the equation?

--

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/= CAMwO0gzAOVy1QkYuR1MRwnGix%2BKsJJKfSMdFQka97jTUabQLQg%40mail.gmail.com.=

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https= ://groups.google.com/d/msgid/pandoc-discuss/57a7749f-72bf-4d76-9422-296e57e= 80e42n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CAKOoOVUh%3DseSfpScCGywuvuTRxG1Tk4p00dS= HCFacagw5DqXtw%40mail.gmail.com.
--000000000000cda20c060acdfac7--