From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28538 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Escape sequence in LUA filters, problems multiple citations conversion of docx to Latex Date: Fri, 4 Jun 2021 21:43:52 +0000 Message-ID: References: <3e06a866-8075-4031-886e-8c45cc4ab8bdn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19011"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBPN55KCQMGQEWMS36EQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 04 23:44:32 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f55.google.com ([209.85.167.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lpHcG-0004iR-K6 for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 04 Jun 2021 23:44:32 +0200 Original-Received: by mail-lf1-f55.google.com with SMTP id u23-20020a1979170000b02901d2e8dd801dsf4341977lfc.6 for ; Fri, 04 Jun 2021 14:44:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622843071; cv=pass; d=google.com; s=arc-20160816; b=CO5seKX2UaD/4i60w/iYxl2gz62NP78ZK0gJkXzDCQpZwuvLqfAiLRIyxl3Ny4vioX eDPnSCRCxEW3TvdSWw2ZbZ+vrKCI1P3u7fzCUUEVfiQTJ+/mMn1SVfFColtjpj6W1mxb gM/QdnlaidZ5T9d7BcuPNvQZpSnMc999/E/bIPmIhCDNP9ZgD9/fmxzGX8zA8pATaBfj BDfY/b9TxFs81nW4zIghL/HGMG7r0Wne43wcqVMzCu4GD2GmHyXmb+xf1eN2WrHPfCCH 9A+eR/r4rsXXwl1XxLO4ICYBrcjjzeEnhcNjIaGaV9/l+eDlqQMQOLcWHbTir1PfIGSP s9PQ== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=pvDHgjNIDhguAWkZQa5gQ2uHGAKZWykvXP4nT77yLKY=; b=05YyDNrnzoxLp8XSenfcd/T4JVCNMlAZ2j7orrpSR5luqKyA88OSJqMEec/FJcUvNN HiRJYMuFRLndscWe6O1btQiiVsKUKeNqxjmOL4EhARzeM0u0RUM4mWC1QzzjhqL0MEfu F4+2ULR67meVddpY3eju+Uv0rd4osyhW7mMNXxNCZ+fLQqsviPstbbt4CQYHHh+0WsQz LGctnV71f4L7hYURJaTgHzVJ0eLRd10FxhcJW67yJited2kDhCMMw6Px7jO7jJ91mjgp Fnor2loG5IoEdX91v1Xoxmtwp/3FcYlBhZ1/crC1Myy0WLLPiKK/DFSKXjFemi4pO1bf 061Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b="SaWm/tCc"; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-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=pvDHgjNIDhguAWkZQa5gQ2uHGAKZWykvXP4nT77yLKY=; b=q0ftKNcazkyDqCWtqC9zHBA7QHc01ccV+Y6oCrqBcuYn804eXl9kOas+P2ZNlQP1u/ EnJc1+RZl2o8i+gaomGgnNxkx3oDI3/dyGUN+sMJxYmnTV+ArXGcRdBsRygsJKz9qRcz 5kluBVFeAuonKN5eHvWwJ9gufWE/VJtqV09HHw2iQfBBB74vS03ozZoBiYlGSK22a1Pt cjFOl9UIN51hfk+yJg71jVu/7eqd7J4fVbvmPDEYuHin/c8rKIsW93IeEfDiiyGYTezR 2aCYxUhuw0QL9EG3LO97Efbo9DeH74cmh2J6pZNlVSFKcprAIkjIq6HtudhKZf90dVkp VCOw== 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:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-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=pvDHgjNIDhguAWkZQa5gQ2uHGAKZWykvXP4nT77yLKY=; b=BNYb3/pAgYfiWboUePeDDF0fBcqPAcExmcQtdGoiXh0NuTPTjhaEoNuFGmcqn3cNUv 1GpfOJlxmxUASAoLpWX5NyQ+jwhFaC76VYrLrVDta7IQlNSiOVQg1/wH3pzDz2LxpFnp kr9O7ErDxJXlsGvLyCRpEZTztMR8bLnBBqPUtEbFTTZrmM8xz8TbVDdf21bkvpNcBZEx OQAHuVvP9qX5ixFE77ktj4qk2UgQ4vTDrAhbsSPAUkb9UVeNBs60VasuebCz7iXVAxl6 vAy/K0WbRVwZvUdQW47Lk2+x52eveOZ1kso/InwQlOPW Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533GjAZG82ggq5rx8TLOjL7Ad2ZLMI7AM3ygWzbGkPNSGmpL99AU zOiWOfSwHnjVg6vmYMenOx4= X-Google-Smtp-Source: ABdhPJz1HahoycZA5nZmN+3FCn1xwBzaxIJt9BO7FGS94WwPAf7YN8brntvgRmFOt5wQFFls4fM7xA== X-Received: by 2002:a19:441a:: with SMTP id r26mr4217159lfa.104.1622843071589; Fri, 04 Jun 2021 14:44:31 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3b0e:: with SMTP id f14ls1013455lfv.3.gmail; Fri, 04 Jun 2021 14:44:28 -0700 (PDT) X-Received: by 2002:a05:6512:3ba3:: with SMTP id g35mr3916417lfv.3.1622843068780; Fri, 04 Jun 2021 14:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622843068; cv=none; d=google.com; s=arc-20160816; b=BI0KT3LorA4ES0cT2TCm3xzpionrH+4d2+jYs9tKtPJHPAqJL9SS44wyvNdAwIQ0GN pfpoCSxCsd3MWjy3soWmEEygpxHhoMaRJWAE47u8u4bVIvaK12yGO1FuZUANhG9Zwztl 0wdm+h3/Q+QuevmznhNkodbx2rXISENP1wC4peGQw63GZhmKcamHZ24UGcXYQhH7tD6Y 5SyOtlTrdH5UhO0w/ofpELBo4Wy9VXMSlPjk4Vs6Lt6Ol57t4eCak3XZAkdnqTOcP8PI 3KY47Ite4PgGwjIlKSAz4SuDzYBAgBK9yZ5x45a5Ba4qah29EaCPe6tHTOfF55EKK4Hg NTqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=B7xxEhYPpfrT2JJcjawCCXJa4tBXceuozdB6h1fO4Vo=; b=M1/o8z5n0YwJqo3AMrmTYR31usSDfO7dJViHo1QWRNAZBZ3TvxH5bMbr9NNxkoCNc/ yBqQ6Z9cgAJiOEzgEuBd19DFG88ieWBVYQS77uTZMV4wTZt34XEk01aY2MynuCTLU9w1 vyClakT+B+bw18G8PWQgpwhQ0Wabx58Wt2Xmj4n0cdDSSc9Kv6gsxx567y9335heJjqD ZHxBfITel/vwRGHmEVQLoP1jb4P1sCyoMXSzdy1c9CCliJ/FWJY4y1av+t83PTACFQgI Sn5Mxz9mo833bkXIIKRY/UzA8nYYzJSGk6DyhAqZ2MiMGtBsuxRg9cQ+n09YXxifBN7g WM8w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b="SaWm/tCc"; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id 81si258366lff.11.2021.06.04.14.44.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 14:44:28 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id C5177240027 for ; Fri, 4 Jun 2021 23:44:27 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FxbrW2X8kz6tmG for ; Fri, 4 Jun 2021 23:44:27 +0200 (CEST) Content-Disposition: inline In-Reply-To: <3e06a866-8075-4031-886e-8c45cc4ab8bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b="SaWm/tCc"; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:28538 Archived-At: Your problem doesn't have anything to do with Lua escaping rules, but with Pandoc conversion of strings to LaTeX. What you tell Pandoc to do is to convert a string beginning with a backslash to LaTeX, so it uses (rightly) \textbackslash. Instead, what you would like to pass is raw LaTeX code: to that end, use pandoc.RawInline. Le Friday 04 June 2021 =C3=A0 10:01:53AM, Ioan Muntean a =C3=A9crit : > Hello all, >=20 > I have some troubles with escaping sequence in a Lua filter. I am using t= he > function Str() and I simply want to generate the text "\cite" in a Latex = output > .=20 > This is the function: > return pandoc.Str([[\cite{]]..latex_citekey.."}") >=20 > The output is: \textbackslash cite\{ > How do I escape the converter if I want to get an output like "\cite"? I = think > it has something to do with inline characters, but I do not know how to u= se > them. >=20 > Here is the bigger picture:=20 >=20 > I am trying to convert with Pandoc DOCX files to Latex. I use Zotero refe= rences > and a Better than Bibtex style in docx to create references for pandoc. > The --citedoc --natlib --bibliography=3D<.bib file> options works with si= ngle > reference in DOCX=20 > The entry: [@parker2009computinguncomputablediscrete] > is converted to \cite{parker2009computinguncomputablediscrete} >=20 > [@cartwright2006wellorderedscience; @cichy2019deepneuralnetworks; > @parker2009computinguncomputablediscrete] >=20 > is not converted but kept exactly like that in the Latex file. But the Do= cx > conversion does not work for multiple references or for prefixes or suffi= xes of > citations. But the same pandoc command for a markdown input works fine. I > suspect there is some difference on how the docx and markdown converter w= orks. >=20 >=20 > I am currently almost done with writing a Lua filter and the intention is= to > generate the correct output >=20 > \cite{cartwright2006wellorderedscience, cichy2019deepneuralnetworks, > parker2009computinguncomputablediscrete} >=20 > Thanks in advance! >=20 > Ioan >=20 >=20 >=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= email > to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/ > pandoc-discuss/3e06a866-8075-4031-886e-8c45cc4ab8bdn%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/YLqemAYD8VVVnCNZ%40localhost.