public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How could I output multiple language bibliography style with CSL control?
@ 2020-08-01 11:23 周嘉希
       [not found] ` <0d279913-5369-4fd5-92f6-bd681077da39o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: 周嘉希 @ 2020-08-01 11:23 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 11577 bytes --]

I created a CSL named "general.csl", which is fit with some Chinese 
journals' requirements. Here is the MWE:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" et-al-min="4" et-al-use-first="1" sort-separator=";" page-range-format="expanded" demote-non-dropping-particle="sort-only" default-locale="zh-CN">
 <info>
   <title>基本通用格式</title>
   <id>http://www.zotero.org/styles/general</id>
   <author>
     <name> edward zhou</name>
   </author>
   <category citation-format="note"/>
   <category field="chinese social science"/>
   <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
 </info>
 <macro name="author">
   <names variable="author">
     <name delimiter="、" sort-separator=","/>
   </names>
   <names variable="editor" suffix="主编">
     <name delimiter="、" sort-separator=","/>
   </names>
 </macro>
 <macro name="editor">
   <names variable="editor" suffix="主编">
     <name delimiter="、" sort-separator=","/>
   </names>
 </macro>
 <macro name="container-title">
   <text variable="container-title" prefix="《" suffix="》"/>
 </macro>
 <macro name="container-author">
   <names variable="container-author">
     <name delimiter="、"/>
   </names>
 </macro>
 <macro name="pageField">
   <choose>
     <if type="chapter" match="any">
       <text variable="page" prefix="第" suffix="页。"/>
     </if>
     <else/>
   </choose>
 </macro>
 <macro name="secondAuthor">
   <names variable="translator" suffix="译">
     <name delimiter="、" sort-separator=","/>
   </names>
 </macro>
 <macro name="publisher">
   <choose>
     <if type="article article-journal article-magazine article-newspaper" match="any"/>
     <else>
       <text variable="abstract"/>
     </else>
   </choose>
 </macro>
 <macro name="place: publisher">
   <text variable="publisher-place" suffix=":"/>
   <text variable="publisher" suffix=","/>
 </macro>
 <macro name="en-layout">
   <names variable="author" suffix=", ">
     <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
   </names>
   <choose>
     <if type="book" match="any">
       <names variable="translator" prefix="trans. " suffix=", ">
         <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
       </names>
       <text variable="title" font-style="italic" suffix=", "/>
       <text variable="publisher-place" suffix=": "/>
       <text variable="publisher" suffix=", "/>
       <date date-parts="year" form="numeric" variable="issued"/>
     </if>
     <else-if type="chapter" match="any">
       <text variable="title" prefix="“" suffix=",” "/>
       <names variable="editor" prefix="in " suffix=", eds., ">
         <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
       </names>
       <names variable="translator" prefix="trans." suffix=", ">
         <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
       </names>
       <text variable="container-title" font-style="italic" suffix=", "/>
       <text variable="publisher-place" suffix=": "/>
       <text variable="publisher" suffix=", "/>
       <date date-parts="year" form="numeric" variable="issued" suffix=", "/>
       <text variable="page" prefix="pp. "/>
     </else-if>
     <else-if type="webpage" match="any">
       <text variable="title" prefix="“" suffix=",” "/>
       <text variable="container-title" font-style="italic" suffix=", "/>
       <date form="text" variable="issued" suffix=", "/>
       <text variable="URL" suffix=", "/>
       <date form="numeric" variable="accessed" prefix="访问时间:">
         <date-part name="year" range-delimiter="" prefix="," suffix="年"/>
         <date-part name="month" form="numeric" range-delimiter="" suffix="月"/>
         <date-part name="day" range-delimiter="" suffix="日"/>
       </date>
     </else-if>
     <else-if type="thesis" match="any">
       <text variable="title" font-style="italic" suffix=", "/>
       <text variable="publisher-place" suffix=": "/>
       <text variable="publisher" suffix=", "/>
       <text variable="genre" suffix=" Thesis, "/>
       <date date-parts="year" form="numeric" variable="issued"/>
     </else-if>
     <else>
       <text variable="title" prefix="“" suffix=",” "/>
       <text variable="container-title" font-style="italic" suffix=", "/>
       <text variable="volume" prefix="Vol. " suffix=", "/>
       <text variable="issue" prefix="No. " suffix=", "/>
       <date date-parts="year" form="text" variable="issued" suffix=", "/>
       <text variable="page" prefix="pp. "/>
     </else>
   </choose>
 </macro>
 <citation>
   <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
     <text macro="en-layout"/>
   </layout>
   <layout suffix="。">
     <choose>
       <if type="article article-journal article-magazine" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="container-title"/>
         <date date-parts="year" form="text" variable="issued"/>
         <text variable="issue" prefix="第" suffix="期"/>
         <text variable="page" prefix=",第" suffix="页"/>
       </if>
       <else-if type="article-newspaper" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="container-title"/>
         <date form="text" variable="issued"/>
       </else-if>
       <else-if type="chapter" match="any">
         <names variable="author"/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="editor" prefix="载"/>
         <text variable="container-title" prefix=":《" suffix="》,"/>
         <text macro="secondAuthor" suffix=","/>
         <text variable="publisher-place" suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
         <text variable="page" prefix=",第" suffix="页"/>
       </else-if>
       <else-if type="webpage" match="any">
         <names variable="author"/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text variable="container-title" suffix=","/>
         <date form="text" variable="issued" suffix=", "/>
         <text variable="URL" prefix=" " suffix=","/>
         <date form="text" variable="accessed" prefix="访问时间:"/>
       </else-if>
       <else-if type="thesis" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text variable="publisher-place" suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued"/>
         <text variable="genre" suffix="学位论文"/>
       </else-if>
       <else>
         <text macro="author" suffix=""/>
         <text variable="title" prefix=":《" suffix="》"/>
         <text macro="secondAuthor" prefix="," />
         <text variable="publisher-place" prefix="," suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
       </else>
     </choose>
   </layout>
 </citation>
 <bibliography>
   <sort>
     <key variable="author"/>
   </sort>
   <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
     <text macro="en-layout"/>
   </layout>
   <layout suffix="。">
     <choose>
       <if type="article article-journal article-magazine" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="container-title"/>
         <date date-parts="year" form="text" variable="issued"/>
         <text variable="issue" prefix="第" suffix="期"/>
         <text variable="page" prefix=",第" suffix="页"/>
       </if>
       <else-if type="article-newspaper" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="container-title"/>
         <date form="text" variable="issued"/>
       </else-if>
       <else-if type="chapter" match="any">
         <names variable="author"/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text macro="editor" prefix="载"/>
         <text variable="container-title" prefix=":《" suffix="》,"/>
         <text macro="secondAuthor" suffix="," />
         <text variable="publisher-place" suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
         <text variable="page" prefix=",第" suffix="页"/>
       </else-if>
       <else-if type="webpage" match="any">
         <names variable="author"/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text variable="container-title" suffix=","/>
         <date form="text" variable="issued" suffix=", "/>
         <text variable="URL" prefix=" " suffix=","/>
         <date form="text" variable="accessed" prefix="访问时间:"/>
       </else-if>
       <else-if type="thesis" match="any">
         <text macro="author"/>
         <text macro="secondAuthor" prefix=","/>
         <text variable="title" prefix=":《" suffix="》,"/>
         <text variable="publisher-place" suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued"/>
         <text variable="genre" suffix="学位论文"/>
       </else-if>
       <else>
         <text macro="author" suffix=""/>
         <text variable="title" prefix=":《" suffix="》"/>
         <text macro="secondAuthor" prefix="," />
         <text variable="publisher-place" prefix="," suffix=":"/>
         <text variable="publisher"/>
         <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
       </else>
     </choose>
   </layout>
 </bibliography>


When using Markdown to Word transition with Pandoc, both English and 
Chinese bibliographies share the common style. Here is the pandoc MWE, but 
no use. 

pandoc -s --bibliography "my.bib" --filter pandoc-citeproc --csl 
"general.csl" -V default-locale="zh-CN" my.md -o out.docx

[image: enter image description here] <https://i.stack.imgur.com/MGz0B.png>

*What I want is to illustrate the bibliography with two styles in my CSL 
based on language.*

[image: The Output Result I Want] <https://i.stack.imgur.com/KkoQt.png>

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0d279913-5369-4fd5-92f6-bd681077da39o%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 160045 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How could I output multiple language bibliography style with CSL control?
       [not found] ` <0d279913-5369-4fd5-92f6-bd681077da39o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-08-02  0:32   ` Priv.-Doz. Dr. Maria Shinoto
       [not found]     ` <E9401FE1-BA73-4D87-85DD-A6B8D0F60EF3-7M2J4GrLiDedPOQpRHQ53DeJuz7u0hKX@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Priv.-Doz. Dr. Maria Shinoto @ 2020-08-02  0:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

