2006-08-18 (금), 14:12 +0900, Changwoo Ryu 쓰시길: > 2006-08-18 (금), 00:45 +0200, Frans Pop 쓰시길: > > - Where does the build/templates/header.ko.tex file come from? Did you > > write it yourself or was it available somewhere? I think we do need > > to know this for copyright reasons. It would probably be good to add > > an explicit copyright comment at the top of the document. > > It was written by Dohyun Kim, the upstream author of latex-hangul-ucs. > He just wrote it when I requested for help building d-i manual PDF, and > later I modified a bit to make it clean. > > I'll ask him for copyright stuffs. Here is the updated patch with copyright comment inserted by Dohyun Kim.
Index: debian/control
===================================================================
--- debian/control (revision 39921)
+++ debian/control (working copy)
@@ -4,7 +4,7 @@
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Uploaders: Joey Hess <joeyh@debian.org>, Frans Pop <fjp@debian.org>
Standards-Version: 3.6.2
-Build-Depends: debhelper (>= 4), docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml-parser-perl, w3m, poxml, jadetex, openjade | openjade1.3, docbook-dsssl, gs-common
+Build-Depends: debhelper (>= 4), docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml-parser-perl, w3m, poxml, jadetex, openjade | openjade1.3, docbook-dsssl, gs-common, latex-hangul-ucs
# This comment can also be used to generate a Build-Depends line, by
# running the debian/genbuilddeps program. So put each build dep on its
# own line, prefixed by " - " and to comment out a build dep, start the
@@ -31,6 +31,8 @@
# Used for producing pdf and ps files.
# - gs-common
# For pdfs.
+# - latex-hangul-ucs
+# For Korean pdf
Package: installation-guide-alpha
Architecture: all
Index: build/buildone.sh
===================================================================
--- build/buildone.sh (revision 39921)
+++ build/buildone.sh (working copy)
@@ -192,6 +192,18 @@
$tempdir/install.${language}.profiled.xml
RET=$?; [ $RET -ne 0 ] && return $RET
+ # some languages need additional macro
+ case "$language" in
+ ko)
+ mv $tempdir/install.${language}.tex \
+ $tempdir/install.${language}.orig.tex
+ cat templates/header.${language}.tex \
+ $tempdir/install.${language}.orig.tex \
+ > $tempdir/install.${language}.tex
+ rm $tempdir/install.${language}.orig.tex
+ ;;
+ esac
+
echo "Info: creating temporary .dvi file..."
# Next we use jadetex to generate a .dvi file
@@ -261,7 +273,7 @@
BUILD_FAIL=""
for format in $formats ; do
case "$language" in
- el|ja|ko|vi|zh_CN|zh_TW)
+ el|ja|vi|zh_CN|zh_TW)
if [ "$format" = "pdf" -o "$format" = "ps" ] ; then
echo "Warning: pdf and ps formats are currently not supported for Chinese, Greek, Japanese, Korean and Vietnamese"
BUILD_SKIP="$BUILD_SKIP $format"
Index: build/templates/header.ko.tex
===================================================================
--- build/templates/header.ko.tex (revision 0)
+++ build/templates/header.ko.tex (revision 0)
@@ -0,0 +1,104 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% hangul typesetting along with jadetex
+%%%
+%%% (C) 2005 Dohyun Kim <nomosnomos@gmail.com>
+%%%
+%%% This program is free software; you can redistribute it and/or modify
+%%% it under the terms of version 2 of the GNU General Public License as
+%%% published by the Free Software Foundation.
+%%%
+%%% This program is distributed in the hope that it will be useful, but
+%%% WITHOUT ANY WARRANTY; without even the implied warranty of
+%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%%% General Public License for more details.
+%%%
+%%% You should have received a copy of the GNU General Public License
+%%% along with this program; if not, write to the Free Software
+%%% Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+%%% USA
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\def\hangulfontnormal{unwmj}
+\def\hangulfontbold{unwmjb}
+\def\hangulfonttitlenormal{unwgt}
+\def\hangulfonttitlebold{unwgtb}
+\def\chaptername{Chapter}
+\let\ucshanguljadetex@character@orig\Character
+\def\Character#1{%
+ \expandafter\ifx\csname!#1\endcsname\relax
+ \hangulunichar{#1}%
+ \else
+ \ucshanguljadetex@character@orig{#1}%
+ \fi}
+\edef\ucshanguljadetex@f@series{\f@series}%
+\def\hangulunichar#1{%
+ \begingroup
+ \edef\temp@f@series{\f@series}%
+ \ifx\temp@f@series\ucshanguljadetex@f@series
+ \ifx\ProcessingMode{book-title-verso-mode}
+ \let\myhangulfont\hangulfonttitlenormal
+ \else
+ \let\myhangulfont\hangulfontnormal
+ \fi
+ \else
+ \ifx\ProcessingMode{book-title-verso-mode}
+ \let\myhangulfont\hangulfonttitlebold
+ \else
+ \let\myhangulfont\hangulfontbold
+ \fi
+ \fi
+ \count2=#1 % \count2 = "AC01
+ \divide\count2 256 % \count2 = "AC
+ \count4\count2 % \count4 = "AC
+ \divide\count2 16 % \count2 = "A ; determined
+ \count255\count2 % \count255 = "A
+ \multiply\count255 16 % \count255 = "A0
+ \advance\count4 -\count255 % \count4 = "C ; determined
+ \edef\mymyfont{\myhangulfont
+ \ifcase\count2 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
+ 8\or 9\or a\or b\or c\or d\or e\or f\fi
+ \ifcase\count4 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
+ 8\or 9\or a\or b\or c\or d\or e\or f\fi}%
+ \font\myfont\mymyfont\space at \f@size pt\relax
+ % calculate hangul char number
+ \count2=#1 % \count2 = "AC01
+ \count255\count2 % \count255 = "AC01
+ \divide\count255 256 % \count255 = "AC
+ \multiply\count255 256 % \count255 = "AC00
+ \advance\count2 -\count255 % \count2 = "1 ; determined
+ \breakbeforehangulchar{#1}% allow linebreak before hangul chars
+ \myfont\char\count2 % print character
+ \hangulspacefactor{#1}% insert hangul spacefactor
+ \endgroup
+ \futurelet\nextglyph\breakbeforeasciioparen% allowbreak before ascii OP (
+}
+% disallow linebreak after OP
+\sfcode`\(=998
+\sfcode`\`=998
+\sfcode`\[=998
+\def\breakbeforehangulchar#1{%
+ \ifnum#1> 13311
+ \ifnum#1< 64255
+ \ifhmode
+ \ifdim\lastskip=0pt
+ \ifnum\spacefactor>998
+ \ifnum\spacefactor=1001
+ \discretionary{}{}{\kern-.085em}%
+ \else
+ \allowbreak
+ \fi\fi\fi\fi\fi\fi
+}
+\def\hangulspacefactor#1{%
+ \ifnum#1>13311
+ \ifnum#1<64255 \spacefactor=1001 \else% hangul, hanja
+ \ifnum#1=65288 \spacefactor=998 \else% (
+ \ifnum#1=65308 \spacefactor=998 \else% <
+ \ifnum#1=65339 \spacefactor=998 \else% [
+ \ifnum#1=65371 \spacefactor=998 % {
+ \fi\fi\fi\fi\fi\else
+ \ifnum#1>12295
+ \ifnum#1<12316 % 〈〉《》「」 etc
+ \ifodd#1 \else \spacefactor=998 \fi% 〈《「『【 etc
+ \fi\fi\fi
+}
+\def\breakbeforeasciioparen{\ifx (\nextglyph\allowbreak\fi}
+\linespread{1.3}
Attachment:
signature.asc
Description: This is a digitally signed message part