\documentclass[luatex,fontsize=8pt,paper=b5,twoside]{jlreq}%
\usepackage{amsmath,amssymb}
\usepackage{booktabs,caption}
\usepackage{luwa-ul}
\usepackage[most]{tcolorbox}
\usepackage{luatexja-ruby,lltjext}
\usepackage{KKsymbols}

\usepackage{listings}
\lstset{
    basicstyle=\ttfamily\small,
    keywordstyle=\color{blue},
    commentstyle=\color{gray},
    stringstyle=\color{red},
    breaklines=true,
    breakatwhitespace=false,  
    columns=flexible           
}

% You can omit these font settings.
\makeatletter
\RequirePackage[no-math]{fontspec}
\RequirePackage[no-math,match,scale=1]{luatexja-fontspec}
\RequirePackage[hiragino-pro,deluxe,expert]{luatexja-preset}
\setmainfont{HiraMinPro-W3}[BoldFont=HiraMinPro-W6]
\setmainjfont{HiraMinPro-W3}[BoldFont=HiraMinPro-W6]
\newfontfamily{\sfhira@pre}{HiraKakuPro-W3}[BoldFont=HiraKakuPro-W6]
\newjfontfamily{\sfhiraj@pre}{HiraKakuPro-W3}[BoldFont=HiraKakuPro-W6]
\newfontfamily{\mchira@pre}{HiraMinPro-W3}[BoldFont=HiraMinPro-W6]
\newjfontfamily{\mchiraj@pre}{HiraMinPro-W3}[BoldFont=HiraMinPro-W6]
\newfontfamily{\gthira@pre}{HiraKakuPro-W3}[BoldFont=HiraKakuPro-W6,FontFace={eb}{\shapedefault}{HiraKakuStd-W8}]
\newjfontfamily{\gthiraj@pre}{HiraKakuPro-W3}[BoldFont=HiraKakuPro-W6,FontFace={eb}{\shapedefault}{HiraKakuStd-W8}]
\newfontfamily{\mghira@pre}{HiraMaruPro-W4}
\newjfontfamily{\mghiraj@pre}{HiraMaruPro-W4}
\renewcommand{\sffamily}{\sfhira@pre\sfhiraj@pre}
\renewcommand{\mcfamily}{\mchira@pre\mchiraj@pre}
\renewcommand{\gtfamily}{\gthira@pre\gthiraj@pre}
\renewcommand{\mgfamily}{\mghira@pre\mghiraj@pre}
\makeatother
%%%


\usepackage{hyperref} 
\hypersetup{
  luatex, pdfencoding=auto, 
  colorlinks=true,
  linkcolor=black,     
  citecolor=black,     
  urlcolor=DeepSkyBlue3,      
  pdfborder={0 0 0}, 
}

\colorlet{grayLight}{white!80!black} 

