From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26914 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: How to add a `\usepackage` in a Lua filter meant to support LaTeX? Date: Fri, 20 Nov 2020 11:43:44 -0800 Message-ID: References: <2e27c210-a276-4319-abd7-c81d5db7f7d7n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3702"; mail-complaints-to="usenet@ciao.gmane.io" To: Norman Ramsey , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB7NY4D6QKGQEN2HON2Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Nov 20 20:44:01 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f191.google.com ([209.85.167.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kgCK9-0000r6-08 for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 Nov 2020 20:44:01 +0100 Original-Received: by mail-oi1-f191.google.com with SMTP id w9sf212748oih.19 for ; Fri, 20 Nov 2020 11:44:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1605901440; cv=pass; d=google.com; s=arc-20160816; b=SVYPiokLVyjLu+9bGp/La0bD9VsAOofGiy3ckRJ3hQ4oa+4V5gLU84EFd8h/amBFCs PNNpGC3tP+nC2iduR7L6RuEKuZrCVZuTPCmvj3uwOcwtcDD0MxZlAKJnSL5of0nC/JOO pZMZZXbfOLtQfnF6aR2oafxLtwg00aXs+e8DsLbVuEZgVEMm/+SABXJzqkZCVnWQMtF8 UXIZwpc7ETra3Piy1pxHxhmLZpr7Zlt31BL60J//c2rRNeqfqNXZXqwy297xem+CLTLO YiBvCzlUWjz3ELKRRnLiw6Iu0rt1XvxJoi1hZeXlSuE51cvx1ILl6stfYW2DwJsL2h+/ iwLg== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=C+ZlhbdkaheIYEf6R9uGUODn8Em135Au3c5uWDodbME=; b=GBwORTLaa+5JeyaAyFq3Xk3iITEkNyUL7hRVjsqdBWl9Slek4BjiE02odGfSUyk51b XjyRqG+1FaVcY+f1lHqCJG5a72nz3Y/BEDvqG0soAOWCJn8Hr/0rqtjd1E8NkTw8T1+i yo1D+oSKnQ5bEtD4wnxTsPllGTEhiiXsN53BpP5bkBaOrQggWkF3255PdD6odRPvDPt1 DXvN7N9mRoWIdbQ4XSUbTkwzEaMbaTY99t88zwRvCldjTTJImvUP7ix0x+/ppIoYHuGt dRYKuPRzOvFDJPBBjtm/rvIvXCgoX6u9YtRhuPAIyRAaGWi7P9evxisdmDI1IGlp/9r+ 59bw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HCO9htaM; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version: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=C+ZlhbdkaheIYEf6R9uGUODn8Em135Au3c5uWDodbME=; b=V1gfYJ55XR8OmQaza6ldHlDN8rrLc0kfKE6Ez3tkBaiAtPcUqKFBMfJMf56UqmT2Oe z4aAmIxl9Eh0yJdc7CtQTvZm1NmVjQsojz7kxWoXmlv5cXS5K8spk3Gky82XT+SxAT87 r9awEHWvd69gjxti5QG4NUUK/UwZEs2WGqFKkB+1x+KskxGpLfO/sucJ/ilDlvmJBjNI Sx8zr526+JWWw2hs4w1lPUk1ESI6cXpLkkApcpcEsR2suDeVkGRgyVSUu7qQYpiCtjjT 53zzzEkavZU+bRl3VG/TOlzhD1sRf+st4krl8zjHZjgejHOG6EPR74Km+9HSKKrS9pfP /l7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version: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=C+ZlhbdkaheIYEf6R9uGUODn8Em135Au3c5uWDodbME=; b=gZbUGY1PmHMc6XXAxH0GSC8OgDm6zxBKIEcTU43FjUbcW8thZcXsP39Psq+ewxWrKD MFVmuQcF4r5X5ZdclSrBeQsYlRCqLfuOoD4dKww3nEG1MvEK/zmbMeY5KeNzA0u0qaTu V3Kl517sVfI3rlfgPtboHyAGvHvg7rakvE8CKZpywTwnoFX4dH+BnRT/C0WSsQhE/zAZ cbUOCGqnJeBJJ3ZUZfgk7y2qOpVoA/pXzN400NkgfwOH7ep5SECCwV06ySJAL5VoC+Ak 7vJVUxiPCGwayqUnozid+jBPG2/FRLc03y289M32rOa6ARTjsuLLIkViY824/tN1X5lt kQFw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532GEnPABkiOcxxePpD3LJ3Ei/FAtkgKRAsBzmAR/TGuizSUzrop 7yXJD/gV8gT82D5j2wn7JhQ= X-Google-Smtp-Source: ABdhPJzKO9Mai4Osfba+wVuCayuzaTKuzBRBka+NRDzwPIOR8Zz1Y82GdkdEFiVhzptD1tCEPRaHPg== X-Received: by 2002:a05:6830:1ac9:: with SMTP id r9mr15090620otc.98.1605901439998; Fri, 20 Nov 2020 11:43:59 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:5c8a:: with SMTP id q132ls1834078oib.0.gmail; Fri, 20 Nov 2020 11:43:57 -0800 (PST) X-Received: by 2002:aca:4a51:: with SMTP id x78mr7745481oia.86.1605901437167; Fri, 20 Nov 2020 11:43:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605901437; cv=none; d=google.com; s=arc-20160816; b=BDeV2PVj5OCkOIAUdVqEjy/SPG+R5Nzn871hZt/mDaxZ2l2b90PEsWkd+bnb0oVDCv oMYpxafxSZsv1tYoriJ9qCy6tNkWboUQBqLEaQUs9+DHbzv2dNpkNGgHKchA2xcl6AIv Au2jrTERSMR3Lo+C5z6a7cYBVHEiJDQEThqZd8HR3S2Dzgosa/dqXafU8aLNDAS6tpe2 xpBa9lo0EwZAZS3W5oPqxgN3/EDQRsV0NsbAjR0pRWbJhUVbI/eKVD4PQGr45/hDkomd FsyyTODlKxLBEwPU915Ngg/OqHJVRTs4JHom1M6En9zYhRByhqP0bxmmB8q0GiJrDqFh vKaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=AEuaqpoWW+v+IxmkjzFMkF0dlMGzbRa6gwoCuuBnGHM=; b=X3aI5slsvvK4PKUhMdc07M7mN7oK7xPQy79QSaLvuiJu2vfmHduKb3lwv4buBkRy/Y Ew2BamR6WRlWzBy4Y0icVZ0Hv2OhTrsTtiMfXrj/6i/fvkhk8z7viWL4VbP6gb0vivOt /SyuFLekqdEKThgUXXVUFujiXiG44SwO9clL36c8157j3GxgmEAmWYSnfabp1vOdyf12 oEarpA4e3QRadJ5oBpdamPrG3XhNah40PMDZvq5O00p7LeSXJxsELTPPdqBmbtgH8Wsa Kn+hB3PqUZ8KKhZEaPOG+hvH0RRPk9t+0kVMJjUl5jzjZ5Zi9Gmn4d/ndG0OmdA24/92 iMnQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HCO9htaM; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com. [2607:f8b0:4864:20::52b]) by gmr-mx.google.com with ESMTPS id f16si421655otc.0.2020.11.20.11.43.57 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Nov 2020 11:43:57 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52b as permitted sender) client-ip=2607:f8b0:4864:20::52b; Original-Received: by mail-pg1-x52b.google.com with SMTP id j19so8170198pgg.5 for ; Fri, 20 Nov 2020 11:43:57 -0800 (PST) X-Received: by 2002:aa7:8c55:0:b029:18c:45ed:d87e with SMTP id e21-20020aa78c550000b029018c45edd87emr15337865pfd.76.1605901436322; Fri, 20 Nov 2020 11:43:56 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id k30sm3799241pgb.83.2020.11.20.11.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 11:43:55 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 751C9A18A; Fri, 20 Nov 2020 14:43:44 -0500 (EST) In-Reply-To: <2e27c210-a276-4319-abd7-c81d5db7f7d7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HCO9htaM; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::52b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:26914 Archived-At: Norman Ramsey writes: > I've got a Lua filter that is meant to render certain document elements in > a `boxedminipage` environment. To accomplish this feat, I give the element > in a suitable `div`, and a Lua filter inserts the LaTeX environment. The > document itself remains universal, but the Lua filter is resolutely > intended for LaTeX. > > The filter adds a raw `\usepackage{boxedminipage2e}` to the > `header-includes` of the metadata, but unfortunately when `-V > header-includes=...` appears on the command line, it takes precedence and > the document metadata is ignored. > > I thought of trying to use `-M header-includes=...` instead of `-V > header-includes=...`, but that comes with its own problems: using the `-M` > option, the argument on the command line is escaped. It is not clear to me > if there is a mechanism I can use to put raw LaTeX in that spot. Why couldn't the filter add to the metadata `header-includes` RawBlock (Format "latex") "\\usepackage{boxedminipage2e}" ? Wouldn't that be a solution?