This repository has been archived by the owner on Sep 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpreamble.tex
48 lines (43 loc) · 1.63 KB
/
preamble.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\makeatletter
\newcommand*{\figref}[1]{{\if@english Figure~\else 図\fi\ref{#1}}}
\newcommand*{\tabref}[1]{{\if@english Table~\else 表\fi\ref{#1}}}
\newcommand*{\eqref}[1]{{\if@english Equation~\else 式\fi}(\ref{#1})}
\newcommand*{\chapref}[1]{{\if@english Chapter~\ref{#1}\else 第{\ref{#1}}章\fi}}
\newcommand*{\secref}[1]{{\if@english Section~\ref{#1}\else \ref{#1}節\fi}}
\newcommand{\chapprint}[1]{\chapref{#1}\if@english:~\textit{\nameref{#1}}\else「\textit{\nameref{#1}}」\fi}
\newcommand{\secprint}[1]{\secref{#1}\if@english:~\textit{\nameref{#1}}\else「\textit{\nameref{#1}}」\fi}
\def\PDFTITLE{\if@english \@ethesisname \else \@jthesisname\fi}
\def\PDFSUBJECT{\if@english \@etitle \else \@jtitle\fi}
\def\PDFAUTHOR{\if@english \@eauthor \else \@jauthor\fi}
\def\PDFKEYWORDS{\ifdefined\@keywords\@keywords\fi}
\makeatother
\usepackage[dvipdfmx]{color}
\usepackage[dvipdfmx,bookmarks=true,bookmarksnumbered=true,bookmarkstype=toc,
colorlinks=true,
linkcolor=black,
citecolor=black,
urlcolor=black,
pdftitle=\PDFTITLE,
pdfsubject=\PDFSUBJECT,
pdfauthor=\PDFAUTHOR,
pdfkeywords=\PDFKEYWORDS]{hyperref}
\usepackage{pxjahyper} % for japanese encoding on pdf bookmarks
\usepackage{listings}
\lstset{
breaklines = true,
basicstyle=\ttfamily,
commentstyle={\itshape \color[cmyk]{1,0.4,1,0}},
classoffset=1,
%% keywordstyle={\bfseries \color[cmyk]{0,1,0,0}},
%% stringstyle={\ttfamily \color[rgb]{0,0,1}},
showstringspaces=false,
columns=fullflexible,
keepspaces=true,
escapeinside={<@}{@>},
%% frame=tRBl,
framesep=5pt,
%% numbers=left,
stepnumber=1,
numberstyle=\tiny,
tabsize=2,
}