From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107881 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alasdair McAndrew Newsgroups: gmane.comp.tex.context Subject: Re: Converting from LaTeX for PDF accessibility tagging? Date: Mon, 29 Jun 2020 10:32:12 +1000 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4688369541371140814==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="59436"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 29 02:33:55 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jphkA-000FOe-Ig for gctc-ntg-context-518@m.gmane-mx.org; Mon, 29 Jun 2020 02:33:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4AEE818530E; Mon, 29 Jun 2020 02:33:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fY1pcAaS14SO; Mon, 29 Jun 2020 02:33:26 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 46D2218530F; Mon, 29 Jun 2020 02:33:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 72D4E185303 for ; Mon, 29 Jun 2020 02:33:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JndSm3zgZQeS for ; Mon, 29 Jun 2020 02:33:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.195; helo=mail-oi1-f195.google.com; envelope-from=amca01@gmail.com; receiver= Original-Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 05365184C0B for ; Mon, 29 Jun 2020 02:33:23 +0200 (CEST) Original-Received: by mail-oi1-f195.google.com with SMTP id k4so13050153oik.2 for ; Sun, 28 Jun 2020 17:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4Q/IzrWX6Kee2W+o+rLonqb+K2H98B7nxcHY6tPOslg=; b=tX1jvKFfWR/wRMpm5vdHt90OzadWNjKsL41oxbDw15Afn6YoLPNQiZv7hy7epnenrH dZQMTQxkY+HTjVOeNJLnLaxHwJyCN58GMARkycx/dPZci2V6FLqHPmrEPpYB34t/xr7P ATx/of1VBQZ8LiqNEmSphzQ2ZcABQ0rkSvMV/cRXeERJlx1uS3hIoWkL/s4aafrlGAoL pWnCokWxYNZaFd0aFgA/BFl2rR0Uxfj+/E17UAtUhyAprauMB6S01/HrAe2MeG4tEB2u 7sy6Uj55zPXhSWv1js24vf3n8isWVIb95UWr9BNFBPXTgwIfH/ZIPJuEIc1ADxdiCDq1 osow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=4Q/IzrWX6Kee2W+o+rLonqb+K2H98B7nxcHY6tPOslg=; b=LWIE0ajAG9DXP9ICZXJxnwOBRoFr0bR4cAk5GAOxWBn/qVTLEBdqoTvYRWMkGMjZ5r tquNcmV88h2TGH2yrxSFQ0+C18WxgCGUBJyGnWXyFuSyKa25I74IVrJ7IzFoy+uBk8Tp j7wOOB/fLopVEeBN0op+pn3cBHtotrI3eN/XEajsZ6gjj3LpixPPjsjIWKpruROkl5sh w2IbDBlJtuWX7heMImEqbYnK3rCkxWT50yNuxZOMq7lsak7Xxon4xREksWoz6LYDT5zW bQMssnrL7AM3c9sQ40OoiVg/BHxXSsoprM/cRjJFzwEoFbPFPFqjItNGm8NK1IiUwtBr 04zA== X-Gm-Message-State: AOAM533j74bHKX0j7z5mQ09wjyDqtePTGbniCIM+dhXWopSFVLMf155n 3e/eVuA+mVb7Wnt1YNwS+hshVxok8VGW8tchpL+S8spY X-Google-Smtp-Source: ABdhPJyuTPOxd50HpYmWiY0c6QdZJ1hg1tIW4Qgkm6Oyd/GG5LxrMBtYdQzoP5Qxi5Vk1MzdNHQmdRMHCERXNH2Z4yU= X-Received: by 2002:aca:4884:: with SMTP id v126mr10097320oia.98.1593390801847; Sun, 28 Jun 2020 17:33:21 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:107881 Archived-At: --===============4688369541371140814== Content-Type: multipart/alternative; boundary="000000000000bb8b9a05a92e34d1" --000000000000bb8b9a05a92e34d1 Content-Type: text/plain; charset="UTF-8" Thank you very much - I think the problem was with a LaTeX "align" environment which pandoc translated into a setting which ConTeXt didn't recognize. These equations were monsters, so I'll try with simpler equations to give you an idea. But in fact what you say makes perfect sense, and I'll go back and read through the mathematics document again, and more closely this time! (For matrices and arrays I still prefer the neat LaTeX implementation, but maybe that's simply my general unfamiliarity with ConTeXt.) Thanks again! Alasdair On Mon, Jun 29, 2020 at 2:27 AM Aditya Mahajan wrote: > On Sun, 28 Jun 2020, Alasdair McAndrew wrote: > > > I tried ConTeXt a few years ago, then gave up on it because of its > > wordiness and verbosity. The 2006 article on creating AMSTeX output in > > ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: > the > > LaTeX commands are small and neat; the ConTeXt commands are not. > > As explained in the last paragraph, there are pre-built shortcuts for the > main alignments and you can define your own to match amsmath style, if you > wish. > > If you are worried about typing, look into tab completion for your editor > of choice. For example, in vim, I can do `for` which expands to > `\startformula ... \stopformula` and `fora` expands to `\startformula > \startalign ... \stopalign \stopformula`. > > > However, I need now to use ConTeXt for accessibility tagging, so I'm > > prepared to give it another try. And this means converting some LaTeX > > documents into ConTeXt. Is there a better way than using pandoc? I ran > a > > LaTeX document through pandoc, but the result is certainly not fully > > "ConTeXt compliant", and generates errors instead of compiling. > > AFAIK, pandoc is not aware of context math. When I convert latex to > context, I find it simpler to do it some hand written regex which translate > commands according to my writing style. > > > I can get easily lost on the ConTeXt site: the documentation is there in > > plenty, but seems hard to search. The main problem for me is mathematics > > and alignment: not just for equations, but for matrices and arrays. What > > I'd love - if it exists - is a document showing how to rewrite LaTeX into > > ConTeXt. Something like the above document, which is now 14 years old. > > The user-interface is still the same. > > > Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and > > dealing with mathematics. Any pointers would be gratefully received! > > Can you post an example of LaTeX math that you are having difficulty in > converting? It is hard to answer this in the abstract. > > Aditya > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > -- https://numbersandshapes.net --000000000000bb8b9a05a92e34d1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you very much - I think the problem was with a LaTeX= "align" environment which pandoc translated into a setting which= =C2=A0 ConTeXt didn't recognize.=C2=A0 These equations were monsters, s= o I'll try with simpler equations to give you an idea.=C2=A0 But in fac= t what you say makes perfect sense, and I'll go back and read through= =C2=A0the mathematics document again, and more closely this time!

