From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31812 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adin Klotz Newsgroups: gmane.text.pandoc Subject: Filter help: apply LaTeX command to words matching pattern Date: Mon, 28 Nov 2022 14:53:48 -0500 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008544aa05ee8d3b5d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7453"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDT5LXEV5QIRBWNDSSOAMGQEAT5YJZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 28 20:54:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pl1-f187.google.com ([209.85.214.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozkCb-0001jm-MS for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Nov 2022 20:54:05 +0100 Original-Received: by mail-pl1-f187.google.com with SMTP id t1-20020a170902b20100b001893ac9f0fesf11018864plr.4 for ; Mon, 28 Nov 2022 11:54:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669665244; cv=pass; d=google.com; s=arc-20160816; b=rEFL5KB3AHbrWGWkgStTvvsXt210wkl/MrycbMceWRnYXg2LOc7oMEDVGsarFm2DP4 hC4wXl2GqORZSbYeVyRqQ5BzQE0l+2+kOiu08YAj4tn/rPFwIAIM3WRhuYT++rqDFtHU zTDrCFiVubWFgdk5l/5qm8s9fzPscHmP35qWvhCMQGI+C7+We1arXvf7u5mn3RAT1Dl8 fxseqZ8WdJZ3Hzgt2JQ7uPUIHpYCCDn7O2v2ocMY0ZduJYwtT39kOMiH+r3F0VMEa82g ZwucD6UMsH+vcV8OrBe+A8ATkR+93clpQmNeFH7lYxmmxMi6BMFtI3sZFxyZMjcOcwmk RnGw== 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:mime-version:sender:dkim-signature:dkim-signature; bh=k7uJSnRfqinZ0kLGyG2WHdTspanpZBk7Uio/KVvx3cI=; b=yHNtPHW/EqKIMvJmiHLVECxfKxSjlSYPuUwoKopUZbtvBv2EsFtUYJzACbItlaoO1G SgbrJUVI3N8iTIkLqE/LWF/72VNwlFR/6U42YENoo+XhLlWJRq90E1MzjUEubclxEXAW dVEwXJn1y5Nbjaxhh5uXSI0HFMJb4zvbRtnzCbJ8VavRbcVeFGcK+9yFqMAYaev1stpx F7PsnzdwlJT1Zrkp7ktK7NV0drNNps07OkI0NbRRqoPwHCqscySCCRU77M7Luc9NgOqs dV19puBjtZJDxQbkjd0NfDC6Lhvh+oYHQDnv6GDwheTWMsuo0hBU3snvM9xKWi9+jRFp +LTQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=H8M3TYfK; spf=pass (google.com: domain of adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::a35 as permitted sender) smtp.mailfrom=adinklotz-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=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=k7uJSnRfqinZ0kLGyG2WHdTspanpZBk7Uio/KVvx3cI=; b=NuirrrsCNcrOx3NlsRjyj7UYKD7DtYkSwEkk25l9MVDd4CmP5+SaPndrvFC9DrhxyH iyMrFmS/xK3AhYDGUJSOncdmxSQk52v9DMa/ACF7wkARixZ61YceCQIwWgJxLoA1ctYr JoIhy7Nd60eTcbK7nBXqb1BuOX3VnZRgrlupSYFcaXv/WItgv2m3JhUE/B/kLMx6cdOG 0Sm7YZ9ivFLQKzoA6fA0ZLFF+QNS0FZAtwfXlskN+vrFdmk6DBhp3tXMugD6KcolZvnQ kWUjZ/t7B96MFJVBdznEYmeWoHmAq+gHo8cmkBGZOVvZDzahPS1O9qTX1V6RzBOFuO40 9dEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k7uJSnRfqinZ0kLGyG2WHdTspanpZBk7Uio/KVvx3cI=; b=Y89c3g3tGFZh8P5P7CwJrisPtOwYe4I0XSmMVsu0Kc6LS/SIKHL8bCf/fTYdAU4rym 7xi5nmG9RR5RtO6n+gZ/3H3prL/InIGiZvtWct3pWVR2BKYZdcVYgDaZOzbR2lpD8P3W e0TH7Sub7IYf7XWIHfABaScffgrQMAQGkEsNkLRsmJ1ne5DqfG2E7eIOiXwcNhJERFJs H/WawfGKAKiyllDngNwevY/FK/2AOUVYQ9V/nPKcX4afeZnNZN846n4wT30UytlWZnez 4M13aWDelLzQPQkoJW4FSWgifXh5gdIUwHR+ArVK4UTGCBWIZLj8nENl4SzqhpmcDeF7 Ddjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-authentication-results:x-original-sender:to:subject :message-id:date:from:mime-version:x-gm-message-state:sender:from:to :cc:subject:date:message-id:reply-to; bh=k7uJSnRfqinZ0kLGyG2WHdTspanpZBk7Uio/KVvx3cI=; b=IwGzSuvgzViL9NfQNgRQDnGG7kzhjJFFz5Zwk7TLtp+8P6lrPDQMQX2B7alRvDrFhZ vPZk4DZQRowVh5KHj1pNTU+hmMmYdQZVrCL3zrQsyk31ojK92/KY+MYGIVgD6J8+Lw6x 7241xBZd8SLfZ6BJl3+POpo2UqHU3wHtmuxSMZnLGkKZimQJbtJvXi8gQmnzcfUqx/M0 BjIP6rwXGpGvHbJlLceDLFUDNbfdqS095Z1148VtHTtlClnGTloafuf+2E4d+EzGcxVW 8a331FdaL10XRdVUeT0bX9sI/HqN3Ul+z8DxmFkKt8de1X/SI41XDp84IG6h53tExl+Y Q Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pmcBrQ6tTA4GliGFSPZ2MRHE9sVWdzbG++xGywXtiXTuJ68XDJt DCQXRJZuHvQKTfu9LqZ0fTQ= X-Google-Smtp-Source: AA0mqf7ShO17fgA3thmx9DZiWeRAtp7PTzFIRTNnvUaC/RkdkZB4N3Pzd/GaSdfpvmf3M+qAGNny/g== X-Received: by 2002:a05:6a00:a96:b0:554:4162:1ec1 with SMTP id b22-20020a056a000a9600b0055441621ec1mr34626717pfl.64.1669665244308; Mon, 28 Nov 2022 11:54:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90a:7002:b0:219:d2d:af41 with SMTP id f2-20020a17090a700200b002190d2daf41ls7272564pjk.3.-pod-canary-gmail; Mon, 28 Nov 2022 11:54:00 -0800 (PST) X-Received: by 2002:a17:903:31cd:b0:180:be71:6773 with SMTP id v13-20020a17090331cd00b00180be716773mr34078817ple.42.1669665240510; Mon, 28 Nov 2022 11:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669665240; cv=none; d=google.com; s=arc-20160816; b=sRiRt7nY68IdIHdxDTRThIkIaNuVjmIOt/CpH/n8nOMs2t465kj0YhxDWKsHsuh4/j oMkikZKath2bGzo5G4a5n10Pkg5IDx1PiXkmOt0O/XeQN8jzQBFMT2/+SJWyNWqRqTBK SRNXYDrvLVNXYqyJKSUBT/RP9f8f/mpDFMZsqulTL6l45sWogMhcO+gBTSpvYmV0VGFj 3AGJ0SBw8wF84Fq5PHPwHwHbizfq16WfRSLMJTDfiEk90JeIYYYlh1brhVw0ssVGdmru cBhfFYpX/RiO9UCnzFSTtW12KtuCD2gg008409qV7ZHD6X+spMGWyfQx5ZHYujQNHT1D AOKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=UaHfPp7qA5JaeSBhkkmRIVZQ2vhOH2Yd2B8M1Fowxj8=; b=R/h6XScm1zU2nVv9mi1eDGqrJ8x3heD0BA7i9X98YMio1H+tHZXo7SexSFBtnDek8R 3ofVKA8QV4lDcUUC4fA+f3mGPuUcCP7Q6KhhMKlLl0N2ac1jicUw9C0mdgTqYihtLyoq xBP/3KKIuAY38OUj2RLsinOO11PK8rgJqsYKNr3j1D5G1c38GRUCwLwsDwRq1BmXo9V8 gf9rI4IjJAXSDJDPA8R61E8kj1GQqmQcdFHVoz/LrXMUVzJFG5E/uE69D+dPPnOq04KN FhBONWVOnGEJxCblqqZs6FQntLX9NMfr1hbtuX8YaX+QF8QBlSBycUxjhx4xkjYDaovp 5LFA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=H8M3TYfK; spf=pass (google.com: domain of adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::a35 as permitted sender) smtp.mailfrom=adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com. [2607:f8b0:4864:20::a35]) by gmr-mx.google.com with ESMTPS id mv8-20020a17090b198800b00218fce2dbb9si648607pjb.1.2022.11.28.11.54.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 11:54:00 -0800 (PST) Received-SPF: pass (google.com: domain of adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::a35 as permitted sender) client-ip=2607:f8b0:4864:20::a35; Original-Received: by mail-vk1-xa35.google.com with SMTP id o24so5809490vkl.9 for ; Mon, 28 Nov 2022 11:54:00 -0800 (PST) X-Received: by 2002:a1f:5042:0:b0:3bc:e09a:3903 with SMTP id e63-20020a1f5042000000b003bce09a3903mr2894921vkb.23.1669665239940; Mon, 28 Nov 2022 11:53:59 -0800 (PST) X-Original-Sender: adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=H8M3TYfK; spf=pass (google.com: domain of adinklotz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::a35 as permitted sender) smtp.mailfrom=adinklotz-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.io gmane.text.pandoc:31812 Archived-At: --0000000000008544aa05ee8d3b5d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Background: I like the look of old-style numerals in text, but they look bad in acronyms or other all-caps blocks, so I=E2=80=99d like to switch to = lining numerals there. I couldn=E2=80=99t find an all-LaTeX way to do this so simp= lest way seemed to be a filter. I want to match words containing and only containing capital letters and numbers and surround them with \liningnums{} For example: NUMBER1 -> \liningnums{NUMBER1} 2022 -> 2022 A1B2C3 -> \liningnums{A1B2C3} A1b2c3 -> A1b2c3 I=E2=80=99ve played around a bit but don=E2=80=99t know enough Lua or Pando= c internals to get there. I have patterns to check the words but haven=E2=80=99t managed t= o successfully add the latex macro. Can someone point me in the right direction? Thanks! --=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/CAFy2Trs7g%2B84uDfLAYOa%2BFZm7YmXfwCUiFiTbcCwyN56KEv8nQ%40ma= il.gmail.com. --0000000000008544aa05ee8d3b5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Background: I like the look of old-style numerals in text= , but they look bad in acronyms or other all-caps blocks, so I=E2=80=99d li= ke to switch to lining numerals there. I couldn=E2=80=99t find an all-LaTeX= way to do this so simplest way seemed to be a filter. I want to match word= s containing and only containing capital letters and numbers and surround t= hem with \liningnums{}

F= or example:
NUMBER1 -> \liningnums{NUMBER1}
=
2022 -> 2022
A1B2C3 -> \lini= ngnums{A1B2C3}
A1b2c3 -> A1b2c3

I=E2=80=99ve played around a bit but don= =E2=80=99t know enough Lua or Pandoc internals to get there. I have pattern= s to check the words but haven=E2=80=99t managed to successfully add the la= tex macro. Can someone point me in the right direction?

Thanks!

--
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://gro= ups.google.com/d/msgid/pandoc-discuss/CAFy2Trs7g%2B84uDfLAYOa%2BFZm7YmXfwCU= iFiTbcCwyN56KEv8nQ%40mail.gmail.com.
--0000000000008544aa05ee8d3b5d--