From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26183 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Denis Maier Newsgroups: gmane.text.pandoc Subject: Re: Manipulate CSL bibliography before processing Date: Fri, 18 Sep 2020 09:50:20 +0200 Message-ID: <3d4526b7-d83f-41ba-5b77-a9969261632c@mailbox.org> References: <54c0b3a9-f742-18e4-9fc2-8a3b7f2f3632@mailbox.org> <9af493a5-336d-a726-4266-b89104f0cebc@mailbox.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32361"; mail-complaints-to="usenet@ciao.gmane.io" To: John MacFarlane , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDAN5ZVOUMHBBPGNSH5QKGQECMX7RCA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Sep 18 09:50:24 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f187.google.com ([209.85.208.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJBA0-0008KX-JG for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 18 Sep 2020 09:50:24 +0200 Original-Received: by mail-lj1-f187.google.com with SMTP id b17sf1765196lji.10 for ; Fri, 18 Sep 2020 00:50:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1600415424; cv=pass; d=google.com; s=arc-20160816; b=DVGbv1AhWwneOZDR5XY5q0uPKT516clg2g2T4Iu/nN1I7U2mVatgLdS7JGjIUCNPqi No3BQyrNGm6DmjHF/VpC0HXZY82U0tuHF+oOKIYEDjWjPOCsfXS4V5Bs3xJrMu9Lki3f 4fRgqOdLXQdrh2iM4Lcqrx7TKRwVuADNvJlAmDFsMFvFZdclk7YTmJWJavQYEPA/V0Ao h08jdcs22o5TKTtTsSidim0CRyMEsCrsl6+tChSyvjUmRdN/TPYOk0waq9+AgeeigwbP lIXhCCuUNkOW7HaFmP6hDF/UeMELwiq73Xpu6EkRijS3Me6KKZUd6cxEDHkr1LHROAKB Zc4Q== 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:content-transfer-encoding :in-reply-to:mime-version:date:message-id:references:reply-to:to :from:subject:sender:dkim-signature; bh=qAs1GJrIWS7n7vglhGZQ6wdI3KN77i7rcokFCMmh7os=; b=Sz3Rtz8zc8ZXaTkvRxTRlMZe9i9/25fHONp4UoDH+Zt68ct8P9aOjkQ7xOttzI3Hsy F8JSj7HqfS8XCtIdZ5zsYyLQSB7FOixHnRAmztsxyXD7qXbOKolHme++Cvnn/FkszMC6 C4pg5tz7bHbyC+t/0MP2zBsMXpFrqiUy/Qd09GKX1kjjQ4gu9VexG9pKx4HavOM6Clvj 8gR8LPLuzzu+VzEoz7/IvTTL+31oUhLj+OMR/au2UM/zg/bJpUJ3kYTZD2JXldNQYRz4 IMqhYNUUy5cjBcnSvM71mFw5P3aRiVU7RK/0fkQ/U803VmptStzVYJwUDVl9yuGGXQwx 3jHg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=rB8omtMQ; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=YRhekdab; spf=pass (google.com: domain of denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailbox.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:from:to:reply-to:references:message-id:date :mime-version:in-reply-to:content-transfer-encoding :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=qAs1GJrIWS7n7vglhGZQ6wdI3KN77i7rcokFCMmh7os=; b=qRCOMyNrugi+C/peRp/+A8eDX1UzlS9YeWWTdnqDyT/Pkow6Sb+EYeJwM/CbVmguBa Mvj4niORjFKxvQc9uKemaPauBHrMium6vKQIKEiPULBg9YPKsnadJf2BW1pDyn/m3eMS RRoFNxLYInCsQ20XWsSEAfqE6H43ghpJq+JM5Iz1p/sPGVHfANJMH1t2WEyrJzjg/u0h PsFpvC1HL1vmrHNSop0ymjB6R42yHJZw3AavdmSFFozsaEzpY3YiAQxRjv5opg1QnAGm 3Itfa2A2LSgO4IM5W/gY8sVUeyGVDwUJZzbAll5X86E2PHcxqHTPSmjhrK/gIx6NY7vC 8Zow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:from:to:reply-to:references :message-id:date:mime-version:in-reply-to:content-transfer-encoding :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=qAs1GJrIWS7n7vglhGZQ6wdI3KN77i7rcokFCMmh7os=; b=Ju4LXCfj6dN97Z11NHED+WNmWbOFYxxy+qGLAFdv8FG3i5gTN/+SUGmvTAGQtTlPOI adwFIxnCYyCjj+NYTpJwkbBcIwzUTAiqKqRmxRdvgaA/0rJBm/Iv5qNyepJukWuXhiHb al8Da2CNwGj3DIjLYppWb5C94bESyxWpPvFFP2xY4Md+Cxe1i1BnpEYaidZ5z+0p8eAZ glitVOrIVcBKnvxYSGRVSbV9FV0ghKhmZVEP4RILNDn8VQZZuKU3MDcGhqBwYZ8GnkiP sjBebFTbvulnbJVQ/aZorOCPQ7++tq2mL71J9rireh8RmxvurrG7hbIGQH5yEOtGrr8Z Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5333BA5TCwTH4SScerjsUkaNQV1LflF8w8NMPGEWuIuJX3wdhdfL krBrWkSIf84AjgdHbvSUbYg= X-Google-Smtp-Source: ABdhPJxDy33pxkeAMrV4Oqtz3mFUupHPdyW3W7vUhDvcpseNWoIDTNOcyvcnwvkGt7JzUFi+K6CyRg== X-Received: by 2002:a2e:2ac3:: with SMTP id q186mr11885356ljq.419.1600415424077; Fri, 18 Sep 2020 00:50:24 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a19:c7c8:: with SMTP id x191ls1384778lff.0.gmail; Fri, 18 Sep 2020 00:50:19 -0700 (PDT) X-Received: by 2002:ac2:4e96:: with SMTP id o22mr9574020lfr.485.1600415419476; Fri, 18 Sep 2020 00:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600415419; cv=none; d=google.com; s=arc-20160816; b=hvmSBgOHWaZuccZ09P78PcveT07tkG12hnpt6z5194X4C4OD/Eidvi9/qxJV8+Q4zG Zz8Xk+BPhQuwUcAL6L7hnMnR++XP5Dt8Jkkm9xsVCxEumyjufL1uiGK1LIRbDoV9Xat5 ko2xIjgamlvt15lFkLimU5/5d3cNwrruOq/oSKPjluhp39AbOJtOH/e9GrEr+0mIiToU gIm9cJzzj1VPNbe0GNIKbTm4FqhfN99SQoU2C89pPngRpR0c10baa19jbdUMHcDjQtmk N2YMciBeTi3ifQeZjoIy2C/aNp3QcOSU80u+c4X47twsCpLX/Wcb9bg4cBGzB6WY96oF dQDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:date:message-id :references:reply-to:to:from:subject:dkim-signature:dkim-signature; bh=ZXiPKcXzDBmjhal+M/qqLUSeHL6DL4fNZTvBe1ZccTc=; b=zikWea4nFnY5gtagT4YMUfc6J9XJvLAKE3SrmyP0DhLlvIXs3IDAcIgIqJJ9eOg0Sg tl+8xBvFnx5s0GFvSovYBTtPBTlvLHAL/jol6qY45El39Q987SkdgFFctPCadM3DL0mb 2ldpTcwhaalsZe1WjfMLgaBXx9+ul8Av+t6Uny5BmFTrKi+oEYVFGy5REXH1C9HxvvZh OOUCXzy8yv497BLRKq3YZDb3YVbFW/kc8bMT+H+m/LC+ezYgdMp5G76U2+L69RtdXAsh tstPBDNzE7337ag1/qjrehX43QgZPOm7w4jb9Kg2KdQC94WST9FXdMAZVo9XRlZ9t4IE tCxA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=rB8omtMQ; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=YRhekdab; spf=pass (google.com: domain of denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailbox.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [2001:67c:2050::465:201]) by gmr-mx.google.com with ESMTPS id t80si46061lff.9.2020.09.18.00.50.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 00:50:19 -0700 (PDT) Received-SPF: pass (google.com: domain of denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) client-ip=2001:67c:2050::465:201; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Bt5bZ62WRzQlWs; Fri, 18 Sep 2020 09:50:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id zaAt7jWgxmk0; Fri, 18 Sep 2020 09:50:14 +0200 (CEST) In-Reply-To: X-Rspamd-Score: -6.45 / 15.00 / 15.00 X-Rspamd-Queue-Id: 89A3D1704 X-Rspamd-UID: 74cc46 X-Original-Sender: denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=rB8omtMQ; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=YRhekdab; spf=pass (google.com: domain of denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org designates 2001:67c:2050::465:201 as permitted sender) smtp.mailfrom=denis.maier.lists-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mailbox.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:26183 Archived-At: Am 18.09.2020 um 08:32 schrieb Denis Maier: > [...] I don't know if there's an easy way to enable merging of=20 > metadata blocks? As often, googling first is a good idea: There seems to be a tool that=20 is designed for exactly that purpose: https://mikefarah.gitbook.io/yq/ So, that would mean I can use Albert's suggestion. Something like this=20 should work: pandoc input.md -o output.pdf --metadata-file <(yd options file1 file2)=20 -citeproc ... > Am 17.09.2020 um 23:37 schrieb John MacFarlane: >> Our library does allow you to define citation-label for a >> reference in your CSL JSON or pandoc YAML bibliography. >> (If you don't define it, and a label is called for, then >> the library will generate one in a manner similar to >> citeproc.js.=C2=A0 But you CAN define it explicitly, and in that >> case the defined version will be used.)=C2=A0 I think that solves >> your problem all by itself. >> >> Denis Maier writes: >> >>> That's related, but not the same. --citation-abbreviatons is currently >>> used to supply short forms of certain fields. E.g container-titles, and >>> so. Also, they match against strings. The citation-label works similar >>> to biblatex's shorthand, but there is currently no way to define=20 >>> them on >>> a per-document basis. >>> But that could of course be added to the --citation-abbreviations=20 >>> feature. >>> >>> Am 17.09.2020 um 19:59 schrieb John MacFarlane: >>>> I wonder whether you could use --citation-abbreviations for this? >>>> See pandoc-citeproc manual. >>>> >>>> Denis Maier writes: >>>> >>>>> Hi, >>>>> >>>>> is it possible to manipulate a CSL bibliography before Pandoc=20 >>>>> processes >>>>> the citations? >>>>> Let's say I have one huge database, and I want to do ad hoc >>>>> modifications, for example add a certain field to a couple of=20 >>>>> entries. >>>>> >>>>> The specific use case would be this: >>>>> You write an essay about Kant, and you want to use the usual >>>>> abbreviations (KrV, KpV, etc.), but you don't want to have those >>>>> abbreviations in your main database. In=C2=A0 your metadata you could= have >>>>> something like this: >>>>> >>>>> ``` >>>>> bibliography: bib.json >>>>> bibliography-modifications: >>>>> =C2=A0=C2=A0 =C2=A0 - id: kant-id1 >>>>> =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 add: >>>>> =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - field: citation-label >>>>> =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 content: KrV >>>>> ``` >>>>> >>>>> Of course, you can always implement this with some sort of >>>>> pre-processing, e.g. with a python script. But a pandoc solution=20 >>>>> would >>>>> be neat. >>>>> >>>>> Is the content of the bibliography file exposed to the filter >>>>> architecture before citeproc actually processes the bibliography? >>>>> >>>>> Best, >>>>> Denis >>>>> >>>>> --=20 >>>>> You received this message because you are subscribed to the Google=20 >>>>> Groups "pandoc-discuss" group. >>>>> To unsubscribe from this group and stop receiving emails from it,=20 >>>>> send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit=20 >>>>> https://groups.google.com/d/msgid/pandoc-discuss/54c0b3a9-f742-18e4-9= fc2-8a3b7f2f3632%40mailbox.org. >>> --=20 >>> You received this message because you are subscribed to the Google=20 >>> Groups "pandoc-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it,=20 >>> send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit=20 >>> https://groups.google.com/d/msgid/pandoc-discuss/9af493a5-336d-a726-426= 6-b89104f0cebc%40mailbox.org. > --=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/3d4526b7-d83f-41ba-5b77-a9969261632c%40mailbox.org.