メモ:rmarkdown
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン次のリビジョン両方とも次のリビジョン | ||
メモ:rmarkdown [2020/09/10 18:14] – [PDF出力用の基本設定] Wiki Editor | メモ:rmarkdown [2020/10/05 17:57] – Wiki Editor | ||
---|---|---|---|
行 19: | 行 19: | ||
header-includes: | header-includes: | ||
- \usepackage{amsmath, | - \usepackage{amsmath, | ||
- | - \usepackage{mathspec} | + | |
+ | # 別のパッケージと競合して1ページ目に無駄な文字列が出力されるので無効に | ||
+ | #- \usepackage{mathspec} | ||
+ | | ||
- \usepackage{indentfirst} | - \usepackage{indentfirst} | ||
- \parindent = 1em | - \parindent = 1em | ||
行 25: | 行 28: | ||
- \setmainfont{Century} | - \setmainfont{Century} | ||
- \setsansfont{Century} | - \setsansfont{Century} | ||
- | - \setjamainfont{MS Mincho} | + | - \setjamainfont{IPAexMincho} |
- | - \setjasansfont{MS Gothic} | + | - \setjasansfont{IPAexGothic} |
- \usepackage{float} | - \usepackage{float} | ||
- \setpagelayout * {margin=20mm} | - \setpagelayout * {margin=20mm} | ||
行 72: | 行 75: | ||
- \newcommand{\blandscape}{\begin{landscape}} | - \newcommand{\blandscape}{\begin{landscape}} | ||
- \newcommand{\elandscape}{\end{landscape}} | - \newcommand{\elandscape}{\end{landscape}} | ||
+ | | ||
+ | # header、footerのカスタマイズ | ||
+ | # 余白を調整するとそのままでは本文文字にページ番号などが被る場合がある | ||
+ | # fancyhdrパッケージで調整する。複雑なヘッダ、フッタも作成できるが、とりあえず余白との兼ね合いを調整するためだけに読み込み | ||
+ | - \usepackage{fancyhdr} | ||
+ | - \pagestyle{fancy} # ページスタイルを適用 | ||
+ | - \lhead{} # ヘッダ左 | ||
+ | - \chead{} # ヘッダ中央 | ||
+ | - \rhead{} # ヘッダ右・・・いずれも空にする | ||
+ | - \renewcommand{\headrulewidth}{0.0pt} # ヘッダの区切り線を消す | ||
+ | - \cfoot{\thepage} # フッタ中央にページ番号記載 | ||
| | ||
documentclass: | documentclass: | ||
行 103: | 行 117: | ||
# * family には OS にインストールされているフォント名を指定する。 | # * family には OS にインストールされているフォント名を指定する。 | ||
# | # | ||
- | knitr:: | + | knitr:: |
} | } | ||
+ | ``` | ||
図のチャンクオプション | 図のチャンクオプション |
メモ/rmarkdown.txt · 最終更新: 2023/06/22 11:00 by Wiki Editor