Quartoで論文を書いています。 英語は苦手なので、取り敢えず日本語で書き始めました。
YAMLで著者情報を書いていきますが、TeXでは著者・所属情報がPDFに思うように表示されません。
Typstを使う quarto-preprintを使ってみます。
$ quarto create project manuscript test2 // directory test2にprojectを作る
$ cd test2
$ quarto add mvuorre/quarto-preprint
$ quarto use template mvuorre/quarto-preprint
日本語フォントにMeiryoを使う
qmdを編集して、quarto render。できあがったPDFで満足しても良いのでしょうが、 折角ですから綺麗なフォントを使いたいですよね?[Y/y]
$ typst fonts
で使用できるフォントを確認してから _extensions/mvuorre/preprint/typst-template.typ を編集し
#let preprint(
font: ("Meiryo", "Times", "Times New Roman", "Arial"),
と”Meiryo”を追加します。
subtitle
qmdのYAMLにsubtitle: を書いていても、そのままではsubtitleは表示されません。
_extensions/mvuorre/preprint/typst-template.typ を編集し
#let preprint(
title: none,
subtitle: [$subtitle$],
更に
if title != none {
titleblock(title)
}
if subtitle != none {
titleblock(
subtitle,
weight: "regular",
size: 1.2em,
above: 0.5em,
below: 1em
)
と変更して、quarto renderします。
Referencesの生成
qmdのYAMLの設定に注意です。
qmdのYAMLを下記で設定しました。
bibliography: bibliography.bib
citeproc: false
suppress-bibliography: true
pandoc citeprocでのReferences生成を抑制するためciteproc: falseとします1。
CSLを設定したい場合は、 _extensions/mvuorre/preprint/typst-template.typの
bibliography-style: "apa",
を変更する必要があるようです。参考:bibliography
脚注
この設定に辿り着くまで1時間ほどハマりました…↩︎