There are good introductions to using CSL in a multilingual environment in the documentation on JurisM, which is a fork of Zotero for multilingual bibliographies. 


> Am 01.08.2020 um 20:23 schrieb 周嘉希 <edwardzhoujiaxi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
> 
> I created a CSL named "general.csl", which is fit with some Chinese journals' requirements. Here is the MWE:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" et-al-min="4" et-al-use-first="1" sort-separator=";" page-range-format="expanded" demote-non-dropping-particle="sort-only" default-locale="zh-CN">
>  <info>
>    <title>基本通用格式</title>
>    <id>http://www.zotero.org/styles/general</id>
>    <author>
>      <name> edward zhou</name>
>    </author>
>    <category citation-format="note"/>
>    <category field="chinese social science"/>
>    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
>  </info>
>  <macro name="author">
>    <names variable="author">
>      <name delimiter="、" sort-separator=","/>
>    </names>
>    <names variable="editor" suffix="主编">
>      <name delimiter="、" sort-separator=","/>
>    </names>
>  </macro>
>  <macro name="editor">
>    <names variable="editor" suffix="主编">
>      <name delimiter="、" sort-separator=","/>
>    </names>
>  </macro>
>  <macro name="container-title">
>    <text variable="container-title" prefix="《" suffix="》"/>
>  </macro>
>  <macro name="container-author">
>    <names variable="container-author">
>      <name delimiter="、"/>
>    </names>
>  </macro>
>  <macro name="pageField">
>    <choose>
>      <if type="chapter" match="any">
>        <text variable="page" prefix="第" suffix="页。"/>
>      </if>
>      <else/>
>    </choose>
>  </macro>
>  <macro name="secondAuthor">
>    <names variable="translator" suffix="译">
>      <name delimiter="、" sort-separator=","/>
>    </names>
>  </macro>
>  <macro name="publisher">
>    <choose>
>      <if type="article article-journal article-magazine article-newspaper" match="any"/>
>      <else>
>        <text variable="abstract"/>
>      </else>
>    </choose>
>  </macro>
>  <macro name="place: publisher">
>    <text variable="publisher-place" suffix=":"/>
>    <text variable="publisher" suffix=","/>
>  </macro>
>  <macro name="en-layout">
>    <names variable="author" suffix=", ">
>      <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>    </names>
>    <choose>
>      <if type="book" match="any">
>        <names variable="translator" prefix="trans. " suffix=", ">
>          <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>        </names>
>        <text variable="title" font-style="italic" suffix=", "/>
>        <text variable="publisher-place" suffix=": "/>
>        <text variable="publisher" suffix=", "/>
>        <date date-parts="year" form="numeric" variable="issued"/>
>      </if>
>      <else-if type="chapter" match="any">
>        <text variable="title" prefix="“" suffix=",” "/>
>        <names variable="editor" prefix="in " suffix=", eds., ">
>          <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>        </names>
>        <names variable="translator" prefix="trans." suffix=", ">
>          <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>        </names>
>        <text variable="container-title" font-style="italic" suffix=", "/>
>        <text variable="publisher-place" suffix=": "/>
>        <text variable="publisher" suffix=", "/>
>        <date date-parts="year" form="numeric" variable="issued" suffix=", "/>
>        <text variable="page" prefix="pp. "/>
>      </else-if>
>      <else-if type="webpage" match="any">
>        <text variable="title" prefix="“" suffix=",” "/>
>        <text variable="container-title" font-style="italic" suffix=", "/>
>        <date form="text" variable="issued" suffix=", "/>
>        <text variable="URL" suffix=", "/>
>        <date form="numeric" variable="accessed" prefix="访问时间:">
>          <date-part name="year" range-delimiter="" prefix="," suffix="年"/>
>          <date-part name="month" form="numeric" range-delimiter="" suffix="月"/>
>          <date-part name="day" range-delimiter="" suffix="日"/>
>        </date>
>      </else-if>
>      <else-if type="thesis" match="any">
>        <text variable="title" font-style="italic" suffix=", "/>
>        <text variable="publisher-place" suffix=": "/>
>        <text variable="publisher" suffix=", "/>
>        <text variable="genre" suffix=" Thesis, "/>
>        <date date-parts="year" form="numeric" variable="issued"/>
>      </else-if>
>      <else>
>        <text variable="title" prefix="“" suffix=",” "/>
>        <text variable="container-title" font-style="italic" suffix=", "/>
>        <text variable="volume" prefix="Vol. " suffix=", "/>
>        <text variable="issue" prefix="No. " suffix=", "/>
>        <date date-parts="year" form="text" variable="issued" suffix=", "/>
>        <text variable="page" prefix="pp. "/>
>      </else>
>    </choose>
>  </macro>
>  <citation>
>    <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
>      <text macro="en-layout"/>
>    </layout>
>    <layout suffix="。">
>      <choose>
>        <if type="article article-journal article-magazine" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="container-title"/>
>          <date date-parts="year" form="text" variable="issued"/>
>          <text variable="issue" prefix="第" suffix="期"/>
>          <text variable="page" prefix=",第" suffix="页"/>
>        </if>
>        <else-if type="article-newspaper" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="container-title"/>
>          <date form="text" variable="issued"/>
>        </else-if>
>        <else-if type="chapter" match="any">
>          <names variable="author"/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="editor" prefix="载"/>
>          <text variable="container-title" prefix=":《" suffix="》,"/>
>          <text macro="secondAuthor" suffix=","/>
>          <text variable="publisher-place" suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>          <text variable="page" prefix=",第" suffix="页"/>
>        </else-if>
>        <else-if type="webpage" match="any">
>          <names variable="author"/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text variable="container-title" suffix=","/>
>          <date form="text" variable="issued" suffix=", "/>
>          <text variable="URL" prefix=" " suffix=","/>
>          <date form="text" variable="accessed" prefix="访问时间:"/>
>        </else-if>
>        <else-if type="thesis" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text variable="publisher-place" suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued"/>
>          <text variable="genre" suffix="学位论文"/>
>        </else-if>
>        <else>
>          <text macro="author" suffix=""/>
>          <text variable="title" prefix=":《" suffix="》"/>
>          <text macro="secondAuthor" prefix="," />
>          <text variable="publisher-place" prefix="," suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>        </else>
>      </choose>
>    </layout>
>  </citation>
>  <bibliography>
>    <sort>
>      <key variable="author"/>
>    </sort>
>    <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
>      <text macro="en-layout"/>
>    </layout>
>    <layout suffix="。">
>      <choose>
>        <if type="article article-journal article-magazine" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="container-title"/>
>          <date date-parts="year" form="text" variable="issued"/>
>          <text variable="issue" prefix="第" suffix="期"/>
>          <text variable="page" prefix=",第" suffix="页"/>
>        </if>
>        <else-if type="article-newspaper" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="container-title"/>
>          <date form="text" variable="issued"/>
>        </else-if>
>        <else-if type="chapter" match="any">
>          <names variable="author"/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text macro="editor" prefix="载"/>
>          <text variable="container-title" prefix=":《" suffix="》,"/>
>          <text macro="secondAuthor" suffix="," />
>          <text variable="publisher-place" suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>          <text variable="page" prefix=",第" suffix="页"/>
>        </else-if>
>        <else-if type="webpage" match="any">
>          <names variable="author"/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text variable="container-title" suffix=","/>
>          <date form="text" variable="issued" suffix=", "/>
>          <text variable="URL" prefix=" " suffix=","/>
>          <date form="text" variable="accessed" prefix="访问时间:"/>
>        </else-if>
>        <else-if type="thesis" match="any">
>          <text macro="author"/>
>          <text macro="secondAuthor" prefix=","/>
>          <text variable="title" prefix=":《" suffix="》,"/>
>          <text variable="publisher-place" suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued"/>
>          <text variable="genre" suffix="学位论文"/>
>        </else-if>
>        <else>
>          <text macro="author" suffix=""/>
>          <text variable="title" prefix=":《" suffix="》"/>
>          <text macro="secondAuthor" prefix="," />
>          <text variable="publisher-place" prefix="," suffix=":"/>
>          <text variable="publisher"/>
>          <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>        </else>
>      </choose>
>    </layout>
>  </bibliography>
> 
> When using Markdown to Word transition with Pandoc, both English and Chinese bibliographies share the common style. Here is the pandoc MWE, but no use. 
> pandoc -s --bibliography "my.bib" --filter pandoc-citeproc --csl "general.csl" -V default-locale="zh-CN" my.md -o out.docx
> 
> 
> 
> What I want is to illustrate the bibliography with two styles in my CSL based on language.
> 
> 
> 
> 
> -- 
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0d279913-5369-4fd5-92f6-bd681077da39o%40googlegroups.com.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/E9401FE1-BA73-4D87-85DD-A6B8D0F60EF3%40zaw.uni-heidelberg.de.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How could I output multiple language bibliography style with CSL control?
       [not found]     ` <E9401FE1-BA73-4D87-85DD-A6B8D0F60EF3-7M2J4GrLiDedPOQpRHQ53DeJuz7u0hKX@public.gmane.org>
@ 2020-08-02 18:41       ` 'Denis Maier' via pandoc-discuss
  0 siblings, 0 replies; 3+ messages in thread
