mgmeyers / obsidian-pandoc-reference-list

Display a formatted reference in Obsidian's sidebar for each pandoc citekey in the active document.
GNU General Public License v3.0
172 stars 9 forks source link

exit code 4: CiteprocParseError: Multiple layout elements present in bibliography #62

Open InnocenseYu opened 1 year ago

InnocenseYu commented 1 year ago

hi,

After I configured this plugin, I get the following error when validating pandoc configuration.

pandocMarkdownToHTML Command failed with exit code 4: C:\Users\xxxx\AppData\Local\Pandoc\pandoc.EXE -f markdown -t html --citeproc --quiet --bibliography=F: \OneDrive\DataLibrary\Obsidian\My-Research\meta\bibtex\My-Library. json --csl=G: \AppData\Zotero\styles\gb-t-7714-2015-numeric-bilingual-no-uppercase-no-url-doi. csl CiteprocParseError: Multiple layout elements present in bibliography

Pandoc version: 3.1.2

bibliography, My-Library.json:

[
    {"id":"othmane2022PerformanceDetectingInjection","abstract":"检测 CAN 总线中制造消息注入的性能\n\nThere have been several public demonstrations of attacks on connected vehicles showing the ability of an attacker to take control of a targeted vehicle by injecting messages into their Controller Area Network (CAN) bus. In this article, using injected speed reading and Revolutions Per Minute (RPM) reading messages in in-motion vehicle, we examine the ability of the Pearson correlation and the unsupervised learning methods k-means clustering and Hidden Markov Model (HMM) to differentiate `no-attack' and `under-attack' states of the given vehicle. We found that the Pearson correlation distinguishes the two states, the k-means clustering method has an acceptable accuracy but high false positive rate and HMM detects attacks with acceptable detection rate but has a high false positive in detecting attacks from speed readings when there is no attack. The accuracy of these unsupervised learning methods are comparable to the ones of the supervised learning methods used by CAN bus Intrusion Detection System (IDS) suppliers. In addition, the article shows that studying CAN anomaly detection techniques using off-vehicle test facilities may not properly evaluate the performance of the detection techniques. The results suggest using other features besides the data content of the CAN messages and integrate knowledge about how the Electronic Control Units (ECUs) collaborate in building effective techniques for the detection of injection of fabricated message attacks.","author":[{"family":"Othmane","given":"Lotfi Ben"},{"family":"Dhulipala","given":"Lalitha"},{"family":"Abdelkhalek","given":"Moataz"},{"family":"Multari","given":"Nicholas"},{"family":"Govindarasu","given":"Manimaran"}],"call-number":"2","citation-key":"othmane2022PerformanceDetectingInjection","container-title":"IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING","DOI":"10.1109/TDSC.2020.2990192","issue":"1","issued":{"date-parts":[[2022,1,1]]},"page":"468-481","source":"6.791","title":"On the Performance of Detecting Injection of Fabricated Messages into the CAN Bus","type":"article-journal","volume":"19"}, 
    {"id":"ZhangXinPeng2015YaSuoGan","abstract":"旋转机械作为大型装备重要的组成部分,在装备高效稳定运行过程中占据重要地位,其失效或者发生故障将会对装备安全运行和效能发挥造成重大影响。因此,研究旋转机械的健康监测对于保障装备安全运行和人员生命安全具有重要意义。随着现代科技的不断发展,装备变得越来越复杂,要更为全面地评估装备健康状况就需要借助于更多类型、更多数量的运行状态数据。对于长期运行的设备来说,实时地监控装备运行状态意味着长时间的不间断连续采样,该过程会产生海量的装备状态数据,一方面会给数据存储带来巨大的压力,对于需要远距离传输状态数据到地面指挥站的装备如战斗机、直升机等,由于无线传输速率和带宽的限制,海量数据也会加大数据传输的难度和压力;另一方面,虽然数据量的增多可以提供更多装备状态信息,然而这些数据往往存在很大的冗余,因此获得的数据越多,数据冗余量也就越大,这就会造成存储和通信资源的巨大浪费。同时,数据量越大,信号处理的负担也就越重,计算代价也就越大。压缩感知作为一种新型的状态感知技术,在确保状态信息量的同时,只需采集少量的压缩观测值,可有效地缓解海量状态数据的存储和传输压力,且由于低维压缩观测值中已包涵装备运行状态信息,因此可直接用于装备的健康监测等。针对上述旋转机械健康监测中的问题,结合压缩感知的特点,本文研究了压缩感知技术在旋转机械健康监测中的应用,主要工作如下。(1)分析了压缩感知基本理论和旋转机械振动信号的稀疏表示问题,构建和分析了三类对振动信号拥有较好稀疏表示效果的字典,包括完备字典、固定的超完备字典以及基于字典学习理论的超完备字典等,并分析了不同字典对振动信号的稀疏分解性能;研究了基于稀疏表示字典的振动数据压缩方法和五种衡量振动数据压缩效果的评价指标,并基于此分析了适用于振动信号稀疏化的字典对振动数据的压缩效果。(2)提出了基于信号稀疏分解理论的轴承故障检测和诊断方法,分别构建了基于字典学习的轴承故障检测模型和故障诊断模型,使用电机驱动端深沟球轴承运行状态振动数据对所提方法进行了验证,分析了稀疏表示误差阈值和分解原子个数等对故障检测和诊断结果的影响。(3)分析了直接使用压缩感知观测值实现信号检测和分类的数学基础以及相应的检测与分类概率;分析了不同状态振动信号频域能量分布的区别,提出了基于信号频域能量分布且直接使用压缩感知观测值的轴承故障检测方法,使用电机驱动端深沟球轴承运行状态振动数据对该方法进行验证,并分析了压缩观测值数量等参数对检测结果的影响。(4)使用轴承不同状态下的振动数据训练得到可分别表示相应状态振动信号的超完备字典,在这些不同类型字典和稀疏分解理论的基础上,提出了直接从低维压缩观测值出发且无需重构原始信号的轴承故障检测方法和轴承故障诊断方法,分析了阈值、观测数量、稀疏度和压缩观测方式等因素对故障诊断结果的影响及其设置原则。(5)提出了基于压缩感知原理的振动数据修复方法。将数据丢失过程转化为压缩观测过程,根据振动数据丢失行为的规律,构建相应的压缩观测向量和压缩观测矩阵并在此基础上重构原始完整信号实现振动数据的修复。使用仿真数据和电机驱动端深沟球轴承运行状态振动数据对该方法进行验证,分析了不同丢失方式和丢失数据量对修复结果的影响。(6)提出了基于压缩感知原理的振动数据降噪方法。针对旋转机械振动数据的噪声干扰问题,利用振动信号可通过某些字典实现稀疏化而噪声信号在大多数字典上不能稀疏表示的特点,对受噪声污染的振动信号执行压缩感知和信号重构,在该转化过程中实现振动数据降噪。使用齿轮仿真数据和电机驱动端深沟球轴承运行状态振动数据对所提方法进行验证,分析了使用不同字典时的降噪效果。综上所述,本文研究了压缩感知原理及其在旋转机械健康监测领域中的应用。构建了三类适用于振动数据稀疏表示的字典,分析结果表明这些字典均对轴承振动数据具有较好的稀疏分解效果;提出和验证了基于信号稀疏分解理论的轴承故障检测和诊断方法;分析了直接使用压缩感知观测值实现信号检测和分类的数学基础以及相应的检测与分类概率,提出和验证了直接使用低维压缩感知观测值的轴承故障检测和诊断方法;提出了基于压缩感知原理的振动数据修复方法和振动数据降噪方法,并使用仿真数据和电机驱动端深沟球轴承实验数据验证了所提方法的有效性。","author":[{"literal":"张新鹏"}],"citation-key":"ZhangXinPeng2015YaSuoGan","contributor":[{"literal":"胡茑庆"}],"genre":"博士","issued":{"date-parts":[[2015]]},"language":"zh-CN","note":"18 citations(CNKI)[9-12-2022]","publisher":"国防科学技术大学","source":"CNKI","title":"压缩感知及其在旋转机械健康监测中的应用","type":"thesis","URL":"https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CDFD&dbname=CDFDLAST2017&filename=1017834243.nh&v="}
]

