summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xecjk/make-tbl-file/main.tex
blob: 0148ee573d3ebb2b86d349ea72d1a2d0042b8e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% -*- coding: utf-8 -*-
%
\documentclass{article}
\begin{document}
\makeatletter
\pagestyle{empty}


\bgroup
\catcode`\%=11
\catcode`\{=11
\catcode`\}=11
\catcode`\(=1
\catcode`\)=2
\catcode`\#=11
\gdef\sharp(#)
\global\def\percent(%)
\global\def\lbrace({)
\global\def\rbrace(})
\egroup

\newwrite\fda
\def\makefile@rubisha{
\immediate\openout\fda=rubisha.tex\relax
\immediate\write\fda{\string\documentclass{article}}
\immediate\write\fda{\string\textwidth 2200pt      }
\immediate\write\fda{\string\textheight 2200pt     }
\immediate\write\fda{\string\begin{document}       }
\immediate\write\fda{\string\makeatletter          }
\immediate\write\fda{\string\pagestyle{empty}      }
\immediate\write\fda{\string\special{pdf: pagesize width 2200 truept height 2200 truept}}
\immediate\write\fda{\string\def\string\prepunct\sharp1\lbrace
      \sharp1\string\rule{0.5pt}{400pt}\string\newpage}
\immediate\write\fda{\string\rule{0.5pt}{400pt}\sharp1\string\newpage}
\immediate\write\fda{\string\@ifnextchar[{\string\xeCJK@gobble@a}{\string\prepunct}\rbrace}
\immediate\write\fda{}
\immediate\write\fda{\string\let\string\postpunct\string\prepunct}
\immediate\write\fda{\string\def\string\xeCJK@gobble@a[]{}                       }
\immediate\write\fda{}
\immediate\write\fda{\string\font\string\1=\ttfontname\space at 2000 pt}
\immediate\write\fda{\string\1}
\immediate\write\fda{\string\input{punct-\CJKlanguage.tex}}
\immediate\write\fda{\string\end{document}}
\immediate\closeout\fda\relax}

\newcount\cnta
\newcount\cntb
\newcount\cntc
\newcount\cntd
\newwrite\fdout

\newcommand{\setCJKlanguagefont}[3][]{
  \def\ttfontname@def{#1}
  \def\CJKlanguage{#2}
  \def\ttfontname{#3}
  \makefile@rubisha
  \immediate\write18{xelatex rubisha.tex}
  \immediate\write18{\ghostscript\space -dBATCH
       -dNOPAUSE -sDEVICE=epswrite -sOutputFile=rubish-\percent 02d.eps   rubisha.pdf}
  \input{eps2tbl.tex}}


\input{fontlist.tex}




\end{document}