summaryrefslogtreecommitdiff
path: root/language/korean
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-05 03:03:08 +0000
committerNorbert Preining <norbert@preining.info>2020-02-05 03:03:08 +0000
commit4b795f65d52cde0d136c0175ce20101946378b54 (patch)
tree07b9b0c89193d379ff6971be01a8ca1e3e6931ca /language/korean
parentfc358ce7332053945afe16ced2a271556cdccfb7 (diff)
CTAN sync 202002050303
Diffstat (limited to 'language/korean')
-rw-r--r--language/korean/pmhanguljamo/README.md6
-rw-r--r--language/korean/pmhanguljamo/doc/ABOUT_FONTS_TO_COMPILE.md16
-rw-r--r--language/korean/pmhanguljamo/doc/pmhanguljamo-doc.pdfbin115873 -> 134637 bytes
-rw-r--r--language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex291
-rw-r--r--language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdfbin508007 -> 531457 bytes
-rw-r--r--language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.tex311
-rw-r--r--language/korean/pmhanguljamo/tex/pmhanguljamo-rrk.tex510
-rw-r--r--language/korean/pmhanguljamo/tex/pmhanguljamo.sty (renamed from language/korean/pmhanguljamo/pmhanguljamo.sty)35
8 files changed, 1030 insertions, 139 deletions
diff --git a/language/korean/pmhanguljamo/README.md b/language/korean/pmhanguljamo/README.md
index 061bcbcf04..4864d6a5d8 100644
--- a/language/korean/pmhanguljamo/README.md
+++ b/language/korean/pmhanguljamo/README.md
@@ -2,9 +2,11 @@
## About
-This LaTeX package provides Hangul *transliteration* input method, which enables to typeset Korean Letters (Hangul) with the help of proper fonts. The name is from “Poor- man’s Hangul Jamo Input Method.”
+This LaTeX package provides Hangul *transliteration* input method, which allows to typeset Korean Letters (Hangul) with the help of proper fonts. The name is from “Poor man’s Hangul Jamo Input Method.”
-It is mainly for the people who have a system without Korean IM, but want to typeset Hangul in their document. Not only modern Hangul, but so-colled “Old Hangul” characters that uses the lost letters such as ‘Arae-A’, ‘Yet Ieung’ or ‘Pan-Sios’ etc. can also be typeset.
+It is mainly for the people who have a system without Korean IM, but want to typeset Hangul in their document. Not only modern Hangul, but so-colled “Old Hangul” characters that uses the lost letters can also be typeset.
+
+In version 0.3, it provides two kinds of transliteration rules. The default one is this package's unique method. The other is a more familiar *Korean Romanization Rule*. With the latter only Modern Hangul can be typeset.
XeLaTeX recommended. And the legacy pdfTeX is not supported.
diff --git a/language/korean/pmhanguljamo/doc/ABOUT_FONTS_TO_COMPILE.md b/language/korean/pmhanguljamo/doc/ABOUT_FONTS_TO_COMPILE.md
deleted file mode 100644
index 836bdf7dbc..0000000000
--- a/language/korean/pmhanguljamo/doc/ABOUT_FONTS_TO_COMPILE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Many fonts
-
-To compile this document successfully, the following fonts must be installed:
-
- * Noto Serif CJK (kr), Noto Sans CJK (kr) and Noto Sans Mono CJK (kr)
- * HCR LVT
- * Nanum Myeongjo Yet Hangeul, and Nanum Barun Gothic Yet Hangeul
- * KoPubWorld Batang and KoPubWorld Gothic
- * Malgun Gothic
- * Jeonju Wanpanbon Che
- * Jeju Fonts
- * Adobe Myungjo Std Medium
-
-# XeLaTeX
-
-run `xelatex` on the source file. \ No newline at end of file
diff --git a/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.pdf b/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.pdf
index b306c193e4..ebba34566e 100644
--- a/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.pdf
+++ b/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.pdf
Binary files differ
diff --git a/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex b/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex
index 83063ab4b3..2410460662 100644
--- a/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex
+++ b/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex
@@ -1,8 +1,3 @@
-%!TEX program = xelatex
-%
-% pmhanguljamo-doc.tex
-%. written by Kangsoo Kim, 2020.
-%
\documentclass[a4paper]{article}
\usepackage{fontspec}
%\setmainfont{Noto Serif}
@@ -35,7 +30,7 @@
\title{Poorman's Hangul Jamo Input Method \\ \Large \texttt{pmhanguljamo.sty} }
\author{Kangsoo Kim}
-\date{20 Jan 2020\quad version 0.2.1}
+\date{30 Jan 2020\quad version 0.3.1}
\maketitle
@@ -47,8 +42,8 @@ This \LaTeX\ package provides Hangul\footnote{%
to write the Korean language. In both South and North Korea,
the standard writing system uses Hangul.}
\emph{transliteration} input method, which
-enables to typeset Korean Letters (Hangul) with the help of proper fonts.
-The name is from ``Poorman's Hangul Jamo Input Method.'' It is mainly for
+allows to typeset Korean Letters (Hangul) with the help of proper fonts.
+The name comes from ``Poorman's Hangul Jamo Input Method.'' It is mainly for
the people who have a system without Korean IM, but want to typeset
Hangul in their document.
Not only modern Hangul, but so-colled ``Old Hangul'' characters
@@ -69,6 +64,14 @@ Put the following line in your preamble:
\usepackage{pmhanguljamo}
\end{verbatim}
+The option \texttt{[RRK]} or \texttt{[rrk]}
+can be fed, in which case the \emph{Standard Korean Romanization Transliteration}
+input method is activated. In section~\ref{sec:rrk},
+we will explain about it.
+Without option, the default input method of this package is used, that
+is explained in sections~\ref{sec:rule}--\ref{sec:exam}.
+They are incompatible with each other.
+
\subsection{Commands and Environment Provided}
The main command to typeset Hangul is \verb|\jamoword|.
@@ -92,7 +95,7 @@ jug/nvn nar/gga/ji ha/nvr/vr u/re/re \\
han jem bu/ggv/rem ebs/gi/rvr
ip/sai/ei i/nvn ba/ram/ei/do \\
-na/nvn goi/ro/oa/haiss/da/.
+na/nvn goi/ro/ue/haiss/da/.
\end{jamotext}
\end{verbatim}
The result will be like this:
@@ -103,7 +106,7 @@ jug/nvn nar/gga/ji ha/nvr/vr u/re/re \\
han jem bu/ggv/rem ebs/gi/rvr
ip/sai/ei i/nvn ba/ram/ei/do \\
-na/nvn goi/ro/oa/haiss/da/.
+na/nvn goi/ro/ue/haiss/da/.
\end{jamotext}
\end{korean}
\end{quote}
@@ -167,11 +170,11 @@ Or the ko.\TeX\ package bundle can be used together.
In any case, the option \verb|[Script=Hangul]| should be given
to the font settings for Hangul. For more information, see section~\ref{sec:font}.
-The Korean writing system does not have hyphenation rule.
-The line breaking can arise at the end of mostly every character. Therefore,
+The Korean writing system does not have hyphenation rules.
+The line breaking can occur just after almost every syllable. Therefore,
without Korean language supporting packages the line breaking and
-justification of paragraphs will not be acceptable.
-But when just single or a few Hangul characters are needed, for example in the case of typesetting
+justification of paragraphs will not be satisfactory.
+However when just single or a few Hangul characters are needed, for example in the case of typesetting
the author's name in Hangul, this package provides a casual way to print them out.
@@ -225,12 +228,13 @@ used in the leading and trailing position of a syllable.
\begin{enumerate}
\item The corresponding letters ``g, n, d, m, b, s, j, k, t, p, h'' are
the same as Korean Romanization Method (RRK).\footnote{The \emph{Revised Romanization of Korean} 1995:2000 is the official Korean language romanization system in South Korea.}
-\item The letter for `\textkorean{\jmcc{R}}' is allocated to \texttt{r} not \texttt{l}.
+\item The letter for `\textkorean{\jmcc{R}}' is allocated to \texttt{r} not \texttt{l}. The latter is reserved for another purpose, cf. item \ref{itm:llr}.
\item The letter `c' is for `\textkorean{\jmcc{C}}'. In the RRK, it is `\texttt{ch}' there.
\item Note that the letter for `\textkorean{\jmcc{X}}' is \texttt{x}, which is a bit strange, but commonly accepted `\texttt{ng}' was not to be chosen. It should be reserved for `\textkorean{\jamoword{@ng/}}'
\item And the letters `q, z, f' are more freely selected. These letters are the lost ones in Modern Korean.
\item The letter `w' is chosen to present \emph{Choseong Filler}.
-\item The letters `l' and `lr' are for very rare case. In the 15th century Korean, `\textkorean{\jamoword{sla}}' and
+\item\label{itm:llr} The letters `l' and `lr' are
+prepared for very rare case. In the 15th century Korean, `\textkorean{\jamoword{sla}}' and
`\textkorean{\jamoword{slra}}' were distinguishable. `sl' is chosen for the SIOS with left branch being longer, and `slr' means right branch longer. The same is the case `ssl', `sslr', `jl', `jlr' etc.
\item The `light labial consonants', \textkorean{\jmcc{BX}, \jmcc{PX}} in the Old Hangul can be input as `bx, px, bbx, mx'.
\item In the Modern Korean, only `gg, dd, bb, ss, jj' are additionally permitted in the leading consonant position,
@@ -312,7 +316,11 @@ They can be downloaded from the url and used freely. And note that
\end{description}
To use one of these fonts, do not forget to provide
-the \texttt{[Script=Hangul]} option. For example, you can specify
+the \texttt{[Script=Hangul]} option.\footnote{%
+ If the document is processed with \LuaLaTeX, \texttt{[Script=Hangul,Renderer=Harfbuzz]} is recommended.
+ The \LuaLaTeX\ version should be over 1.11, that is,
+ the \LaTeX\ format of LuaHB\TeX\ is needed.}
+For example, you can specify
Hamchorom Batang LVT font as:
\begin{verbatim}
\newfontfamily\pmjamofont{HCR Batang LVT}[Script=Hangul]
@@ -331,7 +339,7 @@ message at the console and log file,
However, when \XeLaTeX\ is concerned, it is known that the \emph{Modern} Korean Characters (\emph{Hangul Precomposed Syllables} in the Unicode block [U+AC00] -- [U+D7A3]) can be rendered with this kind of font, in spite of the warning message.
-\section{Examples}
+\section{Examples}\label{sec:exam}
Now, we will show a few practical examples, where
the \emph{korean} environment of \pkg{polyglossia} package is used.
@@ -344,41 +352,87 @@ The preamble is like this:
\newfontfamily\hangulfont{UnBatang.ttf}[Script=Hangul]
\end{verbatim}
-\subsection{Modern Hangul}
+\subsection{Modern Hangul}\label{sec:exammodern}
+
+%\begin{verbatim}
+%\begin{korean}
+%\begin{jamotext}
+%e/rin/i/nvn na/ra/oa gye/rey/vi ap/nar/vr i/e/na/gar
+%sai/sa/ram/i/mv/ro gv/dvr/vi mom/goa ma/vm/vr gui/hi
+%ye/gye orh/go a/rvm/dab/go ssig/ssig/ha/gey ja/ra/do/rog
+%him/sse/ya han/da/.
+%\end{jamotext}
+%\end{korean}
+%
+%\begin{enumerate}
+%\item \textkorean{\jamoword{e/rin/i/nvn in/gan/v/ro/se
+%jon/jux/ha/ye/ya ha/mye sa/hoi/vi han sa/ram/v/ro/se
+%or/ba/rv/gey ki/ue/ya han/da/.}}
+%\end{enumerate}
+%\end{verbatim}
+%
+%\begin{quotation}
+%\begin{korean}
+%\begin{jamotext}
+%e/rin/i/nvn na/ra/oa gye/rey/vi ap/nar/vr i/e/na/gar
+%sai/sa/ram/i/mv/ro gv/dvr/vi mom/goa ma/vm/vr gui/hi
+%ye/gye orh/go a/rvm/dab/go ssig/ssig/ha/gey ja/ra/do/rog
+%him/sse/ya han/da/.
+%\end{jamotext}
+%\end{korean}
+%
+%\begin{enumerate}
+%\item \textkorean{\jamoword{e/rin/i/nvn in/gan/v/ro/se
+%jon/jux/ha/ye/ya ha/mye sa/hoi/vi han sa/ram/v/ro/se
+%or/ba/rv/gey ki/ue/ya han/da/.}}
+%\end{enumerate}
+%\end{quotation}
\begin{verbatim}
+\begin{verse}
\begin{korean}
\begin{jamotext}
-e/rin/i/nvn na/ra/oa gye/rey/vi ap/nar/vr i/e/na/gar
-sai/sa/ram/i/mv/ro gv/dvr/vi mom/goa ma/vm/vr gui/hi
-ye/gye orh/go a/rvm/dab/go ssig/ssig/ha/gey ja/ra/do/rog
-him/sse/ya han/da/.
+na bo/gi/ga yeg/gye/ue \\
+ga/sir ddai/ei/nvn \\
+mar ebs/i go/i bo/nai dv/ri/u/ri/da/.
+
+yex/byen/ei yag/san \\
+jin/dar/rai ggoc \\
+a/rvm dda/da ga/sir gir/ei bbu/ri/u/ri/da/.
+
+ga/si/nvn ger/vm ger/vm \\
+noh/in gv ggoc/vr \\
+sa/bbun/hi jv/rye/barb/go ga/si/ob/so/se
+
+na bo/gi/ga yeg/gye/ue \\
+ga/sir ddai/ei/nvn \\
+jug/e/do a/ni nun/mur hvr/ri/u/ri/da/.
\end{jamotext}
\end{korean}
-
-\begin{enumerate}
-\item \textkorean{\jamoword{e/rin/i/nvn in/gan/v/ro/se
-jon/jux/ha/ye/ya ha/mye sa/hoi/vi han sa/ram/v/ro/se
-or/ba/rv/gey ki/ue/ya han/da/.}}
-\end{enumerate}
+\end{verse}
\end{verbatim}
-\begin{quotation}
+\begin{verse}
\begin{korean}
\begin{jamotext}
-e/rin/i/nvn na/ra/oa gye/rey/vi ap/nar/vr i/e/na/gar
-sai/sa/ram/i/mv/ro gv/dvr/vi mom/goa ma/vm/vr gui/hi
-ye/gye orh/go a/rvm/dab/go ssig/ssig/ha/gey ja/ra/do/rog
-him/sse/ya han/da/.
+na bo/gi/ga yeg/gye/ue \\
+ga/sir ddai/ei/nvn \\
+mar ebs/i go/i bo/nai dv/ri/u/ri/da/.
+
+yex/byen/ei yag/san \\
+jin/dar/rai ggoc \\
+a/rvm dda/da ga/sir gir/ei bbu/ri/u/ri/da/.
+
+ga/si/nvn ger/vm ger/vm \\
+noh/in gv ggoc/vr \\
+sa/bbun/hi jv/rye/barb/go ga/si/ob/so/se
+
+na bo/gi/ga yeg/gye/ue \\
+ga/sir ddai/ei/nvn \\
+jug/e/do a/ni nun/mur hvr/ri/u/ri/da/.
\end{jamotext}
\end{korean}
-
-\begin{enumerate}
-\item \textkorean{\jamoword{e/rin/i/nvn in/gan/v/ro/se
-jon/jux/ha/ye/ya ha/mye sa/hoi/vi han sa/ram/v/ro/se
-or/ba/rv/gey ki/ue/ya han/da/.}}
-\end{enumerate}
-\end{quotation}
+\end{verse}
\subsection{pre-1933 Hangul}
@@ -436,15 +490,166 @@ e/nv na/ri i do/ra/gar h@i/o/.
\end{korean}
\end{verse}
+\let\jamoword\relax
+\let\jamotext\relax
+\let\endjamotext\relax
+\ExplSyntaxOn
+\input pmhanguljamo-rrk.tex
+\ExplSyntaxOff
+
+
+\section{The RRK input method} \label{sec:rrk}
+
+In chapter 3 section 8 of \emph{Revised Romanization of Korean} (2000),
+the `transliteration method' of Hangul romanization is declared.
+It is exceptionally permitted when it is required to restore
+the original Hangul writings, while the phonetic transcription method
+is standard.
+So we can make use of it as an input method.
+
+If the package option \texttt{[RRK]} or \texttt{[rrk]} is given,
+the RRK method is activated. In this case, only `Modern Hangul' can
+be available.
+
+\subsection{Transliteration Rule of RRK}
+
+Table~\ref{tab:rrkcons} and \ref{tab:rrkvow} show the
+RRK transliteration rule.
+
+\begin{table}[h]
+\centering
+\caption{RRK Consonants} \label{tab:rrkcons}
+\fontspec{UnDotum.ttf}
+\begin{tabular}{ll|ll|ll|ll|ll|ll}
+\hline
+ㄱ & g & ㄲ & kk & ㅋ & k & ㄷ & d & ㄸ & tt & ㅌ & t \\
+ㅂ & b & ㅃ & pp & ㅍ & p & ㅈ & j & ㅉ & jj & ㅊ & ch \\
+ㅅ & s & ㅆ & ss & ㅎ & h & & & & & & \\ \hline
+ㄴ & n & ㅁ & m & ㅇ & ng & ㄹ & l & & & & \\ \hline
+\end{tabular}
+\end{table}
+
+\begin{table}[h]
+\centering
+\caption{RRK Vowels} \label{tab:rrkvow}
+\fontspec{UnDotum.ttf}
+\begin{tabular}{ll|ll|ll|ll|ll||ll}
+\hline
+ㅏ & a & ㅓ & eo & ㅗ & o & ㅜ & u & ㅡ & eu & ㅣ & i\\
+ㅐ & ae & ㅔ & e & ㅚ & oe & ㅟ & wi & & & & \\ \hline
+ㅑ & ya & ㅕ & yeo & ㅛ & yo & ㅠ & yu & ㅒ & yae & ㅖ & ye \\
+ㅘ & wa & ㅙ & wae & ㅝ & wo & ㅞ & we & ㅢ & ui & & \\ \hline
+ \end{tabular}
+ \end{table}
+
+\begin{enumerate}
+\item When the leading consonant `{\fontspec{UnBatang}\jmcc{X}}' is placed
+at the head of a word, it can be ommitted. Otherwise the hyphen character (\verb|-|) should be put. For example, \\
+\verb|\jamoword{annyeonghase-yo}| \textkorean{\jamoword{annyeonghase-yo}} \\
+\verb|\jamoword{jung-ang jungang}| \textkorean{\jamoword{jung-ang jungang}} \\
+\verb|\jamoword{ha-yeossseubnida}| \textkorean{\jamoword{ha-yeossseubnida}}
+
+\item The hyphen character \verb|-| can be used to forcibly separate syllables.
+And the special character \verb|/| is taken as another syllable separator.
+They are exchangeable.\\
+\verb|\jamoword{haeb/ssal haeb-ssal}| \textkorean{\jamoword{haeb/ssal haeb-ssal}}
+
+\item The six pucntuation marks, \texttt{.} \texttt{,} \texttt{!} \texttt{?} \texttt{;} \texttt{:} can be located in the Hangul scope.
+The others are not allowed.\\
+\verb|\jamoword{a! malg-eun haneul, si-wonhan baram.}| \\
+\textkorean{\jamoword{a! malg-eun haneul, si-wonhan baram.}}\\
+The \LaTeX\ quotes, \verb|``|, \verb|''|, \verb|`| and \verb|'| cannot be used
+within Hangul input scope. They should be located outside.
+However you can use unicode quotes, \verb|“| and \verb|”|, which can be input
+with syllable separator. For example, \\
+\verb|\jamoword{“/hangeul/”/ilan hangug-eoleul jeogneun geul-ida.}|\\
+\textkorean{\jamoword{“/hangeul/”/ilan hangug-eoleul jeogneun geul-ida.}}\\
+In this case, the syllable separator \verb|/| cannot be replaced by hyphen character.
+
+\item The leading consonant `\textkorean{\jmcc{R}}' is written with
+either \texttt{l} or \texttt{r}, while the trailing one should be \texttt{l}.\\
+\verb|\jamoword{noraereul nolaeleul}| \textkorean{\jamoword{noraereul nolaeleul}}
+
+\item We made it possible to use `Arae-A' with the RRK method.
+Though it is not present in Modern Hangul writing system, typesetting
+`Jeju language' or some pre-1933 Korean texts will be made easy with this.
+The `Arae-A' is to be input as `\texttt{@}' character, and the `Double Arae-A' `\texttt{@@}'. There is one exception. The one word with one letter that
+has only leading `@', i.e., \textkorean{\jamoword{x@}} should be input by `\verb|x@|'.
+If the syllable has trailing consonants or is part of a word, just \verb|@| is
+good. \\
+\verb|\jamoword{h@ngeul @@nam-eun}| \textkorean{\jamoword{h@ngeul @@nam-eun}}.
+
+\end{enumerate}
+
+\subsection{Examples of RRK method}
+
+The text is one of the most famous poem in Korean, \textkorean{\jamoword{jindallaekkoch}} \emph{Azalea} by Kim So-wol.\footnote{%
+ An English translation of this poem can be read in Wikipedia,
+ \url{https://en.wikipedia.org/wiki/Kim_Sowol}.}
+In section~\ref{sec:exammodern}, we showed default way of inputting
+the poem. The \textit{korean} environment and font settings are
+the same as in section~\ref{sec:exam}.
+
+\begin{verbatim}
+\begin{verse}
+\begin{korean}
+\begin{jamotext}
+na bogiga yeoggyeo-wo \\
+gasil ttae-eneun \\
+mal eobs-i go-i bonae deuli-ulida.
+
+yeongbyeon-e yagsan \\
+jindallae kkoch \\
+aleum ttada gasil gil-e ppuli-ulida.
+
+gasineun geol-eum geol-eum \\
+noh-in geu kkoch-eul \\
+sappunhi jeulyeobalbgo gasi-obsoseo
+
+na bogiga yeoggyeo-wo \\
+gasil ttae-eneun \\
+jug-eodo ani nunmul heulli-ulida.
+\end{jamotext}
+\end{korean}
+\end{verse}
+\end{verbatim}
+
+\begin{verse}
+\begin{korean}
+\begin{jamotext}
+na bogiga yeoggyeo-wo \\
+gasil ttae-eneun \\
+mal eobs-i go-i bonae deuli-ulida.
+
+yeongbyeon-e yagsan \\
+jindallae kkoch \\
+aleum ttada gasil gil-e ppuli-ulida.
+
+gasineun geol-eum geol-eum \\
+noh-in geu kkoch-eul \\
+sappunhi jeulyeobalbgo gasi-obsoseo
+
+na bogiga yeoggyeo-wo \\
+gasil ttae-eneun \\
+jug-eodo ani nunmul heulli-ulida.
+\end{jamotext}
+\end{korean}
+\end{verse}
+
+\section{Further Information}
+
+
For more examples and information about this package,
-please read the documentation \texttt{pmhanguljamo-kdoc.pdf}
+please read the documentation
+\href{http://mirrors.ctan.org/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf}{\texttt{pmhanguljamo-kdoc.pdf}}
(in Korean).
+
\section{Acknowledgement}
Thanks go to yihoze at the KTUG board, there he commented,
``The IMs I've tried such as Korean Windows Old Hangul IM or Saenaru IM
-were all somewhat inconvenient. \ldots.
+were all somewhat inconvenient. \ldots\
In my opinion, for the foreign scholar who
studies Korean language, especially Middle Age Korean language,
this kind of transliteration method may be much more convenient and
diff --git a/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf b/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf
index 23c3829a8a..667684c6db 100644
--- a/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf
+++ b/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf
Binary files differ
diff --git a/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.tex b/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.tex
index 8646c4d814..6a47752169 100644
--- a/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.tex
+++ b/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.tex
@@ -59,7 +59,9 @@
%\date{2020/07/17\quad v0.1}
%\date{2020/07/18\quad v0.1.1}
%\date{2020/07/19\quad v0.2.0}
-\date{2020/01/20\quad v0.2.1}
+%\date{2020/01/20\quad v0.2.1}
+%\date{2020/01/28\quad v0.3}
+\date{2020/01/30\quad v0.3.1}
\maketitle
@@ -91,13 +93,31 @@ e/nv na/ri i do/ra/gar h@i/o/.
\subsection{패키지 사용 선언}
\begin{boxedverbatim}
-\usepackage{pmhanguljamo}
+\usepackage[<option>]{pmhanguljamo}
\end{boxedverbatim}
-preamble에 위의 문장을 둔다. 패키지의 옵션은 따로 없다.
+preamble에 위의 문장을 둔다. 옵션으로 \verb|rrk| 또는 \verb|RRK| 하나를 쓸 수 있는데
+이 옵션은 ``표준 전자법''으로 현대 한글을 입력하는 방식으로 바뀐다. 이에 대해서는
+\ref{sec:rrk}절을 보라.
+옵션을 주지 않으면 \ref{sec:pmrule}절에서 설명하는 pm 입력 방식을 따른다.
\subsection{명령과 환경}
+\subsubsection{주의사항}
+
+이 패키지의 목적은 한글 자모를 입력하여 한글이 표현되게 하는 것이다.
+그러므로 한글이 입력되고 있는 범위(이하 “인자 범위”라고 부른다) 안에서는
+원칙적으로 다른 어떤 매크로도 올 수 없다. 글자가 먼저 만들어져야 거기에 대해서
+어떤 명령을 수행할 수 있기 때문이다. 예를 들어
+\begin{verbatim}
+ \textbf{\jamoword{<args>}}
+\end{verbatim}
+이것은 원하는 결과를 내지만
+\begin{verbatim}
+ \jamoword{\textbf{<args>}}
+\end{verbatim}
+이렇게 하면 오류가 발생한다.
+
\subsubsection{\texttt{\bs jamoword} 명령}
\begin{boxedverbatim}
@@ -107,6 +127,7 @@ preamble에 위의 문장을 둔다. 패키지의 옵션은 따로 없다.
한글 자모를 알파벳으로 입력하여 출력한다.
하나 또는 둘 이상의 단어가 올 수 있다. (단 하나의 단어만을 처리하는 \cmda{\jamotextcmd}라는 명령이
있기는 하나 내부적으로 사용되는 것이다.)
+\verb|\par|를 포함하는 문단은 올 수 없다.
\medskip
@@ -123,6 +144,8 @@ preamble에 위의 문장을 둔다. 패키지의 옵션은 따로 없다.
\end{boxedverbatim}
\env{jamotext} 환경은 여러 문단을 포함하는 긴 문장을 식자할 수 있다.
+단 이 환경 안에 오는 모든 텍스트는 문장부호와 몇 가지 예외적인 것 이외에
+인자를 취하는 매크로를 포함하지 않고 순수한 한글로만 되어 있어야 한다.
\medskip
\begin{exampleside}
@@ -142,13 +165,21 @@ mun/jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
음절이 아니라 한 개의 자모만을 표시할 목적으로 \href{https://en.wikipedia.org/wiki/Hangul_Compatibility_Jamo}{한글 호환 자모}를 식자하려 할 때 사용하는 명령이다.
호환 자모를 \cmda{\jamoword} 명령의 인자 안에서 쓰는 방법은 \ref{sec:compjamo}절을 보라. 이 명령은 본문
중에서 독립적으로 쓰기 위해 마련되었다.
-인자로 단 하나의 자모만이 와야 한다.
+인자로 단 하나의 자모만이 와야 한다. 설령 \texttt{RRK} 옵션을 부여하여 RRK 입력 방법을 쓰는 때라도
+이 명령의 인자는 이 패키지의 고유한 전자 규칙을 따른다.
\medskip
\begin{exampleside}
\jmcc{BSG} \jmcc{@} \jmcc{UEY}
\end{exampleside}
+\section{轉字 규칙} \label{sec:pmrule}
+
+이 패키지는 아래에서 설명하는 바 독특한 입력 문자 대응 규칙을 정의하여 쓴다. 이 방법을
+편의상 ‘pm 전자 규칙’이라고 부르기로 한다. 이 방법은 \ref{sec:rrk}절에서 설명할 RRK 입력 규칙과
+다르고 둘 중 하나를 선택하여 써야 한다. 소실된 한글 옛문자를
+완벽하게 식자하려면 pm 입력 방식으로만 가능하다.
+
\subsection{성조표지와 음절}
입력에는 로마자 알파벳과 \verb|@| 부호, 그리고 세 개의 성조표지(방점) 기호 \verb|/|, \verb|;|, \verb|:|를 사용한다.
@@ -277,7 +308,7 @@ mun/jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
\verb|\jamoword{W/n@n; 呑t@n/D/字/jj@x; ga/on;d@is;so/ri; g@;t@;ni/ra;.}| \\
\jamoword{W/n@n; 呑t@n/D/字/jj@x; ga/on;d@is;so/ri; g@;t@;ni/ra;.}
-\subsubsection{한자와 음절 한글}
+\subsubsection{문장 부호, 한자와 음절 한글}
\cmda{\jamoword} 명령과 \env{jamotext} 환경 안에 오는 인자는 다음과 같은 문자에 대하여 예약이 되어 있다.
\begin{itemize}\firmlist
@@ -285,7 +316,8 @@ mun/jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
\item \texttt{;}, \texttt{:}, \texttt{/} --- 이 세 개의 부호는 성조표지, 음절완성을 표시하기 위하여 예약되어 있다.
\item \texttt{|} --- 이 한 개의 부호문자는 내부적으로 사용하도록 예약되어 있다.
\end{itemize}
-이를 제외한 문자는 입력한 대로 찍힌다. 즉 한글 완성형 음절 문자나 한자 및 숫자와 문장부호가 모두 그대로 출력된다.
+이를 제외한 문자는 입력한 대로 찍힌다. 즉 한글 완성형 음절 문자나 한자 및 숫자와 문장부호가 모두 그대로 출력된다. 예: \verb|\jamoword{``/u/ri/na/ra/"}| \jamoword{``/u/ri/na/ra/"}. 모둔 문장 부호는 모두 음절 분리 부호에 의하여 분리되어 있어야 한다는 점에 주의하라.
+
콜론, 세미콜론, 슬래시는 각각 \cmda{\ColonMark}, \cmda{\SemiColonMark}, \cmda{\SlashMark} 명령을 사용할 수 있게 해두었다.
\medskip
@@ -293,9 +325,11 @@ mun/jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
\jamoword{15 세기 표기\ColonMark{} 國之語音, 우리나라의 말이 $\Rightarrow$ na/ras/mar/ss@/mi}
\end{exampleside}
-단일 매크로 자체는 그대로 출력된다. 그러나 인자를 취하는 매크로의 인자로 로마자 알파벳이 들어가는 경우에는
-이 로마자를 자모 한글로 처리하려 하기 때문에 오류가 발생한다. 알파벳 포함 인자를 취하는 매크로는 이 범위 안에
-넣지 않는 것이 좋다.
+매크로를 쓸 수 없는 것이 원칙이기는 하나,
+protect된 단일 매크로는 그대로 출력된다. 그러나 인자를 취하는 매크로는 오류가 발생할 것이므로
+인자 범위 밖에 두도록 하라.
+
+%RRK 입력 방식이 활성화되면 매크로 사용은 더욱 제한된다. \cmda{\ColonMark}와 같은 임시 명령도 동작하지 않는다.
\medskip
@@ -453,12 +487,37 @@ Adobe 명조 \testfont{AdobeMyungjoStd-Medium.otf}
\koTeX\ 문서가 아닐 때는 \pkg{fontspec} 패키지를 이용한다. main font를 위의 글꼴 중의 하나로 하거나(이 때에도 \texttt{[Script=Hangul]} 옵션을 반드시 지정하여야 한다.),
\cmda{\newfontfamily}로 글꼴 명령을 만들어 쓰거나,
아니면 한글이 필요한 부분에만 \cmda{\fontspec}으로 글꼴을 지정해주는 것으로 될 것이다.
-\fref{fig:sample}\는 \pkg{article} 문서의 한 예이다.\footnote{폰트에 부여하는
+%\fref{fig:sample}\는 \pkg{article} 문서의 한 예이다.
+다음은 \pkg{article} 문서의 한 예이다.\footnote{폰트에 부여하는
옵션에 관하여 각주~\ref{fn:fontoption}\을 볼 것.}
+%\begin{figure}
+%\centering
+%\begin{boxedminipage}{\dimexpr\textwidth-2.5cm\relax}
+\begin{boxedverbatim}
+\documentclass{article}
+\usepackage{fontspec}
+\newfontfamily\hngljmfont{HCR Batang LVT}[Script=Hangul]
+\usepackage{pmhanguljamo}
+\newcommand*\jmhangul[1]{%
+ \begingroup
+ \hngljmfont\jamoword{#1}%
+ \endgroup
+}
+
+\begin{document}
+Say `Hello' in Korean,
+\jmhangul{an/nyex/ha/sey/yo}.
+\end{document}
+\end{boxedverbatim}
+%\end{boxedminipage}
+%\caption{article에서 pmhanguljamo을 쓰는 예}\label{fig:sample}
+%\end{figure}
+
\bigskip
-\pkg{polyglossia}와 함께 사용하는 것도 잘 된다.\footnote{\pkg{polyglossia}는 \XeLaTeX 에서만 사용 가능하다.}
+\pkg{polyglossia}와 함께 사용하는 것도 잘 된다.
+%\footnote{\pkg{polyglossia}는 \XeLaTeX 에서만 사용 가능하다.}
다음은 이 경우의 한 설정 방법이다.
(이 보기에서는 한국어를 other language로 설정하고 있는데 만약 main language로 설정한다면
\env{korean} 환경 안이 아니라도 한글 폰트가 적용된다.)
@@ -500,28 +559,166 @@ na/ras/mar/ss@/mi
그러나 위의 처방은 이 환경 안의 모든 로마자가 한글이라는 확신이 있을 때만 적용해야 할 것이다.
\env{korean} 환경 안에서 로마자를 입력해야 할 일이 있을지 모르기 때문이다.
-\begin{figure}
+\subsection{훈민정음 어제 서문}
+
+훈민정음 어제 서문을 입력한 예를 보여두겠다.
+
+\begin{boxedverbatim}
+\begin{jamotext}
+世syeyx;宗joq/御ex;製jyeyx;訓hun;民min/正jyeq;音fvm/
+
+na/ras;mar:ss@/mi; 中dyuq/國guig;ei; dar/a;
+文mun/字jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
+i;ren jyen/c@;ro; e/rin; 百b@ig;姓syeq;i; ni/rv/go;jye; horf; bai;
+i/sye;do; m@/c@m;nai: jey bdv;dvr; si/re; pye/di;
+mod:h@rf no;mi; ha/ni;ra;.
+
+nai; i;r@r; 爲uix;h@;ya; e:yes/bi; ne/gye;
+sai;ro; sv;mvr; ye/dvrb; 字jj@x;r@r; m@iq/g@;no/ni;
+sa:r@m/ma:da; h@i:xxye; su:bxi; ni/gye;
+nar;ro; bsu;mey;
+便bbyen/安fan/kvi; h@/go;jye; h@rf sd@/r@/mi;ni/ra;.
+\end{jamotext}
+\end{boxedverbatim}
+
+\begin{quote}
+\begin{jamotext}
+世syeyx;宗joq/御ex;製jyeyx;訓hun;民min/正jyeq;音fvm/
+
+na/ras;mar:ss@/mi; 中dyuq/國guig;ei; dar/a;
+文mun/字jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
+i;ren jyen/c@;ro; e/rin; 百b@ig;姓syeq;i; ni/rv/go;jye; horf; bai; i/sye;do;
+m@/c@m;nai: jey bdv;dvr; si/re; pye/di; mod:h@rf no;mi; ha/ni;ra;.
+
+nai; i;r@r; 爲uix;h@;ya; e:yes/bi; ne/gye;
+sai;ro; sv;mvr; ye/dvrb; 字jj@x;r@r; m@iq/g@;no/ni;
+sa:r@m/ma:da; h@i:xxye; su:bxi; ni/gye;
+nar;ro; bsu;mey;
+便bbyen/安fan/kvi; h@/go;jye; h@rf sd@/r@/mi;ni/ra;.
+\end{jamotext}
+\end{quote}
+
+
+\section{표준 로마자 표기법 전자법 입력}\label{sec:rrk}
+
+\let\Ajamoword\jamoword
+\let\Ajamotext\jamotext
+\let\endAjamotext\endjamotext
+\let\jamoword\relax
+\let\jamotext\relax
+\let\endjamotext\relax
+\ExplSyntaxOn
+\input {pmhanguljamo-rrk.tex}
+\ExplSyntaxOff
+
+패키지 옵션으로 \verb|[rrk]| 또는 \verb|[RRK]|가 주어지면 입력 규칙이 표준 로마자 표기법 전자법 방식으로
+바뀐다. 전자법(transliteration method, 轉字法)이란 ``국어의 로마자 표기법'' (1998:2000) 제3장 제8항에서
+\begin{quote}
+학술 연구 논문 등 특수 분야에서 한글 복원을 전제로 표기할 경우에는 한글 표기를 대상으로 적는다. 이때 글자 대응은 제2장을 따르되 ‘ㄱ, ㄷ, ㅂ, ㄹ’은 ‘g, d, b, l’로만 적는다. 음가 없는 ‘ㅇ’은 붙임표(-)로 표기하되 어두에서는 생략하는 것을 원칙으로 한다. 기타 분절의 필요가 있을 때에도 붙임표(-)를 쓴다.
+\end{quote}
+라 규정한 방법을 말한다.\footnote{\url{https://www.korean.go.kr/front/page/pageView.do?page_id=P000150&mn_id=99}}
+RRK는 이 문서의 영어 명칭인 \emph{Revised Romanization of Korean}의 첫 글자를 딴 것이다.
+국어의 로마자 표기는 전음법이 원칙이고 전자법은 예외 규정이다. 그러나 한글의 입력 방법으로서 이를 쓰려 하는 한
+전음법은 사용할 수 없다.
+
+전자법 입력은 오직 현대어에만 적용된다. 따라서 옛한글은 이 방법으로 입력할 수 없다. (아래아 입력을 가능하게 한 것은
+아래를 참조.)
+
+\subsection{RRK 전자 규칙}
+
+\begin{table}[h]
\centering
-\begin{boxedminipage}{\dimexpr\textwidth-2.5cm\relax}
-\begin{verbatim}
-\documentclass{article}
-\usepackage{fontspec}
-\newfontfamily\hngljmfont{HCR Batang LVT}[Script=Hangul]
-\usepackage{pmhanguljamo}
-\newcommand*\jmhangul[1]{%
- \begingroup
- \hngljmfont\jamoword{#1}%
- \endgroup
-}
+\begin{tabular}{ll|ll|ll|ll|ll|ll}
+\hline
+\multicolumn{12}{l}{모음} \\ \hline
+ㅏ & a & ㅓ & eo & ㅗ & o & ㅜ & u & ㅡ & eu & ㅣ & i\\
+ㅐ & ae & ㅔ & e & ㅚ & oe & ㅟ & wi & & & & \\ \hline
+ㅑ & ya & ㅕ & yeo & ㅛ & yo & ㅠ & yu & ㅒ & yae & ㅖ & ye \\
+ㅘ & wa & ㅙ & wae & ㅝ & wo & ㅞ & we & ㅢ & ui & & \\ \hline
+ \end{tabular}
+ \end{table}
-\begin{document}
-Say `Hello' in Korean,
-\jmhangul{an/nyex/ha/sey/yo}.
-\end{document}
+\begin{table}[h]
+\centering
+\begin{tabular}{ll|ll|ll|ll|ll|ll}
+\hline
+\multicolumn{12}{l}{자음}\\ \hline
+ㄱ & g & ㄲ & kk & ㅋ & k & ㄷ & d & ㄸ & tt & ㅌ & t \\
+ㅂ & b & ㅃ & pp & ㅍ & p & ㅈ & j & ㅉ & jj & ㅊ & ch \\
+ㅅ & s & ㅆ & ss & ㅎ & h & & & & & & \\
+ㄴ & n & ㅁ & m & ㅇ & ng & ㄹ & l & & & & \\ \hline
+\end{tabular}
+\end{table}
+
+\begin{enumerate}[(1)] \firmlist
+\item 단어의 첫소리 `ㅇ'은 적지 않는다. 그밖의 초성 이응은 \verb|-|로 적는다. \\
+\verb|\jamoword{annyeonghase-yo}|. \jamoword{annyeonghase-yo}.\\
+\verb|\jamoword{na bogiga yeoggyeo-wo gasil ttae-eneun}|
+\jamoword{na bogiga yeoggyeo-wo gasil ttae-eneun}
+
+\item 표준의 규정 대로 \verb|-|는 음절의 분철을 위해서 입력할 수 있다. 한편,
+표준의 규정에는 없지만 음절 구분을 위한 \verb|/|를 사용할 수 있다. 음절 분리자가 쓰인
+경우에는 초성 이응을 생략할 수 있다. \\
+\verb|\jamoword{iss-eoss-seubnida}|. \jamoword{iss-eoss-seubnida}. \\
+\verb|\jamoword{annyeonghase/yo}|. \jamoword{annyeonghase/yo}. \\
+\verb|\jamoword{annyeonghase-yo}|. \jamoword{annyeonghase-yo}.
+
+\item 모음과 모음 사이에 `ㅅ'이 세 개 오는 경우에는 쌍시옷 받침과 초성 시옷으로 분해한다. 만약 어떤 이유에선가 이 분철방법을
+바꾸어야 한다면 \verb|-|나 음절 분리 부호를 쓰도록 하라. 강제 분철이 필요한 경우에도 마찬가지이다.\\
+\verb|\jamoword{haessseubnida}|. \jamoword{haessseubnida}. \\
+\verb|\jamoword{gas/sseun, mal/sseum}|. \jamoword{gas/sseun, mal/sseum}. \\
+\verb|\jamoword{gas-sseun, mal-sseum}|. \jamoword{gas-sseun, mal-sseum}.
+
+\item 문장 부호는 \texttt{.}, \texttt{,}, \texttt{!}, \texttt{?},
+\texttt{;}, \texttt{:} 이 여섯 개에 한하여
+인자 범위 안에서 입력할 수 있다. 다른 것은 오지 못한다. 특히 줄표(\texttt{-})는 인자 범위 안에 넣으면 안 된다.\\
+\verb|\jamoword{swimpyo, machimpyo. a! geulae? olhda.}| \jamoword{swimpyo, machimpyo. a! geulae? olhda.} \\
+따옴표의 경우, \LaTeX\ 따옴표는 인자 범위 밖에 두어야 한다. 그런데 소위 “스마트 따옴표”를 이용하여 유니코드 따옴표를 입력한다면 음절 분리 부호를 이용하여 다음과 같이 할 수 있다. \\
+\verb|\jamoword{“/ulinala/”}| \jamoword{“/ulinala/”} \\
+이 때의 음절 분리 부호는 하이픈 부호로 대치할 수 없다.
+
+\item 현대어만 입력할 수 있는 것이 원칙이지만 이 패키지는 편의를 위해 아래아(와 쌍아래아)를 식자할 수 있게 하였다.
+아래아는 \verb|@|로, 쌍아래아는 \verb|@@|로 적는다. 다른 옛한글 문자는 입력할 수 없다. \\
+\verb|\jamoword{h@ngeul}| \jamoword{h@ngeul}. \\
+\verb|\jamoword{@@nam-eun}| \jamoword{@@nam-eun}. \\
+단 `\jamoword{x@}' 글자만으로 한 단어를 이룰 때 \verb|@| 문자의 성격 때문에 음절이 만들어지지 않을 수 있다. 이럴 때는 \verb|x|를 앞에 붙여 \verb|x@|와 같이 입력한다. 받침이 붙거나 다음 음절이 이어지는 때에는 \verb|x|를 붙일 필요 없다.\\
+\verb|\jamoword{x@ x@@ @n @@n}|. \jamoword{x@ x@@ @n @@n}.\\
+이로써 이 패키지의 RRK 방식
+입력으로도 제주어를 적을 수 있다.
+\item 초성 자리에 (실수로) l 대신 r이 오더라도 `ㄹ'이 적히도록 하였다. \\
+\verb|\jamoword{ri-eul li-eul}|. \jamoword{ri-eul li-eul}.
+\end{enumerate}
+
+\subsection{현대문 RRK 입력 예제}
+
+\begin{boxedverbatim}
+\begin{verse}
+\begin{jamotext}
+nae saranghali siwol-ui gangmul-eul \\
+seog-yang-i jit-eoganeun puleun molaetob \\
+jinan nal gajyeossdeon seulpeun yeojeongdeul-eul, adeughan gidaeleul \\
+ijeneun hollo nam-a ttatteus-i gidalili.
+\end{jamotext}
+\end{verse}
+\end{boxedverbatim}
+
+\begin{verse}
+\begin{jamotext}
+nae saranghali siwol-ui gangmul-eul \\
+seog-yang-i jit-eoganeun puleun molaetob \\
+jinan nal gajyeossdeon seulpeun yeojeongdeul-eul, adeughan gidaeleul \\
+ijeneun hollo nam-a ttatteus-i gidalili.
+\end{jamotext}
+\end{verse}
+
+비교를 위하여 이 패키지의 고유한 pm 입력 방식으로 제시해보면 다음과 같다.
+
+\begin{verbatim}
+nai sa/rax/ha/ri si/uer/vi gax/mur/vr \\
+seg/yax/i jit/e/ga/nvn pu/rvn mo/rai/tob \\
+ji/nan nar ga/jyess/den svr/pvn ye/jex/dvr/vr/, a/dvg/han gi/dai/rvr \\
+i/jey/nvn hor/ro nam/a dda/ddvs/i gi/da/ri/ri/.
\end{verbatim}
-\end{boxedminipage}
-\caption{article에서 pmhanguljamo을 쓰는 예}\label{fig:sample}
-\end{figure}
\section{贅辭}
@@ -532,11 +729,12 @@ Kubuntu 리눅스에서 옛한글이 사용되는 문서를 작성할 일이 있
QT에서 뭔가 이상하게 동작하거나 아예 한글 입력이 안 되거나\ldots\ldots.
\LaTeX\ 문서인데 굳이 입력기가 필요한가 생각이 들어 간단히 로마자 대응 입력(transliteration)으로 한글과 옛한글을
입력하도록 하면 이 문제로 시간낭비하지 않아도 되지 않을까 싶어 시작하게 된 일이었다.
-(그리고 입력기 설치보다 더 많은 시간과 \jamoword{ke/xpi/}--\footnote{이 표기를
+(그리고 입력기 설치보다 더 많은 시간과 \jamotextcmd{ke}\jamotextcmd{xpi}--\footnote{이 표기를
이태준 (1940), \ccnm{文章講話} (경성 종로, 文章社), p.~23에서 보았다. `\jamotextcmd{pxi}'가
아니라 `\jamotextcmd{xpi}'이다. 부록의 \fref{fig:mun} 참조.
인쇄 상태로 미루어보면 `\jamotextcmd{xpi}'자 활자가 있었던 것 같지는 않고 `피'를 식자한 후에 왼편에
-조그마한 고리를 달아 인쇄한 것으로 보인다.}%
+조그마한 고리를 달아 인쇄한 것으로 보인다.
+한편, 정약용의 원본에 지석영이 영어 단어와 음을 붙여 발행했다고 하는 \ccnm{아학편} (1909)에서도 이와 같은 표기법이 쓰이고 있다.}%
를 소비하였다.)
옛한글 입력과 관련하여, Mac OS에서는 구름 입력기가 있더라. 한글 Windows 10은 시스템 자체에
@@ -584,6 +782,10 @@ Expl3는 내가 원하는 일을 너무나 간단하게 구현할 수 있게 해
\textbullet\ v0.2.1 (2020/01/20): \verb|\ColonMark| bug fix. thanks to yihoze.
+\textbullet\ v0.3 (2020/01/28): 표준 로마자 표기법 전자법 입력 추가.
+
+\textbullet\ v0.3.1 (2020/01/30): RRK 입력 방법에서 한글 음절 문자 구성 방법 개선. 일부 문장부호 추가.
+
%%% APPENDICES
\ExplSyntaxOn
\int_new:N \l_appsec_int
@@ -600,7 +802,7 @@ Expl3는 내가 원하는 일을 너무나 간단하게 구현할 수 있게 해
\newpage
\section*{부록 \appsec. 이 문서 컴파일에 필요한 폰트}
-\addcontentsline{toc}{section}{\string\qquad 부록}
+\addcontentsline{toc}{section}{\string\hspace{1.8em}부록}
이 문서의 한글과 한자 부분에 다음과 같은 폰트를 사용하였다.
모두 설치되어 있어야 컴파일할 수 있다.
@@ -639,52 +841,15 @@ Adobe사의 \href{https://source.typekit.com/source-han-serif/kr/}{본명조(Sou
폰트 설정 시에 옵션으로 다음을 부여한다. 아래 \texttt{RawFeature} 부분은 LuaHB\TeX 이
아니면 에러를 토할 것이다.
\begin{verbatim}
-[Script=Hangul,RawFeature={mode=harf}]
+[Script=Hangul,Renderer=Harfbuzz]
\end{verbatim}
+\verb|Harfbuzz| 대신 \verb|Renderer=OpenType|으로 지정할 수 있다.
이 설정은 \pkg{luatexko}와 함께 쓰는 경우든 아니든 필요하다.
\hologo{LuaTeX}에서 이 패키지와 함께 사용할 수 있는 폰트는 \texttt{Script Hangul} 속성을 가진 폰트로
제한된다. 이 속성을 가지지 않은 일반적인 폰트로는 자모 입력으로부터 한글 음절 문자를 얻어낼 수 없는
것으로 보인다. \ref{sec:font}절에서 어떤 폰트가 사용가능한지 확인할 수 있다.
-\section*{부록 \appsec. 예제}
-
-훈민정음 어제 서문을 입력한 예를 보여두겠다.
-
-\begin{boxedverbatim}
-\begin{jamotext}
-世syeyx;宗joq/御ex;製jyeyx;訓hun;民min/正jyeq;音fvm/
-
-na/ras;mar:ss@/mi; 中dyuq/國guig;ei; dar/a;
-文mun/字jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
-i;ren jyen/c@;ro; e/rin; 百b@ig;姓syeq;i; ni/rv/go;jye; horf; bai;
-i/sye;do; m@/c@m;nai: jey bdv;dvr; si/re; pye/di;
-mod:h@rf no;mi; ha/ni;ra;.
-
-nai; i;r@r; 爲uix;h@;ya; e:yes/bi; ne/gye;
-sai;ro; sv;mvr; ye/dvrb; 字jj@x;r@r; m@iq/g@;no/ni;
-sa:r@m/ma:da; h@i:xxye; su:bxi; ni/gye;
-nar;ro; bsu;mey;
-便bbyen/安fan/kvi; h@/go;jye; h@rf sd@/r@/mi;ni/ra;.
-\end{jamotext}
-\end{boxedverbatim}
-
-\begin{quote}
-\begin{jamotext}
-世syeyx;宗joq/御ex;製jyeyx;訓hun;民min/正jyeq;音fvm/
-
-na/ras;mar:ss@/mi; 中dyuq/國guig;ei; dar/a;
-文mun/字jj@x;oa;ro; se/rv s@/m@s/di; a/ni;h@r/ss@i;
-i;ren jyen/c@;ro; e/rin; 百b@ig;姓syeq;i; ni/rv/go;jye; horf; bai; i/sye;do;
-m@/c@m;nai: jey bdv;dvr; si/re; pye/di; mod:h@rf no;mi; ha/ni;ra;.
-
-nai; i;r@r; 爲uix;h@;ya; e:yes/bi; ne/gye;
-sai;ro; sv;mvr; ye/dvrb; 字jj@x;r@r; m@iq/g@;no/ni;
-sa:r@m/ma:da; h@i:xxye; su:bxi; ni/gye;
-nar;ro; bsu;mey;
-便bbyen/安fan/kvi; h@/go;jye; h@rf sd@/r@/mi;ni/ra;.
-\end{jamotext}
-\end{quote}
\section*{부록 \appsec. 유니코드의 한글}
@@ -780,6 +945,8 @@ GSUB/GPOS라는 트루타입 오픈의 속성을 이용하여
뿐이라 별로 언급할 필요를 느끼지 못한다. 다만 공병우 박사가 생전에 이 직결 글꼴의 아이디어로
한글 문자생활을 했다는 이야기가 흥미롭다.
+\newpage
+
\section*{부록 \appsec. \ccnm{문장강화}의 한 페이지}
\begin{figure}[hp]
diff --git a/language/korean/pmhanguljamo/tex/pmhanguljamo-rrk.tex b/language/korean/pmhanguljamo/tex/pmhanguljamo-rrk.tex
new file mode 100644
index 0000000000..603b762520
--- /dev/null
+++ b/language/korean/pmhanguljamo/tex/pmhanguljamo-rrk.tex
@@ -0,0 +1,510 @@
+%
+% subroutine of pmhanguljamo.sty
+%. v0.3.1 (2020/01/30)
+%
+\seq_new:N \l_textjm_seq
+
+\NewDocumentEnvironment { jamotext } { +b }
+{
+ \seq_set_split:Nnn \l_textjm_seq {\par} { #1 }
+ \seq_indexed_map_inline:Nn \l_textjm_seq
+ {
+ \jamoword { ##2 }
+ \int_compare:nT { ##1 < \seq_count:N \l_textjm_seq }
+ {
+ \par
+ }
+ }
+}{}
+
+\tl_new:N \l_tmpz_tl
+
+\NewDocumentCommand \jamoword { m }
+{
+ \seq_set_split:Nnn \l_tmpa_seq { ~ } { #1 }
+ \seq_indexed_map_inline:Nn \l_tmpa_seq
+ {
+ \tl_set:Nn \l_tmpz_tl { ##2 }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { - }
+ {
+ \regex_replace_all:nnN { \- } { \/\- } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { . }
+ {
+ \regex_replace_all:nnN { \. } { \/\. } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { , }
+ {
+ \regex_replace_all:nnN { \, } { \/\, } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { ! }
+ {
+ \regex_replace_all:nnN { \! } { \/\! } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { ? }
+ {
+ \regex_replace_all:nnN { \? } { \/\? } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { : }
+ {
+ \regex_replace_all:nnN { \: } { \/\: } \l_tmpz_tl
+ }
+ \exp_args:No \str_if_in:nnT { \l_tmpz_tl } { ; }
+ {
+ \regex_replace_all:nnN { \; } { \/\; } \l_tmpz_tl
+ }
+
+ \exp_args:No \str_if_in:nnTF { \l_tmpz_tl } { / }
+ {
+ \exp_args:NNno \seq_set_split:Nnn \l_tmpb_seq { / } { \l_tmpz_tl }
+ \seq_map_function:NN \l_tmpb_seq \rrk_fn_outer:n
+ }
+ {
+ \exp_args:No \rrk_a_word:n { \l_tmpz_tl }
+ }
+ \int_compare:nT { \seq_count:N \l_tmpa_seq > ##1 }
+ {
+ \space
+ }
+ }
+}
+
+\cs_new:Npn \rrk_fn_outer:n #1
+{
+ \rrk_a_word:n { #1 }
+}
+
+\cs_new_nopar:Npn \rrk_a_word:n #1
+{
+ \seq_gclear:N \g_outsyl_tl
+
+ \regex_match:nnTF { [a-zA-Z0 ] } { #1 }
+ {
+ \exp_args:NNnx \seq_set_split:Nnn \g_tmpa_seq {} { \str_lowercase:f { #1 } }
+
+ \int_step_inline:nn { 9 }
+ {
+ \seq_put_right:Nn \g_tmpa_seq { 0 }
+ }
+
+ \cho_fn:
+
+ \seq_use:Nn \g_outsyl_tl { }
+ }
+ {
+ #1
+ }
+}
+
+\cs_new:Npn \insert_out:n #1
+{
+ \seq_put_right:Nn \g_outsyl_tl { #1 }
+}
+
+\cs_new:Npn \prepare_three_tk:
+{
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpa_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpb_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpc_tl
+}
+
+\cs_new:Npn \cho_fn:
+{
+ \prepare_three_tk:
+
+ \str_case_e:nn { \l_tmpa_tl }
+ {
+% Zero 자음
+ { @ } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { a } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { e } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { i } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { o } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { u } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { w } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+ { y } { \insert_out:n { ᄋ } \restore_c: \restore_b: \restore_a: }
+
+ { g } { \insert_out:n { ᄀ } \restore_c: \restore_b: }
+ { n } { \insert_out:n { ᄂ } \restore_c: \restore_b: }
+ { d } { \insert_out:n { ᄃ } \restore_c: \restore_b: }
+ { l } { \insert_out:n { ᄅ } \restore_c: \restore_b: }
+ { r } { \insert_out:n { ᄅ } \restore_c: \restore_b: }
+ { m } { \insert_out:n { ᄆ } \restore_c: \restore_b: }
+ { b } { \insert_out:n { ᄇ } \restore_c: \restore_b: }
+ { c } { \insert_out:n { ᄎ } \restore_c: }
+ { h } { \insert_out:n { ᄒ } \restore_c: \restore_b: }
+ { x } { \insert_out:n { ᄋ } \restore_c: \restore_b: }
+
+ { s } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { s }
+ { \insert_out:n { ᄊ } \restore_c: }
+ { \insert_out:n { ᄉ } \restore_c: \restore_b: } }
+ { j } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { j }
+ { \insert_out:n { ᄍ } \restore_c: }
+ { \insert_out:n { ᄌ } \restore_c: \restore_b: } }
+ { k } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { k }
+ { \insert_out:n { ᄁ } \restore_c: }
+ { \insert_out:n { ᄏ } \restore_c: \restore_b: } }
+ { t } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { t }
+ { \insert_out:n { ᄄ } \restore_c: }
+ { \insert_out:n { ᄐ } \restore_c: \restore_b: } }
+ { p } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { p }
+ { \insert_out:n { ᄈ } \restore_c: }
+ { \insert_out:n { ᄑ } \restore_c: \restore_b: } }
+ { - } { \exp_args:Nno \str_if_in:nnTF { aeiouwy@ } { \l_tmpb_tl }
+ { \insert_out:n { ᄋ } \restore_c: \restore_b: }
+ { \insert_out:n { } \restore_c: \restore_b: \cho_fn: }
+ }
+ }
+ \jung_fn:
+}
+
+\cs_new:Npn \jung_fn:
+{
+ \prepare_three_tk:
+
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { 0 }
+ { \scan_stop: }
+ {
+ \str_case_e:nn { \l_tmpa_tl }
+ {
+ { i } { \insert_out:n { ᅵ } \restore_c: \restore_b: }
+ { o } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { e }
+ { \insert_out:n { ᅬ } \restore_c: }
+ { \insert_out:n { ᅩ } \restore_c: \restore_b: } }
+ { u } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { i }
+ { \insert_out:n { ᅴ } \restore_c: }
+ { \insert_out:n { ᅮ } \restore_c: \restore_b: } }
+ { a } { \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { e }
+ { \insert_out:n { ᅢ } \restore_c: }
+ { \insert_out:n { ᅡ } \restore_c: \restore_b: } }
+ { e } { \str_case_e:nnF { \l_tmpb_tl }
+ {
+ { o } { \insert_out:n { ᅥ } \restore_c: }
+ { u } { \insert_out:n { ᅳ } \restore_c: }
+ }
+ { \insert_out:n { ᅦ } \restore_c: \restore_b: }
+ }
+ { @ } { \str_case_e:nnF { \l_tmpb_tl }
+ {
+ { @ } { \insert_out:n { ᆢ } \restore_c: }
+ { i } { \insert_out:n { ᆡ } \restore_c: }
+ }
+ { \insert_out:n { ᆞ } \restore_c: \restore_b: }
+ }
+
+ { y } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { o } { \insert_out:n { ᅭ } \restore_c: }
+ { u } { \insert_out:n { ᅲ } \restore_c: }
+ { a } { \exp_args:No \str_if_eq:nnTF { \l_tmpc_tl } { e }
+ { \insert_out:n { ᅤ } }
+ { \insert_out:n { ᅣ } \restore_c: } }
+ { e } { \exp_args:No \str_if_eq:nnTF { \l_tmpc_tl } { o }
+ { \insert_out:n { ᅧ } }
+ { \insert_out:n { ᅨ } \restore_c: } }
+ }
+ }
+ { w } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { o } { \insert_out:n { ᅯ } \restore_c: }
+ { i } { \insert_out:n { ᅱ } \restore_c: }
+ { e } { \insert_out:n { ᅰ } \restore_c: }
+ { a } { \exp_args:No \str_if_eq:nnTF { \l_tmpc_tl } { e }
+ { \insert_out:n { ᅫ } }
+ { \insert_out:n { ᅪ } \restore_c: } }
+ }
+ }
+ }
+
+ \jong_fn:
+ }
+}
+
+\cs_new:Npn \prepare_five_tk:
+{
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpa_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpb_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpc_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpd_tl
+ \seq_pop_left:NN \g_tmpa_seq \l_tmpe_tl
+}
+
+\cs_new:Npn \jong_fn:
+{
+ \prepare_five_tk:
+
+ \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { 0 }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ }
+ {
+ \exp_args:Nno \str_if_in:nnTF { aeiouwy@ } { \l_tmpb_tl }
+ {
+ \restore_e: \restore_d: \restore_c: \restore_b: \restore_a:
+ \cho_fn:
+ }
+ {
+ \exp_args:Nno \str_if_in:nnTF { aeiouwy@ } { \l_tmpc_tl }
+ {
+ \restore_e: \restore_d: \restore_c: \restore_b: \restore_a:
+ \take_jong_two:
+ }
+ {
+ \exp_args:Nno \str_if_in:nnTF { aeiouwy@ } { \l_tmpd_tl }
+ {
+ \restore_e: \restore_d: \restore_c: \restore_b: \restore_a:
+ \take_jong_three:
+ }
+ {
+ \exp_args:Nno \str_if_in:nnTF { aeiouwy@ } { \l_tmpe_tl }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl }
+% \exp_args:Nx \insert_out:n { \l_tmpc_tl \l_tmpd_tl }
+ \restore_e: \restore_d: \restore_c:
+ \cho_fn:
+ }
+ {
+ \restore_e: \restore_d: \restore_c: \restore_b: \restore_a:
+ \take_jong_four:
+ }
+ }
+ }
+ }
+ }
+}
+
+\cs_new:Npn \take_jong_four:
+{
+ \prepare_five_tk:
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { 0 }
+ { \scan_stop: }
+ {
+ \exp_args:Nx \insert_jong:n { \tl_use:N \l_tmpa_tl \tl_use:N \l_tmpb_tl }
+ \restore_e: \restore_d: \restore_c:
+ \cho_fn:
+ }
+}
+
+\cs_new:Npn \insert_jong:n #1
+{
+ \str_case:nn { #1 }
+ {
+ { kk } { \insert_out:n { ᆩ } }
+ { gs } { \insert_out:n { ᆪ } }
+ { g } { \insert_out:n { ᆨ } }
+ { nj } { \insert_out:n { ᆬ } }
+ { nh } { \insert_out:n { ᆭ } }
+ { n } { \insert_out:n { ᆫ } }
+ { d } { \insert_out:n { ᆮ } }
+ { lg } { \insert_out:n { ᆰ } }
+ { lm } { \insert_out:n { ᆱ } }
+ { lb } { \insert_out:n { ᆲ } }
+ { ls } { \insert_out:n { ᆳ } }
+ { lt } { \insert_out:n { ᆴ } }
+ { lp } { \insert_out:n { ᆵ } }
+ { lh } { \insert_out:n { ᆶ } }
+ { l } { \insert_out:n { ᆯ } }
+ { m } { \insert_out:n { ᆷ } }
+ { bs } { \insert_out:n { ᆹ } }
+ { b } { \insert_out:n { ᆸ } }
+ { ss } { \insert_out:n { ᆻ } }
+ { s } { \insert_out:n { ᆺ } }
+ { ng } { \insert_out:n { ᆼ } }
+ { j } { \insert_out:n { ᆽ } }
+ { ch } { \insert_out:n { ᆾ } }
+ { k } { \insert_out:n { ᆿ } }
+ { t } { \insert_out:n { ᇀ } }
+ { p } { \insert_out:n { ᇁ } }
+ { h } { \insert_out:n { ᇂ } }
+ { / } { \insert_out:n { 0 } }
+ }
+}
+
+\cs_new:Npn \take_jong_three:
+{
+ \prepare_three_tk:
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { 0 }
+ { \scan_stop: }
+ {
+%% XX-
+ \exp_args:No \str_if_eq:nnTF { \l_tmpc_tl } { - }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl }
+ \restore_c:
+ }
+ {
+ \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { - }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b:
+ }
+ {
+ \check_jong_sub:
+ }
+ }
+ \cho_fn:
+ }
+}
+
+
+\cs_new:Npn \check_jong_sub:
+{
+ \exp_args:Noo \str_if_eq:nnTF { \l_tmpb_tl } { \l_tmpc_tl }
+ {
+ \exp_args:Noo \str_if_eq:nnTF { \l_tmpa_tl } { \l_tmpb_tl } %%% sss
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl } %% ss-s
+ \restore_c:
+ }
+ {
+ \exp_args:Nno \str_if_in:nnTF { tpkj } { \l_tmpb_tl }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b:
+ }
+ {
+ \check_jong_sub_last:
+ }
+ }
+ }
+ {
+ \str_if_eq:eeTF { \l_tmpa_tl } { k }
+ {
+ \str_if_eq:eeTF { \l_tmpb_tl } { k } %% kk-g
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl }
+ \restore_c:
+ }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b:
+ }
+ }
+ {
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { c } %%% chX
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl }
+ \restore_c:
+ }
+ {
+ \exp_args:No \str_if_eq:nnTF { \l_tmpb_tl } { c } %%% Xch
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b:
+ }
+ {
+ \check_jong_sub_last:
+ }
+ }
+ }
+ }
+}
+
+\cs_new:Npn \check_jong_sub_last:
+{
+ \str_case_e:nnTF { \l_tmpa_tl }
+ {
+ { n } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { j } { }
+ { g } { }
+ { h } { }
+ }
+ }
+ { g } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { s } { }
+ }
+ }
+ { l } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { g } { }
+ { m } { }
+ { b } { }
+ { s } { }
+ { t } { }
+ { p } { }
+ { h } { }
+ }
+ }
+ { b } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { s } { }
+ }
+ }
+ { s } { \str_case_e:nn { \l_tmpb_tl }
+ {
+ { s } { }
+ }
+ }
+ }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl \l_tmpb_tl }
+ \restore_c:
+ }
+ {
+ \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b:
+ }
+}
+
+\cs_new:Npn \take_jong_two:
+{
+ \prepare_three_tk:
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { 0 }
+ { \scan_stop: }
+ {
+ \exp_args:Noo \str_if_eq:nnTF { \l_tmpa_tl } { \l_tmpb_tl }
+ {
+ \exp_args:Nno \str_if_in:nnTF { tpkj } { \l_tmpa_tl }
+ { \restore_c: \restore_b: \restore_a: }
+ {
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { c }
+ { \restore_c: \restore_b: \restore_a: }
+ { \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b: }
+ }
+ }
+ {
+ \exp_args:No \str_if_eq:nnTF { \l_tmpa_tl } { c }
+ { \restore_c: \restore_b: \restore_a: }
+ { \exp_args:Nx \insert_jong:n { \l_tmpa_tl }
+ \restore_c: \restore_b: }
+ }
+ }
+ \cho_fn:
+}
+
+\cs_new:Npn \restore_c:
+{
+ \exp_args:NNx \seq_put_left:Nn \g_tmpa_seq { \tl_use:N \l_tmpc_tl }
+}
+
+\cs_new:Npn \restore_b:
+{
+ \exp_args:NNx \seq_put_left:Nn \g_tmpa_seq { \tl_use:N \l_tmpb_tl }
+}
+
+\cs_new:Npn \restore_a:
+{
+ \exp_args:NNx \seq_put_left:Nn \g_tmpa_seq { \tl_use:N \l_tmpa_tl }
+}
+
+\cs_new:Npn \restore_d:
+{
+ \exp_args:NNx \seq_put_left:Nn \g_tmpa_seq { \tl_use:N \l_tmpd_tl }
+}
+
+\cs_new:Npn \restore_e:
+{
+ \exp_args:NNx \seq_put_left:Nn \g_tmpa_seq { \tl_use:N \l_tmpe_tl }
+}
+
+\cs_new:Npn \restore_five:
+{
+ \restore_e: \restore_d: \restore_c: \restore_b: \restore_a:
+}
+
+\endinput
+
+%% end of file pmhanguljamo-rrk.tex
diff --git a/language/korean/pmhanguljamo/pmhanguljamo.sty b/language/korean/pmhanguljamo/tex/pmhanguljamo.sty
index a491e5cdc7..b816fd9056 100644
--- a/language/korean/pmhanguljamo/pmhanguljamo.sty
+++ b/language/korean/pmhanguljamo/tex/pmhanguljamo.sty
@@ -2,7 +2,7 @@
%%
%% Poorman's Hangul Jamo Input Method.
%%
-%% (C) 2020 Kangsoo Kim <modviv2k15 at gmail.com>
+%% (C) 2020 Nova de Hi
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -14,21 +14,37 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Kangsoo Kim.
+%% The Current Maintainer of this work is Nova de Hi.
%%
%% This work consists of the file pmhanguljamo.sty
%% and the documentation files pmhanguljamo-doc.tex and pmhanguljamo-doc.pdf.
%%
-\RequirePackage{expl3,xparse}
+\RequirePackage{xparse}
\ProvidesExplPackage
{pmhanguljamo}
- {2020/01/20}
- {v0.2.1}
+ {2020/01/28}
+ {v0.3}
{Poorman's Hangul Jamo Input Method}
+\RequirePackage{l3keys2e}
+
+\keys_define:nn { pmhanguljamo }
+{
+ rrk .bool_set:N = \opt_rrkopt_bool,
+ RRK .bool_set:N = \opt_rrkopt_bool
+}
+
+\ProcessKeysOptions { pmhanguljamo }
+
+\bool_if:NT \opt_rrkopt_bool
+{
+ \file_input:n { pmhanguljamo-rrk.tex }
+ \endinput
+}
+
\NewDocumentCommand \jamotextcmd { m }
{
- \tl_set:Nn \l_tmpa_tl { #1 / }
+ \tl_set:Nn \l_tmpa_tl { #1 / }
\regex_replace_all:nnN { / } { |/ } \l_tmpa_tl
\regex_replace_all:nnN { ; } { ;/ } \l_tmpa_tl
\regex_replace_all:nnN { : } { :/ } \l_tmpa_tl
@@ -49,6 +65,13 @@
{
\seq_set_split:Nnn \l_inputpar_seq { \par } { #1 }
\seq_indexed_map_function:NN \l_inputpar_seq \jamo_word:nn
+% \seq_set_split:Nnn \l_inputword_seq { ~ } { #1 }
+% \seq_indexed_map_inline:Nn \l_inputword_seq
+% {
+% \jamotextcmd { ##2 }
+% \int_compare:nT { ##1 < \seq_count:N \l_inputword_seq }
+% { \space }
+% }
}{}
\cs_new:Npn \jamo_word:nn #1 #2