| 1 |
\ProvidesFile{tables.inc}[2002/11/23 Common LaTeX code for character charts] |
| 2 |
|
| 3 |
\documentclass{article} |
| 4 |
\usepackage{geometry} |
| 5 |
\usepackage{ucs} |
| 6 |
\usepackage{colortbl} |
| 7 |
|
| 8 |
\nofiles |
| 9 |
|
| 10 |
\makeatletter |
| 11 |
|
| 12 |
\ifx\TeXXeTstate\undefined\else\TeXXeTstate=1\fi |
| 13 |
|
| 14 |
\def\format@table{table} |
| 15 |
\def\@thirdoffour#1#2#3#4{#3} |
| 16 |
|
| 17 |
\newcommand\combineglyph{o} |
| 18 |
\def\ONE{1} |
| 19 |
|
| 20 |
\newcommand\callcombineglyph[1]{\acombineglyph} |
| 21 |
|
| 22 |
\newcommand\init@table{ |
| 23 |
\count255=\gstart\divide\count255by16\multiply\count255by16\relax |
| 24 |
\ifnum\gstart=\count255\relax\else |
| 25 |
\PackageError{ucs::tables}{I need a multiple of 16 as beginning of |
| 26 |
the range, when format table is used (I got \gstart!=\number\count255)}\fi |
| 27 |
% |
| 28 |
\definecolor{notfound}{rgb}{.7,.7,.7} |
| 29 |
\definecolor{withoption}{rgb}{.9,.9,.9} |
| 30 |
\definecolor{combining}{rgb}{0.9,1,1} |
| 31 |
\definecolor{control}{rgb}{1,1,.9} |
| 32 |
\definecolor{outside}{rgb}{1,0,0} |
| 33 |
\definecolor{notassigned}{rgb}{.5,.5,.5} |
| 34 |
% |
| 35 |
\ifx\blackwhite\undefined |
| 36 |
\newcolumntype{A}{>{\columncolor{notfound}}D} |
| 37 |
\newcolumntype{B}{>{\columncolor{withoption}}D} |
| 38 |
\newcolumntype{C}{>{\columncolor{outside}}D} |
| 39 |
\newcolumntype{D}{>{\hfill}m{1.6em}<{\hfill\null}} |
| 40 |
\newcolumntype{E}{>{\mystrut}c} |
| 41 |
\newcolumntype{F}{>{\columncolor{combining}}D} |
| 42 |
\newcolumntype{G}{>{\columncolor{notassigned}}D} |
| 43 |
\newcolumntype{H}{>{\columncolor{control}}D} |
| 44 |
\else |
| 45 |
\newcolumntype{A}{>{\columncolor{notfound}}D} |
| 46 |
\newcolumntype{B}{D} |
| 47 |
\newcolumntype{C}{>{\columncolor{outside}}D} |
| 48 |
\newcolumntype{D}{>{\hfill}m{1.6em}<{\hfill\null}} |
| 49 |
\newcolumntype{E}{>{\mystrut}c} |
| 50 |
\newcolumntype{F}{D} |
| 51 |
\newcolumntype{G}{>{\columncolor{notassigned}}D} |
| 52 |
\newcolumntype{H}{D} |
| 53 |
\fi |
| 54 |
% |
| 55 |
\def\amper{&} |
| 56 |
\newcommand\mystrut{\rule{0pt}{12pt}} |
| 57 |
\newcommand\tend{% |
| 58 |
\\\hline% |
| 59 |
\end{tabular}% |
| 60 |
\end{document}} |
| 61 |
\newcommand\table@field[1]{% |
| 62 |
% \typeout{<\ahexcode>}% |
| 63 |
\count255=\acode\divide\count255by16\multiply\count255by16\relax |
| 64 |
\advance\count255by-\acode\relax |
| 65 |
\ifnum\count255=0\relax |
| 66 |
\expandafter\\\ahexcodebeforelast0\fi% |
| 67 |
&##1% |
| 68 |
}% |
| 69 |
\newcommand\noglyph{\table@field{\multicolumn{1}{A|}{}}} |
| 70 |
\newcommand\unassigned{\table@field{\multicolumn{1}{G|}{}}} |
| 71 |
\newcommand\withoption{\table@field{\multicolumn{1}{B|}{}}} |
| 72 |
\newcommand\glyph{% |
| 73 |
\edef\muco{\noexpand\multicolumn{1}{% |
| 74 |
\ifx\actrlglyph\undefined |
| 75 |
\ifx\acombining\ONE F\else D\fi |
| 76 |
\else |
| 77 |
H% |
| 78 |
\fi|}}% |
| 79 |
\expandafter\table@field\expandafter{\muco{\dirt% |
| 80 |
\ifx\arightleft\ONE\beginR\fi |
| 81 |
\ifx\afontenc\undefined\else |
| 82 |
\fontencoding{\afontenc}\selectfont\fi |
| 83 |
\ifx\afontfamily\undefined\else |
| 84 |
\fontfamily{\afontfamily}\selectfont\fi |
| 85 |
\ifx\aoption\undefined\else |
| 86 |
\SetUnicodeOption{no\goption}\SetUnicodeOption{\aoption}\fi |
| 87 |
\ifx\atableglyph\undefined |
| 88 |
\atableenvelope{% |
| 89 |
\ifx\acombining\ONE |
| 90 |
\SetUnicodeOption{combine}% |
| 91 |
\ifx\acombinechar\undefined |
| 92 |
\uc@output{\csname callcombineglyph\endcsname}{-1}% |
| 93 |
\else |
| 94 |
\SetUnicodeOption[1000]{\acombineoption}% |
| 95 |
\unichar{\acombinechar}% |
| 96 |
\fi |
| 97 |
\unichar{\acode}% |
| 98 |
\SetUnicodeOption{nocombine}% |
| 99 |
\else |
| 100 |
\unichar{\acode}\fi% |
| 101 |
}% |
| 102 |
\else |
| 103 |
\atableglyph\fi |
| 104 |
\ifx\arightleft\ONE\endR\fi |
| 105 |
% /\SetUnicodeOption{nodefault}\SetUnicodeOption{warnunknown}% |
| 106 |
% \SetUnicodeOption{fasterrors}\SetUnicodeOption{graphics}\unichar{\acode} |
| 107 |
\clearargs |
| 108 |
}}} |
| 109 |
\let\start\table@start |
| 110 |
\clearargs |
| 111 |
} |
| 112 |
|
| 113 |
\newcommand\clearargs{% |
| 114 |
\global\let\afontenc\undefined |
| 115 |
\global\let\afontfamily\undefined |
| 116 |
\global\let\adirty\undefined |
| 117 |
\global\let\acombining\undefined |
| 118 |
\global\let\acode\undefined |
| 119 |
\global\let\aoption\undefined |
| 120 |
\global\let\ahexcode\undefined |
| 121 |
\global\let\acombineglyph\combineglyph |
| 122 |
\global\let\acombinechar\undefined |
| 123 |
\global\def\acombineoption{default}% |
| 124 |
\global\let\atableglyph\undefined |
| 125 |
\global\let\atableenvelope\@iden |
| 126 |
} |
| 127 |
|
| 128 |
\newcommand\dirt{\expandafter\ifx\adirty1% |
| 129 |
\typeout{Dirt!}% |
| 130 |
\SetUnicodeOption[0]{default}% |
| 131 |
\SetUnicodeOption[-20]{mathletters}% |
| 132 |
\SetUnicodeOption[-10]{cjkjis}% |
| 133 |
\fi} |
| 134 |
|
| 135 |
\newcommand\old@glyph{% |
| 136 |
\expandafter\ifx\adirty1 |
| 137 |
\typeout{Dirty \acode\space = 0x\ahexcode}% |
| 138 |
\noglyph% |
| 139 |
\else |
| 140 |
\@glyph |
| 141 |
\fi} |
| 142 |
|
| 143 |
\newcommand\table@start{% |
| 144 |
\begin{tabular}{|E||D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|D|} |
| 145 |
\hline |
| 146 |
\multicolumn{17}{|l|}{Range: U+\ghstart--U+\ghend, option: \goption}\\ |
| 147 |
\hline\hline |
| 148 |
& 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & A & B & C & D & E & F\\ |
| 149 |
\hline |
| 150 |
\let\\\relax |
| 151 |
} |
| 152 |
|
| 153 |
\newcommand\clearoptions{% |
| 154 |
\let\uc@tempa\\ |
| 155 |
\def\\##1{\SetUnicodeOption{no##1}} |
| 156 |
\unicode@knownoptions |
| 157 |
\let\\\uc@tempa} |
| 158 |
|
| 159 |
\newcommand\loadpackages{% |
| 160 |
\ifx\gfontencs\undefined\else |
| 161 |
\expandafter\usepackage\expandafter[\gfontencs]{fontenc}\fi |
| 162 |
\ifx\brailleunit\undefined\else |
| 163 |
\divide\brailleunit2\fi |
| 164 |
} |
| 165 |
|
| 166 |
\newcommand\tstart{ |
| 167 |
\loadpackages |
| 168 |
\begin{document} |
| 169 |
\thispagestyle{empty} |
| 170 |
\clearoptions |
| 171 |
\SetUnicodeOption{\goption} |
| 172 |
\ifx\gformat\format@table |
| 173 |
\init@table |
| 174 |
\else |
| 175 |
\PackageError{ucs::tables}{Unknown format \gformat} |
| 176 |
\fi |
| 177 |
\typeout{Generating table, format: \gformat} |
| 178 |
\table@start |
| 179 |
} |
| 180 |
|
| 181 |
%%% These are for my local definitions... |
| 182 |
\newcommand\coleq{% |
| 183 |
\mathrel{% |
| 184 |
\raise 3.0pt\hbox to0pt{.\hss}% |
| 185 |
\raise 0.85pt\hbox to 0pt{.\hss}% |
| 186 |
\hskip2.8pt\hbox{$=$}}}% |
| 187 |
\newcommand{\qed}{\ensuremath{\rule{.6em}{.6em}}} |
| 188 |
% |
| 189 |
\iffalse |
| 190 |
\newcommand\mathbfit[1]{\hbox{\bf\it #1}} |
| 191 |
\newcommand\mathsfbf[1]{\hbox{\bf\sf #1}} |
| 192 |
\newcommand\mathsfit[1]{\hbox{\it\sf #1}} |
| 193 |
\newcommand\mathsfbfit[1]{\hbox{\bf\sf\it #1}} |
| 194 |
\newcommand\mathbfxxx[3]{\rlap{\m@th$#1{#3}$}\hskip#2% |
| 195 |
\rlap{\m@th$#1{#3}$}\hskip#2% |
| 196 |
\rlap{\m@th$#1{#3}$}\hskip#2% |
| 197 |
#1{#3}} |
| 198 |
\newcommand\mathbfcal[1]{\mathbfxxx\mathcal{.2pt}{#1}} |
| 199 |
\newcommand\mathbfcalsmall[1]{\mathbfxxx\mathcalsmall{.2pt}{#1}} |
| 200 |
\newcommand\mathbffrak[1]{\mathbfxxx\mathfrak{.2pt}{#1}} |
| 201 |
\newcommand\mathcalsmall[1]{{\scriptscriptstyle\expandafter\mathcal\expandafter |
| 202 |
{\uppercase{#1}}}} |
| 203 |
\fi |
| 204 |
% m4_emacs( |
| 205 |
%%% Local Variables: |
| 206 |
%%% mode: latex |
| 207 |
%%% time-stamp-start: "\\\\Provides\\(Package\\|File\\){[^}]*}\\[" |
| 208 |
%%% time-stamp-end: "\\( \\|\\]\\)" |
| 209 |
%%% time-stamp-format: (time-stamp-yyyy/mm/dd) |
| 210 |
%%% time-stamp-active: t |
| 211 |
%%% time-stamp-line-limit: 200 |
| 212 |
%%% TeX-master: "~/prg/latexuni/tables/table-default-2000-20FF.tex" |
| 213 |
%%% End: |
| 214 |
%%% Local IspellDict: british |
| 215 |
% LocalWords: british noexpand |
| 216 |
% ) |