Modularize colors
This commit is contained in:
parent
5da70a3184
commit
4355494602
|
@ -1,4 +1,4 @@
|
||||||
const yomiBrackets = ['\\textbf{\\textcolor{myGreen!80!black}{', '}}'];
|
const yomiBrackets = ['\\textbf{\\textcolor{kanjiColor!80!black}{', '}}'];
|
||||||
const yomiConnector = '、 ';
|
const yomiConnector = '、 ';
|
||||||
const yomiDash = '—';
|
const yomiDash = '—';
|
||||||
|
|
||||||
|
|
25
kanjiLib.tex
25
kanjiLib.tex
|
@ -3,7 +3,10 @@
|
||||||
\usepackage{anyfontsize}
|
\usepackage{anyfontsize}
|
||||||
\usepackage{tikz}
|
\usepackage{tikz}
|
||||||
|
|
||||||
\definecolor{myGreen}{RGB}{72, 194, 78}
|
\definecolor{kanjiColor}{RGB}{72, 194, 78}
|
||||||
|
\colorlet{kunyomiColor}{blue}
|
||||||
|
\colorlet{onyomiColor}{red}
|
||||||
|
\colorlet{meaningColor}{black}
|
||||||
|
|
||||||
% ---------------------------------------------------------------------------- %
|
% ---------------------------------------------------------------------------- %
|
||||||
% JLPT Section %
|
% JLPT Section %
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
\begin{center}
|
\begin{center}
|
||||||
\resizebox{\textwidth}{!}{
|
\resizebox{\textwidth}{!}{
|
||||||
\begin{tikzpicture}
|
\begin{tikzpicture}
|
||||||
\fill[rounded corners=2pt, fill=myGreen, draw=black] (0,0) rectangle (1,1);
|
\fill[rounded corners=2pt, fill=kanjiColor, draw=black] (0,0) rectangle (1,1);
|
||||||
\draw (0.5,0.23) node[white, anchor=base, scale=2]{#1};
|
\draw (0.5,0.23) node[white, anchor=base, scale=2]{#1};
|
||||||
\end{tikzpicture}
|
\end{tikzpicture}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +104,7 @@
|
||||||
tcbox width=auto limited,
|
tcbox width=auto limited,
|
||||||
capture=hbox,
|
capture=hbox,
|
||||||
enhanced,
|
enhanced,
|
||||||
colback=black!20,
|
colback=meaningColor!20,
|
||||||
left=15pt,
|
left=15pt,
|
||||||
right=15pt,
|
right=15pt,
|
||||||
top=15pt,
|
top=15pt,
|
||||||
|
@ -110,7 +113,7 @@
|
||||||
outer arc=0pt,
|
outer arc=0pt,
|
||||||
attach boxed title to top center={yshift=-12pt, yshifttext=-6pt},
|
attach boxed title to top center={yshift=-12pt, yshifttext=-6pt},
|
||||||
title={\fontsize{15}{20}\textcolor{white}{\textbf{意味}}},
|
title={\fontsize{15}{20}\textcolor{white}{\textbf{意味}}},
|
||||||
colbacktitle=black!60,
|
colbacktitle=meaningColor!60,
|
||||||
boxed title style={arc=0pt, outer arc=0pt}
|
boxed title style={arc=0pt, outer arc=0pt}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,14 +132,14 @@
|
||||||
\newtcolorbox{kunyomiBox}{
|
\newtcolorbox{kunyomiBox}{
|
||||||
enhanced,
|
enhanced,
|
||||||
attach boxed title to top left={yshift=-12pt,xshift=10pt},
|
attach boxed title to top left={yshift=-12pt,xshift=10pt},
|
||||||
colback=blue!20,
|
colback=kunyomiColor!20,
|
||||||
colframe=blue!60,
|
colframe=kunyomiColor!60,
|
||||||
left=15pt,
|
left=15pt,
|
||||||
right=15pt,
|
right=15pt,
|
||||||
top=15pt,
|
top=15pt,
|
||||||
bottom=5pt,
|
bottom=5pt,
|
||||||
title={\fontsize{15}{20}\textcolor{white}{\textbf{訓読み}}},
|
title={\fontsize{15}{20}\textcolor{white}{\textbf{訓読み}}},
|
||||||
colbacktitle=blue!60,
|
colbacktitle=kunyomiColor!60,
|
||||||
width=\textwidth
|
width=\textwidth
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,21 +153,21 @@
|
||||||
\newtcolorbox{onyomiBox}{
|
\newtcolorbox{onyomiBox}{
|
||||||
enhanced,
|
enhanced,
|
||||||
attach boxed title to top left={yshift=-12pt,xshift=10pt},
|
attach boxed title to top left={yshift=-12pt,xshift=10pt},
|
||||||
colback=red!20,
|
colback=onyomiColor!20,
|
||||||
colframe=red!60,
|
colframe=onyomiColor!60,
|
||||||
left=15pt,
|
left=15pt,
|
||||||
right=15pt,
|
right=15pt,
|
||||||
top=15pt,
|
top=15pt,
|
||||||
bottom=5pt,
|
bottom=5pt,
|
||||||
title={\fontsize{15}{20}\textcolor{white}{\textbf{音読み}}},
|
title={\fontsize{15}{20}\textcolor{white}{\textbf{音読み}}},
|
||||||
colbacktitle=red!60,
|
colbacktitle=onyomiColor!60,
|
||||||
width=\textwidth,
|
width=\textwidth,
|
||||||
}
|
}
|
||||||
|
|
||||||
\newcommand{\onyomi}[1]{
|
\newcommand{\onyomi}[1]{
|
||||||
\begin{onyomiBox}
|
\begin{onyomiBox}
|
||||||
\fontsize{15}{20}
|
\fontsize{15}{20}
|
||||||
\textbf{\textcolor{myGreen!80!black}{#1}}
|
\textbf{\textcolor{kanjiColor!80!black}{#1}}
|
||||||
\end{onyomiBox}
|
\end{onyomiBox}
|
||||||
\vspace{0.5cm}
|
\vspace{0.5cm}
|
||||||
}
|
}
|
||||||
|
|
2
main.tex
2
main.tex
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
% Kanji table settings that should not affect the titlepage
|
% Kanji table settings that should not affect the titlepage
|
||||||
\renewcommand{\arraystretch}{2}
|
\renewcommand{\arraystretch}{2}
|
||||||
\rowcolors{1}{white}{myGreen!30}
|
\rowcolors{1}{white}{kanjiColor!30}
|
||||||
|
|
||||||
\break
|
\break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue