From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18493 Path: news.gmane.org!.POSTED!not-for-mail From: distantflag Newsgroups: gmane.text.pandoc Subject: Re: Markdown syntax can't handle BibLaTeX formatting Date: Thu, 2 Nov 2017 00:39:29 -0700 (PDT) Message-ID: References: <90e14ff2-6cec-4dfe-9236-0998cf317b6c@googlegroups.com> <87tvyd4trv.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_408_1148905427.1509608369585" X-Trace: blaine.gmane.org 1509608369 2208 195.159.176.226 (2 Nov 2017 07:39:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2017 07:39:29 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCR4PQ5D3UPRBMUX5PHQKGQEHOOYILY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Nov 02 08:39:25 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f56.google.com ([209.85.218.56]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eAA60-0000AN-3e for gtp-pandoc-discuss@m.gmane.org; Thu, 02 Nov 2017 08:39:24 +0100 Original-Received: by mail-oi0-f56.google.com with SMTP id j83sf5201585oif.7 for ; Thu, 02 Nov 2017 00:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=Bg5vPiCrGZum8qEM1q/aQEnb6q3LjgxL8pG5LRkAdH0=; b=XIDtJS0704xS7OGBdt8kvYlmGpOfLUFVHCWkbn+uefH6zuYqRReHqQXEocBS4Fgk0U x+4cYJDWcM7qaC9suFHk+HArzV/1U1H0MSwAK1vQuFxLv/8B5n/sBLftszu3E50daLbb TFCq9yEDhzW68D8PLUbuP1rYgqRtQWP39dz7vAesGn8tTbA1auHjrDQndhbeaiL2r7wr 1t73sUc2gpd2MVzLxcm5x9GevPJOqvyJFF1qqsoEzj2r+blAGfh351pR62RxXrOPQ/CL ahqRmSb174RSySFGxzLMlEghdhjB90Gphx7roZi082sk+StMjAch2F0/y4/R4EZhL3IW CpxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=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=Bg5vPiCrGZum8qEM1q/aQEnb6q3LjgxL8pG5LRkAdH0=; b=MO1I6sW0etO/o4Y2BqiG2d7zp7ZoytFDjWiLM2QY8AZIlvv8Pdb5OI0Vdw83WRntx+ 00+dO8A3mTM5+wGVr8PCfM9akvXXXYMSo8j8v4JxGjnorvRnvH3qkCTWjNzW0L8k3VeA h9aT2oSQM76tgw/1QerNM1zDaZZ8fL0S2+o4CRSoeGpVwnIux/EfkMVntSdo827GOe0Z D+fsSqafRXmSxz3SlBKgJjByn7r9sAg/jpTSbOi/2kCQZrybdV5zgsyEpkSbHMqO57Nc 01uIexblKxjIj/MPk2oW6S/fhhY1q4iGkkxYRhJbKx5Qx10/WEk27ucFh6MwGwgQmUkw gdVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Bg5vPiCrGZum8qEM1q/aQEnb6q3LjgxL8pG5LRkAdH0=; b=HGDJn3sGPsHCdPC6FsWQWC0vkdnFQlUixcsQhytv+bUzLFFudtapYov71pK51G0nN5 rpTBo8eIuQVGDOMrbJxfPElr7MMMZGqDsvQBK6/zplWn48jZFc72DIcyF+A7J+2qzSNp G3swzH+UbXcam12oI6iMEfG9wnDeZL7y8DZifnUdqlvdzLCF3MkCg440z9PIP147M2Fd iauNFY6xhX0SsMFvsg8D7uEchglkY+VhK8TDHYm85a2gwpeTHVotWddbL0sJb0PuWuJb aeHrhdmXSmEfXcGMdT2d2DSREkk1Nv+nFFr++56J4zozDQveFPePsU7WEqG5umm73ryr RPjA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJaThX5dhq6UEma4JLSvQx7af6IS5aAiktq1woZy2jTOEUE7zEQoHdUR S2LlcseY0JYteYTv6axGnVo= X-Google-Smtp-Source: ABhQp+Tnkxd7f77dOWwXk2uRe++fG3YWIPmUTD7O6PywZa3PYarnUBE5i7Uf1PgWehDQ7yZqvoSwEw== X-Received: by 10.157.0.7 with SMTP id 7mr75295ota.14.1509608371389; Thu, 02 Nov 2017 00:39:31 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.202.188.131 with SMTP id m125ls737951oif.2.gmail; Thu, 02 Nov 2017 00:39:30 -0700 (PDT) X-Received: by 10.157.45.110 with SMTP id v101mr75567ota.12.1509608370216; Thu, 02 Nov 2017 00:39:30 -0700 (PDT) In-Reply-To: <87tvyd4trv.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: eksbjo-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.org gmane.text.pandoc:18493 Archived-At: ------=_Part_408_1148905427.1509608369585 Content-Type: multipart/alternative; boundary="----=_Part_409_1801687289.1509608369585" ------=_Part_409_1801687289.1509608369585 Content-Type: text/plain; charset="UTF-8" Hello, Thanks for your replies. I could of course change the bibkeys. But since I am generating them through export from Zotero I would like to do so now and again when adding citations to a text, not having to edit each and every faulty bibkey each time this export process is done. Albert Krewinkel: This script seems handy. Where do I place it? As a file by itself or inside the Markdown file? I tried the latter but I didn't seem to get it right. Den onsdag 1 november 2017 kl. 21:41:48 UTC+1 skrev Albert Krewinkel: > > If, for some reason, the bib keys cannot be changed, the combination of > spans and filters might come in handy: > > Write citations as a markdown span > > [statute._2014/foo:bar_title_????]{.cite} > > and use a filter like the following to convert the span into a citation. > > function Span(elem) > if elem.classes[1] == "cite" then > local citeId = elem.content[1].text > local citeMode = pandoc.AuthorInText > local citation = pandoc.Citation(citeId, citeMode) > return pandoc.Cite(elem.content, {citation}) > end > end > > It is not a pretty solution, but you might find it useful regardless. > > > distantflag > writes: > > > I have an issue where the Markdown syntax for referring to > bibliographical sources can't treat direct links to the entries in an > BibLaTeX file. > > > > For instance, the BibLaTeX file looks like this: > > > > @online{statute._2014/foo:bar_title_????, > > title = {Title}, > > author = {{Statute. 2014/Foo:Bar}}, > > langid = {swedish} > > } > > > > @report{author_report:_2014, > > location = {Foobar}, > > title = {Report: Foo (Bar)}, > > url = {http://foo.bar}, > > author = {{Author}}, > > urldate = {2017-11-01}, > > date = {2014} > > } > > > > The Markdown formatting for referring to this would be > > > > [@statute._2014/foo:bar_title_????] > > > > and > > > > [@author_report:_2014] > > > > However, the question marks and the colon messes up the syntax > formatting and the sources cannot be converted to plain text using pandoc. > > > > What can be done about this? > > -- > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cfc702fb-7389-4b78-88c8-0ec235ffa481%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_409_1801687289.1509608369585 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Thanks for your replies. I could= of course change the bibkeys. But since I am generating them through expor= t from Zotero I would like to do so now and again when adding citations to = a text, not having to edit each and every faulty bibkey each time this expo= rt process is done.

Albert Krewinkel: This script = seems handy. Where do I place it? As a file by itself or inside the Markdow= n file? I tried the latter but I didn't seem to get it right.

De= n onsdag 1 november 2017 kl. 21:41:48 UTC+1 skrev Albert Krewinkel:If, for some reason, the bib keys cann= ot be changed, the combination of
spans and filters might come in handy:

Write citations as a markdown span

=C2=A0 =C2=A0 [statute._2014/foo:bar_title_????]{.cite}

and use a filter like the following to convert the span into a citation= .

=C2=A0 =C2=A0 function Span(elem)
=C2=A0 =C2=A0 =C2=A0 if elem.classes[1] =3D=3D "cite" then
=C2=A0 =C2=A0 =C2=A0 =C2=A0 local citeId =3D elem.content[1].text
=C2=A0 =C2=A0 =C2=A0 =C2=A0 local citeMode =3D pandoc.AuthorInText
=C2=A0 =C2=A0 =C2=A0 =C2=A0 local citation =3D pandoc.Citation(citeId, = citeMode)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return pandoc.Cite(elem.content, {citation}= )
=C2=A0 =C2=A0 =C2=A0 end
=C2=A0 =C2=A0 end
=C2=A0 =C2=A0=20
It is not a pretty solution, but you might find it useful regardless.


distantflag <eks...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I have an issue where the Markdown syntax for referring to bibliog= raphical sources can't treat direct links to the entries in an BibLaTeX= file.
>
> For instance, the BibLaTeX file looks like this:
>
> @online{statute._2014/foo:bar_title_????,
> title =3D {Title},
> author =3D {{Statute. 2014/Foo:Bar}},
> langid =3D {swedish}
> }
>
> @report{author_report:_2014,
> location =3D {Foobar},
> title =3D {Report: Foo (Bar)},
> url =3D {http://foo.bar},
> author =3D {{Author}},
> urldate =3D {2017-11-01},
> date =3D {2014}
> }
>
> The Markdown formatting for referring to this would be
>
> [@statute._2014/foo:bar_title_????]
>
> and
>
> [@author_report:_2014]
>
> However, the question marks and the colon messes up the syntax for= matting and the sources cannot be converted to plain text using pandoc.
>
> What can be done about this?=20

--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe =C2=A0e836 388d c0b2 1f63 1124

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/cfc702fb-7389-4b78-88c8-0ec235ffa481%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_409_1801687289.1509608369585-- ------=_Part_408_1148905427.1509608369585--