Lingdocdown

プログラミングによる,言語学向けの文書の生成を支援する説明書およびテンプレート

Category

Other

License

Free to use (MIT)

File

main.tex

main.texRead-only preview
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
  pandoc,
  jafont = haranoaji,
  a4paper,
  everyparhook = compat,
  japaram = {units = true}]{bxjsarticle}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math}
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  \setmainfont[Scale = 1]{TeX Gyre Termes}
  \setsansfont[Scale = 1]{TeX Gyre Heros}
  \setmonofont[Scale = MatchLowercase]{zcoN}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
  pdfauthor={姓 名},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[left = 20truemm,right = 20truemm,top = 20truemm,bottom = 30truemm,footskip = 15truemm]{geometry}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{42,33,28}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,1.00,0.00}{#1}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.00,0.40,1.00}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.27,0.67,0.26}{#1}}
\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.02,0.61,0.04}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.00,0.40,1.00}{\textbf{\textit{#1}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.26,0.66,0.93}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{\underline{#1}}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.27,0.67,0.26}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.00,0.40,1.00}{\textit{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,1.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.27,0.67,0.26}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{1.00,0.58,0.35}{\textbf{#1}}}
\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.00,0.40,1.00}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.26,0.66,0.93}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{\textbf{#1}}}
\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.02,0.61,0.04}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.02,0.61,0.04}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.02,0.61,0.04}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.74,0.68,0.62}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.02,0.61,0.04}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{1.00,1.00,0.00}{\textbf{#1}}}
\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
%---------------------------------------------------
%
% 図表に関する指定
%
%---------------------------------------------------

%% 表が版面の幅に合うように自動で調整 %%

\usepackage{adjustbox} 

%% 欧文誌でよく見られる表にする %%

\usepackage{booktabs}

%% 表のセル内改行を可能にする %%

\usepackage{tabularx}

%% 版面における図表の位置を自動で調整する %%

\usepackage{float} % Don't delete after 2020.06.08 update to rmarkdown 2.2

%%%% 図表の出力位置を指定した場合,必ずその位置に指定する %%%%

\floatplacement{figure}{H}
\floatplacement{table}{H}

%% 図表のキャプション設定 %%

%\usepackage[font=small,labelfont={bf,sf}]{caption} %論文用
%\usepackage[font=tiny,labelfont={bf,sf}]{caption} %beamer用

%beamerでのcaptionフォントサイズ変更は\setbeamerfont{caption}{size=\tiny}で行う

%\captionsetup[table]{skip=-5truemm}
%\captionsetup[table]{belowskip = -7truemm}
%\captionsetup{skip = 2pt, aboveskip = 0pt, belowskip = 0pt}


%% 図を並列した場合に出来る「1a」等のキャプションの設定 %%

%\usepackage[font=footnotesize]{subfig} %論文用
\usepackage[font=tiny]{subfig} %beamer用

%% 英文での図表キャプションを略記する場合 %%

%%%% FigureからFig.へ %%%%
%\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}

%%%% TableからTab.へ %%%%
%\addto\captionsenglish{\renewcommand{\tablename}{Tab.}}

%% 図表本体と図表キャプションの間隔を調整する場合 %%

%%%% 図本体と図キャプションの間隔 %%%%

\addtolength{\abovecaptionskip}{-1truemm}

%%%% 表本体と表キャプションの間隔 %%%%

\captionsetup*[table]{skip = 0pt, belowskip = 0pt}
% \addtolength{\belowcaptionskip}{-1truemm}

%---------------------------------------------------
%
% 囲み記事を作る際の指定
%
%---------------------------------------------------

%% tcolorboxを使う %%

\usepackage{tcolorbox}

%%%% 囲み記事が複数ページをまたげるようにする %%%%

\tcbuselibrary{breakable}

%% ascmacパッケージを使う %%

\usepackage{ascmac}

%---------------------------------------------------
%
% フォント指定
% 
% なお,アルファベットの設定はYAMLセクションでも可能
%
% 本テンプレートで紹介したフォントをインストールしていない場合は
% 必ず (1) 下記をコメントアウトするか,
% (2) YAMLセクションのincludes: in_header:以下の
% character-config.texをコメントアウトし
% 下記内容を参照しないようにすること
% 
%---------------------------------------------------

\usepackage{fontspec}

%% アルファベットの設定 %%

%%%% ローマン体(論文本文用) %%%%

%\setmainfont[Scale = 1]{TeXGyreTermes}

%%%% サンセリフ体(論文章節タイトル用) %%%%

%\setsansfont[Scale = 1]{TeXGyreHeros}

%%%% タイプライタ体(コードブロック用) %%%%

%\setmonofont[Scale = MatchLowercase]{zcoN}

\usepackage{zxjatype}

%%  非アルファベットの設定  %%
%%                    %%
%% 例:日本語で使うフォント %%

%% このテンプレートは,LaTeXが認識できる日本語フォントのインストールについて
%% 言及していないので,下記はコメントアウトしてある

%%%% 明朝体(論文本文用) %%%%

% \setjamainfont[BoldFont = SourceHanSansJP-Bold.otf]{SourceHanSerifJP-Light.otf}

%%%% サンセリフ体(論文章節タイトル用) %%%%

% \setjasansfont[Scale=1, BoldFont = SourceHanSansJP-Bold.otf]{SourceHanSansJP-Normal.otf}

%%%% タイプライタ体(コードブロック用) %%%%

% \setjamonofont{SourceHanSansJP-Normal.otf}

%---------------------------------------------------
%
% 行頭インデント・行間の設定
%
%---------------------------------------------------

%\usepackage{indentfirst}
%\setlength{\parindent}{12pt} %日本語用
%%\setlength{\parindent}{1.27cm} %APA 6版 対応
%\parskip=0pt
%
%\renewcommand{\baselinestretch}{1.2}
%
%\usepackage{ragged2e}
%
%\usepackage{calc}

%---------------------------------------------------
%
% 言語学関係の設定
%
%---------------------------------------------------

\usepackage{linguex}

\makeatletter % {gb4e}packageの妨害コマンドを抑止する
\def\new@fontshape{} % {gb4e}packageの妨害コマンドを抑止する
\makeatother % {gb4e}packageの妨害コマンドを抑止する
\let\mathexp=\exp % TeXにおける本来の \exp コマンドの定義(数学の指数expの表示)を保存
\usepackage{gb4e}\noautomath
\let\gbexp=\exp % gb4eでの \exp コマンドの定義(例文表示)を保存
\DeclareRobustCommand{\exp}{\ifmmode\mathexp\else\expandafter\gbexp\fi}

\usepackage{tipa}
%IPAのフォントをTimesに変える
%https://tex.stackexchange.com/questions/193368/set-tipa-font-to-times-for-phonetic-characters
%\DeclareFontSubstitution{T3}{ptm}{m}{n}

%https://tex.stackexchange.com/a/345436/169454
\DeclareTextFontCommand{\textipa}{%
  \fontfamily{ptm}\tipaencoding
}
\renewenvironment{IPA}{\fontfamily{ptm}\tipaencoding}{}


%% 木構造

\usepackage[linguistics]{forest}

%% HPSGでのAVM(attribute-value matrices)

\usepackage{langsci-avm}

%---------------------------------------------------
%
% 本文内でのリンクに色を付ける際の設定
%
%---------------------------------------------------

\hypersetup{
  colorlinks = true,
  citecolor = [RGB]{24,127,196},
  linkcolor = [RGB]{24, 127,196},
  urlcolor = [RGB]{24,127,196} %orange
}

%---------------------------------------------------
%
% コードブロックのシンタックスハイライトに関する設定
%
%---------------------------------------------------

\usepackage{fvextra}

\DefineVerbatimEnvironment{Highlighting}{Verbatim}{showspaces=false,showtabs=false,breaklines,commandchars=\\\{\}}

%---------------------------------------------------
%
% biblatex-japaneseを使う際の設定
%
%---------------------------------------------------

\usepackage[sortcites = true, 
sorting = nyt,
backend = biber,
style = authoryear,
maxcitenames = 2]{biblatex-japanese}

\ifluatex
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\usepackage[]{biblatex}
\addbibresource{citation/bibliography/cjk.bib}
\addbibresource{citation/bibliography/non-cjk.bib}

\title{タイトル}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
  \apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{サブタイトル}
\author{姓 名}
\date{2021/1/31 (最終更新: 2021/3/15)}

\begin{document}
\maketitle
\begin{abstract}
ここに要旨
\end{abstract}

{
\setcounter{tocdepth}{2}
\tableofcontents
}
\thispagestyle{empty}
\pagestyle{empty}

\hypertarget{ux5e8fux8ad6}{%
\section{序論}\label{ux5e8fux8ad6}}

いろはにほへとちりぬるを

\hypertarget{ux5e8fux8ad6ux306e1ux7bc0}{%
\subsection{序論の1節}\label{ux5e8fux8ad6ux306e1ux7bc0}}

わかよたれそつねならむ

\hypertarget{ux8a66ux6599ux3068ux65b9ux6cd5}{%
\section{試料と方法}\label{ux8a66ux6599ux3068ux65b9ux6cd5}}

うゐのおくやま

\hypertarget{ux8a66ux6599}{%
\subsection{試料}\label{ux8a66ux6599}}

けふこえて

\hypertarget{ux65b9ux6cd5}{%
\section{方法}\label{ux65b9ux6cd5}}

あさきゆめみし ゑひもせす

\hypertarget{ux7d50ux679cux3068ux5206ux6790}{%
\section{結果と分析}\label{ux7d50ux679cux3068ux5206ux6790}}

色は匂へど 散りぬるを

\hypertarget{ux5206ux6790ux65b9ux6cd5}{%
\subsection{分析方法}\label{ux5206ux6790ux65b9ux6cd5}}

我が世誰そ 常ならむ

\hypertarget{ux8003ux5bdf}{%
\section{考察}\label{ux8003ux5bdf}}

有為の奥山 今日越えて

\hypertarget{ux7d50ux8ad6}{%
\section{結論}\label{ux7d50ux8ad6}}

浅き夢見じ 酔ひもせず

\hypertarget{ux5f15ux7528ux306eux30c6ux30b9ux30c8}{%
\section{引用のテスト}\label{ux5f15ux7528ux306eux30c6ux30b9ux30c8}}

\href{http://www.ls-japan.org/modules/documents/LSJpapers/j-gkstyle2020.pdf}{日本言語学会の『言語研究』執筆要項}に載っている文献引用例を基に,引用と参考文献一覧の生成をテストする。この子ファイルは,ご自身の実際の論文生成の際は,親ファイル\texttt{main.Rmd}には含めない。親ファイルにて,チャンク名が\texttt{bibliography-test}となっている\texttt{r}チャンクを探し,下記の通り設定すると,この子ファイルの内容は反映されなくなる。

\begin{Shaded}
\begin{Highlighting}[]
\InformationTok{\textasciigrave{}\textasciigrave{}\textasciigrave{}\{r bibliography{-}test, child=\textquotesingle{}drafts/06{-}1{-}bibliography{-}test.Rmd\textquotesingle{}, include=FALSE, eval=FALSE\}}
\InformationTok{\textasciigrave{}\textasciigrave{}\textasciigrave{}}
\end{Highlighting}
\end{Shaded}

\url{http://www.ls-japan.org/modules/documents/LSJpapers/j-gkstyle2020.pdf}

\textcite{佐久間1941}

\textcite{服部1976}

\textcite{金田一1955}

\textcite{上野1997}

\textcite{柴谷1978}

\textcite{林_南1974}

\textcite{梶1992}

\textcite{橋本1966}

\textcite{Postal1970},

\textcite{Kay_McDaniel1978}

\textcite{Kiparsky1968}

\textcite{Haegeman1994}

\textcite{Jakobson_etal1963}

\textcite{Sag1976}

\textcite{Liberman2007}

\autocite{佐久間1941}

\autocite{服部1976}

\autocite{金田一1955}

\autocite{上野1997}

\autocite{柴谷1978}

\autocite{林_南1974}

\autocite{梶1992}

\autocite{橋本1966}

\autocite{Postal1970}

\autocite{Kay_McDaniel1978}

\autocite{Kiparsky1968}

\autocite{Haegeman1994}

\autocite{Jakobson_etal1963}

\autocite{Sag1976}

\autocite{Liberman2007}

\printbibliography

\end{document}
Preview
Lingdocdown preview
Lingdocdown LaTeX Template | Bibby | Bibby AI