% TeX用テンプレートファイル \documentclass[a4paper,twoside]{bxjsarticle} \usepackage{fontspec} \usepackage{myjapanese} %\setmainfont{HanaMin} \setmainfont{HAN NOM A} \setsansfont{IPAゴシック} \setmonofont{IPAゴシック} \newfontfamily\jarm{IPA明朝} \newfontfamily\ebas{EBAS} \newfontfamily\sw{SW} \newfontfamily\ext{HAN NOM B} \topmargin=-40pt %\textheight=712pt \textheight=692pt \oddsidemargin=-5pt \evensidemargin=-5pt \textwidth=462pt \pagestyle{plain} \renewcommand{\thepage}{\texttt{\arabic{page}}} \renewcommand\thefootnote{\texttt{*}\kern1pt\texttt{\arabic{footnote}}} %\newcommand{\wordindex}[2]{\raisebox{1.5em}{{\footnotesize #1~#2}}\hspace{-3em}} \newcommand{\wordindex}[2]{{\small (#1) \hspace{-2em}}\raisebox{1.5em}{{\footnotesize #2}}} % 標点 \newcommand{\book}[1]{《#1》} \newcommand{\chap}[1]{〈#1〉} \newcommand{\pers}[1]{\underline{#1}} \newcommand{\fanqie}[1]{#1} \newcommand{\rime}[1]{#1} \newcommand{\seal}[1]{{\sw #1}} \newcommand{\xiaozi}[1]{( #1 )} \newcommand{\dzhnote}[1]{\footnote{#1}} \begin{document} \begin{flushright} {\jarm「点注会」校注\\\today} \end{flushright} \begin{center} \Large\textrm{<%= @title %>}\vspace{2em} \end{center} <% @wordlist.each do |word| %> <% (spec, content) = word %>% <% if spec == 'part' then %>% \hspace{4em}% <% elsif spec == 'volume' then %>% \hspace{2em}% <% else %>% <% (type, ext_word, char, wordid) = spec %>% <% if type == 'ebas' then %>% {\Huge\ebas <%= char %>}% <% else %>% {\Huge\sw <%= char %>}% <% end %>% \wordindex{<%= ext_word %>}{<%= wordid %>} <% end %>% <% if content then %>% <% content.each do |line| %>% <% if line.has_key?('ex') then %>% {\Large <%= line['ex'] %>}% <% elsif line.has_key?('dn') then %>% <%= line['dn'] %>% <% end %>% <% end %>\\ <% end %>% <% end %> \end{document}