見出し画像

[LaTex]ファイルの初期設定

プロジェクトに,主に次の5つの.texファイルを設けている。
#main.tex
01 math symbols.tex
02 hd settings.tex
03 diy markers.tex
04 basecode.tex

#main.texには次の内容を書く。

\documentclass[twoside,11pt,a4paper]{article}[2007/10/19]% v1.4h
\usepackage[whole]{bxcjkjatype}%なんか日本語になる
\usepackage{lipsum}[2011/04/14]% v1.2
\usepackage{eurosym}[1998/08/06]% v1.1
\usepackage[height=3cm,width=0.5cm]{thumbs}[2014/03/09]% v1.0q
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}
\makeatletter
\ltx@ifpackageloaded{hyperref}{% hyperref loaded
}{% hyperref not loaded
\usepackage{url}% otherwise the "\url"s in this example must be removed manually
}
\makeatother
\listfiles
\usepackage{fancyhdr,amsmath,mathtools,amssymb,multicol,tcolorbox,ascmac,comment, enumerate,fancybox,framed,setspace,tikz, enumitem, tasks,ifthen,pdfpages,multicol,ulem,graphicx, wrapfig}
\usepackage{fancypar}%美化用いろいろ

\input{01 math symbols.tex}
\input{02 hd settings.tex}
\input{03 diy markers.tex}
\input{04 basecode.tex}

\begin{document}
内容
\end{document}

#01 math symbols.tex は現時点では空白
#02 hd settings.tex には次の内容を書く。