<= /div>
(For matrices and arrays I still prefer the neat LaTeX implementa= tion, but maybe that's simply my general unfamiliarity with ConTeXt.)= =C2=A0 Thanks again!

Alasdair

On Mon, Jun 29,= 2020 at 2:27 AM Aditya Mahajan <ad= ityam@umich.edu> wrote:
On Sun, 28 Jun 2020, Alasdair McAndrew wrote:

> I tried ConTeXt a few years ago, then gave up on it because of its
> wordiness and verbosity.=C2=A0 The 2006 article on creating AMSTeX out= put in
> ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly= what I mean: the
> LaTeX commands are small and neat; the ConTeXt commands are not.

As explained in the last paragraph, there are pre-built shortcuts for the m= ain alignments and you can define your own to match amsmath style, if you w= ish.

If you are worried about typing, look into tab completion for your editor o= f choice. For example, in vim, I can do `for<Tab>` which expands to `= \startformula ... \stopformula` and `fora<Tab>` expands to `\startfor= mula \startalign ... \stopalign \stopformula`.

> However, I need now to use ConTeXt for accessibility tagging, so I'= ;m
> prepared to give it another try.=C2=A0 And this means converting some = LaTeX
> documents into ConTeXt.=C2=A0 Is there a better way than using pandoc?= =C2=A0 I ran a
> LaTeX document through pandoc, but the result is certainly not fully > "ConTeXt compliant", and generates errors instead of compili= ng.

AFAIK, pandoc is not aware of context math. When I convert latex to context= , I find it simpler to do it some hand written regex which translate comman= ds according to my writing style.

> I can get easily lost on the ConTeXt site: the documentation is there = in
> plenty, but seems hard to search.=C2=A0 The main problem for me is mat= hematics
> and alignment: not just for equations, but for matrices and arrays.=C2= =A0 What
> I'd love - if it exists - is a document showing how to rewrite LaT= eX into
> ConTeXt.=C2=A0 Something like the above document, which is now 14 year= s old.

The user-interface is still the same.

> Anyway, as I say, my main issues are converting LaTeX into ConTeXt. an= d
> dealing with mathematics.=C2=A0 Any pointers would be gratefully recei= ved!

Can you post an example of LaTeX math that you are having difficulty in con= verting? It is hard to answer this in the abstract.

Aditya
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________


--
--000000000000bb8b9a05a92e34d1-- --===============4688369541371140814== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4688369541371140814==--