Skip to content

Instantly share code, notes, and snippets.

@doraTeX
Created August 3, 2014 09:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doraTeX/d92f09058c794acd1f1b to your computer and use it in GitHub Desktop.
Save doraTeX/d92f09058c794acd1f1b to your computer and use it in GitHub Desktop.
小塚明朝で 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