From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22431 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Convert \index{true@`true`} to \index{true@\texttt{true}} ? Date: Fri, 5 Apr 2019 08:55:57 +0200 Message-ID: References: <2d229904-88ac-452d-90da-d27d54528779@googlegroups.com> <2e883e9d-f7c8-f7b7-952d-41945ef038aa@gmail.com> <2ac8ec4b-51f8-4121-89a5-06ebc6090ffa@googlegroups.com> <4c44b992-efd3-4a3c-8f25-eb21212af0a1@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000a54440585c2fb84" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67880"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBBXYTPSQKGQEH37WR6A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Apr 05 08:56:07 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-wr1-f62.google.com ([209.85.221.62]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hCIlj-000HWj-O4 for gtp-pandoc-discuss@m.gmane.org; Fri, 05 Apr 2019 08:56:07 +0200 Original-Received: by mail-wr1-f62.google.com with SMTP id f15sf3485421wrq.0 for ; Thu, 04 Apr 2019 23:56:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1554447367; cv=pass; d=google.com; s=arc-20160816; b=T5m7HwrJYPhR9qO0vkjNtoXcbUIiAFCd5pKEtbRjXASp6UCefn2ObC4teIOfy0/f6Z 7g+js+l+8Uu0kzjixxNG4+S5xk+x+OPvyY53BQ4FYWXtCK6vw9k+B7mG7zJ9k/V40Bgk wLYAwy1QQQdEk7YaNXiGurmXo+g2wfn5MT/qd5lcu0kl5HEVOd3NWzrj+4LCZc9ImxHH SIFEsy1U5ryZhOKI3Pvw+7yZcj4QO3a7u4Eb2Fwv8aBijjkNVljvdOxVDYj+wwMsJv/w OXxEg84v8Ar/T4976X2NkZavRYmiJQj6gaIWgC9XXEyS2kSuWRIlLed3+izxUJfwYsa7 hOLA== 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=i8kuEo0kH3vondtPZE86Dv7tY9CFqt4CSg/JMrU7Ofc=; b=06YnMXhXUIveO/wkAFa7lO7AjBp+H+e6LukOEPW4bsh6Yg6zIj3ijw5jAsvYkvaWDf km9ceSJ7RE9ex59apvFkh6Bd2MmQ2AzCw9yRmBJ28xeoa5xZq77e99ip6Q3Sy9eEBHgu nfGRKGpVa/w+XIOIZh7YLOymnP+6X4wqzW4ZkwraIpoqNC7pHSPqa7A+tdmJqHj8mqv2 5tU2FJK6ACHaNQXR4KiEsM3Nmi7xOlVgDz2WUAw9lJn71lJjKv9hDlVWXn9sPuxCOnh3 NnRWMrvf5R2g7iCHoOR/6Q4qAh8xZonZbkxv0CqPsi4461GLH7jZ99m9r2i2oHxRKu4N FxGA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dG7V6pwT; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42d as permitted sender) smtp.mailfrom=melroch-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=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=i8kuEo0kH3vondtPZE86Dv7tY9CFqt4CSg/JMrU7Ofc=; b=rikzYjb6iyrT9q0tXFef8X+01kBqa38XfSLA04Yfnn+ua3b6vO9AhHkTUOEjoKbt40 IAByKtHcihGVu7+EiXOdfoIGlYX/Di8mcoyyi9AolSF8pHXXuVG1Mpk14++bSO4rRqzA wozl7Pc9bQ1/sJ1VAiO0q5Y15zqhHS6VzZFmJ/ahNHy/vMpQfRR7Gq/ZEQe47loe85bL PO3k/N1hSXnVbeX9Lp7CzM+CQMF2WVngYC0g3RlvwR01d9I3TFh9CQOhef/una6m/T7f aeoN9Dni4XomW8DpJsbBL/9S5CkkfJEP4XTp8RXrmix2ExpVTeCA/boWKHuMJ1n6Zx2x i/tQ== 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 :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=i8kuEo0kH3vondtPZE86Dv7tY9CFqt4CSg/JMrU7Ofc=; b=DG3+L/Dhe9iH/0bLqxTMKAyw+Wj2mTJ29rCd8bKpXQV4RqYQgqGS2TlAGuTn/DfSAl LuJK9UCnegGnRiNBjAFknKjCpuVsm2BR8EVj3IFZQVSN5jn4qFntr1nCowoljYGz9CBf 6joykonF0lXzl5pC6/mj6kGwaqz9ZViNDxkQ2BdD0q0/zPlbZz2kSexJYJg4XX20rzUN QYBh7wolvSgqc9GJf4lhCTryrH/YA9fyt7OpGIwWbvXRE09wOFqSiKQwpNE9L3mp0a7m yuM9o/MGzK2M7r/Z/aOVlfVYmQLG7KVOCWzFKieeTy8PHku26iCJ6CFJ5qJIvlBaXNhb BUmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=i8kuEo0kH3vondtPZE86Dv7tY9CFqt4CSg/JMrU7Ofc=; b=Bcv9DoJJSyggd4zaiqAwpQIq4H8/6l4ns+vAEUrMlyw8oBaACaQB1VbQVNji8ICDWZ 544VWfYGWeGWbnbdhOPu6fwJubXXc3KaLgBsIllApbSpeubUBKHqXgJ3Lb0RM88YG6dq hRMFCDHByEUt5pXNWRD86JtDq9wAnFzhw6KdSGDVEwhgeLvdbKALdt1rOo6LP2N8RSyu 2AoT/bfTDejSOKCBsoVjK7dID5eMhvUzPfK39/85d+qot5t3W/I/5Cla+zos7k6kh10z 5exELR8fd936YNO/Vp2i87DyNXzi6jJeKlMvVccG01gg4Nly5zVk/SjSGmooiibDVjVI b5PQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAXoHqecfgMS74dPikxN2YDfBkn47uMEa2t7PMEqW/4YwfLZPqYF NNdDI2NN4iFOrYxc8np/lNM= X-Google-Smtp-Source: APXvYqw2eY/EjzXK2R4cuDvPSOZgqVN/pT1Gji4IwHqeHEzx9wHd/A6tzaX5fXsmYr1yDVGfhBxmPg== X-Received: by 2002:adf:ea0b:: with SMTP id q11mr6846814wrm.233.1554447367094; Thu, 04 Apr 2019 23:56:07 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1c:f310:: with SMTP id q16ls143797wmq.3.gmail; Thu, 04 Apr 2019 23:56:06 -0700 (PDT) X-Received: by 2002:a1c:2d4c:: with SMTP id t73mr519527wmt.21.1554447366083; Thu, 04 Apr 2019 23:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554447366; cv=none; d=google.com; s=arc-20160816; b=oe2U4Z7zKyXq4uzaR4hTgAeUOW6r/Fm/jzSAuNQI70AsEkZbMMHk7zkfPD991qu/BL wwvjq4oyWomr1rB7DO1o+DOzO9ir9x61Ajs/IZucm2TFgK605mxiIiSvmKnfIMBu+HEu za7XvDrI13vGUsfUzxnuexStzV9Fw0f9NH4wyhF2z1vx2Qo1JpfyjmTUMuk8iFZQbmAs aJQtmo33kXdiHzRlKPHUZXJGIhi0djQbqNpnbl9gj1o2RAA1Fn+9AlSOt3+4a1GqKSRQ 1EBruk7cwk0pB6kKCQCQynf0oKECPdteqq9sSgaIKBLQLy8LqwM8vVPD8dWydbcx/a0d iHYQ== 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=6Wcgjoc7NT7rQKhuDsZ1NdERI+vA6nH8FtsCbx5vP7k=; b=hhQqBKK7nLGqLF3+ztjtm0rLrvND/WSvyvts8fq+yx64aQ1VFjUh8sR1obFYDw0f4e JYAekEMunqgnzV/RqDqgzmxKj/V+I6ahIYgxEas9d/+O1TbQEPj+fJUiYE8PQlQ3f9Hv s4d0LAwzv4lqJIQ6tD9WKtkzVzpVCDfY4wq/66+T+3XgB2CTpm5BR3Li2VL12iFacHr6 fFaC33pSXiiYq+NDGJG70PxGHMNbp0QwQjIvr3Ob+mhOZdnJdnTq9/tgzve+MzpskVOL EGx+tdl34OKUH0Q227E1TrQCIC/shZf0KXZJIZKyaL8UdkEwqoZk8IwLiyhCSkcR2gAA 6eFA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dG7V6pwT; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42d as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com. [2a00:1450:4864:20::42d]) by gmr-mx.google.com with ESMTPS id f21si244539wme.3.2019.04.04.23.56.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 23:56:06 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42d as permitted sender) client-ip=2a00:1450:4864:20::42d; Original-Received: by mail-wr1-x42d.google.com with SMTP id t17so6545650wrw.13 for ; Thu, 04 Apr 2019 23:56:06 -0700 (PDT) X-Received: by 2002:adf:dd0f:: with SMTP id a15mr6550333wrm.221.1554447365459; Thu, 04 Apr 2019 23:56:05 -0700 (PDT) In-Reply-To: <4c44b992-efd3-4a3c-8f25-eb21212af0a1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dG7V6pwT; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42d as permitted sender) smtp.mailfrom=melroch-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.org gmane.text.pandoc:22431 Archived-At: --0000000000000a54440585c2fb84 Content-Type: text/plain; charset="UTF-8" I have been working on such a thing, as a helper module for filter authors or as a filter itself. It has a function which will turn any unparsed command into a Span with a `custom-style=""` attribute and each argument into a nested span with a similar attribute with an `-arg-N` suffix, where N is 0 for an optional argument and 1 through 9 for a mandatory argument, using `pandoc.read()` to convert each argument into an AST, naturally also walking the AST calling the conversion function on any nested unparsed commands. If this sounds interesting I'll try to get it into a presentable form ASAP. Den tors 4 apr. 2019 15:32Axel Rauschmayer skrev: > Long term, it may make sense for Pandoc to provide a utility function for > Lua filters that parses LaTeX commands (including attribute lists). > > Rationale: Some advanced things can be passed directly to LaTeX, but need > to be parsed and processed for, e.g., HTML. Having help there would be > useful. > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/4c44b992-efd3-4a3c-8f25-eb21212af0a1%40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAkq_SYCvz94%2BRq8HSA30kUywKE%2Bkoc4f6Rq2Xk785L_A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --0000000000000a54440585c2fb84 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have been working on such a thing, as a helper module f= or filter authors or as a filter itself. It has a function which will turn = any unparsed command into a Span with a `custom-style=3D"<user-defi= ned-prefix><command-name-minus-backslash>"` attribute and eac= h argument into a nested span with a similar attribute with an `-arg-N` suf= fix, where N is 0 for an optional argument and 1 through 9 for a mandatory = argument, using `pandoc.read()` to convert each argument into an AST, natur= ally also walking the AST calling the conversion function on any nested unp= arsed commands. If this sounds interesting I'll try to get it into a pr= esentable form ASAP.

Den tors 4 apr. 2019 15:32Axel Rauschmayer <rauschma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
Long term, it may make sense= for Pandoc to provide a utility function for Lua filters that parses LaTeX= commands (including attribute lists).

Rationale: Some a= dvanced things can be passed directly to LaTeX, but need to be parsed and p= rocessed for, e.g., HTML. Having help there would be useful.

--
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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To post to this group, send email to pandoc-discuss@googlegrou= ps.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/4c44b992-efd3= -4a3c-8f25-eb21212af0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CADAJKhAkq_SYCvz94%2BRq8HSA30kUywKE%2= Bkoc4f6Rq2Xk785L_A%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--0000000000000a54440585c2fb84--