From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28702 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.text.pandoc Subject: Equation labels/references when converting from latex to markdown/other Date: Mon, 28 Jun 2021 11:06:45 -0700 (PDT) Message-ID: <733e0d35-b1c4-4380-bf9f-7d6523c55162n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1580_1755773181.1624903605507" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15509"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDV6FCGMWUKBBNU75CDAMGQENQLELYA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 28 20:06:49 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f63.google.com ([209.85.210.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lxvei-0003r3-Tl for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Jun 2021 20:06:48 +0200 Original-Received: by mail-ot1-f63.google.com with SMTP id v29-20020a056830091db029045efea1ec9bsf13657708ott.21 for ; Mon, 28 Jun 2021 11:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=THGj3vsUJcsdQYfS9OcS8TBXRESvhj04ihjl7joFL8Y=; b=ICPAz47ZMEwRJ7oS8Wo0dkFrPnBVl07qTm/tu0X5ctTnwKwzdMPeyxsMQ7pciWEqu5 5fDwSJC2rcP09pl4bC1BI61DTnd0jI1K0u5V1uYLDd6aLN3WQEeAVqzn/Jfx+Gi14dBo j6CmWeUS39yryJlEwB4mWkdqT43S8qfvIuhR5uxJlgTN/eMPbXcfb3R6N/6LAIAqaZJ2 FFWl7rBDWsyIllkySxsY6lxm5iEKRM9UAvrXoUQGh0fyg3P1VbIhG/p3O/cB5V0yER6t h5FPoFAAWmp0i10KLsRPDDrNj6Gyq+ZLtLoNx7MXswq+erhuHJtkHns40z2cLAJd9eyr 8HFA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=THGj3vsUJcsdQYfS9OcS8TBXRESvhj04ihjl7joFL8Y=; b=uA0AYflHW+CretTWaBs4qQatdwFKDsf/K8JxIi7LGIl1I01VDjC3yKztJKbxWH+J1v BHxHQjybrVjjIcYCTgNCm199OAjmMeyaIcBXNK/4sSmQ9b3VAyLKqW2eidWU4pCbTd5W hpRilAsmKd+pOxloQtUT70iVd/hV95OgqqAbF6XbOkotnuBpE/Y3Pb7PFFW1oVTCowp8 h2QNzBMm/LPMcxQzGE16M/moXHoN7/QlfhoHh2OKpDOXV7GFfgPPXnKSACVPZcSBFGfY Y721PyHvdejcfSiKt7Ov6an8qAO8SG/2R3JSY07241S65G32/kCdUGvIatl/bNPdmpm8 QIAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=THGj3vsUJcsdQYfS9OcS8TBXRESvhj04ihjl7joFL8Y=; b=pNhpd01fO33nbQXExtxd4Fq5JegqXPgxOYT7u1uipKrC+vKPcVaY7uDCKX0+jzBGXs KP/ydqcuS9f7PIdFRy/lT+MPHm2UFTaIF49Ip9nP7p3JUP2lmLk0UegYZN5rSMeB/z+c CaCJvoFMjwIE1NrBAoLtXBqsnXAZYr91hbBTJKbXXC2s9SFcoHgkhoNkuEOhtHcO8tJY b3txBdevUhts2bZrSPeKq6HpdH5pqr0hQUok2JSA6cyhDMgRcRBdFxM7Rif0awaDqjAw Po2uBGS69+nIOlJroDfQeEbwv8eH17OwK0gvg/VZ8hojXKmbCZJXcjGNgzkpYyT542U9 gjNA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533T7qaKzXSNY8X3SnQqbxWPpfvVyT4LcGyzRs2GPC4rmayPsgg2 XfH3gHunKUYCL/8dbzHHGd8= X-Google-Smtp-Source: ABdhPJy3JEIavvkOBUSesmT8LGqhlzi+l3397+8WQUOA2CJoiicBGeod+yGGEEeJxkwV6x3sf/IuYw== X-Received: by 2002:aca:b486:: with SMTP id d128mr22247075oif.99.1624903607893; Mon, 28 Jun 2021 11:06:47 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:c986:: with SMTP id u6ls991780ooq.7.gmail; Mon, 28 Jun 2021 11:06:46 -0700 (PDT) X-Received: by 2002:a4a:9c2:: with SMTP id 185mr533313ooa.93.1624903606226; Mon, 28 Jun 2021 11:06:46 -0700 (PDT) X-Original-Sender: ianprice90-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:28702 Archived-At: ------=_Part_1580_1755773181.1624903605507 Content-Type: multipart/alternative; boundary="----=_Part_1581_1494691412.1624903605507" ------=_Part_1581_1494691412.1624903605507 Content-Type: text/plain; charset="UTF-8" Hello, My university is looking into the options for converting various notes, exercises sheets, presentations, etc. from latex generated pdf into a more accessible format. This basically means converting to html + mathjax because this tends to work better for screen readers. Converting beamer seems to be impossible, but for notes pandoc (and some others like latexml) is generally giving good output, however the major issue is cross referencing between text and maths blocks. In short, mathjax can handle internal links from maths blocks to other maths blocks, and pandoc can handle links to other parts of pandoc documents, except when a document makes specific reference to an equation. For example, suppose we have the following mwe.tex cut out from some electromagnetism notes --- \documentclass[12pt]{article} \begin{document} \begin{equation} J \equiv \frac{dI}{da_{\perp}} = \rho v. \label{volume-current-density} \end{equation} The total current crossing a surface $S$ can be calculated by integrating Eq. (\ref{volume-current-density}): \end{document} --- When converted to markdown, we get the following --- $$J \equiv \frac{dI}{da_{\perp}} = \rho v. \label{volume-current-density}$$ The total current crossing a surface $S$ can be calculated by integrating Eq. ([\[volume-current-density\]](#volume-current-density){reference-type="ref" reference="volume-current-density"}): --- The link to the label volume-current-density is clearly broken and when I get my html file it does nothing in particular. One solution I've seen is to convert the label references to the syntax used by, e.g., pandoc-crossref, but this involves me editing the markdown by hand. Is there an automatic way to convert these? -- 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/733e0d35-b1c4-4380-bf9f-7d6523c55162n%40googlegroups.com. ------=_Part_1581_1494691412.1624903605507 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
My university is looking into the options for con= verting various notes, exercises sheets, presentations, etc. from latex gen= erated pdf into a more accessible format. This basically means converting t= o html + mathjax because this tends to work better for screen readers. Conv= erting beamer seems to be impossible, but for notes pandoc (and some others= like latexml) is generally giving good output, however the major issue is = cross referencing between text and maths blocks.

I= n short, mathjax can handle internal links from maths blocks to other maths= blocks, and pandoc can handle links to other parts of pandoc documents, ex= cept when a document makes specific reference to an equation.
For= example, suppose we have the following mwe.tex cut out from some electroma= gnetism notes
---
\documentclass[12pt]{article} \begin{document}
\begin{equation}
J \equiv \frac{dI}{da_{\perp}} = =3D  \rho v.  
\label{volume-current-density}
\end{equatio= n}
The total current crossing a surface $S$ can be calculated by integr= ating Eq. (\ref{volume-current-density}):  
\end{document}
---
When converted to markdown, we get the following
<= div>---
$$J \equiv \frac{dI}{da_{\perp}} =3D  \rho v.  =
\label{volume-current-density}$$
 
The total current crossi= ng a surface $S$ can be calculated by
integrating Eq.
([\[volume-cu= rrent-density\]](#volume-current-density){reference-type=3D"ref"
refere= nce=3D"volume-current-density"}):
---
The link to the l= abel volume-current-density is clearly broken and when I get my html file i= t does nothing in particular.

One solution I've se= en is to convert the label references to the syntax used by, e.g., pandoc-c= rossref, but this involves me editing the markdown by hand. Is there an aut= omatic way to convert these?

--
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://groups.google.com/d= /msgid/pandoc-discuss/733e0d35-b1c4-4380-bf9f-7d6523c55162n%40googlegroups.= com.
------=_Part_1581_1494691412.1624903605507-- ------=_Part_1580_1755773181.1624903605507--