Notion-MW
Notion-MW
42行目: 42行目:
参考文献には出版年を書く必要があり、BibTeXではyearというフィールドに書かれる。このデータはZoteroの文献情報のdateのところから取得されており、「April 22, 2011」「2011-04-22」のようなdateのデータからは正しく「2011」だけを抽出してくれるが、dateが前述の「4月 22 , 2011」のような書式になっていた場合はうまくいかず、この文字列全てがBibTeX(.bib)に出力されてしまう(報告済み: [https://github.com/retorquere/zotero-better-bibtex/issues/2449 [Bug]: Japanese date format is not parsed correctly · Issue #2449 · retorquere/zotero-better-bibtex]、6.7.61あたりで修正済み)。←の通り、Better BibTeXのエクスポート時に適用されるscript(Export → postscript)のところにデータを置換するための以下のようなコードを書いておくとよい。
参考文献には出版年を書く必要があり、BibTeXではyearというフィールドに書かれる。このデータはZoteroの文献情報のdateのところから取得されており、「April 22, 2011」「2011-04-22」のようなdateのデータからは正しく「2011」だけを抽出してくれるが、dateが前述の「4月 22 , 2011」のような書式になっていた場合はうまくいかず、この文字列全てがBibTeX(.bib)に出力されてしまう(報告済み: [https://github.com/retorquere/zotero-better-bibtex/issues/2449 [Bug]: Japanese date format is not parsed correctly · Issue #2449 · retorquere/zotero-better-bibtex]、6.7.61あたりで修正済み)。←の通り、Better BibTeXのエクスポート時に適用されるscript(Export → postscript)のところにデータを置換するための以下のようなコードを書いておくとよい。


<syntaxhighlight lang="visual basic">if (tex.has.year) {
<syntaxhighlight lang="vb.net">if (tex.has.year) {
tex.add({name: 'year', replace: true, value: tex.has.year.value.replace(/.* /, '')})
tex.add({name: 'year', replace: true, value: tex.has.year.value.replace(/.* /, '')})
}</syntaxhighlight>
}</syntaxhighlight>
74行目: 74行目:
コード例&#58;
コード例&#58;


m_with_cap_m
<syntaxhighlight style="margin-bottom:0.2em;" lang="python">python
 
import sqlite3
<syntaxhighlight lang="python">import sqlite3
import sys
import sys
import json
import json