csl file:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" name-as-sort-order="all" sort-separator=" " demote-non-dropping-particle="never" initialize-with=" " initialize-with-hyphen="false" page-range-format="expanded" default-locale="zh-CN">
  <info>
    <title>GB/T 7714-2015 (顺序编码, 双语, 姓名取消大写, 无 URL DOI)</title>
    <id>http://www.zotero.org/styles/gb-t-7714-2015-numeric-bilingual-no-uppercase-no-url-doi</id>
    <link href="http://www.zotero.org/styles/gb-t-7714-2015-numeric-bilingual-no-uppercase-no-url-doi" rel="self"/>
    <link href="http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric" rel="template"/>
    <link href="https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D8055ED3A7E05397BE0A0AB82A" rel="documentation"/>
    <author>
      <name>牛耕田</name>
      <email>buffalo_d@163.com</email>
    </author>
    <contributor>
      <name>韩小土</name>
      <email>redleafnew@163.com</email>
    </contributor>
    <contributor>
      <name>Zeping Lee</name>
      <email>zepinglee@gmail.com</email>
    </contributor>
    <category citation-format="numeric"/>
    <category field="generic-base"/>
    <summary>1. 按照语言显示“等”或“et al.”;2. 姓名取消全大写;3. 仅纯电子资源显示引用日期和 URL;4. 无 DOI。</summary>
    <updated>2023-04-15T15:52:20+08:00</updated>
    <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>
  <locale xml:lang="zh">
    <date form="text">
      <date-part name="year" suffix="年" range-delimiter="&#8212;"/>
      <date-part name="month" form="numeric" suffix="月" range-delimiter="&#8212;"/>
      <date-part name="day" suffix="日" range-delimiter="&#8212;"/>
    </date>
    <terms>
      <term name="edition" form="short">版</term>
      <term name="open-quote">“</term>
      <term name="close-quote">”</term>
      <term name="open-inner-quote">‘</term>
      <term name="close-inner-quote">’</term>
    </terms>
  </locale>
  <locale>
    <date form="numeric">
      <date-part name="year" range-delimiter="/"/>
      <date-part name="month" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
      <date-part name="day" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
    </date>
    <terms>
      <term name="page-range-delimiter">-</term>
    </terms>
  </locale>
  <!-- 主要责任者 -->
  <macro name="author">
    <names variable="author">
      <name/>
      <substitute>
        <names variable="composer"/>
        <names variable="illustrator"/>
        <names variable="director"/>
        <choose>
          <if variable="container-title" match="none">
            <names variable="editor"/>
          </if>
        </choose>
      </substitute>
    </names>
  </macro>
  <!-- 题名 -->
  <macro name="title">
    <group delimiter=", ">
      <group delimiter=": ">
        <text variable="title"/>
        <group delimiter="&#8195;">
          <choose>
            <if variable="container-title" type="chapter paper-conference" match="none">
              <text macro="volume"/>
            </if>
          </choose>
          <choose>
            <if type="bill legal_case legislation patent regulation report standard" match="any">
              <text variable="number"/>
            </if>
          </choose>
        </group>
      </group>
      <choose>
        <if variable="container-title" type="chapter paper-conference" match="none">
          <choose>
            <if variable="event-date">
              <text variable="event-place"/>
              <date variable="event-date" form="text"/>
            </if>
          </choose>
        </if>
      </choose>
    </group>
    <group delimiter="/" prefix="[" suffix="]">
      <text macro="type-code"/>
      <text macro="medium-code"/>
    </group>
  </macro>
  <!-- 书籍的卷号(“第 x 卷”或“第 x 册”) -->
  <macro name="volume">
    <choose>
      <if type="article article-journal article-magazine article-newspaper periodical" match="none">
        <choose>
          <if is-numeric="volume">
            <group delimiter=" ">
              <label variable="volume" form="short" text-case="capitalize-first"/>
              <text variable="volume"/>
            </group>
          </if>
          <else>
            <text variable="volume"/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <!-- 文献类型标识 -->
  <macro name="type-code">
    <choose>
      <if type="article">
        <!-- article 为预印本,符合国标的“档案”(A)类型:“分类保存以备查考的文件和材料,如……科技档案” -->
        <text value="A"/>
      </if>
      <else-if type="article-journal article-magazine periodical" match="any">
        <text value="J"/>
      </else-if>
      <else-if type="article-newspaper">
        <text value="N"/>
      </else-if>
      <else-if type="bill collection legal_case legislation regulation treaty" match="any">
        <!-- 国标的“档案”(A)类型包括法律法规、政府文件等 -->
        <text value="A"/>
      </else-if>
      <else-if type="book chapter" match="any">
        <text value="M"/>
      </else-if>
      <else-if type="dataset">
        <text value="DS"/>
      </else-if>
      <else-if type="map">
        <text value="CM"/>
      </else-if>
      <else-if type="paper-conference">
        <text value="C"/>
      </else-if>
      <else-if type="patent">
        <text value="P"/>
      </else-if>
      <else-if type="post post-weblog webpage" match="any">
        <text value="EB"/>
      </else-if>
      <else-if type="report">
        <text value="R"/>
      </else-if>
      <else-if type="software">
        <text value="CP"/>
      </else-if>
      <else-if type="standard">
        <text value="S"/>
      </else-if>
      <else-if type="thesis">
        <text value="D"/>
      </else-if>
      <else>
        <text value="Z"/>
      </else>
    </choose>
  </macro>
  <!-- 文献载体标识 -->
  <macro name="medium-code">
    <choose>
      <if type="dataset post post-weblog software webpage" match="any">
        <!-- 仅当纯电子资源显示 URL 时才出现“OL” -->
        <choose>
          <if variable="medium">
            <text variable="medium"/>
          </if>
          <else-if variable="URL">
            <text value="OL"/>
          </else-if>
        </choose>
      </if>
    </choose>
  </macro>
  <!-- 其他责任者 -->
  <macro name="secondary-contributors">
    <names variable="translator">
      <name/>
      <label form="short" prefix=", "/>
    </names>
  </macro>
  <!-- 专著主要责任者 -->
  <macro name="container-contributors">
    <names variable="editor">
      <name/>
      <substitute>
        <names variable="editorial-director"/>
        <names variable="collection-editor"/>
        <names variable="container-author"/>
      </substitute>
    </names>
  </macro>
  <!-- 专著题名 -->
  <macro name="container-booklike">
    <group delimiter=", ">
      <choose>
        <if variable="container-title">
          <!-- 优先使用专著或会议论文集的题名 -->
          <group delimiter=": ">
            <text variable="container-title"/>
            <text macro="volume"/>
          </group>
        </if>
        <else-if type="paper-conference">
          <!-- 有些会议没有论文集,使用会议名代替 -->
          <text variable="event-title"/>
        </else-if>
      </choose>
      <!-- 会议时间和会议地点 -->
      <choose>
        <if type="paper-conference" variable="event-date" match="all">
          <date variable="event-date" form="text"/>
          <text variable="event-place"/>
        </if>
      </choose>
    </group>
  </macro>
  <!-- 连续出版物中的出处项 -->
  <macro name="container-periodical">
    <choose>
      <if type="article-newspaper">
        <!-- 报纸的出处项:“刊名, 出版日期(版次): 页码[引用日期]” -->
        <group delimiter=", ">
          <text variable="container-title"/>
          <text macro="issued-date"/>
        </group>
        <text variable="page" prefix="(" suffix=")"/>
      </if>
      <else>
        <!-- 期刊、杂志的出处项:“刊名, 年, 卷(期): 页码[引用日期]” -->
        <group delimiter=": ">
          <group>
            <group delimiter=", ">
              <text variable="container-title"/>
              <text macro="issued-year"/>
              <text variable="volume"/>
            </group>
            <text variable="issue" prefix="(" suffix=")"/>
          </group>
          <text variable="page"/>
        </group>
      </else>
    </choose>
    <text macro="accessed-date"/>
  </macro>
  <!-- 版本项 -->
  <macro name="edition">
    <choose>
      <if is-numeric="edition">
        <group delimiter=" ">
          <number variable="edition" form="ordinal"/>
          <label variable="edition" form="short"/>
        </group>
      </if>
      <else>
        <text variable="edition"/>
      </else>
    </choose>
  </macro>
  <!-- 连续出版物的年卷期 -->
  <macro name="year-volume-issue">
    <group delimiter=", ">
      <text macro="issued-year"/>
      <text variable="volume"/>
    </group>
    <text variable="issue" prefix="(" suffix=")"/>
  </macro>
  <!-- 出版项 -->
  <macro name="publisher">
    <choose>
      <if type="patent">
        <!-- 专利的出版项格式“公告日期[引用日期]” -->
        <text macro="issued-date"/>
        <text macro="accessed-date"/>
      </if>
      <else-if type="book chapter paper-conference periodical thesis" variable="publisher page" match="any">
        <!-- 非纯电子资源的格式“出版地: 出版者, 出版年: 页码[引用日期]” -->
        <group delimiter=": ">
          <group delimiter=", ">
            <group delimiter=": ">
              <text variable="publisher-place"/>
              <text variable="publisher"/>
            </group>
            <text macro="issued-year"/>
          </group>
          <text variable="page"/>
        </group>
        <text macro="accessed-date"/>
      </else-if>
      <else-if variable="URL">
        <!-- 纯电子资源联机网络文献的格式“(更新或修改日期)[引用日期]”。
          原国标中,电子公告、无出版社的报告、法规等文献都可以作为“纯电子文献”。 -->
        <choose>
          <if type="dataset post post-weblog software webpage" match="any">
            <!-- 限制更少的类型作为“纯电子文献“ -->
            <text macro="issued-date" prefix="(" suffix=")"/>
            <text macro="accessed-date"/>
          </if>
          <else>
            <text macro="issued-year"/>
          </else>
        </choose>
      </else-if>
      <else>
        <text macro="issued-year"/>
      </else>
    </choose>
  </macro>
  <!-- 出版年 -->
  <macro name="issued-year">
    <choose>
      <if is-uncertain-date="issued">
        <!-- 出版年无法确定时, 估计的出版年应置于方括号内。 -->
        <date variable="issued" prefix="[" suffix="]">
          <date-part name="year" range-delimiter="-"/>
        </date>
      </if>
      <else>
        <date variable="issued">
          <date-part name="year" range-delimiter="-"/>
        </date>
      </else>
    </choose>
  </macro>
  <!-- 出版日期,用于报纸文献、专利的“公告日期或公开日期”、电子资源的“更新或修改日期” -->
  <macro name="issued-date">
    <date variable="issued" form="numeric"/>
  </macro>
  <!-- 引用日期 -->
  <macro name="accessed-date">
    <choose>
      <if type="dataset post post-weblog software webpage" match="any">
        <!-- 仅当纯电子资源显示 URL 时才出现引用日期 -->
        <choose>
          <if variable="URL">
            <date variable="accessed" form="numeric" prefix="[" suffix="]"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <!-- 获取和访问路径、数字对象唯一标识符 -->
  <macro name="access">
    <choose>
      <if type="dataset post post-weblog software webpage" match="any">
        <!-- 仅纯电子资源显示 URL -->
        <text variable="URL"/>
      </if>
    </choose>
  </macro>
  <!-- 参考文献表格式 -->
  <macro name="entry-layout">
    <group delimiter=". ">
      <text macro="author"/>
      <choose>
        <if type="periodical">
          <!-- 4.3 连续出版物 -->
          <text macro="title"/>
          <text macro="year-volume-issue"/>
          <text macro="publisher"/>
        </if>
        <else-if type="article-journal article-magazine article-newspaper" match="any">
          <!-- 4.4 连续出版物中的析出文献 -->
          <text macro="title"/>
          <text macro="container-periodical"/>
        </else-if>
        <else-if type="patent">
          <!-- 4.5 专利文献 -->
          <text macro="title"/>
          <text macro="publisher"/>
        </else-if>
        <else-if type="dataset post post-weblog software webpage" match="any">
          <!-- 4.6 电子资源 -->
          <text macro="title"/>
          <text macro="publisher"/>
        </else-if>
        <else-if type="chapter paper-conference" variable="container-title" match="any">
          <!-- 4.2 专著中的析出文献 -->
          <group delimiter="//">
            <group delimiter=". ">
              <text macro="title"/>
              <text macro="secondary-contributors"/>
            </group>
            <group delimiter=". ">
              <text macro="container-contributors"/>
              <text macro="container-booklike"/>
            </group>
          </group>
          <text macro="edition"/>
          <text macro="publisher"/>
        </else-if>
        <else>
          <!-- 4.1 专著 -->
          <text macro="title"/>
          <text macro="secondary-contributors"/>
          <text macro="edition"/>
          <text macro="publisher"/>
        </else>
      </choose>
      <text macro="access"/>
    </group>
  </macro>
  <citation collapse="citation-number" after-collapse-delimiter=",">
    <sort>
      <key variable="citation-number"/>
    </sort>
    <layout vertical-align="sup" delimiter="," prefix="[" suffix="]">
      <text variable="citation-number"/>
    </layout>
  </citation>
  <bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" second-field-align="flush">
    <layout suffix="." locale="en">
      <text variable="citation-number" prefix="[" suffix="]"/>
      <text macro="entry-layout"/>
    </layout>
    <layout suffix=".">
      <text variable="citation-number" prefix="[" suffix="]"/>
      <text macro="entry-layout"/>
    </layout>
  </bibliography>
</style>
davidchen1996 commented 1 year ago

same question and not solve yet.

mgmeyers commented 11 months ago

@InnocenseYu Is this still an issue in the latest version of the plugin? Cite key processing is handled much differently now.

InnocenseYu commented 11 months ago

@InnocenseYu Is this still an issue in the latest version of the plugin? Cite key processing is handled much differently now.

It’s incredible. You actually solved this problem. Thank you very much. It took you a lot of time. Respect.

InnocenseYu commented 11 months ago

I apologize for responding to you again with an issue that I don't know how to resolve at this time, as shown below:

  1. can't use the icon to prompt to open pdf file, nothing happens after clicking. (windows10)
  2. But the second picture of the link form can use the default pdf reader to open the document, the third picture of the link form can be in zotero pdf file and indexed to the specified location.

image

image

image

  1. How to use the shortcut key alt+enter(insert using template) in @ shortcut, it cannot wrap @xxx with double brackets like before.

image