From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32304 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: bapt a Newsgroups: gmane.text.pandoc Subject: raw_tex commands substitution with bibtex input Date: Wed, 8 Mar 2023 16:48:55 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12068_958703032.1678322935446" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1634"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDG3FYUYQUCBB6GZUSQAMGQESWZVIJI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Mar 09 01:49:00 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f183.google.com ([209.85.222.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pa4Sq-0000Ec-2u for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 09 Mar 2023 01:49:00 +0100 Original-Received: by mail-qk1-f183.google.com with SMTP id pc36-20020a05620a842400b00742c715894bsf289292qkn.21 for ; Wed, 08 Mar 2023 16:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678322939; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=ZSWzP66Hh6qmsWJqPtJyOtnwGPiLbqV/RE87bodzY2M=; b=CXiFEVBb7F4XeVq7iiqq5NG6VsDQQFGYQa44rBAR4LlBhFPKx1+VjCUo2Vi97usmwf /+i6gvKMX5dHJhP+958jpdtqp47oGzS4Mkc9H4x12Bhjo0oZ0VjrZ9QvI9P5rUdwc/N7 yIEr/pgMD2MmWzoKsr7yvUYLB75pMo4JQKNNqtLCcLuO0VdWb3aeZZK2y8julxXwzke2 7o6W1jh3n1yoxiw1vb5lxRFeU+q257N6ViJ1f6oC5LG05nB93yYorF1nVr2SssvYftcB mUeS8h73Xp5B3CDtWL7DgqKpGmakikCQniYlhNUR5OzDXLzI93+MCCcEYtpRupnEb55e 7fCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678322939; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=ZSWzP66Hh6qmsWJqPtJyOtnwGPiLbqV/RE87bodzY2M=; b=hJDxIAkSeKf777EV4Ug9ppLqeXJLFZeDaekGNkS4hrNVM8TVodRAzIhSBgvHEWEfmw WvFEnBMlJq3lvApo6Ck7D255u4tRwDgLDssgx80zFrKgNaKusHqd+elAVA+sZJMYlsuS RQHwW4KYtsQv59qBPKZola58nv1gVoNfIlPdesInLSpw6qH8TZAq6M9XZE3Q9BWr066A xkCkWkuVVOU1LLmQukJ5fzXnSNNRb7jg8OK+Q6jEJfp7UNWoqTtfhtSPIAKo+a5lwRwn LbpLNr6I+xVL5wLSENTyycJ5erwnas2FCz1kr6tLdXO5CWVLtqvtgbSgVYiByktYC5cb BVKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678322939; 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-sender:mime-version:subject:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=ZSWzP66Hh6qmsWJqPtJyOtnwGPiLbqV/RE87bodzY2M=; b=zlRZr8yTfJvUI3cRLLIsPtgtAI6C4qiUdKAVRIk3RJtUYqX9ENtgDetnof2OOSOT2c jRUIzbKmsznuZypQX0MVJSGTwuwNy+7wpmjyZF3jAAcX1f1lSnaZNaRJm1IECmNvpiXs dPyuo2LzefkacuUcdgFfmOwDM0TKhetI/ZkGTbjPvh+5hnjN+E76EEBdFwhjV0/5+74g TjxBxUww0gVxXHBx0DkSE4jeR0o/PgJV+FlWgD1TSkcaKIYbf/WQMALo/Cevnloju4hG lvgTkh9I2tktgwy2QVxafyTZCBjycj8TPt6bHzWanORXeB/mg4yzgOQOOolsD5nANzvf +Lxw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWUzH8/d79Iu+LHD3xslP1F2R5RbwKhSM/5We9nKqRBKQrU8uLx 07mbnSnTLjBsxZo6xOUVruI= X-Google-Smtp-Source: AK7set89pB6051ej1ZhBfncwgVfF2emoyOjQRtccsj/65GdwvRIYkRVE36JxHKIi5Clo71YE/d9aLg== X-Received: by 2002:a05:6214:9c9:b0:56e:8fe6:dfd8 with SMTP id dp9-20020a05621409c900b0056e8fe6dfd8mr5412594qvb.1.1678322939025; Wed, 08 Mar 2023 16:48:59 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ac8:72cd:0:b0:3b8:64eb:ae2a with SMTP id o13-20020ac872cd000000b003b864ebae2als614321qtp.11.-pod-prod-gmail; Wed, 08 Mar 2023 16:48:56 -0800 (PST) X-Received: by 2002:ac8:83:0:b0:3bf:abef:4e7 with SMTP id c3-20020ac80083000000b003bfabef04e7mr5768736qtg.4.1678322936285; Wed, 08 Mar 2023 16:48:56 -0800 (PST) X-Original-Sender: auguieba-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:32304 Archived-At: ------=_Part_12068_958703032.1678322935446 Content-Type: multipart/alternative; boundary="----=_Part_12069_1374108122.1678322935446" ------=_Part_12069_1374108122.1678322935446 Content-Type: text/plain; charset="UTF-8" Hi, I'm not sure how to approach this: suppose I want to produce html output from a .bib file uses LaTeX commands such as `\textregistered`, or `\myname` as an alias, etc. but outside a math environment (`$\textregistered$` would be fine, as it's handled as Inline Math and passed to mathjax). With a different input format, I could use the `+raw_tex` extension to make sure pandoc does not drop the latex commands, and have a Lua filter perform the desired substitutions, as in this answer: https://stackoverflow.com/a/56391373 Unfortunately, I'm getting this message from pandoc: "The extension raw_tex is not supported for bibtex" Is there a workaround for such substitutions? Many thanks, baptiste --- pandoc test.bib --from bibtex+raw_tex -t csljson -o test.json sample bibtex @preamble{"\providecommand{\textregistered}{\unicode{xAE}}"} @preamble{"\providecommand{\customalias}{Akshay Agrawal}"} @article{agrawal2021mde, author = {\customalias and Alnur Ali and Stephen Boyd}, doi = {10.1561/2200000090}, journal = {Foundations and Trends{\textregistered} in Machine Learning}, number = {3}, pages = {211--378}, publisher = {Now Publishers}, title = {Minimum-Distortion Embedding}, url = {https://doi.org/10.1561/2200000090}, volume = {14}, year = {2021}, bdsk-url-1 = {https://doi.org/10.1561/2200000090}} -- 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/c6cfd247-822c-419e-a8ec-e3cee10e03f0n%40googlegroups.com. ------=_Part_12069_1374108122.1678322935446 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I'm not sure how to approach this: supp= ose I want to produce html output from a .bib file uses LaTeX commands such= as `\textregistered`, or `\myname` as an alias, etc. but outside a math en= vironment (`$\textregistered$` would be fine, as it's handled as Inline Mat= h and passed to mathjax).=C2=A0

With a different= input format, I could use the `+raw_tex` extension to make sure pandoc doe= s not drop the latex commands, and have a Lua filter perform the desired su= bstitutions, as in this answer: https://stackoverflow.com/a/56391373
<= div>
Unfortunately, I'm getting this message from pandoc: "= The extension raw_tex is not supported for bibtex"

Is there a workaround for such substitutions?

Many thanks,

baptiste


---
pandoc test.bib --from bibtex+raw_t= ex -t csljson -o test.json

sample bibtex

@preamble{"\providecommand{\textregistered}{\unicode{xA= E}}"}
@preamble{"\providecommand{\customalias}{Akshay Agrawal}"}
=
@article{agrawal2021mde,
author =3D {\customalias and Alnur Ali and Stephen Boyd},
doi =3D {10.1561/2200000090},
journal =3D {Foundations and Trends{\tex= tregistered} in Machine Learning},
= number =3D {3},
pages= =3D {211--378},
publisher = =3D {Now Publishers},
title = =3D {Minimum-Distortion Embedding},
= url =3D {https://doi.org/10.1561/2200000090},
volume =3D {14},
year =3D {2021},
bdsk-url-1 =3D {https://doi.org/10.1561/2200000090}}



--
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/c6cfd247-822c-419e-a8ec-e3cee10e03f0n%40googlegroups.= com.
------=_Part_12069_1374108122.1678322935446-- ------=_Part_12068_958703032.1678322935446--