Skip to content

Instantly share code, notes, and snippets.

@K-atc
Last active April 19, 2016 01:52
Show Gist options
  • Select an option

  • Save K-atc/d9177b2a00ebe83fb41d to your computer and use it in GitHub Desktop.

Select an option

Save K-atc/d9177b2a00ebe83fb41d to your computer and use it in GitHub Desktop.
Texts カスタマイズ関連ファイル
\documentclass[11pt]{article}
% \documentclass[a4paper]{bxjsarticle} % 文書クラスは bxjsarticle
\usepackage[default]{zxjatype} % zxjatype パッケージ読込
\usepackage[utf8]{inputenc}
\usepackage{fontspec, xunicode}
% \usepackage{mathspec}
\usepackage{coloremoji}
% \setlength{\textwidth}{17cm}
% \setlength{\textheight}{24cm}
% \setlength{\leftmargin}{-1cm}
% \setlength{\topmargin}{-2cm}
% \setlength{\oddsidemargin}{0cm}
% \setlength{\evensidemargin}{0cm}
% set smaller margins
% \usepackage[a4paper,margin=1in]{geometry}
\usepackage[top=21mm, bottom=21mm, left=21mm, right=21mm]{geometry}
% use standard math symbols
\usepackage{amssymb}
% for \text inside formulas and for \eqref
\usepackage{amsmath}
\usepackage{amsfonts}
%slab-serif math font package (コンクリートなフォント)
\usepackage{concmath}
%enables Times New Roman in math env
% \usepackage{unicode-math}
% enable full XeLaTeX power
\usepackage{xltxtra}
% select widely available fonts
\setmainfont{Lato-Light}
% \setromanfont{Times New Roman}
\setsansfont{Lato-Light}
\setmonofont{Courier New}
% \setmathfont{Times New Roman} % mathspeck package
\usepackage{xeCJK}
\setCJKmainfont[BoldFont=Ruika-04]{Ruika-02}
\renewcommand{\text}{\mathrm}
% set paragraph margins
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.45em}
% \setlength{\parskip}{6pt plus 2pt minus 1pt}
\renewcommand{\baselinestretch}{1.26}
% prevent overfull lines
\setlength{\emergencystretch}{3em}
% for \includegraphics
\usepackage{graphicx}
\usepackage{grffile}
% fit images in page width
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
% for exact placement of figures
\usepackage{float}
% for footnotes in tables
\usepackage{longtable}
\usepackage{booktabs}
% for hyperlinks
\usepackage[colorlinks,urlcolor=blue,filecolor=blue,linkcolor=black,citecolor=black]{hyperref}
\usepackage[all]{hypcap}
\urlstyle{same}
% do not number sections
\setcounter{secnumdepth}{0}
% table がページをはみ出すのを解決する
% \let\Oldtabularnewline\tabularnewline
% \renewcommand{\tabularnewline}{ \Oldtabularnewline\midrule }
% \def \tabularnewline{ \\ \midrule }
\renewenvironment{minipage}[4][]{%
}{}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
% substitute another font for a few Unicode glyphs missing in the main font
\newfontfamily{\emojifont}{Segoe UI Emoji}
\newfontfamily{\msgothic}{MS Gothic}
\newfontfamily{\msmincho}{MS Mincho}
\newfontfamily{\malgungothic}{Malgun Gothic}
\newfontfamily{\gulim}{Gulim}
\catcode`✔=\active
\protected\def ✔{{\textcolor{green}\emojifont\char`\✔}}
\catcode`✓=\active
\protected\def ✓{{\msmincho\char`\✓}}
\catcode`™=\active
\protected\def ™{{\emojifont\char`\™}}
\catcode`✂=\active
\protected\def ✂{{\emojifont\char`\✂}}
% (‘ω’)✌
\catcode`ω=\active
\protected\def ω{{\msgothic\char`\ω}}
\catcode`✌=\active
\protected\def ✌{{\emojifont\char`\✌}}
% ヾ(・ᆺ・✿)ノ゙
\catcode`ᆺ=\active
\protected\def ᆺ{{\gulim\char`\ᆺ}}
% \protected\def ᆺ{{\msmincho \char`\ᆺ}} % tofu
% \protected\def ᆺ{{\msmincho \foreignlanguage{korean}{ᆺ}}}
\catcode`✿=\active
\protected\def ✿{{\emojifont\char`\✿}}
\catcode`※=\active
\protected\def ※{ {\msgothic\char`\※} }
\catcode`≒=\active
\protected\def ≒{ {\msgothic\char`\≒} }
\catcode`△=\active
\protected\def △{ {\msgothic\char`\△} }
\catcode`×=\active
\protected\def ×{ {\msgothic\char`\×} }
% % 見出しのフォント変更
\usepackage{titlesec}
% % \allsectionsfont{\sffamily}
% \titleformat{\chapter}[display]
% {\normalfont\sffamily\huge\bfseries}
% {\chaptertitlename\ \thechapter}{20pt}{\Huge}
% \titleformat{\section}
% {\normalfont\sffamily\LARGE\bfseries}
% {\thesection}{1em}{}
% \titleformat{\subsection}
% {\normalfont\sffamily\large\bfseries}
% {\thesection}{1em}{}
\definecolor{dark-gray}{gray}{0.18}
\titleformat{\subsubsection}
{\normalfont\sffamily\bfseries}
{\thesection}{0em}{}
\titleformat*{\paragraph}
{\normalfont\normalsize\bfseries\color{dark-gray}}
\titlespacing{\section}{}{1.2em}{0.3em}[]
\titlespacing{\subsubsection}{}{1.2em}{0.3em}[]
\titlespacing{\paragraph}{}{0.5em}{0.5em}[]
\let\olditemize\itemize
\renewcommand{\itemize}{
% \vspace{-0.5em}
\olditemize
\setlength{\leftskip}{-0.5em}
\setlength{\itemsep}{0.35em}
\setlength{\parskip}{-0.3em}
\setlength{\parsep}{0em}
}
\let\oldverbatim\verbatim
\renewcommand{\verbatim} {
\footnotesize\oldverbatim
}
% タイトル
\makeatletter
\def\@maketitle{%
\begin{center}%
\let\footnote\thanks
\vspace*{0mm} % この量でタイトルの位置が下がる。
{\LARGE \@title \par}%
\vskip 1em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
% \vskip 1em%
% {\large \@date}%
\end{center}%
\par\vskip 1.5em}
\makeatother
\title{$title$}
\author{$author$}
% remove date completely
% \date{\vspace{-5ex}}
\begin{document}
\maketitle
$body$
\end{document}
/***************************** Serif Font Scheme ******************************/
div {
font-family: "Open Sans", "C4 Beogo R 04";
}
div.Code, div.Formula, span.Code, span.Math {
font-family: "Courier New", "C4 Beogo R 04";
background-color: #f6fafe;
}
/**************************** Default Size Scheme *****************************/
div {
font-size: 16px;
line-height: 21px;
}
div.Code, div.Formula, span.Code, span.Math {
font-size: 16px;
}
div.Heading.Indent0 {
font-size: 34px;
line-height: 34px;
}
div.Heading.Indent1 {
font-size: 26px;
line-height: 30px;
}
div.Heading.Indent2 {
font-size: 18px;
line-height: 20px;
}
div.Heading.Indent0 span.Code, div.Heading.Indent0 span.Math {
font-size: 24px;
line-height: 19px;
}
div.Heading.Indent1 span.Code, div.Heading.Indent1 span.Math {
font-size: 22px;
line-height: 17px;
}
div.Heading.Indent2 span.Code, div.Heading.Indent2 span.Math {
font-size: 19px;
line-height: 16px;
}
/********************************* Intervals **********************************/
div {
margin-top: 7px;
}
/* avoid extra margin at the beginning of document */
div:first-child {
margin-top: 0;
}
div.Heading {
margin-top: 16px;
margin-bottom: 10px;
}
div.Heading:first-child {
marin-top: 0px;
}
/******************************* Indent Levels ********************************/
div.Indent0 {
margin-left: 0;
}
div.Indent1 {
margin-left: 25px;
text-indent: -25px;
}
div.Indent2 {
margin-left: 50px;
text-indent: -50px;
}
div.Indent3 {
margin-left: 75px;
text-indent: -75px;
}
div.Indent4 {
margin-left: 100px;
text-indent: -100px;
}
div.Indent5 {
margin-left: 125px;
text-indent: -125px;
}
div.Heading {
margin-left: 0;
text-indent: 0;
}
/********************************* Prefixes ***********************************/
span.Prefix {
width: 25px;
}
div.Indent0 span.Prefix,
div.Indent0 span.Start {
width: 0;
display: none;
}
div.Heading span.Prefix,
div.Heading span.Start {
width: 0;
display: none;
}
div.Indent1 span.Prefix {
width: 25px;
}
div.Indent2 span.Prefix {
margin-left: 25px;
}
div.Indent3 span.Prefix {
margin-left: 50px;
}
div.Indent4 span.Prefix {
margin-left: 75px;
}
div.Indent5 span.Prefix {
margin-left: 100px;
}
\documentclass[11pt]{article}
% set smaller margins
\usepackage[a4paper,margin=1in]{geometry}
% use standard math symbols
\usepackage{amssymb}
% for \text inside formulas and for \eqref
\usepackage{amsmath}
% enable full XeLaTeX power
\usepackage{xltxtra}
% select widely available fonts
\setmainfont{Times New Roman}
\setmonofont{Courier New}
% \setmainfont{Ruika-02}
\setsansfont{Lato}
\setmonofont{IPAexゴシック}
\usepackage{xeCJK}
\setCJKmainfont{RyuminPr6-Light}
\setCJKsansfont{GothicMB101Pr6-Regular}
% 見出しのフォント変更
\usepackage{titlesec}
% \allsectionsfont{\sffamily}
\titleformat{\chapter}[display]
{\normalfont\sffamily\huge\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
{\normalfont\sffamily\LARGE\bfseries}
{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\sffamily\large}
{\thesection}{1em}{}
\titleformat{\subsubsection}
{\normalfont\sffamily}
{\thesection}{1em}{}
% set paragraph margins
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
% prevent overfull lines
\setlength{\emergencystretch}{3em}
% for \includegraphics
\usepackage{graphicx}
\usepackage{grffile}
% fit images in page width
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
% for exact placement of figures
\usepackage{float}
% for footnotes in tables
\usepackage{longtable}
% for hyperlinks
\usepackage[colorlinks,urlcolor=blue,filecolor=blue,linkcolor=black,citecolor=black]{hyperref}
\usepackage[all]{hypcap}
\urlstyle{same}
% do not number sections
\setcounter{secnumdepth}{0}
\renewcommand{\figurename}{図}
% 行の間隔
\linespread{1.26}
\begin{document}
$body$
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment