Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
小塚明朝で Adobe-Japan 1-6 の全グリフを1ページに
\documentclass[uplatex,dvipdfmx]{jsarticle}
\usepackage[papersize={580pt,7410pt},margin=10pt,noheadfoot,dvipdfm]{geometry}
\usepackage{otf}
\usepackage{color}
\usepackage{pgffor}
\pagestyle{empty}
\usepackage{numprint}
\npthousandsep{}
\nplpadding{5}
\AtBeginDvi{\special{pdf:mapline otf-cjmr-h Identity-H KozMinPr6N-Regular.otf}}
\makeatletter
\newif\iftcqgz@ok
\newcommand*{\AJCID}[2][]{%
\begingroup
\kanjifamily{cidj}%
\setbox\z@\hbox{\set@character=#2}%
\ifdim\wd\z@>\z@ \unhbox\z@ \aftergroup\tcqgz@oktrue \fi
\endgroup
\iftcqgz@ok\tcqgz@okfalse\else #1\fi}
\definecolor{cBkGray}{rgb}{.9,.9,.9}
\definecolor{cNaGray}{rgb}{.75,.75,.75}
\setlength{\fboxsep}{0pt}
\newcommand*{\xLH}[1]{%
\par\noindent
{\small\usefont{T1}{txtt}{m}{n}\numprint{\the#1}}\hspace{15pt}}
\newcommand*{\xBH}{\hspace{5pt}}
\newcommand*{\xC}[1]{\makebox[10pt][c]{\colorbox{cBkGray}{\AJCID[\xNA]{#1}}}}
\newcommand*{\xNA}{\textcolor{cNaGray}{\rule[-1.2pt]{10pt}{10pt}}}
\newcount\i
\makeatother
\begin{document}
\foreach \p in {0,...,461}{%
\xLH{\i}%
\foreach \q in {0,...,4}{%
\foreach \r in {0,...,9}{%
\ifnum\i<23058
\xC{\i}%
\global\advance \i by 1
\fi}%
\xBH}}%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment