CONTENTS

1.環境2.日本航空宇宙学会 年会講演会の論文フォーマット3.作成結果4.コード5.Tips太文字明朝と太文字ゴシックの両立フォントサイズの制御Abstract二段組における図表の位置コントロール出典記号を文中と右肩を両方使い分ける6.諦めたこと全体のフォントサイズの小数での制御7.出典関連記事

MENU

溶けかけてるうさぎ HP GALLERY BLOG TOP RECENT ARTICLES POPULAR ARTICLES ABOUT THIS BLOG

CATEGORY

大学 (142) 仕事 (23) 航空宇宙 (108) 写真 (79) 旅行 (33) 飯・酒 (20) コンピュータ (122) その他 (47)

TAG

ARCHIVE

RECENT

自宅を部分的に交換するととても便利! 【駅メモ!】6000 駅達成! 【Archive】『衛星データ利用の方々にとって近いようで触れる機会のなさそうな小話』 @日本衛星データコミニティ勉強会 【写真】今年の写真活動振り返り 2024 【Archive】『衛星スタートアップの FOSS4G 初参加の記録』 @FOSS4G Belem & Asia アフタートーク

【LuaTeX】日本航空宇宙学会 年会講演会のLaTeXテンプレート

事象発生日:2018-02-25

記事公開日:2018-02-25

アクセス数:8444

日本航空宇宙学会 年会講演会のLaTeXテンプレートが存在しなかったので作成した.

処理系はLuaTeXである.

1.環境

Microsoft Windows 10 Home (64bit)

W32TeX(2017/09/17インストール)

2.日本航空宇宙学会 年会講演会の論文フォーマット

論文フォーマットは以下の日本航空宇宙学会HPリンクから入手できる.

(念のためこのHPにもミラーしてある.)

 

フォーマット (PDF) (49_mihon.pdf [178,856 byte])

フォーマット (DOC) (49_mihon.doc [45,056 byte])

フォーマット (PDF)(ミラー) (49_mihon.pdf [178,856 byte])

フォーマット (DOC)(ミラー) (49_mihon.doc [45,056 byte])

 

フォーマットのスクリーンショットは以下.

配布されているフォーマットは.docで,フォントサイズは9.5ptとかいうよくわからないサイズ.

LaTeXのテンプレートも見当たらなかったので,自作することにした.

3.作成結果

作ったテンプレートのスクリーンショットは次のようになった.

 

フォーマットを完全には厳守してない点は以下.

章番号などの数字が全角ではなく半角
“1-1”ではなく“1.1”
題目部や章名の行間が厳密ではない

4.コード

.texコードは以下.