From: 'Denis Maier' via pandoc-discuss @ 2020-08-02 18:41 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I've already answered to the OP, but forgot to include the list. Posting 
again in case someone has a similar problem:

Currently, you can't do that. Your style uses citeproc-js specific CSL 
extensions. Those don't work with pandoc-citeproc. There's the new 
citeproc-rs under development that will possibly support those features 
with pandoc. But I don't know when that will be ready.

Best, Denis


Am 02.08.2020 um 02:32 schrieb Priv.-Doz. Dr. Maria Shinoto:
> There are good introductions to using CSL in a multilingual environment in the documentation on JurisM, which is a fork of Zotero for multilingual bibliographies.
>
>
>> Am 01.08.2020 um 20:23 schrieb 周嘉希 <edwardzhoujiaxi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>>
>> I created a CSL named "general.csl", which is fit with some Chinese journals' requirements. Here is the MWE:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" et-al-min="4" et-al-use-first="1" sort-separator=";" page-range-format="expanded" demote-non-dropping-particle="sort-only" default-locale="zh-CN">
>>   <info>
>>     <title>基本通用格式</title>
>>     <id>http://www.zotero.org/styles/general</id>
>>     <author>
>>       <name> edward zhou</name>
>>     </author>
>>     <category citation-format="note"/>
>>     <category field="chinese social science"/>
>>     <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
>>   </info>
>>   <macro name="author">
>>     <names variable="author">
>>       <name delimiter="、" sort-separator=","/>
>>     </names>
>>     <names variable="editor" suffix="主编">
>>       <name delimiter="、" sort-separator=","/>
>>     </names>
>>   </macro>
>>   <macro name="editor">
>>     <names variable="editor" suffix="主编">
>>       <name delimiter="、" sort-separator=","/>
>>     </names>
>>   </macro>
>>   <macro name="container-title">
>>     <text variable="container-title" prefix="《" suffix="》"/>
>>   </macro>
>>   <macro name="container-author">
>>     <names variable="container-author">
>>       <name delimiter="、"/>
>>     </names>
>>   </macro>
>>   <macro name="pageField">
>>     <choose>
>>       <if type="chapter" match="any">
>>         <text variable="page" prefix="第" suffix="页。"/>
>>       </if>
>>       <else/>
>>     </choose>
>>   </macro>
>>   <macro name="secondAuthor">
>>     <names variable="translator" suffix="译">
>>       <name delimiter="、" sort-separator=","/>
>>     </names>
>>   </macro>
>>   <macro name="publisher">
>>     <choose>
>>       <if type="article article-journal article-magazine article-newspaper" match="any"/>
>>       <else>
>>         <text variable="abstract"/>
>>       </else>
>>     </choose>
>>   </macro>
>>   <macro name="place: publisher">
>>     <text variable="publisher-place" suffix=":"/>
>>     <text variable="publisher" suffix=","/>
>>   </macro>
>>   <macro name="en-layout">
>>     <names variable="author" suffix=", ">
>>       <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>>     </names>
>>     <choose>
>>       <if type="book" match="any">
>>         <names variable="translator" prefix="trans. " suffix=", ">
>>           <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>>         </names>
>>         <text variable="title" font-style="italic" suffix=", "/>
>>         <text variable="publisher-place" suffix=": "/>
>>         <text variable="publisher" suffix=", "/>
>>         <date date-parts="year" form="numeric" variable="issued"/>
>>       </if>
>>       <else-if type="chapter" match="any">
>>         <text variable="title" prefix="“" suffix=",” "/>
>>         <names variable="editor" prefix="in " suffix=", eds., ">
>>           <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>>         </names>
>>         <names variable="translator" prefix="trans." suffix=", ">
>>           <name and="text" et-al-min="4" et-al-use-first="1" sort-separator=""/>
>>         </names>
>>         <text variable="container-title" font-style="italic" suffix=", "/>
>>         <text variable="publisher-place" suffix=": "/>
>>         <text variable="publisher" suffix=", "/>
>>         <date date-parts="year" form="numeric" variable="issued" suffix=", "/>
>>         <text variable="page" prefix="pp. "/>
>>       </else-if>
>>       <else-if type="webpage" match="any">
>>         <text variable="title" prefix="“" suffix=",” "/>
>>         <text variable="container-title" font-style="italic" suffix=", "/>
>>         <date form="text" variable="issued" suffix=", "/>
>>         <text variable="URL" suffix=", "/>
>>         <date form="numeric" variable="accessed" prefix="访问时间:">
>>           <date-part name="year" range-delimiter="" prefix="," suffix="年"/>
>>           <date-part name="month" form="numeric" range-delimiter="" suffix="月"/>
>>           <date-part name="day" range-delimiter="" suffix="日"/>
>>         </date>
>>       </else-if>
>>       <else-if type="thesis" match="any">
>>         <text variable="title" font-style="italic" suffix=", "/>
>>         <text variable="publisher-place" suffix=": "/>
>>         <text variable="publisher" suffix=", "/>
>>         <text variable="genre" suffix=" Thesis, "/>
>>         <date date-parts="year" form="numeric" variable="issued"/>
>>       </else-if>
>>       <else>
>>         <text variable="title" prefix="“" suffix=",” "/>
>>         <text variable="container-title" font-style="italic" suffix=", "/>
>>         <text variable="volume" prefix="Vol. " suffix=", "/>
>>         <text variable="issue" prefix="No. " suffix=", "/>
>>         <date date-parts="year" form="text" variable="issued" suffix=", "/>
>>         <text variable="page" prefix="pp. "/>
>>       </else>
>>     </choose>
>>   </macro>
>>   <citation>
>>     <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
>>       <text macro="en-layout"/>
>>     </layout>
>>     <layout suffix="。">
>>       <choose>
>>         <if type="article article-journal article-magazine" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="container-title"/>
>>           <date date-parts="year" form="text" variable="issued"/>
>>           <text variable="issue" prefix="第" suffix="期"/>
>>           <text variable="page" prefix=",第" suffix="页"/>
>>         </if>
>>         <else-if type="article-newspaper" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="container-title"/>
>>           <date form="text" variable="issued"/>
>>         </else-if>
>>         <else-if type="chapter" match="any">
>>           <names variable="author"/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="editor" prefix="载"/>
>>           <text variable="container-title" prefix=":《" suffix="》,"/>
>>           <text macro="secondAuthor" suffix=","/>
>>           <text variable="publisher-place" suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>>           <text variable="page" prefix=",第" suffix="页"/>
>>         </else-if>
>>         <else-if type="webpage" match="any">
>>           <names variable="author"/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text variable="container-title" suffix=","/>
>>           <date form="text" variable="issued" suffix=", "/>
>>           <text variable="URL" prefix=" " suffix=","/>
>>           <date form="text" variable="accessed" prefix="访问时间:"/>
>>         </else-if>
>>         <else-if type="thesis" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text variable="publisher-place" suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued"/>
>>           <text variable="genre" suffix="学位论文"/>
>>         </else-if>
>>         <else>
>>           <text macro="author" suffix=""/>
>>           <text variable="title" prefix=":《" suffix="》"/>
>>           <text macro="secondAuthor" prefix="," />
>>           <text variable="publisher-place" prefix="," suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>>         </else>
>>       </choose>
>>     </layout>
>>   </citation>
>>   <bibliography>
>>     <sort>
>>       <key variable="author"/>
>>     </sort>
>>     <layout locale="en English en-GB en-gb en-us en-US eng" suffix=".">
>>       <text macro="en-layout"/>
>>     </layout>
>>     <layout suffix="。">
>>       <choose>
>>         <if type="article article-journal article-magazine" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="container-title"/>
>>           <date date-parts="year" form="text" variable="issued"/>
>>           <text variable="issue" prefix="第" suffix="期"/>
>>           <text variable="page" prefix=",第" suffix="页"/>
>>         </if>
>>         <else-if type="article-newspaper" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="container-title"/>
>>           <date form="text" variable="issued"/>
>>         </else-if>
>>         <else-if type="chapter" match="any">
>>           <names variable="author"/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text macro="editor" prefix="载"/>
>>           <text variable="container-title" prefix=":《" suffix="》,"/>
>>           <text macro="secondAuthor" suffix="," />
>>           <text variable="publisher-place" suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>>           <text variable="page" prefix=",第" suffix="页"/>
>>         </else-if>
>>         <else-if type="webpage" match="any">
>>           <names variable="author"/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text variable="container-title" suffix=","/>
>>           <date form="text" variable="issued" suffix=", "/>
>>           <text variable="URL" prefix=" " suffix=","/>
>>           <date form="text" variable="accessed" prefix="访问时间:"/>
>>         </else-if>
>>         <else-if type="thesis" match="any">
>>           <text macro="author"/>
>>           <text macro="secondAuthor" prefix=","/>
>>           <text variable="title" prefix=":《" suffix="》,"/>
>>           <text variable="publisher-place" suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued"/>
>>           <text variable="genre" suffix="学位论文"/>
>>         </else-if>
>>         <else>
>>           <text macro="author" suffix=""/>
>>           <text variable="title" prefix=":《" suffix="》"/>
>>           <text macro="secondAuthor" prefix="," />
>>           <text variable="publisher-place" prefix="," suffix=":"/>
>>           <text variable="publisher"/>
>>           <date date-parts="year" form="text" variable="issued" prefix="," suffix=""/>
>>         </else>
>>       </choose>
>>     </layout>
>>   </bibliography>
>>
>> When using Markdown to Word transition with Pandoc, both English and Chinese bibliographies share the common style. Here is the pandoc MWE, but no use.
>> pandoc -s --bibliography "my.bib" --filter pandoc-citeproc --csl "general.csl" -V default-locale="zh-CN" my.md -o out.docx
>>
>>
>>
>> What I want is to illustrate the bibliography with two styles in my CSL based on language.
>>
>>
>>
>>
>> -- 
>> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0d279913-5369-4fd5-92f6-bd681077da39o%40googlegroups.com.

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/32b7fdc7-7155-4176-c9c2-5190058d813b%40mailbox.org.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-02 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-01 11:23 How could I output multiple language bibliography style with CSL control? 周嘉希
     [not found] ` <0d279913-5369-4fd5-92f6-bd681077da39o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-08-02  0:32   ` Priv.-Doz. Dr. Maria Shinoto
     [not found]     ` <E9401FE1-BA73-4D87-85DD-A6B8D0F60EF3-7M2J4GrLiDedPOQpRHQ53DeJuz7u0hKX@public.gmane.org>
2020-08-02 18:41       ` 'Denis Maier' via pandoc-discuss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).