\NewTCBListing{SourceCode}{ m m !o !O{DeepSkyBlue3} }{%
  enhanced, colback=black!70, colframe=Snow4,
  toptitle=-1mm, bottomtitle=-1mm,
  righttitle=-1mm, lefttitle=-1mm,
  arc=.5mm, 
  title={\tcbox[on line, arc=.5mm, boxsep=0pt, boxrule=0pt, top=1mm, bottom=0.8mm, left=2mm, right=2.2mm, colback=gray!80, coltext=white]{\raisebox{-0.1ex}{\vphantom{羅}\vphantom{j}#1}}},fonttitle=\gtfamily\footnotesize,boxrule=0.8pt,
  breakable,before upper={\color{white}},top=-0.5mm,bottom=-0.5mm,
  after title=\IfNoValueTF{#3}{}{{\hfill\tcbox[on line, arc=.5mm, boxsep=0pt, boxrule=0pt, top=1mm, bottom=0.8mm, left=2mm, right=2.2mm, colback=white!80!black, coltext=#4]{\raisebox{-0.1ex}{\vphantom{羅}\vphantom{j}#3}}}},
  listing only,
  listing options={
    language={#2},
    basicstyle=\ttfamily,
    keywordstyle=\ttfamily\color{white},
    stringstyle=\itshape\color{white},
    commentstyle=\small\gtfamily\color{DeepSkyBlue2},
    showspaces=false,showtabs=false,
    breaklines=true,breakindent=0pt,
    showstringspaces=false,
    columns=fullflexible,
    tabsize=2,
    numbers=left,numbersep=1.5pt,
    numberstyle=\scriptsize\gtfamily\color{gray},
  }
}

\NewTColorBox{OutPut}{ m !o !O{DeepSkyBlue3} }{%
  enhanced, colframe=Snow4,
  toptitle=-1mm, bottomtitle=-1mm,
  righttitle=-1mm, lefttitle=-1mm,
  arc=.5mm, colback=white, 
  title={\tcbox[on line, arc=.5mm, boxsep=0pt, boxrule=0pt, top=1mm, bottom=0.8mm, left=2mm, right=2.2mm, colback=gray!40, coltext=DeepSkyBlue3]{\raisebox{-0.1ex}{\vphantom{羅}\vphantom{j}#1}}},fonttitle=\gtfamily\footnotesize,boxrule=0.8pt,
  breakable,top=-0.5mm,bottom=-0.5mm,
  after title=\IfNoValueTF{#2}{}{{\hfill\tcbox[on line, arc=.5mm, boxsep=0pt, boxrule=0pt, top=1mm, bottom=0.8mm, left=2mm, right=2.2mm, colback=white!80!black, coltext=#3]{\raisebox{-0.1ex}{\vphantom{羅}\vphantom{j}#2}}}}, bottom=2mm, top=2mm, 
}

\title{\texttt{KKsymbols} Package Documentation}
\author{Kosei Kawaguchi a.k.a. KKTeX}
\date{Version 2.0.2 (2026/01/20)}
\begin{document}

\begin{titlepage}
  \maketitle
\end{titlepage}
\newpage
\tableofcontents
\newpage

\section{Outline}
Japanese: このパッケージは、既存のotfフォントに頼ることなく、「任意のフォント、任意の引数で」丸数字などの特殊記号を再現する目的で作成されています。

luatexja-otfにおける\verb|\ajMaru|などは、その設計上いたしかなないデメリットとして、早見表がないと使い物にならないというものがありました。しかし、本パッケージでは、一から特殊文字を設計し直すというという取り組みを行なっているため、そのようなデメリットが解消されています。

English: This package is designed to reproduce special characters, such as circled numbers, using arbitrary fonts and parameters without relying on existing otf font sets.

A known disadvantage of commands like \verb|\ajMaru| in luatexja-otf is that they are practically unusable without a reference chart. In contrast, this package addresses this issue by re-engineering special characters from the ground up, eliminating the need for complex lookup tables.

{%
\fboxsep=0pt\fboxrule=.1pt
\makebox[10\zw][s]{ああ\kakko{あ}ああ}


\directlua{
  for i = 1, 26 do
    local char = i
    tex.print("\\fbox{\\maru{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\maru*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\maru{" .. char .. "}}")
  end
}

\directlua{
  for i = 1, 26 do
    local char = i
    tex.print("\\fbox{\\jegg{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\jegg{" .. char .. "}}")
  end
}

\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\jegg*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuromaru*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuromaru{" .. char .. "}}")
  end
}

\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\nmaru*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\nmaru{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\hishi*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\hishi{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kurohishi*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kurohishi{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\maruhishi*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\maruhishi{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuromaruhishi*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuromaruhishi{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\seihou*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\seihou{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuroseihou*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuroseihou{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\seimaru*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\seimaru{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuroseimaru*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kuroseimaru{" .. char .. "}}")
  end
}


\directlua{
  for i = 1,26 do
    local char = i
    tex.print("\\fbox{\\kakko{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("a"), string.byte("z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kakko*{" .. char .. "}}")
  end
}


\directlua{
  for i = string.byte("A"), string.byte("Z") do
    local char = string.char(i)
    tex.print("\\fbox{\\kakko{" .. char .. "}}")
  end
}%
}


\section{Acknowledgements / Credit}
In developing this package, I made extensive use of the advice I received from Mr.~Yusuke~Terada.

I recommend you to refer to his article when you develop new-type symbols on \LaTeX.

\begin{quotation}
  \url{https://doratex.hatenablog.jp/entry/20211205/1638697391}
\end{quotation}

\section{Installation}
Place \texttt{KKsymbols.sty} in a directory where LaTeX can find it, e.g., your local \texttt{texmf} tree or alongside your document.

Dependencies:
\begin{itemize}
    \item \texttt{LuaLaTeX-ja}
    \item \texttt{tikz}
    \item \texttt{clac}
\end{itemize}

Load the package:

\begin{verbatim}
\usepackage{KKsymbols}
\end{verbatim}

\section{Caution}
Since this package internally calls \verb|\ltjghostbeforejachar| and \verb|\ltjghostafterjachar|, it can be used only in a LuaLaTeX environment.

\section{Updates for LuaTeX-ja v20260107.0}
With the update to luatexja version 20260107.0, the commands provided by the KKsymbols package now behave identically to native Japanese characters. This improvement is due to the bug fixes in \verb|\ltjghostbeforejachar| and \verb|\ltjghostafterjachar|. Previously, when multiple commands from this package were used consecutively, proper glue was not inserted between them; however, this issue has been resolved in this update.

\section{Commands}
\subsection{The maru series}
This package provides \verb|\maru|, \verb|\kuromaru|, and \verb|\nmaru|. Each of them takes one mandatory argument and no optional arguments. You can pass strings of any length and in any font as arguments.

In most cases, \verb|\maru{argument}| will meet your demands. However, only when you take lowercase alphabet in these commands, you must use star-command just like \verb|\maru*{m}|\footnote{\texttt{\textbackslash jegg} is an exception of this rule. When you use \texttt{\textbackslash jegg}, you don't have to put the star option no matter the argument is lowercase or not. If you do it, the background color of the \texttt{\textbackslash jegg} changes into gray. Only in this case, the effect of the option is different.}.

\begin{SourceCode}{Input}{TeX}[Mind the star option!]
  % Normal Characters
  \maru{A}\maru{あ}\maru{QED.}

  % Lowercase Alphabetic Characters
  \maru*{a}\maru*{j}\maru*{z}
\end{SourceCode}

\begin{OutPut}{Output}
  % Normal Characters
  \maru{A}\maru{あ}\maru{QED.}

  % Lowercase Alphabetic Characters
  \maru*{a}\maru*{j}\maru*{z}
\end{OutPut}

They are used as follows.

\begin{table}[h]
\centering
\caption{maru series}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
argument & \texttt{\textbackslash maru} & \texttt{\textbackslash kuromaru} & \texttt{\textbackslash nmaru} & \texttt{\textbackslash jegg} & \texttt{\textbackslash jegg*} \\
\hline
1     & \maru{1}     & \kuromaru{1}     & \nmaru{1} & \jegg{1} & \jegg*{1}  \\
97    & \maru{97}    & \kuromaru{97}    & \nmaru{97} & \jegg{97} & \jegg*{97} \\
だ    & \maru{だ}    & \kuromaru{だ}    & \nmaru{だ} & \jegg{だ} & \jegg*{だ} \\
ばばば & \maru{ばばば} & \kuromaru{ばばば} & \nmaru{ばばば} & \jegg{ばばば} & \jegg*{ばばば} \\
m & \maru*{m} & \kuromaru*{m} & \nmaru*{m} & \jegg{m} & \jegg*{m} \\
Qjg & \maru{Qjg} & \kuromaru{Qjg} & \nmaru{Qjg} & \jegg{Qjg} & \jegg*{Qjg} \\
\hline
\end{tabular}
\end{table}

They behave as if they were single kanji or hiragana characters:

\fboxsep=0pt\fboxrule=0.1pt
\begin{quotation}
  あいう\fbox{\maru{あ}}\fbox{あ}いう\maru{1}\maru{2}\maru{3}あいうえお
\end{quotation}

The spacing between \verb|\maru| and other characters is adjusted using \verb|\ltjghostbeforejachar| and \verb|\ltjghostafterjachar| so that it behaves like hiragana or kanji.

When changing the font size using commands such as \verb|\Large|, each command is scaled proportionally according to the font size change:

\begin{quotation}
  {\tiny \maru{あああ}\kuromaru{2222}\nmaru{亀}}

  {\normalsize \maru{あああ}\kuromaru{2222}\nmaru{亀}}

  {\Huge \maru{あああ}\kuromaru{2222}\nmaru{亀}}
\end{quotation}

You can also change the current font:
\begin{quotation}
  {\LARGE\maru{あいう}\kuromaru{午後}\nmaru{悟}}%

  {\gtfamily \maru{あいう}\kuromaru{午後}\nmaru{悟}}
\end{quotation}


\section{Rotation}
\subsection{Commands}
This package provides \verb|\RotTate| and \verb|\RotYoko|. The differnces are as follows:

\begin{description}
  \item[In horizontal mode] You should use \verb|\RotYoko|. The default value is \verb|0|. Therefore, if you use \verb|\RotYoko| with no arguments, this is equal to \verb|\RotYoko[0]| 
  \item[In vertical mode] You should use \verb|\RotTate|. The default value is \verb|90|. Therefore, if you use \verb|\RotTate| with no arguments, this is equal to \verb|\RotTate[90]| 
\end{description}

From a technical perspective: Commands like \verb|\maru| provided by this package automatically rotate their arguments based on the ``current typesetting direction'' Specifically, the package applies a 0-degree rotation for horizontal writing (yoko-gaki) and a 90-degree rotation for vertical writing (tate-gaki).

The commands \verb|\RotYoko| and \verb|\RotTate| redefine this "automatic rotation angle" to the value specified in their arguments. Consequently, the effect is persistent unless localized (similar to how font-size commands like \verb|\small| behave). Therefore, please ensure you use appropriate scoping, such as enclosing the command within curly braces \verb|{...}|, when applying these settings.

\begin{SourceCode}{Input}{TeX}
  % In horizontal mode
  {\RotYoko[45]\kakko{あ}\kakko{い}\kakko{う}}\par
  {\RotYoko[60]\kakko{1}\kakko{2}\kakko{3}}

  % In vertical mode
  \parbox<t>{5\zw}{% <t> option requires lltjext package.
    {\RotTate[45]\kakko{あ}\kakko{い}\kakko{う}}\par
    {\RotTate[60]\kakko{1}\kakko{2}\kakko{3}}
  }
\end{SourceCode}

\begin{OutPut}{Output}
  {\RotYoko[45]\kakko{あ}\kakko{い}\kakko{う}}\par
  {\RotYoko[60]\kakko{1}\kakko{2}\kakko{3}}

  \bigskip

  \parbox<t>{5\zw}{% <t> option requires lltjext package.
    {\RotTate[45]\kakko{あ}\kakko{い}\kakko{う}}\par
    {\RotTate[60]\kakko{1}\kakko{2}\kakko{3}}
  }
\end{OutPut}

\subsection{Vertical mode}
When you want to typeset \maru{あ}, for instance, in vertical mode, you should use \verb|\RotTate| command. 

As described in the previous subsection, the effect of \verb|\RotTate| lasts, when localized, in a certain group. So when you typeset hiragana or kanji, use it like this:

\begin{SourceCode}{Input}{TeX}
  % In vertical mode
  \parbox<t>{5\zw}{%
    {\RotTate[0]\kakko{あ}\kakko{い}\kakko{う}}\par
    \kakko{1}\kakko{1}\kakko{3}
  }
\end{SourceCode}

\begin{OutPut}{Output}
  \parbox<t>{5\zw}{%
    {\RotTate[0]\kakko{あ}\kakko{い}\kakko{う}}\par
    \kakko{1}\kakko{1}\kakko{3}
  }
\end{OutPut}

\section{The seihou series}
The commands introduced below are used in exactly the same way as the maru series.
In most cases, \verb|\seihou{argument}| will meet your demands. However, only when you take lowercase alphabet in these commands, you must use star-command just like \verb|\seihou*{m}|.

\bigskip{%
\centering
\captionof{table}{seihou series}
\begin{tabular}{|c|c|c|c|c|}
\hline
argument & \texttt{\textbackslash seihou} & \texttt{\textbackslash kuroseihou} & \texttt{\textbackslash seimaru} & \texttt{\textbackslash kuroseimaru} \\
\hline
1       & \seihou{1}        & \kuroseihou{1}      & \seimaru{1}       & \kuroseimaru{1}  \\
97      & \seihou{97}       & \kuroseihou{97}     & \seimaru{97}      & \kuroseimaru{97} \\
だ      & \seihou{だ}       & \kuroseihou{だ}     & \seimaru{だ}      & \kuroseimaru{だ} \\
ばばば  & \seihou{ばばば}   & \kuroseihou{ばばば} & \seimaru{ばばば}  & \kuroseimaru{ばばば} \\
m       & \seihou*{m}       & \kuroseihou*{m}     & \seimaru*{m}      & \kuroseimaru*{m} \\
Qjg     & \seihou{Qjg}      & \kuroseihou{Qjg}    & \seimaru{Qjg}     & \kuroseimaru{Qjg} \\
\hline
\end{tabular}
}\bigskip

{%
\centering
\captionof{table}{hishi series}
\begin{tabular}{|c|c|c|c|c|}
\hline
argument & \texttt{\textbackslash hishi} & \texttt{\textbackslash kurohishi} & \texttt{\textbackslash maruhishi} & \texttt{\textbackslash kuromaruhishi} \\
\hline
1     & \hishi{1}     & \kurohishi{1}     & \maruhishi{1}     & \kuromaruhishi{1} \\
97    & \hishi{97}    & \kurohishi{97}    & \maruhishi{97}    & \kuromaruhishi{97} \\
だ    & \hishi{だ}    & \kurohishi{だ}    & \maruhishi{だ}    & \kuromaruhishi{だ} \\
ばばば & \hishi{ばばば} & \kurohishi{ばばば} & \maruhishi{ばばば} & \kuromaruhishi{ばばば} \\
m & \hishi*{m} & \kurohishi*{m} & \maruhishi*{m} & \kuromaruhishi*{m} \\
Qjg & \hishi{Qjg} & \kurohishi{Qjg} & \maruhishi{Qjg} & \kuromaruhishi{Qjg} \\
\hline
\end{tabular}
}\bigskip


\begin{SourceCode}{Input}{TeX}[Mind the star option!]
  % Normal Characters
  \seihou{A}\seihou{あ}\seihou{QED.}

  % Lowercase Alphabetic Characters
  \seihou*{a}\seihou*{j}\seihou*{z}
\end{SourceCode}

\begin{OutPut}{Output}
  % Normal Characters
  \seihou{A}\seihou{あ}\seihou{QED.}

  % Lowercase Alphabetic Characters
  \seihou*{a}\seihou*{j}\seihou*{z}
\end{OutPut}


\section{The kakko series}
The commands introduced below are used in exactly the same way as the maru series.

In most cases, \verb|\kakko{argument}| will meet your demands. However, only when you take lowercase alphabet in these commands, you must use star-command just like \verb|\kakko*{m}|.

\bigskip{%
\centering
\captionof{table}{kakko series\maru{1}}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
argument & \texttt{\textbackslash kakko} & \texttt{\textbackslash sumikakko} & \texttt{\textbackslash kakukakko} & \texttt{\textbackslash kikakko} & \texttt{\textbackslash ykakko} \\
\hline
1     & \kakko{1}     & \sumikakko{1}     & \kakukakko{1}     & \kikakko{1}     & \ykakko{1} \\
97    & \kakko{97}    & \sumikakko{97}    & \kakukakko{97}    & \kikakko{97}    & \ykakko{97} \\
だ    & \kakko{だ}    & \sumikakko{だ}    & \kakukakko{だ}    & \kikakko{だ}    & \ykakko{だ} \\
ばばば & \kakko{ばばば} & \sumikakko{ばばば} & \kakukakko{ばばば} & \kikakko{ばばば} & \ykakko{ばばば} \\
m & \kakko*{m} & \sumikakko*{m} & \kakukakko*{m} & \kikakko*{m} & \ykakko*{m} \\
Qjg & \kakko{Qjg} & \sumikakko{Qjg} & \kakukakko{Qjg} & \kikakko{Qjg} & \ykakko{Qjg} \\
\hline
\end{tabular}
}

\bigskip{%
\centering
\captionof{table}{kakko series\maru{2}}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
argument & \texttt{\textbackslash nykakko} & \texttt{\textbackslash namikakko} & \texttt{\textbackslash kagikakko} & \texttt{\textbackslash nkagikakko} & \texttt{\textbackslash period} & \texttt{\textbackslash ichimoji} \\
\hline
1     & \nykakko{1}     & \namikakko{1}     & \kagikakko{1}     & \nkagikakko{1}     & \period{1} & \ichimoji{1} \\
97    & \nykakko{97}    & \namikakko{97}    & \kagikakko{97}    & \nkagikakko{97}    & \period{97} & \ichimoji{97} \\
だ    & \nykakko{だ}    & \namikakko{だ}    & \kagikakko{だ}    & \nkagikakko{だ}    & \period{だ} & \ichimoji{だ} \\
ばばば & \nykakko{ばばば} & \namikakko{ばばば} & \kagikakko{ばばば} & \nkagikakko{ばばば} & \period{ばばば} & \ichimoji{ばばば} \\
m & \nykakko*{m} & \namikakko*{m} & \kagikakko*{m} & \nkagikakko*{m} & \period*{m} & \ichimoji*{m} \\
Qjg & \nykakko{Qjg} & \namikakko{Qjg} & \kagikakko{Qjg} & \nkagikakko{Qjg} & \period{Qjg} & \ichimoji{Qjg} \\
\hline
\end{tabular}
}\bigskip

\begin{SourceCode}{Input}{TeX}[Mind the star option!]
  % Normal Characters
  \kakko{A}\kakko{あ}\kakko{QED.}

  % Lowercase Alphabetic Characters
  \kakko*{a}\kakko*{j}\kakko*{z}
\end{SourceCode}

\begin{OutPut}{Output}
  % Normal Characters
  \kakko{A}\kakko{あ}\kakko{QED.}

  % Lowercase Alphabetic Characters
  \kakko*{a}\kakko*{j}\kakko*{z}
\end{OutPut}

\section{License}

Released under the MIT License.

\section{Version History}

\begin{itemize}
  \item \textbf{v1.0.0 (2025/10/03)} --- Initial public release.
  \item \textbf{v1.0.1--1.0.4} --- Added \verb|\ichimoji|; fixed various bugs.
  \item \textbf{v1.1.0 (2025/10/28)} --- Unified all commands to \textit{zenkaku} (full-width).
  \item \textbf{v1.1.1 (2025/11/10)} --- Refined \verb|\ichimoji| scaling logic.
  \item \textbf{v2.0.0 (2025/12/23)} --- Overhauled scaling to match OTF character quality.
  \item \textbf{v2.0.1 (2026/01/08)} --- Added explanations regarding several important notes. In addition, the manual has been updated to reflect bug fixes introduced in luatexja version 20260107.0.
  \item \textbf{v2.0.2 (2026/01/20)} --- Slightly adjusted internal macro which used in \verb|\kakko| command.
\end{itemize}

\section{Source Code}

\begin{lstlisting}
  \NeedsTeXFormat{LaTeX2e}
  \ProvidesPackage{KKsymbols}[2026/01/20, Version 2.0.2]
  \RequirePackage{luatexja-adjust}
  \RequirePackage{expl3}
  \RequirePackage{calc}
  \RequirePackage{tikz}
  \usetikzlibrary{shapes}

  \DeclareRobustCommand{\maru}{%
    \@ifstar{\maru@new@no}{\maru@new}%
  }

  \DeclareRobustCommand{\kuromaru}{%
    \@ifstar{\kuromaru@new@no}{\kuromaru@new}%
  }

  \DeclareRobustCommand{\nmaru}{%
    \@ifstar{\nmaru@new@no}{\nmaru@new}%
  }

  \DeclareRobustCommand{\jegg}{%
    \@ifstar{\jegg@new@black}{\jegg@new}%
  }

  \DeclareRobustCommand{\seihou}{%
    \@ifstar{\seihou@new@no}{\seihou@new}%
  }

  \DeclareRobustCommand{\kuroseihou}{%
    \@ifstar{\kuroseihou@new@no}{\kuroseihou@new}%
  }

  \DeclareRobustCommand{\seimaru}{%
    \@ifstar{\seimaru@new@no}{\seimaru@new}%
  }

  \DeclareRobustCommand{\kuroseimaru}{%
    \@ifstar{\kuroseimaru@new@no}{\kuroseimaru@new}%
  }

  \DeclareRobustCommand{\hishi}{%
    \@ifstar{\hishi@new@no}{\hishi@new}%
  }

  \DeclareRobustCommand{\kurohishi}{%
    \@ifstar{\kurohishi@new@no}{\kurohishi@new}%
  }

  \DeclareRobustCommand{\maruhishi}{%
    \@ifstar{\kurohishi@new@no}{\kurohishi@new}%
  }

  \DeclareRobustCommand{\kuromaruhishi}{%
    \@ifstar{\kuromaruhishi@new@no}{\kuromaruhishi@new}%
  }

  \DeclareRobustCommand{\ichimoji}{%
    \@ifstar{\ichimoji@new@no}{\ichimoji@new}%
  }

  \DeclareRobustCommand{\kakko@y@internal}[1]{\kakko@byouga@internal{（}{）}{#1}}
  \DeclareRobustCommand{\kakko@y@internal@no}[1]{\kakko@byouga@internal@no{（}{）}{#1}}
  \DeclareRobustCommand{\kakko@t@internal}[1]{\kakko@byouga@internal@tate{（}{）}{#1}}
  \DeclareRobustCommand{\kakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{（}{）}{#1}}
  \DeclareRobustCommand{\kakko}{%
    \@ifstar{\kakko@star}{\kakko@nostar}% 
  }
  \newcommand{\kakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kakko@t@internal@no{#1}%
    \else
      \kakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\kakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kakko@t@internal{#1}%
    \else
      \kakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\sumikakko@y@internal}[1]{\kakko@byouga@internal{【}{】}{#1}}
  \DeclareRobustCommand{\sumikakko@y@internal@no}[1]{\kakko@byouga@internal@no{【}{】}{#1}}
  \DeclareRobustCommand{\sumikakko@t@internal}[1]{\kakko@byouga@internal@tate{【}{】}{#1}}
  \DeclareRobustCommand{\sumikakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{【}{】}{#1}}
  \DeclareRobustCommand{\sumikakko}{%
    \@ifstar{\sumikakko@star}{\sumikakko@nostar}% 
  }
  \newcommand{\sumikakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \sumikakko@t@internal@no{#1}%
    \else
      \sumikakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\sumikakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \sumikakko@t@internal{#1}%
    \else
      \sumikakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\kakukakko@y@internal}[1]{\kakko@byouga@internal{［}{］}{#1}}
  \DeclareRobustCommand{\kakukakko@y@internal@no}[1]{\kakko@byouga@internal@no{［}{］}{#1}}
  \DeclareRobustCommand{\kakukakko@t@internal}[1]{\kakko@byouga@internal@tate{［}{］}{#1}}
  \DeclareRobustCommand{\kakukakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{［}{］}{#1}}
  \DeclareRobustCommand{\kakukakko}{%
    \@ifstar{\kakukakko@star}{\kakukakko@nostar}% 
  }
  \newcommand{\kakukakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kakukakko@t@internal@no{#1}%
    \else
      \kakukakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\kakukakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kakukakko@t@internal{#1}%
    \else
      \kakukakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\kikakko@y@internal}[1]{\kakko@byouga@internal{〔}{〕}{#1}}
  \DeclareRobustCommand{\kikakko@y@internal@no}[1]{\kakko@byouga@internal@no{〔}{〕}{#1}}
  \DeclareRobustCommand{\kikakko@t@internal}[1]{\kakko@byouga@internal@tate{〔}{〕}{#1}}
  \DeclareRobustCommand{\kikakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{〔}{〕}{#1}}
  \DeclareRobustCommand{\kikakko}{%
    \@ifstar{\kikakko@star}{\kikakko@nostar}% 
  }
  \newcommand{\kikakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kikakko@t@internal@no{#1}%
    \else
      \kikakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\kikakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kikakko@t@internal{#1}%
    \else
      \kikakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\ykakko@y@internal}[1]{\kakko@byouga@internal{〈}{〉}{#1}}
  \DeclareRobustCommand{\ykakko@y@internal@no}[1]{\kakko@byouga@internal@no{〈}{〉}{#1}}
  \DeclareRobustCommand{\ykakko@t@internal}[1]{\kakko@byouga@internal@tate{〈}{〉}{#1}}
  \DeclareRobustCommand{\ykakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{〈}{〉}{#1}}
  \DeclareRobustCommand{\ykakko}{%
    \@ifstar{\ykakko@star}{\ykakko@nostar}% 
  }
  \newcommand{\ykakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \ykakko@t@internal@no{#1}%
    \else
      \ykakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\ykakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \ykakko@t@internal{#1}%
    \else
      \ykakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\nykakko@y@internal}[1]{\kakko@byouga@internal{《}{》}{#1}}
  \DeclareRobustCommand{\nykakko@y@internal@no}[1]{\kakko@byouga@internal@no{《}{》}{#1}}
  \DeclareRobustCommand{\nykakko@t@internal}[1]{\kakko@byouga@internal@tate{《}{》}{#1}}
  \DeclareRobustCommand{\nykakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{《}{》}{#1}}
  \DeclareRobustCommand{\nykakko}{%
    \@ifstar{\nykakko@star}{\nykakko@nostar}% 
  }
  \newcommand{\nykakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \nykakko@t@internal@no{#1}%
    \else
      \nykakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\nykakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \nykakko@t@internal{#1}%
    \else
      \nykakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\namikakko@y@internal}[1]{\kakko@byouga@internal{｛}{｝}{#1}}
  \DeclareRobustCommand{\namikakko@y@internal@no}[1]{\kakko@byouga@internal@no{｛}{｝}{#1}}
  \DeclareRobustCommand{\namikakko@t@internal}[1]{\kakko@byouga@internal@tate{｛}{｝}{#1}}
  \DeclareRobustCommand{\namikakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{｛}{｝}{#1}}
  \DeclareRobustCommand{\namikakko}{%
    \@ifstar{\namikakko@star}{\namikakko@nostar}% 
  }
  \newcommand{\namikakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \namikakko@t@internal@no{#1}%
    \else
      \namikakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\namikakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \namikakko@t@internal{#1}%
    \else
      \namikakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\kagikakko@y@internal}[1]{\kakko@byouga@internal{「}{」}{#1}}
  \DeclareRobustCommand{\kagikakko@y@internal@no}[1]{\kakko@byouga@internal@no{「}{」}{#1}}
  \DeclareRobustCommand{\kagikakko@t@internal}[1]{\kakko@byouga@internal@tate{「}{」}{#1}}
  \DeclareRobustCommand{\kagikakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{「}{」}{#1}}
  \DeclareRobustCommand{\kagikakko}{%
    \@ifstar{\kagikakko@star}{\kagikakko@nostar}% 
  }
  \newcommand{\kagikakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kagikakko@t@internal@no{#1}%
    \else
      \kagikakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\kagikakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \kagikakko@t@internal{#1}%
    \else
      \kagikakko@y@internal{#1}%
    \fi
  }

  \DeclareRobustCommand{\nkagikakko@y@internal}[1]{\kakko@byouga@internal{『}{』}{#1}}
  \DeclareRobustCommand{\nkagikakko@y@internal@no}[1]{\kakko@byouga@internal@no{『}{』}{#1}}
  \DeclareRobustCommand{\nkagikakko@t@internal}[1]{\kakko@byouga@internal@tate{『}{』}{#1}}
  \DeclareRobustCommand{\nkagikakko@t@internal@no}[1]{\kakko@byouga@internal@tate@no{『}{』}{#1}}
  \DeclareRobustCommand{\nkagikakko}{%
    \@ifstar{\nkagikakko@star}{\nkagikakko@nostar}% 
  }
  \newcommand{\nkagikakko@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \nkagikakko@t@internal@no{#1}%
    \else
      \nkagikakko@y@internal@no{#1}%
    \fi
  }
  \newcommand{\nkagikakko@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \nkagikakko@t@internal{#1}%
    \else
      \nkagikakko@y@internal{#1}%
    \fi
  }


  \DeclareRobustCommand{\period@y@internal}[1]{\kakko@byouga@internal{\relax}{.}{#1}}
  \DeclareRobustCommand{\period@y@internal@no}[1]{\kakko@byouga@internal@no{\relax}{.}{#1}}
  \DeclareRobustCommand{\period@t@internal}[1]{\kakko@byouga@internal@tate{\relax}{.}{#1}}
  \DeclareRobustCommand{\period@t@internal@no}[1]{\kakko@byouga@internal@tate@no{\relax}{.}{#1}}
  \DeclareRobustCommand{\period}{%
    \@ifstar{\period@star}{\period@nostar}% 
  }
  \newcommand{\period@star}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \period@t@internal@no{#1}%
    \else
      \period@y@internal@no{#1}%
    \fi
  }
  \newcommand{\period@nostar}[1]{%
    \ifnum\ltjgetparameter{direction}=3\relax
      \period@t@internal{#1}%
    \else
      \period@y@internal{#1}%
    \fi
  }


  % 全体で使用
  \NewDocumentCommand{\shukushou@adj@new}{ m m m }{%
    \ifdim #1 < #2%
      \resizebox*{\width}{#2}{#3}%
    \else%
      \resizebox*{#2}{#2}{#3}%
    \fi%
  }
  \NewDocumentCommand{\shukushou@adj@new@no}{ m m m }{%
    \ifdim #1 < #2%
      #3%
    \else%
      \resizebox*{!}{#2}{#3}%
    \fi%
  }
  \NewDocumentCommand{\RotYoko}{O{0}}{%
    \def\KKsymbolsRot@val@y{#1}%
  }
  \NewDocumentCommand{\RotTate}{O{90}}{%
    \def\KKsymbolsRot@val@t{#1}%
  }
  \def\KKsymbolsRot@val@t{90}
  \def\KKsymbolsRot@val@y{0}
  \NewDocumentCommand{\rot@or@not@kksym}{}{%
    \ifnum\ltjgetparameter{direction}=3
      \def\rot@kksym@tateyoko{\KKsymbolsRot@val@t}%
    \else
      \def\rot@kksym@tateyoko{\KKsymbolsRot@val@y}%
    \fi
  }
  %%%


  % \maru
  \NewDocumentCommand{\vertical@adj@maru@new}{}{%
    \ifnum\ltjgetparameter{direction}=3
      -.5\zw%
    \else
      -.12\zw%
    \fi
  }
  \newlength{\maru@boxwidth@new}
  \newlength{\maru@boxwidth@inner}
  \newlength{\maru@var@yokohaba}
  \newlength{\maru@var@yokohaba@cal}
  \newlength{\maru@var@tate}
  \newlength{\maru@var@fuka}
  \newlength{\maru@var@zenkou}

  \NewDocumentCommand{\shukushou@adj@new@no@maru}{ m m m m }{%
    \ifdim #1 < #2%
      \ifdim #3 > #2%
        \resizebox*{#3}{!}{#4}%
      \else%
        \scalebox{.9}{#4}%
      \fi%
    \else%
      \resizebox*{!}{#2}{#4}%
    \fi%
  }

  \DeclareRobustCommand{\maru@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          line width=.04\maru@boxwidth@new,  
          minimum size=.9\maru@boxwidth@new, 
          draw,
          inner sep=.02\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\maru@var@yokohaba}{\maru@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\maru@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \settoheight{\maru@var@tate}{#1}%
    \settodepth{\maru@var@fuka}{#1}%
    \pgfmathsetlength{\maru@var@zenkou}{\maru@var@tate + \maru@var@fuka}%
    \pgfmathsetlength{\maru@var@yokohaba@cal}{0.85 * \maru@var@yokohaba}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          line width=.04\maru@boxwidth@new,  
          minimum size=.9\maru@boxwidth@new, 
          draw,
          inner sep=.02\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@maru{\maru@var@zenkou}{\maru@boxwidth@inner}{\maru@var@yokohaba@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\kuromaru@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          fill=black,%%%
          line width=.04\maru@boxwidth@new,  
          minimum size=.9\maru@boxwidth@new, 
          draw,
          inner sep=.02\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\maru@var@yokohaba}{\maru@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kuromaru@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \settoheight{\maru@var@tate}{#1}%
    \settodepth{\maru@var@fuka}{#1}%
    \pgfmathsetlength{\maru@var@zenkou}{\maru@var@tate + \maru@var@fuka}%
    \pgfmathsetlength{\maru@var@yokohaba@cal}{0.85 * \maru@var@yokohaba}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          fill=black,%%%
          line width=.04\maru@boxwidth@new,  
          minimum size=.9\maru@boxwidth@new, 
          draw,
          inner sep=.02\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@maru{\maru@var@zenkou}{\maru@boxwidth@inner}{\maru@var@yokohaba@cal}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\nmaru@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.85 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          line width=.03\maru@boxwidth@new,  
          minimum size=.88\maru@boxwidth@new, 
          draw, double, double distance=.03\zw,%%%
          inner sep=.06\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko,
          scale=.87
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\maru@var@yokohaba}{\maru@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\nmaru@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \settoheight{\maru@var@tate}{#1}%
    \settodepth{\maru@var@fuka}{#1}%
    \pgfmathsetlength{\maru@var@zenkou}{\maru@var@tate + \maru@var@fuka}%
    \pgfmathsetlength{\maru@var@yokohaba@cal}{0.85 * \maru@var@yokohaba}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.82 * \maru@boxwidth@new / sqrt(2)}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=circle,
          line width=.03\maru@boxwidth@new,  
          minimum size=.88\maru@boxwidth@new, 
          draw, double, double distance=.03\zw,%%%
          inner sep=.06\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko,
          scale=.9
        ] (char){%
        \vbox to \maru@boxwidth@inner{%
          \vss%
          \hbox to \maru@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@maru{\maru@var@zenkou}{\maru@boxwidth@inner}{\maru@var@yokohaba@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \newlength{\jegg@boxwidth@inner@cal}%%%
  \DeclareRobustCommand{\jegg@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \pgfmathsetlength{\jegg@boxwidth@inner@cal}{0.77 * \maru@boxwidth@inner}%%%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=ellipse,
          line width=.04\maru@boxwidth@new,  
          minimum height=.9\maru@boxwidth@new, 
          minimum width=.7\maru@boxwidth@new, 
          draw,
          inner sep=0\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \jegg@boxwidth@inner@cal{%
          \hss%
            \shukushou@adj@new{\maru@var@yokohaba}{\jegg@boxwidth@inner@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\jegg@new@black}[1]{%
    \rot@or@not@kksym%
    \setlength{\maru@boxwidth@new}{\zw}%
    \settowidth{\maru@var@yokohaba}{#1}%
    \pgfmathsetlength{\maru@boxwidth@inner}{0.87 * \maru@boxwidth@new / sqrt(2)}%
    \pgfmathsetlength{\jegg@boxwidth@inner@cal}{0.77 * \maru@boxwidth@inner}%%%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \maru@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \maru@boxwidth@new{%
    \vss%
    \hbox to \maru@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          shape=ellipse,
          line width=.04\maru@boxwidth@new,  
          minimum height=.9\maru@boxwidth@new, 
          minimum width=.7\maru@boxwidth@new, 
          draw,
          fill=black!70,
          inner sep=0\maru@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \maru@boxwidth@inner{
          \vss%
          \hbox to \jegg@boxwidth@inner@cal{%
          \hss%
            \shukushou@adj@new{\maru@var@yokohaba}{\jegg@boxwidth@inner@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  %%%


  % \seihou
  \NewDocumentCommand{\vertical@adj@seihou@new}{}{%
    \ifnum\ltjgetparameter{direction}=3
      -.5\zw%
    \else
      -.12\zw%
    \fi
  }
  \newlength{\seihou@boxwidth@new}
  \newlength{\seihou@boxwidth@inner}
  \newlength{\seihou@var@yokohaba@cal}
  \newlength{\seihou@var@yokohaba}
  \newlength{\seihou@var@tate}
  \newlength{\seihou@var@fuka}
  \newlength{\seihou@var@zenkou}

  \NewDocumentCommand{\shukushou@adj@new@no@seihou}{ m m m m }{%
    \ifdim #1 < #2%
      \ifdim #3 > #2%
        \resizebox*{#3}{!}{#4}%
      \else%
        \scalebox{.9}{#4}%
      \fi%
    \else%
      \resizebox*{!}{#2}{#4}%
    \fi%
  }

  \DeclareRobustCommand{\seihou@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\seihou@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{\seihou@var@tate + \seihou@var@fuka}%
    \pgfmathsetlength{\seihou@var@yokohaba@cal}{0.85 * \seihou@var@yokohaba}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@seihou{\seihou@var@zenkou}{\seihou@boxwidth@inner}{\seihou@var@yokohaba@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\kuroseihou@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kuroseihou@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{\seihou@var@tate + \seihou@var@fuka}%
    \pgfmathsetlength{\seihou@var@yokohaba@cal}{0.85 * \seihou@var@yokohaba}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@seihou{\seihou@var@zenkou}{\seihou@boxwidth@inner}{\seihou@var@yokohaba@cal}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\seimaru@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          rounded corners=.13\zw,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\seimaru@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{\seihou@var@tate + \seihou@var@fuka}%
    \pgfmathsetlength{\seihou@var@yokohaba@cal}{0.85 * \seihou@var@yokohaba}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          rounded corners=.13\zw,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@seihou{\seihou@var@zenkou}{\seihou@boxwidth@inner}{\seihou@var@yokohaba@cal}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\kuroseimaru@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          rounded corners=.13\zw,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kuroseimaru@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{\seihou@var@tate + \seihou@var@fuka}%
    \pgfmathsetlength{\seihou@var@yokohaba@cal}{0.85 * \seihou@var@yokohaba}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.68 * \seihou@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.85\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          rounded corners=.13\zw,%%%
          inner sep=.1\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new@no@seihou{\seihou@var@zenkou}{\seihou@boxwidth@inner}{\seihou@var@yokohaba@cal}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\hishi@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\hishi@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{(\seihou@var@tate + \seihou@var@fuka)*99}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            % これだけ他のやつと違うので注意！
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\maruhishi@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          rounded corners=.06\zw,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\maruhishi@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{(\seihou@var@tate + \seihou@var@fuka)*99}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          rounded corners=.06\zw,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            % これだけ他のやつと違うので注意！
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{#1}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\kurohishi@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kurohishi@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{(\seihou@var@tate + \seihou@var@fuka)*99}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            % これだけ他のやつと違うので注意！
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }


  \DeclareRobustCommand{\kuromaruhishi@new}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          rounded corners=.06\zw,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{%
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kuromaruhishi@new@no}[1]{%
    \rot@or@not@kksym%
    \setlength{\seihou@boxwidth@new}{\zw}%
    \settowidth{\seihou@var@yokohaba}{#1}%
    \settoheight{\seihou@var@tate}{#1}%
    \settodepth{\seihou@var@fuka}{#1}%
    \pgfmathsetlength{\seihou@var@zenkou}{(\seihou@var@tate + \seihou@var@fuka)*99}%
    \pgfmathsetlength{\seihou@boxwidth@inner}{0.85 * \seihou@boxwidth@new / 2}%
    \leavevmode%
    \ltjghostbeforejachar%
    \hbox to \seihou@boxwidth@new{%
    \raisebox{\vertical@adj@maru@new}{%
    \vbox to \seihou@boxwidth@new{%
    \vss%
    \hbox to \seihou@boxwidth@new{%
      \hss%
      \tikz[baseline=(char.base)]{%
        \node[
          line width=.04\seihou@boxwidth@new,  
          minimum size=.5\seihou@boxwidth@new, 
          draw,
          fill=black,%%%
          rounded corners=.06\zw,%%%
          shape=diamond,
          inner sep=.03\seihou@boxwidth@new,
          rotate=\rot@kksym@tateyoko
        ] (char){%
        \vbox to \seihou@boxwidth@inner{
          \vss%
          \hbox to \seihou@boxwidth@inner{%
          \hss%
            % これだけ他のやつと違うので注意！
            \shukushou@adj@new{\seihou@var@yokohaba}{\seihou@boxwidth@inner}{%
              \textcolor{white}{#1}}%
          \hss%
          }%
          \vss%
        }%
        };
      }%
      \hss%
    }%
    \vss%
    }%
    }%
    }%
    \ltjghostafterjachar%
  }
  %%%


  % \kakko
  \newlength{\kakko@boxwidth@new}
  \newlength{\kakko@boxwidth@inner}
  \newlength{\kakko@var@yokohaba}
  \newlength{\kakko@var@yokohaba@cal}
  \newlength{\kakko@var@tate}
  \newlength{\kakko@var@fuka}
  \newlength{\kakko@var@zenkou}

  \NewDocumentCommand{\shukushou@adj@new@no@kakko}{ m m m m }{%
    \ifdim #1 < #2%
      \ifdim #3 > #2%
        \resizebox*{#3}{!}{#4}%
      \else%
        \scalebox{.9}{#4}%
      \fi%
    \else%
      \resizebox*{!}{#2}{#4}%
    \fi%
  }

  \DeclareRobustCommand{\kakko@byouga@internal}[3]{% 横の方
    \rot@or@not@kksym%
    \setlength{\kakko@boxwidth@new}{\zw}%
    \settowidth{\kakko@var@yokohaba}{#3}%
    \pgfmathsetlength{\kakko@boxwidth@inner}{0.8 * \kakko@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
      \hbox to \zw{\hss%
        \scalebox{.63}[1]{#1}\hspace*{-.1\zw}%
        \raisebox{-.03\zw}{%
          \vbox to \kakko@boxwidth@inner{%
            \vss%
            \hbox to \kakko@boxwidth@inner{%
            \hss%
              \rotatebox[origin=c]{\rot@kksym@tateyoko}{%
                \shukushou@adj@new{\kakko@var@yokohaba}{\kakko@boxwidth@inner}{#3}}%
            \hss%
            }%
            \vss%
          }%
        }%
        \hspace*{-.1\zw}\scalebox{.63}[1]{#2}%
      \hss}%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kakko@byouga@internal@no}[3]{% 横の方
    \rot@or@not@kksym%
    \setlength{\kakko@boxwidth@new}{\zw}%
    \settowidth{\kakko@var@yokohaba}{#3}%
    \settoheight{\kakko@var@tate}{#3}%
    \settodepth{\kakko@var@fuka}{#3}%
    \pgfmathsetlength{\kakko@var@zenkou}{\kakko@var@tate + \kakko@var@fuka}%
    \pgfmathsetlength{\kakko@var@yokohaba@cal}{0.9 * \kakko@var@yokohaba}%
    \pgfmathsetlength{\kakko@boxwidth@inner}{0.8 * \kakko@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
      \hbox to \zw{\hss%
        \scalebox{.63}[1]{#1}\hspace*{-.1\zw}%
        \raisebox{-.03\zw}{%
          \vbox to \kakko@boxwidth@inner{%
            \vss%
            \hbox to \kakko@boxwidth@inner{%
            \hss%
              \rotatebox[origin=c]{\rot@kksym@tateyoko}{%
                \shukushou@adj@new@no@kakko{\kakko@var@zenkou}{\kakko@boxwidth@inner}{\kakko@var@yokohaba@cal}{#3}}%
            \hss%
            }%
            \vss%
          }%
        }%
        \hspace*{-.1\zw}\scalebox{.63}[1]{#2}%
      \hss}%
    \ltjghostafterjachar%
  }

  \DeclareRobustCommand{\kakko@byouga@internal@tate}[3]{% 縦の方
    \rot@or@not@kksym%
    \ifnum\ltjgetparameter{direction}=3\pgfmathsetmacro{\rot@kksym@tateyoko}{\rot@kksym@tateyoko - 90}\fi%
    \setlength{\kakko@boxwidth@new}{\zw}%
    \settowidth{\kakko@var@yokohaba}{#3}%
    \pgfmathsetlength{\kakko@boxwidth@inner}{0.8 * \kakko@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
      \raisebox{-.5\zw}{%
      \rotatebox[origin=c]{90}{%
      \hbox to \zw{\hss%
      \vbox to \zw{\vss%
        \hbox to \zw{\hss%
        \scalebox{.63}[1]{#1}\hspace*{-.1\zw}%
          \vbox to \kakko@boxwidth@inner{%
          \vss%
          \hbox to \kakko@boxwidth@inner{%
          \hss%
            \raisebox{-1.2\zw}{%
              \rotatebox[origin=c]{\rot@kksym@tateyoko}{%
                \shukushou@adj@new{\kakko@var@yokohaba}{\kakko@boxwidth@inner}{#3}%
              }%
            }%
          \hss%
          }%
          \vss%
        }%
        \hspace*{-.1\zw}\scalebox{.63}[1]{#2}\vspace*{.3\zw}%
      \hss}%
      \vss}%
      \hss}%
      }%
      }%
    \ltjghostafterjachar%
  }
  \DeclareRobustCommand{\kakko@byouga@internal@tate@no}[3]{% 縦の方
    \rot@or@not@kksym%
    \ifnum\ltjgetparameter{direction}=3\pgfmathsetmacro{\rot@kksym@tateyoko}{\rot@kksym@tateyoko - 90}\fi%
    \setlength{\kakko@boxwidth@new}{\zw}%
    \settowidth{\kakko@var@yokohaba}{#3}%
    \settoheight{\kakko@var@tate}{#3}%
    \settodepth{\kakko@var@fuka}{#3}%
    \pgfmathsetlength{\kakko@var@zenkou}{\kakko@var@tate + \kakko@var@fuka}%
    \pgfmathsetlength{\kakko@var@yokohaba@cal}{0.9 * \kakko@var@yokohaba}%
    \pgfmathsetlength{\kakko@boxwidth@inner}{0.8 * \kakko@boxwidth@new}%
    \leavevmode%
    \ltjghostbeforejachar%
      \raisebox{-.5\zw}{%
      \rotatebox[origin=c]{90}{%
      \hbox to \zw{\hss%
      \vbox to \zw{\vss%
        \hbox to \zw{\hss%
        \scalebox{.63}[1]{#1}\hspace*{-.1\zw}%
          \vbox to \kakko@boxwidth@inner{%
          \vss%
          \hbox to \kakko@boxwidth@inner{%
          \hss%
            \raisebox{-1.6\zw}{%
              \vbox to \kakko@boxwidth@inner{%
              \vss%
              \hbox to \kakko@boxwidth@inner{%
              \hss%
              \rotatebox[origin=c]{\rot@kksym@tateyoko}{%
                \shukushou@adj@new@no@kakko{\kakko@var@zenkou}{\kakko@boxwidth@inner}{\kakko@var@yokohaba@cal}{#3}%
              }\hss}\vss}%
            }%
          \hss%
          }%
          \vss%
        }%
        \hspace*{-.1\zw}\scalebox{.63}[1]{#2}\vspace*{.3\zw}%
      \hss}%
      \vss}%
      \hss}%
      }%
      }%
    \ltjghostafterjachar%
  }
  %%%


  % \ichimoji
  \newlength{\ichimoji@yk@new}
  \newlength{\ichimoji@ht@new}
  \newlength{\ichimoji@dp@new}
  \newlength{\ichimoji@zenkou@new}
  \DeclareRobustCommand{\ichimoji@scaling}[1]{%
    \ifdim\ichimoji@yk@new > \zw%
      \pgfmathsetmacro{\ratio@ichimoji@yk}{\strip@pt\zw/\strip@pt\ichimoji@yk@new}%
      \scalebox{\ratio@ichimoji@yk}[1]{#1}%
    \else%
      #1%
    \fi%
  }
  \DeclareRobustCommand{\ichimoji@new}[1]{%
    \ifnum\ltjgetparameter{direction}=3%
      \leavevmode%
      \ltjghostbeforejachar%
      \raisebox{-.5\zw}{\hbox to \zw {\hss%
      \vbox to \zw {\vss%
        \hbox to \zw {\hss%
          \resizebox*{\zw}{\zw}{#1}%
        \hss}%
      \vss}\hss}}%
      \ltjghostafterjachar%
    \else%
      \leavevmode%
      \ltjghostbeforejachar%
      \raisebox{-.12\zw}{\hbox to \zw {\hss%
      \vbox to \zw {\vss%
        \hbox to \zw {\hss%
          \resizebox*{\zw}{\zw}{#1}%
        \hss}%
      \vss}\hss}}%
      \ltjghostafterjachar%
    \fi%
  }
  \DeclareRobustCommand{\ichimoji@new@no}[1]{%
    \settowidth{\ichimoji@yk@new}{#1}%
    \settoheight{\ichimoji@ht@new}{#1}%
    \settodepth{\ichimoji@dp@new}{#1}%
    \pgfmathsetlength{\ichimoji@zenkou@new}{\ichimoji@ht@new + \ichimoji@dp@new}%
    \ifnum\ltjgetparameter{direction}=3%
      \leavevmode%
      \ltjghostbeforejachar%
      \raisebox{-.5\zw}{\hbox to \zw {\hss%
      \vbox to \zw {\vss%
        \hbox to \zw {\hss%
          \ichimoji@scaling{#1}%
        \hss}%
      \vss}\hss}}%
      \ltjghostafterjachar%
    \else%
      \leavevmode%
      \ltjghostbeforejachar%
      \raisebox{-.12\zw}{\hbox to \zw {\hss%
      \vbox to \zw {\vss%
        \hbox to \zw {\hss%
          \ichimoji@scaling{#1}%
        \hss}%
      \vss}\hss}}%
      \ltjghostafterjachar%
    \fi%
  }
  %%%
  \endinput
\end{lstlisting}
\end{document}