\usepackage[top=28mm, bottom=28mm, left=17mm,right=17mm]{geometry} %ここで余白設定してます。
\pagestyle{fancy}
\fancyhf{} % 清除所有的页眉和页脚样式
\rhead{\includegraphics[keepaspectratio,width=3cm]{coach logo.png}}%奇偶数页眉
%\fancyfoot[LE,RO]{\leftmark \enspace}%奇偶数页脚
%\fancyfoot[RE,LO]{\rightmark \enspace}%奇偶数页脚
  %\renewcommand{\chaptermark}[1]{\markboth{第\ \thechapter\ 章~#1}{}}
%\renewcommand{\sectionmark}[1]{\markright{\enspace #1}{}}
%\renewcommand{\chaptermark}[1]{\markright{\enspace #1}{}}%定义章节名的格式(不加编号)
%\chead{日本留学試験対策} %ヘッダーの中央に書くやつ
\cfoot{\thepage} %フッターの中央に書くやつ
\renewcommand{\headrulewidth}{0.5pt}
\setlength{\columnseprule}{0pt}%分栏中线
\setlength{\columnwidth}{5mm}
\setstretch{2} 

03 diy markers.tex に次の内容を書く。

\setlength{\fboxsep}{1pt} %枠の大きさ設定
\setlength{\fboxrule}{1pt}%枠の大きさ設定

\newcommand{\deta}[1]{\setlength{\fboxrule}{1pt}
\fcolorbox[rgb]{0, 0, 0}{0.75,0.75,0.75}{\mbox{ \textbf{#1} }}}

\newcommand{\ana}[1]{\setlength{\fboxrule}{1pt}
\fcolorbox[rgb]{0, 0, 0}{1,1,1}{\mbox{ \textbf{#1} }}}

\newcommand{\aana}[1]{\setlength{\fboxrule}{0.3pt}
\fcolorbox[rgb]{0, 0, 0}{1,1,1}{\fbox{\mbox{ \textbf{#1} }}}}

\newcommand{\dana}[1]{\setlength{\fboxrule}{0.3pt}
\fcolorbox[rgb]{0, 0, 0}{0.75,0.75,0.75}{\fbox{\mbox{ \textbf{#1} }}}}
%\newcommand{\sanaume}[1]{ \framebox[40pt][c]{\mbox{\large{#1}}}}

\newcommand{\banaume}[1]{\setlength{\fboxrule}{1pt} \fbox{\mbox{\textbf{\large{\phantom{a}#1\phantom{a}}}}}\setlength{\fboxrule}{0.4pt}}
\newcommand{\sbanaume}[1]{\fbox{\mbox{\large{\phantom{a}#1\phantom{a}}}}}
\newcommand{\ctext}[1]{\raise0.2ex\hbox{\textcircled{\scriptsize{#1}}}}%まるすうじ
\setcounter{enumi}{3}%箇条書き途中から番号
\newcommand{\egg}[1]{\,\raisebox{-3 pt}{%  选项编号
  \begin{tikzpicture}[x = 1 pt, y = 1 pt, line width = 0.6 pt, scale = 0.9]
  \draw (0,0) ellipse (4.5 and 6);\draw (0.1,0.2) node{\small\usefont{T1}{qhv}{m}{n}{#1}};\end{tikzpicture}}\,}
\newcommand{\eggs}[1]{\,\raisebox{-3 pt}{%  选项编号
  \begin{tikzpicture}[x = 1 pt, y = 1 pt, line width = 0.6 pt, scale = 0.81]
  \draw (0,0) ellipse (4.5 and 6);\draw (0.1,0.2) node{\small\usefont{T1}{qhv}{m}{n}{#1}};\end{tikzpicture}}\,}

04 basecode.tex には次の内容を書く。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%飾りマーク
\newcommand{\tanngenn}[1]{\lhead{\framebox[176mm][l]{#1}}}
\newcommand{\sisinn}[1]{\noindent{\bf 指針▷} #1}
\newcommand{\rennsyuu}{\noindent\fcolorbox{white}{gray}{\textcolor{white}{練}}\colorbox[gray]{0.8}{習}\fcolorbox{white}{gray}{\textcolor{white}{問}}\colorbox[gray]{0.8}{題}}
\newcommand{\rei}[1]{\noindent\Ovalbox{\textbf{\large{例}{#1}}}}
\newcommand{\enn}[1]{\noindent
\begin{tikzpicture}[scale=0.2, baseline=2.8pt]
\draw[fill=yellow!20!lightgray,thick, rounded corners=4pt,] (0,0)--(6.5,0)--(6.5,2.6)--(0,2.6)--cycle;
\draw (3.3,1.3) node{\textbf{\large{演{#1}}}};
\end{tikzpicture}\;}
\newcommand{\ren}[1]{\noindent
\begin{tikzpicture}[scale=0.2, baseline=2.8pt]
\draw[fill=lightgray,thick, rounded corners=4pt,] (0,0)--(6.5,0)--(6.5,2.6)--(0,2.6)--cycle;
\draw (3.3,1.3) node{\textbf{\large{練{#1}}}};
\end{tikzpicture}\;}
\newcommand{\chui}{\colorbox{black}{\textcolor{white}{\textbf{ 注意!}}}}
\newcommand{\tejun}{\noindent
\begin{tikzpicture}[scale=0.2, baseline=2.8pt]
\fill (0,1)--(1,0)--(2,1)--(1,2)--cycle;
\fill[gray] (1,1)--(2,0)--(3,1)--(2,2)--cycle;
\fill (2,1)--(3,0)--(4,1)--(3,2)--cycle;
\end{tikzpicture}\;}

\newcommand{\bango}[1]{\noindent
\begin{tikzpicture}[scale=0.2, baseline=2.8pt]
\filldraw[darkgray,thick, rounded corners=4pt,] (0,0)--(88,0)--(88,3)--(0,3)--cycle;
\draw (2,1.5) node[right]{\textcolor{white}{\textbf{\large{{#1}}}}};
\end{tikzpicture}\;}

\newcommand{\leafline}{\leavevmode \xleaders \hbox{\textleaf }\hfill \null}\par
\newcommand{\diyaline}{\leavevmode \xleaders \hbox{\textcurrency \textbullet}\hfill \null}\par
\newcommand{\diybline}{\leavevmode \xleaders \hbox{\textmarried}\hfill \null}\par

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%その他
\setcounter{enumi}{3}%箇条書き途中から番号

この記事が気に入ったらサポートをしてみませんか?