Last active
August 14, 2019 01:50
-
-
Save sawa2d2/0ac4afeb487f0c61ed53a950e4e02184 to your computer and use it in GitHub Desktop.
Latex Japanese Report Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## DIRECTORY-CONFIGURATION | |
| project/ | |
| ├ main.tex | |
| ├ latexmkrc | |
| ├ figures/ | |
| └ styles/ | |
| ├ report.sty | |
| ├ report-compact.sty | |
| └ util.sty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $latex = 'platex'; | |
| $bibtex = 'pbibtex'; | |
| $dvipdf = 'dvipdfmx %O -o %D %S'; | |
| $makeindex = 'mendex %O -o %D %S'; | |
| $pdf_mode = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass[a4paper,12pt]{jreport} | |
| \usepackage{styles/report} | |
| %\usepackage{styles/report-compact} | |
| \usepackage{styles/util} | |
| \graphicspath{./figures/} % directory for figures | |
| \begin{document} | |
| % 表紙 | |
| \title{2}{Title \\ Foobar} % linage and title | |
| \date{DATE} | |
| \studentid{STUDENTID} % * INDISPENSABLE | |
| \author{NAME} % * INDISPENSABLE | |
| \affiliation{ORGANIZATION} | |
| \mail{EMAILADDRESS} | |
| \maketitle | |
| %%% Main Araticle | |
| %\bibliography{bibliography} | |
| \begin{thebibliography}{9} | |
| \addcontentsline{toc}{chapter}{\bibname} | |
| \bibitem{a} foo. | |
| \bibitem{b} bar \url{http://example.com}, (accessed: Apr. 1 2000). | |
| \end{thebibliography} | |
| \end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \def\stylename{report-compact} | |
| \newif\if@JA | |
| \@JAtrue | |
| \DeclareOption{eng}{\@JAfalse} | |
| \ProcessOptions* | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % サンセリフ + ゴシック | |
| \newcommand*{\textsfgt}[1]{% | |
| {\sffamily\gtfamily #1}} | |
| % レイアウト | |
| \setlength{\textheight}{680pt}% 本文領域高 | |
| \setlength{\textwidth}{480pt}% 本文領域幅 | |
| \setlength{\topmargin}{-40pt}% 上部のマージン | |
| \setlength{\oddsidemargin}{-12pt}% 横マージン (奇数ページ) | |
| \setlength{\evensidemargin}{-12pt}% 横マージン (偶数ページ) | |
| \setlength{\footskip}{40pt}% 本文領域底辺とフッタ領域底辺の間隔 | |
| \setlength{\parskip}{1.5ex}% 段落間のスペース | |
| \setlength{\parindent}{12pt}% 段落先頭の字下げ幅 | |
| % 各種変数定義 | |
| \def\title#1#2{% | |
| \gdef\@titlelinecount{#1}% | |
| \gdef\@title{#2}} | |
| \let\@titlelinecount\@empty | |
| \long\def\studentid#1{\gdef\@studentid{#1}}%学籍番号 | |
| \let\@studentid\@empty | |
| \long\def\affiliation#1{\gdef\@affiliation{#1}} %所属 | |
| \let\@affiliation\@empty | |
| \long\def\mail#1{\gdef\@mail{#1}} %e-mail | |
| \let\@mail\@empty | |
| % 表紙の書式 | |
| \usepackage{ulem} | |
| \def\maketitle{% | |
| \begin{flushright} | |
| \@date | |
| \end{flushright} | |
| \vspace{-3zh} %行間を詰める | |
| \begin{center} | |
| {\LARGE \textsfgt \@title} | |
| Student ID : \uline{\@studentid}~ | |
| Name : \uline{\@author}~ | |
| {\if\@affiliation \else Organizaton : \uline{\@affiliation}~ \fi} | |
| {\if\@mail \else E-mail : \uline{\@mail}~ \fi} | |
| \hrulefill | |
| \end{center} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \def\stylename{report} | |
| \newif\if@JA | |
| \@JAtrue | |
| \DeclareOption{eng}{\@JAfalse} | |
| \ProcessOptions* | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % サンセリフ + ゴシック | |
| \newcommand*{\textsfgt}[1]{% | |
| {\sffamily\gtfamily #1}} | |
| % レイアウト | |
| \setlength{\textheight}{600pt}% 本文領域高 | |
| \setlength{\textwidth}{424pt}% 本文領域幅 | |
| \setlength{\topmargin}{-0.1pt}% 上部のマージン | |
| \setlength{\oddsidemargin}{12pt}% 横マージン (奇数ページ) | |
| \setlength{\evensidemargin}{12pt}% 横マージン (偶数ページ) | |
| \setlength{\footskip}{60pt}% 本文領域底辺とフッタ領域底辺の間隔 | |
| \setlength{\parskip}{1.5ex}% 段落間のスペース | |
| \setlength{\parindent}{12pt}% 段落先頭の字下げ幅 | |
| % 各種変数定義 | |
| \def\title#1#2{% | |
| \gdef\@titlelinecount{#1}% | |
| \gdef\@title{#2}} | |
| \let\@titlelinecount\@empty | |
| \long\def\studentid#1{\gdef\@studentid{#1}}%学籍番号 | |
| \let\@studentid\@empty | |
| \long\def\affiliation#1{\gdef\@affiliation{#1}} %所属 | |
| \let\@affiliation\@empty | |
| \long\def\mail#1{\gdef\@mail{#1}} %e-mail | |
| \let\@mail\@empty | |
| % 表紙の書式 | |
| \def\maketitle{% | |
| \begin{titlepage} | |
| \hfill% スペース | |
| \vskip 1.5in | |
| \begin{center} | |
| {\Huge% タイトル | |
| % タイトル上下スペースの計算と設定 - ここから | |
| \newlength\titletop | |
| \setlength\titletop{.875in}% 表題が1行のときの上下スペース | |
| \newlength\titletopskip | |
| \titletopskip = \baselineskip | |
| \newcount\titlelines | |
| \titlelines = \@titlelinecount | |
| \advance\titlelines by -1% 1 引く | |
| \multiply\titletopskip by \titlelines% 掛ける | |
| \divide\titletopskip by 2% 2 で割る | |
| \addtolength\titletop{-\titletopskip}% 必要な分だけ上下スペースを減らす | |
| % タイトル上下スペースの計算と設定 - ここまで | |
| \vskip\titletop% スペース | |
| \renewcommand{\arraystretch}{.75}% 行間 | |
| \textsfgt{ | |
| \begin{tabular}{c}% タイトル | |
| \@title | |
| \end{tabular}} | |
| %\renewcommand{\arraystretch}{1.0}% 戻す | |
| \vskip\titletop% スペース | |
| } | |
| \vfill% スペース | |
| {\LARGE \@author} \\[14pt]% 著者 | |
| {\Large | |
| \renewcommand{\arraystretch}{\if@JA .6 \else 1.0 \fi}% 行間 | |
| \begin{tabular}{c}% 所属 | |
| \@affiliation | |
| \end{tabular} | |
| %\renewcommand{\arraystretch}{1.0}% 戻す | |
| } \\[8pt] | |
| {\Large \@studentid}% 学籍番号 | |
| \\[8pt] | |
| {\Large \@mail}% メールアドレス | |
| \vskip 0.5in% スペース | |
| {\Large \@date}% 提出日 | |
| \end{center} | |
| \end{titlepage} | |
| \thispagestyle{empty}% pagestyle: empty | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \def\stylename{util} | |
| % 標準的なインポートファイル | |
| \usepackage[dvipdfmx]{graphicx} % 画像関連 | |
| \usepackage{amsmath,amssymb} % 数式関連 | |
| \usepackage{algorithmic,algorithm} %擬似コード向け | |
| %プログラムコード向け | |
| \usepackage{listings} | |
| \renewcommand{\lstlistingname}{\textbf{Program}} | |
| \lstset{% | |
| frame={trbl}, | |
| breaklines=true, | |
| columns=[l]{fullflexible}, | |
| numbers=left, | |
| xrightmargin=0zw, | |
| xleftmargin=2zw, | |
| morecomment=[l]{//} | |
| } | |
| \usepackage{ascmac} %丸枠用 | |
| \usepackage{comment} %コメント用 | |
| \usepackage{listliketab} %表内の箇条書き用 | |
| \usepackage{url}% URL用 | |
| % 参考文献の書式 | |
| \renewcommand{\lstlistingname}{\textbf{Program}} | |
| \lstset{% | |
| frame={trbl}, | |
| breaklines=true, | |
| columns=[l]{fullflexible}, | |
| numbers=left, | |
| xrightmargin=0zw, | |
| xleftmargin=2zw, | |
| morecomment=[l]{//} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment