From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30897 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John Carter Wood Newsgroups: gmane.text.pandoc Subject: Re: Changing colons to full-stops in titles Date: Fri, 1 Jul 2022 08:52:15 -0700 (PDT) Message-ID: References: <78df697a-50f5-46d0-b0b8-29a2cbc9509an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1448_1374669092.1656690735020" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17056"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCYPBGVKTEEBBMFQ7SKQMGQEEHBMZ2Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 01 17:52:20 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yw1-f188.google.com ([209.85.128.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o7IwN-0004GN-VY for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 01 Jul 2022 17:52:20 +0200 Original-Received: by mail-yw1-f188.google.com with SMTP id 00721157ae682-317f6128c86sf21676017b3.22 for ; Fri, 01 Jul 2022 08:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=ttfbynMXvuK1W+mhPOF8zwkHs3Tny4/HPyClTtZF/9U=; b=q8YD23H2jaak2h08ost99/4ERb7iievoso+gKFHHNUGIaYoIP8WRiFSF9VUVGaPuWi 4S00wwHXJZ3FlDzOEO8zfC3AvH7BJQEbrslzTQpKNE2l097Gsihq/YylQCn64PmvDWzG dtVTPVMMOMKWvi15dzYoczUj7A3UArEo+m8P6NzUWO41U0coQWaXNUsKKK2P3uz4SRyp IpFCsDHh3g0moYbquua5ffWf19lvHPlrEPzEjR+PZzRkwNzZpL+sHcFFQ+ICFuZ4eHsH lKKXBueNI0J9IBLnlwRRjgYl6Kw7EAAMf6EQ/D1Crb0uiHDAs2s/w1ZX/iN5D6kJNv+s Xyfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=ttfbynMXvuK1W+mhPOF8zwkHs3Tny4/HPyClTtZF/9U=; b=6CCnpU3AI+95Qpzx4oohjBHmwe9UnCC37pPwRQflCptqCI89GXwX9Y47h9lD0tXPAr 9GaFbwZBhXkoiD7A8an2SbwORuaR91l/IZ9+F8J8Cr23clFoRqqWNFX7cisEeptzRtHB SUnjQiGC+bKSTij9B1IakqXoUxsY2hnT5VOaMwq5sLPNKMqWmeMXS10jjYJeaSe+M/W7 LYI7g66PN68s03HIGLOENQswlUZ/qs1PA01X+ick7ranC/NteLlyNA+GDmTW7c4gI3LL COJRRuRyLkVD2CV6/wcSL59zxFsIR5VUkZtZcRPqfsbln3V1w/mzR8FhuSs+bsNoS9sv faPA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+mdD6V1c+5GsTzpCTSjr6z1goWA50EcrUJjXDL4sY8JcC+bvC2 l6fCg6ilblYc0IgOpmshPns= X-Google-Smtp-Source: AGRyM1t30L//n0VUtKm3c/uEAyHl/i47tI92sf5lcxQf52vFgRHzbtW4BRhxIQC1zVgcqSXCUdlcZw== X-Received: by 2002:a81:1c56:0:b0:31c:651:a28f with SMTP id c83-20020a811c56000000b0031c0651a28fmr18403837ywc.424.1656690738797; Fri, 01 Jul 2022 08:52:18 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a81:407:0:b0:317:949b:3a9c with SMTP id 7-20020a810407000000b00317949b3a9cls18617825ywe.10.gmail; Fri, 01 Jul 2022 08:52:15 -0700 (PDT) X-Received: by 2002:a81:8d08:0:b0:317:a4cd:d65d with SMTP id d8-20020a818d08000000b00317a4cdd65dmr17071431ywg.329.1656690735520; Fri, 01 Jul 2022 08:52:15 -0700 (PDT) In-Reply-To: X-Original-Sender: woodjo-ZOsAvrTRSvuEhhMi0yms2Q@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:30897 Archived-At: ------=_Part_1448_1374669092.1656690735020 Content-Type: multipart/alternative; boundary="----=_Part_1449_265093406.1656690735020" ------=_Part_1449_265093406.1656690735020 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the suggestions, a couple of which are kind of stretching my=20 knowledge of these things, but I see where they're going.=20 As to JGM's question: I am using a CSL json bibliography, so my titles are= =20 in a single field. ("title":"Science and religion: new perspectives on the= =20 dialogue") The issue is that *most* of the journals / publishers I publish in use, as= =20 here, the colon. *Some* (mainly German) styles want the period. If I were= =20 solely interested in either one, I could choose and just enter the relevant= =20 punctuation in the title field. However, I want to continue saving my=20 bibliographic entries with a colon (because that's the most standard one=20 for me), but have the option of automatically converting them to a period= =20 for those cases where I need to. If that makes sense.=20 Thus: going through denis's options:=20 1. I have switched to json bibliographies from bibtex/biblatex as they=20 seemed to offer more flexibility (I was running into issue with the strange= =20 archival references I have to make in my field, and JSON seemed to work=20 better in that regard). So this seems to not apply.=20 2. Seems to not apply, as I have a single title field 3. Sounds really interesting, and I use BBT, though it also sounds like I= =20 would here have to create a separate bibliography file from my Zotero=20 database for those publishers/styles that require the dot. This is not=20 *too* onerous, as it would at least be automated.=20 4. Having a filter that I could simply apply (as part of a pandoc command,= =20 say) or not apply as relevant seems like the most flexible / efficient=20 solution. I don't know lua, but if this is one possible way, then I could= =20 use it as a (hopefully fairly simple?) way into learning it.=20 Does this help to clarify my situation? denis...-NSENcxR/0n0@public.gmane.org schrieb am Freitag, 1. Juli 2022 um 17:34:55 UTC+2: > Yes, that=E2=80=99s a known issue... > > There are a couple of possible solutions : > > =20 > > 1. use biblatex databases and patch pandoc so it will concat title and=20 > subtitle fields using periods. (line 667=20 > https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Citeproc/BibTeX= .hs > ) > > =20 > > 2. I think pandoc=E2=80=99s citeproc will just treat every unknown variab= le as a=20 > string variable (see=20 > https://github.com/jgm/citeproc/blob/3f94424db469c804cf2dac2d22dc7a18b614= f43e/src/Citeproc/Types.hs#L1054=20 > and=20 > https://github.com/jgm/citeproc/blob/3f94424db469c804cf2dac2d22dc7a18b614= f43e/src/Citeproc/Types.hs#L901),=20 > so you should be able to use =C2=ABsubtitle=C2=BB in styles. (This will g= ive you=20 > warnings when using the style with Zotero and it won=E2=80=99t work relia= bly across=20 > implementations, but anyway ...) > > =20 > > 3. if you=E2=80=99re using Zotero, you can leverage Zotero BBT=E2=80=99s = postscript=20 > feature to manipulate the JSON after exporting. > > E.g., this one : > > if (Translator.BetterCSL && item.title) { > > reference.title =3D reference.title.replace(/ : /g, '. ') > > } > > Not bullet-proof, but simple. You will want to choose a better separator,= =20 > maybe a double-bar or so. > > =20 > > 4. Doing the with lua should also be possible... > > =20 > > The question is: do you have the subtitle in a distinct field or is it=20 > just in the title field? > > =20 > > *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org *Im=20 > Auftrag von *John Carter Wood > *Gesendet:* Freitag, 1. Juli 2022 16:39 > *An:* pandoc-discuss > *Betreff:* Changing colons to full-stops in titles > > =20 > > I have one final (for now...) issue in setting up a CSL file (which I use= =20 > with pandoc/citeproc and references in a json file).=20 > > =20 > > I'm not sure whether this is a CSL issue or whether it's an issue that ca= n=20 > be solved via using a filter (or some other solution) in pandoc, but I=20 > thought there might be some people here who might have faced a similar=20 > issue.=20 > > =20 > > The house style for here (German-based publisher) wants a *=20 > full-stop/period *between main title and subtitle in citations /=20 > bibliographies; US/UK standard is a *colon* between main title and=20 > subtitle. And reference managers like Zotero -- IIUC -- save titles as=20 > single fields (at least they are in my version of Zotero). So it doesn't= =20 > seem like it is possible to control what delimiter is used between them v= ia=20 > CSL.=20 > > > I have found various discussions of relevant title/subtitle division=20 > issues -- some going back quite a few years -- in forums on Zotero:=20 > > > https://forums.zotero.org/discussion/8077/separate-fields-for-title-and-s= ubtitle/ > > ...and CSL: > > > https://discourse.citationstyles.org/t/handling-main-sub-title-splits-cit= eproc-js/1563/11 > > =20 > > However, these were in part discussions among developers about *possible*= =20 > changes, and I'm not sure of the current status of this issue or whether= =20 > there is a way to handle it.=20 > > Would it be possible to automate turning colons in titles into full-stops= =20 > via using a filter? If so is there such a filter already around? Can this= =20 > be done via CSL? > > =20 > > Or is this, as of now, impossible? > > (Or is there a real simple solution that I have, as usual, overlooked...)= =20 > > --=20 > > You received this message because you are subscribed to the Google Groups= =20 > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= =20 > email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/78df697a-50f5-46d0-b0b8-= 29a2cbc9509an%40googlegroups.com=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 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/a2d540a6-a435-4285-aed5-018007d155cfn%40googlegroups.com. ------=_Part_1449_265093406.1656690735020 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the suggestions, a couple of which are kind of stretching my kno= wledge of these things, but I see where they're going.

As to JGM's = question: I am using a CSL json bibliography, so my titles are in a single = field. ("title":"Science and religion: new perspectives on the dialogue")
The issue is that *most* of the journals / publishers I publish in us= e, as here, the colon. *Some* (mainly German) styles want the period. If I = were solely interested in either one, I could choose and just enter the rel= evant punctuation in the title field. However, I want to continue saving my= bibliographic entries with a colon (because that's the most standard one f= or me), but have the option of automatically converting them to a period fo= r those cases where I need to. If that makes sense.

Thus: going thr= ough denis's options:

1. I have switched to json bibliographie= s from bibtex/biblatex as they seemed to offer more flexibility (I was runn= ing into issue with the strange archival references I have to make in my fi= eld, and JSON seemed to work better in that regard). So this seems to not a= pply.
2. Seems to not apply, as I have a single title field<= /div>
3. Sounds really interesting, and I use BBT, though it also sound= s like I would here have to create a separate bibliography file from my Zot= ero database for those publishers/styles that require the dot. This is not = *too* onerous, as it would at least be automated.
4. Having = a filter that I could simply apply (as part of a pandoc command, say) or no= t apply as relevant seems like the most flexible / efficient solution. I do= n't know lua, but if this is one possible way, then I could use it as a (ho= pefully fairly simple?) way into learning it.

Does this help to clarify my situation?



denis...-NSENcxR/0n0@public.gmane.org s= chrieb am Freitag, 1. Juli 2022 um 17:34:55 UTC+2:

Yes, that=E2=80=99s a known iss= ue...

There are a couple of possible = solutions=C2=A0:

=C2=A0

1. use biblatex databases and p= atch pandoc so it will concat title and subtitle fields using periods. (line 667 https://github.com/jgm/p= andoc/blob/master/src/Text/Pandoc/Citeproc/BibTeX.hs)

=C2=A0

2. I think pandoc=E2=80=99s citeproc will just= treat every unknown variable as a string variable (see https://github.com/jgm/citeproc/blob/3f94424db469c804cf2dac2d2= 2dc7a18b614f43e/src/Citeproc/Types.hs#L1054 and https://github.com/jgm/citeproc/blob/3f94424db469c804cf2dac2d22dc7a18b614f4= 3e/src/Citeproc/Types.hs#L901), so you should be able to use =C2=ABsubt= itle=C2=BB in styles. (This will give you warnings when using the style wit= h Zotero and it won=E2=80=99t work reliably across implementations, but anyway ...)

=C2=A0

3. if you=E2=80=99re using Zote= ro, you can leverage Zotero BBT=E2=80=99s postscript feature to manipulate = the JSON after exporting.

E.g., this one=C2=A0:=

if (Translator.BetterCSL &&= amp; item.title) {

=C2=A0 reference.title =3D refe= rence.title.replace(/ : /g, '. ')

}

Not bullet-proof, but simple. Y= ou will want to choose a better separator, maybe a double-bar or so.=

=C2=A0

4. Doing the with lua should also be possible.= ..

=C2=A0

The question is: do you have the subtitle in a= distinct field or is it just in the title field?

=C2=A0

Von: pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...@googlegroups.c= om> Im Auftrag von John Carter Wood
Gesendet: Freitag, 1. Juli 2022 16:39
An: pandoc-discuss <pa= ndoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Changing colons to full-stops in titles

=C2=A0

I have one final (for now...) issue in setting up a = CSL file (which I use with pandoc/citeproc and references in a json file).

=C2=A0

I'm not sure whether this is a CSL issue or whet= her it's an issue that can be solved via using a filter (or some other = solution) in pandoc, but I thought there might be some people here who migh= t have faced a similar issue.

=C2=A0

The house style for here (German-based publisher) wa= nts a full-stop/period between main title and subtitle in citations / bibliog= raphies; US/UK standard is a colon between main title and subtitle. And reference managers like Z= otero -- IIUC -- save titles as single fields (at least they are in my vers= ion of Zotero). So it doesn't seem like it is possible to control what = delimiter is used between them via CSL.


I have found various discussions of relevant title/subtitle division issues= -- some going back quite a few years -- in forums on Zotero:

https://fo= rums.zotero.org/discussion/8077/separate-fields-for-title-and-subtitle/=

...and CSL:

https://discourse.citationstyles.org/t/handling-main-sub-title-splits-= citeproc-js/1563/11

=C2=A0

However, these were i= n part discussions among developers about possible changes, and I'm not sure of the current status of this= issue or whether there is a way to handle it.

Would it be possible to automate turning colons in t= itles into full-stops via using a filter? If so is there such a filter alre= ady around? Can this be done via CSL?

=C2=A0

Or is this, as of now, impossible?

(Or is there a real simple solution that I have, as usual, overlooked...) <= u>

--

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 pandoc-discus...-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/78df697a-50f5-46d0-b0b8-29= a2cbc9509an%40googlegroups.com.

--
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/a2d540a6-a435-4285-aed5-018007d155cfn%40googlegroups.= com.
------=_Part_1449_265093406.1656690735020-- ------=_Part_1448_1374669092.1656690735020--