001% \documentclass[9pt,a4paper]{jsarticle}                % for upLaTeX
002\documentclass[9pt,a4paper]{ltjsarticle}                % for LuaTeX
003% \documentclass[9.5pt,a4paper]{ltjsarticle}            % for 小数指定はできなかった
004 
005% ###############################
006% 航空宇宙学会年会 原稿
007% ###############################
008 
009\pagestyle{empty}       % ページ番号を消す
010 
011\input{setting}
012\begin{document}
013 
014\begin{center}
015    {\fontsize{16pt}{24pt}\selectfont \textbf{1A23 ほげほげほげほげによるぴよぴよぴよぴよのための}} \\[8pt]
016    {\fontsize{16pt}{24pt}\selectfont \textbf{ふがふがふがふがに関する研究}} \\[14pt]
017 
018    \textbf{田中 太郎}(東京大学),\textbf{鈴木 一郎}(京都大学), \\
019    \textbf{高橋 修},\textbf{松本 次郎},\textbf{佐々木 明},\textbf{内藤 康平}(東京大学) \\[14pt]
020 
021    Hogehoge Piyopiyo Fugafuga of Hogepiyofuga Study \\
022 
023    Taro Tanaka (The University of Tokyo), Ichiro Suzuki (Kyoto University), \\
024    Osamu Takahashi, Jiro Matsumoto, Akira Sasaki, Kohe Naito (The University of Tokyo) \\[14pt]
025 
026    Key words :  Aircraft, Safety and Reliability, Remote Sensing, \\
027    Flight Dynamics, Artificial Satellites \\[14pt]
028 
029    \textbf{Abstract}
030\end{center}
031\vspace{-2mm}
032 
033\lipsum[1-2]
034 
035\begin{multicols}{2}
036 
037\mySection{序論 \label{Sec:Intro}}
038\mySubsection{研究背景}
039\begin{Figure}
040    \centering
041    \iffigure
042    \rule{50mm}{30mm}
043    % \includegraphics[width=50mm]{./img/hoge.pdf}
044    \fi
045    \captionsetup{type=figure}
046    \caption{``Hoge'' イメージ図}
047\end{Figure}
048\jalipsum[1-2]{wagahai}
049 
050 
051\mySubsection{サブセクション}
052\mySubsubsection{サブサブセクション}
053\jalipsum[3]{wagahai}
054 
055 
056\mySubsubsection{サブサブセクション}
057\mySubsubsubsection{サブサブサブセクション}
058ああああ.
059 
060 
061\mySubsubsubsection{サブサブサブセクション}
062いいいい.
063% \vfill\null
064% \columnbreak
065 
066 
067\mySection{図表}
068\mySubsection{図}
069\begin{Figure}
070    \centering
071    \iffigure
072    \rule{50mm}{30mm}
073    % \includegraphics[width=50mm]{./img/hoge.pdf}
074    \fi
075    \captionsetup{type=figure}
076    \caption{大きな図}
077\end{Figure}
078\begin{Figure}
079    \begin{minipage}{0.49\hsize}
080        \centering
081        \iffigure
082        \rule{35mm}{30mm}
083        % \includegraphics[width=30mm]{./img/hoge.pdf}
084        \fi
085    \end{minipage}
086    \begin{minipage}{0.49\hsize}
087        \centering
088        \iffigure
089        \rule{35mm}{30mm}
090        % \includegraphics[width=30mm]{./img/hoge.pdf}
091        \fi
092    \end{minipage}
093    \captionsetup{type=figure}
094    \caption{小さな図(左)と小さな図(右)}
095\end{Figure}
096\begin{Figure}
097    \begin{minipage}{0.49\hsize}
098        \centering
099        \iffigure
100        \rule{35mm}{30mm}
101        % \includegraphics[width=30mm]{./img/hoge.pdf}
102        \fi
103    \end{minipage}
104    \begin{minipage}{0.49\hsize}
105        \centering
106        \iffigure
107        \rule{35mm}{30mm}
108        % \includegraphics[width=30mm]{./img/hoge.pdf}
109        \fi
110    \end{minipage}
111    \captionsetup{type=figure}
112    \caption{小さな図(左)と小さな図(右)}
113\end{Figure}
114 
115 
116\mySubsection{表}
117\begin{Table}
118    \centering
119    \renewcommand{\arraystretch}{0.8}
120    \captionsetup{type=table}
121    \caption{表テンプレート}
122    \small
123    \begin{tabular}{lccc}
124    \toprule
125    \multicolumn{1}{c}{\myJFontTable{}}       &
126    \multicolumn{1}{c}{\myJFontTable{記号}}   &
127    \multicolumn{1}{c}{\myJFontTable{単位}}   &
128    \multicolumn{1}{c}{\myJFontTable{値}} \\
129    \midrule
130    \myJFontTable{ほげ直径} &
131        $D$         & $\si{m}$           & $1.234$ \\
132    \myJFontTable{ピヨ数} &
133        $Q$         &                    & $6$ \\
134    \myFontTable{Fuga値} &
135        $f$         & $\si{m}$           & $3.56$ \\
136    \myFontTable{HOGE精度} &
137        $\delta_h$  & $\si{\micro m}$    & $1.00$ \\
138    \myFontTable{Piyo精度} &
139        $\delta_f$  & $\si{\micro rad}$  & $2.00$ \\
140    \bottomrule
141    \end{tabular}
142    \renewcommand{\arraystretch}{1}
143\end{Table}
144 
145 
146\mySection{出典}
147\citen{Schweighart2002}によると,ほげほげ.
148また,ふがふがはぴよぴよである\cite{Hadaegh2016}
149 
150 
151\renewcommand{\refname}{}
152\phantomsection
153\addcontentsline{toc}{chapter}{参考文献}
154\section*{参考文献}
155% レイアウト調整
156\vspace{-20pt}
157\bibliographystyle{junsrt}
158\bibliography{bibdata}
159 
160\end{multicols}
161\end{document}
main.tex
001\usepackage[top=25truemm,bottom=25truemm,left=23truemm,right=23truemm]{geometry}
002 
003% フォント設定
006\usepackage[no-math]{fontspec}
007% ↑これつけるとsiunitxのmicroが消えた... ↓下で解決
008\usepackage[yu-win,deluxe]{luatexja-preset}
009 
013\usepackage{luatexja-fontspec}
014% \newfontfamily\fontConsolas{Consolas}
015% \newfontfamily\myFontYuGothM[ExternalLocation,Scale=0.91]{YuGothM.ttc}  % これでもできた
016% \newjfontfamily\myJFontYuGothM[ExternalLocation]{YuGothM.ttc}           % これでもできた
017\newfontfamily\myFontYuGothM[ExternalLocation,Scale=0.91]{YuGothM001.ttf}
018\newjfontfamily\myJFontYuGothM[ExternalLocation]{YuGothM001.ttf}
019\newfontfamily\myFontYuGothB[ExternalLocation,Scale=0.91]{YuGothB001.ttf}
020\newjfontfamily\myJFontYuGothB[ExternalLocation]{YuGothB001.ttf}
021% \newfontfamily\myFontYuGothM[ExternalLocation,Scale=MatchLowercase]{YuGothM.ttc}   % サイズが上手く合わない
022% \newjfontfamily\myJFontYuGothM[ExternalLocation,Scale=MatchLowercase]{YuGothM.ttc} % サイズが上手く合わない
023 
024\usepackage{amsmath,amssymb}
025\usepackage{siunitx}                            % SI単位
026\sisetup{input-ignore={,},input-decimal-markers={.},group-separator={,},group-minimum-digits=4,group-digits=integer}
027% \sisetup{mathsmu = \text{μ},textmu  = μ}    % μとµは違う
028\sisetup{math-micro=\text{µ},text-micro=µ}
029% μ
030% U+03BC
031% µ
032% U+00B5
033% for % ↑これつけるとsiunitxのmicroが消えた... ってのの解決
034\usepackage{bm}                                 % for vector    % font系パッケージの後に宣言
035\usepackage{setspace}                           % for spacing環境
036\usepackage[normalem]{ulem}                     % for \sout{} 取り消し線
037% ulemの下線注意
039\usepackage{url}
040% http://osksn2.hep.sci.osaka-u.ac.jp/~naga/miscellaneous/tex/tex-tips3.html
041\usepackage{booktabs}                           % for \toprule \midrule \bottomrule
042% \usepackage[dvipdfmx]{graphicx}               % for upLaTeX
043\usepackage[luatex]{graphicx}                   % for LuaTeX
044\usepackage{multirow}                           % 表で行結合
048% LuaTeX. upLaTeXではオプションが違う.
049\usepackage[unicode=true,hidelinks,bookmarksnumbered=true,bookmarksdepth=subsubsection,bookmarksopen=true]{hyperref}
050\usepackage{comment}
051% 画像強制位置合わせ
053\usepackage{here}
054 
055% sectionのフォントサイズ変更
057\usepackage{titlesec}
058\titleformat*{\section}{\normalsize\bfseries}
059\titleformat*{\subsection}{\normalsize\rmfamily}
060\titleformat*{\subsubsection}{\normalsize\rmfamily}
061 
063% mathpzc
064\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}
065 
066% 引用[]を右上に 方法3
068\usepackage[square]{natbib}
069 
070% 2段組み
072\usepackage{multicol}
073 
074% 2段組み図 方法2
076% \usepackage[labelsep=none]{caption}
077\usepackage[labelsep=quad]{caption}
078\newenvironment{Figure}
079  {\par\medskip\noindent\minipage{\linewidth}}
080  {\endminipage\par\medskip}
081\newenvironment{Table}
082  {\par\medskip\noindent\minipage{\linewidth}}
083  {\endminipage\par\medskip}
084% キャプションのエラー
085% Package caption Warning: The option `hypcap=true' will be ignored for this(caption)
086% については
088 
089% コンパイル時に図をとばす
091\newif\iffigure
092\figurefalse
093\figuretrue
094 
095 
097\makeatletter % プリアンブルで定義開始
098 
099% 表示文字列を"図"から"Figure"へ
100\renewcommand{\figurename}{Fig.\,}
101\renewcommand{\tablename}{Table\,}
102 
103% 図番号を"<節番号>.<図番号>" へ
104\renewcommand{\thefigure}{\thesection.\arabic{figure}}
105\renewcommand{\thetable}{\thesection.\arabic{table}}
106\renewcommand{\theequation}{\thesection.\arabic{equation}}
107 
108% 節が進むごとに図番号をリセットする
109\@addtoreset{figure}{section}
110\@addtoreset{table}{section}
111\@addtoreset{equation}{section}
112 
113\makeatother % プリアンブルで定義終了
114 
115 
116% 引用[]を右上に 方法3
118\setcitestyle{super}
119\setcitestyle{citesep={,}}
120\DeclareRobustCommand*{\citen}[1]{%
121    \begingroup
122        \romannumeral-`\x % remove space at the beginning of \setcitestyle
123        \setcitestyle{numbers}%
124        \cite{#1}%
125    \endgroup
126}
127 
128% 数式記号命令 \mhyph の定義
129% ハイフン
131\DeclareMathSymbol{\mhyph}{\mathalpha}{operators}{`-}
132 
133 
134% マクロ
135\newcommand{\refSec}[1]   {\ref{#1}章}
136\newcommand{\refApd}[1]   {付録\ref{#1}}
137\newcommand{\refSsec}[1]  {\ref{#1}節}
138\newcommand{\refSssec}[1] {\ref{#1}項}
139\newcommand{\refFig}[1]   {\figurename\ref{#1}}
140\newcommand{\refTable}[1] {\tablename\ref{#1}}
141\newcommand{\refEq}[1]    {Eq.\,\ref{#1}}
142 
144\newcommand{\argmax}{\mathop{\rm arg~max}\limits}
145\newcommand{\argmin}{\mathop{\rm arg~min}\limits}
146 
147% \midの拡張
149% \newcommand{\relmiddle}[1]{\mathrel{}\middle#1\mathrel{}}
150\newcommand{\relmiddle}[1]{\mathrel{}\middle#1}
151 
153\newcommand*\rfrac[2]{{}^{#1}\!/_{#2}}
154 
155\newcommand{\mySection}[1] {%
156    \section{#1}%
157    \vspace{-6pt}
158}
159\newcommand{\mySubsection}[1] {%
160    \subsection{#1}%
161    \vspace{-6pt}
162}
163\newcommand{\mySubsubsection}[1] {%
164    \subsubsection{#1}%
165}
166\newcommand{\mySubsubsubsection}[1] {
167    \vspace{5pt}
168    \noindent
169    ・#1 \par
170}
171 
172% 表見出しフォント
173\newcommand{\myJFontTable}[1] {\myJFontYuGothM{#1}}
174\newcommand{\myEFontTable}[1] {\myFontYuGothM{#1}}
175\newcommand{\myFontTable}[1] {\myJFontYuGothM{\myFontYuGothM{#1}}}
176 
177\allowdisplaybreaks[4]
178 
179\usepackage{lipsum}
180\usepackage {bxjalipsum}
setting.tex
01@article{Schweighart2002,
02author={Schweighart, Samuel A. and Sedwick, Raymond J.},
03title={{High-Fidelity Linearized $J_2$ Model for Satellite Formation Flight}},
04journal={Journal of Guidance, Control, and Dynamics},
05year={2002},
06month={Nov},
07day={01},
08publisher={American Institute of Aeronautics and Astronautics},
09volume={25},
10number={6},
11pages={1073-1080},
12issn={0731-5090},
13doi={10.2514/2.4986},
15}
16@article{Hadaegh2016,
17author = {Hadaegh, Fred Y. and Chung, Soon Jo and Manohara, Harish M.},
18doi = {10.1109/JSYST.2014.2327972},
19issn = {19379234},
20journal = {IEEE Systems Journal},
21keywords = {Autonomous agents,Control systems,Distributed control,Satellites,Space technology},
22number = {2},
23pages = {673--684},
24title = {{On development of 100-gram-class spacecraft for swarm applications}},
25volume = {10},
26year = {2016}
27}
bibdata.bib

5.Tips

基本的にはコードの周辺にURLが書いてあるのでそれを参照すればいいが,いくつかここでまとめておく.

太文字明朝と太文字ゴシックの両立

6\usepackage[no-math]{fontspec}
7% ↑これつけるとsiunitxのmicroが消えた... ↓下で解決
8\usepackage[yu-win,deluxe]{luatexja-preset}

とすることにより,いろいろましになる.

[yu-win]によりデフォルトのフォントが游書体となり,

[deluxe]により日本語の太文字が明朝体となる.

 

これで\textbfは太字明朝体となる.

\textmgでゴシック体が使えるようになるはずだったのだが,いまいちうまくいかなかったので,

13\usepackage{luatexja-fontspec}
14% \newfontfamily\fontConsolas{Consolas}
15% \newfontfamily\myFontYuGothM[ExternalLocation,Scale=0.91]{YuGothM.ttc}  % これでもできた
16% \newjfontfamily\myJFontYuGothM[ExternalLocation]{YuGothM.ttc}           % これでもできた
17\newfontfamily\myFontYuGothM[ExternalLocation,Scale=0.91]{YuGothM001.ttf}
18\newjfontfamily\myJFontYuGothM[ExternalLocation]{YuGothM001.ttf}
19\newfontfamily\myFontYuGothB[ExternalLocation,Scale=0.91]{YuGothB001.ttf}
20\newjfontfamily\myJFontYuGothB[ExternalLocation]{YuGothB001.ttf}
21% \newfontfamily\myFontYuGothM[ExternalLocation,Scale=MatchLowercase]{YuGothM.ttc}   % サイズが上手く合わない
22% \newjfontfamily\myJFontYuGothM[ExternalLocation,Scale=MatchLowercase]{YuGothM.ttc} % サイズが上手く合わない

で游ゴシック体を別途使えるようにしている.(日本語と英語で別途作っているあたりセンスがないが....)

 

一般的には,\newfontfamily\fontConsolas{フォント名}とするのだが,フォント名にスペースがあったり和名フォントはうまくいかなかったので,フォントファイルを直接パスが通っているディレクトリ(ここではmain.tex直下)において指定している.

なお,YuGothM001.ttfYuGothM.ttcをばらして生成したものである.

.ttc.ttfファイルについてはまだ別の記事で書こうかね....

 

Scale=0.91では,日本語フォント (\newjfontfamily) と英語フォント (\newfontfamily) のサイズの調整をしている.

Scale=MatchLowercaseでうまくいくと思っていたが,微妙にいい感じにならなかったので手動設定している.

 

 

ここで発生した問題として,\usepackage[no-math]{fontspec}を読み込むとsiunitxパッケージの\microが消失するというものがあった.

27% \sisetup{mathsmu = \text{μ},textmu  = μ}    % μとµは違う
28\sisetup{math-micro=\text{µ},text-micro=µ}
29% μ
30% U+03BC
31% µ
32% U+00B5
33% for % ↑これつけるとsiunitxのmicroが消えた... ってのの解決

を指定することによって解決した.

なお,μはUnicode上に2つありU+03BCは通常のギリシャ文字領域に存在するミューであり,U+00B5はLatin-1領域のものである.

前者はイタリック体となるが,後者を指定すると単位系文字としてふさわしいローマン体となる.

フォントサイズの制御

15{\fontsize{16pt}{24pt}\selectfont \textbf{1A23 ほげほげほげほげによるぴよぴよぴよぴよのための}} \\[8pt]

では,\fontsize{フォントサイズ}{行送り}\selectfontで設定している.

しかし,行送りが正しく機能しなかったため,\\[8pt]というひどい実装になっている.

Abstract

普通Abstractにはabstract環境を用いるが,それだと幅が若干狭くなる.

ここではAbstractは一段組でかつ100%幅にしたかったため,abstract環境は使用していない.

二段組における図表の位置コントロール

二段組では[H]による強制位置合わせができない.

そこで以下のようにFigureTableを定義する.

74% 2段組み図 方法2
76% \usepackage[labelsep=none]{caption}
77\usepackage[labelsep=quad]{caption}
78\newenvironment{Figure}
79  {\par\medskip\noindent\minipage{\linewidth}}
80  {\endminipage\par\medskip}
81\newenvironment{Table}
82  {\par\medskip\noindent\minipage{\linewidth}}
83  {\endminipage\par\medskip}
84% キャプションのエラー
85% Package caption Warning: The option `hypcap=true' will be ignored for this(caption)
86% については

キャプションがおかしくなるので,captionパッケージをインクルードして

39\begin{Figure}
40    \centering
41    \iffigure
42    \rule{50mm}{30mm}
43    % \includegraphics[width=50mm]{./img/hoge.pdf}
44    \fi
45    \captionsetup{type=figure}
46    \caption{``Hoge'' イメージ図}
47\end{Figure}

のように\captionsetup{type=figure}などと追記する.

出典記号を文中と右肩を両方使い分ける

116% 引用[]を右上に 方法3
118\setcitestyle{super}
119\setcitestyle{citesep={,}}
120\DeclareRobustCommand*{\citen}[1]{%
121    \begingroup
122        \romannumeral-`\x % remove space at the beginning of \setcitestyle
123        \setcitestyle{numbers}%
124        \cite{#1}%
125    \endgroup
126}

とすることにより,文中の引用は\citeを,右肩の引用は\citenで使い分けができるようになる.

6.諦めたこと

全体のフォントサイズの小数での制御

全体のフォントサイズを9.5ptとしたくて

1\documentclass[9.5pt,a4paper]{ltjsarticle}

としたが,小数での設定はできなかった.(コンパイルは通る.)

7.出典

[1](一社)日本航空宇宙学会 第49期 定時社員総会および年会講演会. 原稿投稿. Retrieved February 25, 2018, from http://branch.jsass.or.jp/nenkai/%E5%8E%9F%E7%A8%BF%E6%8A%95%E7%A8%BF/

関連記事

コメントを投稿

名前

Email (※公開されることはありません)

コメント