summaryrefslogtreecommitdiff
path: root/language/korean/pmhanguljamo/doc/pmhanguljamo-doc.tex
blob: 7b119f0267fd1da13ea5cc31e79a9a4ce2f9b8f5 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
%!TEX TS-program = SpiX
%$ cluttex -e xelatex --synctex=1 --shell-escape --package-support=minted --tex-option=--8bit $texname
% arara: xelatex: { shell: yes, synctex: yes }
\documentclass[a4paper]{article}
\usepackage{kotex}
%\usepackage{fontspec}
%\setmainfont{Noto Serif}
%\setsansfont{Noto Sans}
%\setmonofont{Noto Sans Mono}
\setmainfont{STIX Two Text}

\usepackage{hologo}
\newcommand*\XeTeX{\hologo{XeTeX}}
\newcommand*\XeLaTeX{\hologo{XeLaTeX}}
\newcommand*\LuaTeX{\hologo{LuaTeX}}
\newcommand*\LuaLaTeX{\hologo{LuaLaTeX}}

\usepackage[pmfont={Noto Serif KR}]{pmhanguljamo}
\usepackage[colorlinks]{hyperref}

%\usepackage{polyglossia}
%\setotherlanguage{korean}
%\newfontfamily\hangulfont{UnBatang.ttf}[Script=Hangul,Renderer=OpenType]
%%\newcommand*\jamo[1]{\begingroup\hangulfont\jamoword{#1}}

\setmainhangulfont{Noto Serif CJK KR}

\providecommand*\textkorean[1]{#1}
\newenvironment{korean}{}{}
\newcommand*\jamo[1]{\jamoword{#1}}

\newcommand*\pkg[1]{\textsf{#1}\index{#1}\index{Package!#1}}
\newcommand*\thispkg{\pkg{pmhanguljamo}}
%\maxsecnumdepth{section}

\usepackage{hvextern}
\usepackage{tabularray}

\begin{document}

\title{Poorman's Hangul Jamo Input Method \\ \Large \texttt{pmhanguljamo.sty} }
\author{Kangsoo Kim}
%\date{10 Mar 2021\quad version 0.3.5}
%\date{20 Sep 2021\quad version 0.3.6}
%\date{6 Sep 2022\quad version 0.5.1}
%\date{7 Sep 2022\quad version 0.5.2}
%\date{22 Feb 2023\quad version 1.0.1}
\date{3 Mar 2023\quad version 1.0.2}

\maketitle

\tableofcontents

\section{Introduction}
This \LaTeX\ package provides Hangul\footnote{%
    \emph{Hangul} is the Korean alphabet 
    to write the Korean language. In both South and North Korea,
    the standard writing system uses Hangul.}
\emph{transliteration} input method, which 
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 keyboard 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'(\textkorean{\jmcc{@}}), `Yes-Ieung'(\textkorean{\jmcc{F}}) or `Pan-Sios'(\textkorean{\jmcc{Z}}) etc.\ can also be typeset.

\XeLaTeX\ or \LuaLaTeX\ is required. The legacy pdf\TeX\ is not supported.
The Korean Language supporting packages such as \pkg{xetexko} and \pkg{luatexko} (in the ko.\TeX\ bundle)
or \pkg{polyglossia} package with Korean support %under \XeLaTeX\  
are recommended, but without them typesetting Hangul is of no problem
with this package \thispkg.

\section{Usage}

\subsection{Loading the package}

Put the following line in your preamble:
\begin{verbatim}
\usepackage[<options>]{pmhanguljamo}
\end{verbatim}

\subsection{Package options}

The package provides three kinds of Hangul input methods. 
You should select one of them with the package option.
And you have to specify just one of them. Mixing ways of transliteration is not
allowed.

\begin{enumerate}
\item \texttt{[method=pm]}. It is an original method of this package. In section~\ref{sec:pmmethod} we will explain about it. If \texttt{method=} option is missing, this one will be activated.
\item \texttt{[method=rrk]} or \texttt{[rrk]}, \texttt{[RRK]}. The \emph{Standard Korean Romanization Transliteration} input method.
In section~\ref{sec:rrk},
we will explain about it. 
\item \texttt{[method=frkim]} or \texttt{[frkim]}. A newly introduced rule. See section~\ref{sec:frkim}.
\end{enumerate}

Whatever method you selected, the following basic options are common.

\begin{enumerate}
\item \texttt{pmfont=<fontname>}. The font that is used to typeset Hangul 
characters in the scope of \verb|\jamoword| or \texttt{jamotext}. If this option missing, the Jamo-Hangul font is to be same as the \textit{main font} of 
the document.

\item \texttt{pmfontfeature=<fontfeature>}. It is possible to provide \emph{font features} to
the font selected as \texttt{pmfont}.
\end{enumerate}

\subsection{Commands and Environment Provided}

The main command to typeset Hangul is \verb|\jamoword|.

\begin{quote}
Input:
\verb|\jamoword{han/gvr/vi yeis i/rvm/vn hun/min/jeq/vm/i/da/.}|\\
Result: \textkorean{\jamoword{han/gvr/vi yeis i/rvm/vn hun/min/jeq/vm/i/da/.}}
\end{quote}

The argument of the command consists of roman alphabets 
and a few marks that represent Hangul Jamo.
In the example we showed the \texttt{[method=pm]} way
which is explained in the section~\ref{sec:pmmethod}. 
But with any other rule it will make the same result.

And an environment \emph{jamotext} is provided.
In the environment, multiple paragraphs can be located. So, it is
suitable to typeset longer text stuffs. For example,
\begin{verbatim}
\begin{jamotext}
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/ue/haiss/da/.
\end{jamotext}
\end{verbatim}
Result:
\begin{quote}
\begin{korean}
\begin{jamotext}
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/ue/haiss/da/.
\end{jamotext}
\end{korean}
\end{quote}

\subsection{Setting up in your Preamble}

Without any other packages, you can type Hangul. Be sure that
proper fonts should be declared for Hangul, utilizing \pkg{fontspec}.

\begin{externalDocument}[ 
	compiler=xelatex,
	code,
	lstOptions={basicstyle=\ttfamily},
	cleanup]{testa}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontspec}
\usepackage[pmfont={Noto Serif KR}]{pmhanguljamo}
%StopVisiblePreamble
\begin{document}
\jamoword{an/nyeq/ha/sei/yo}
\end{document}
\end{externalDocument}

If you don't want to specify \texttt{pmfont} option, you should manually
declare the proper font for Jamo Hangul with \texttt{Script=Hangul} option.\footnote{See section \ref{sec:font}.}

\begin{externalDocument}[ 
	compiler=xelatex,
	code,
	lstOptions={basicstyle=\ttfamily},
	cleanup]{testa}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontspec}
\usepackage{pmhanguljamo}
\newfontfamily\mypmfont{Noto Serif KR}[Script=Hangul]
%StopVisiblePreamble
\begin{document}
\mypmfont\jamoword{an/nyeq/ha/sei/yo}
\end{document}
\end{externalDocument}

%\texttt{UnBatang.ttf} is a font shipped in \pkg{unfonts-core} package of \TeX\,Live.
Not all Korean fonts are available to typeset so-called `Old Hangul',
because they happen to lack
the feature of composing Korean syllables from conjoining Jamo codes. Fortunately,
we have a few more fonts besides \texttt{UnBatang} that are \emph{proper}
and freely available, which are listed in the section~\ref{sec:font}.
In \TeX\,Live distribution, \texttt{UnBatang} is the only \emph{proper} one.

The \pkg{polyglossia} package provides Korean language support. \thispkg\
can be used with it. The following is an example.

\begin{externalDocument}[ 
	compiler=xelatex,
	code,
	lstOptions={basicstyle=\ttfamily},
	cleanup]{testa}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{korean}
\newfontfamily\hangulfont{Noto Serif KR}[Script=Hangul]
\usepackage{pmhanguljamo}
%StopVisiblePreamble
\begin{document}
\begin{korean}
\jamoword{a/rvm/da/un han/gvr/ib/ni/da/.}
\end{korean}
\end{document}
\end{externalDocument}

In this example, the Korean language is set as `other language',
and the default font for Korean is declared as `\verb|\hangulfont|'.
In the \textit{korean} environment, the \verb|\hangulfont| will be
used for Hangul.

Or the ko.\TeX\ package bundle can be used together.

\begin{externalDocument}[ 
	compiler=xelatex,
	code,
	lstOptions={basicstyle=\ttfamily},
	cleanup]{testa}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{kotex}
\usepackage[pmfont={NotoSerifKR-Regular.otf}]{pmhanguljamo}
%StopVisiblePreamble
\begin{document}
\jamoword{na/ras/mar/ss@/mi}
\end{document}
\end{externalDocument}

When ko.\TeX\ is used, the fontspec command for Hangul is not
\verb|\fontspec| but \verb|\hangulfontspec|. We recommend that
you use \texttt{pmfont=} option to avoid the complicated situation.

%The \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 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 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.


\section{Proper Fonts}\label{sec:font}

In order to typeset Hangul characters successfully with the input method
of this package, the help of the \emph{proper} font is crucial.
What we call \emph{proper} font is the font that has the Opentype feature of `Script Hangul', that is, the feature of conjoining jamo characters.
A Truetype font may have this Opentype feature.
Otherwise, it is regarded as an \emph{improper} font.

Not so many fonts are \emph{proper}. 
The fonts or font families listed in the following lines are 
what we know \emph{proper}.
They can be downloaded from the url and used freely. And note that
\texttt{UnBatang} is already installed in your \TeX\,Live installation.
But the author recommends the Noto Korean fonts for this purpose.

\begin{description}
\item[Hamchorom or Hamchorom-LVT] Hamchorom fonts by Hancom Inc., 
\url{https://www.hancom.com/cs_center/csDownload.do},
and their variants with GSUB tables by KTS (the Korean \TeX\ Society).  \url{https://github.com/dohyunkim/hcr-lvt}
\item[KoPub World] free fonts by Korea Publisher Society. 
\url{https://www.kopus.org/biz-electronic-font2/}.
\item[Malgun Gothic] One of Windows 10 system fonts. 
\item[Nanum Yet Hangul] Two font families from Naver. Nanum Myeongjo Yet Hangeul and Nanum Barun Gothic Yet Hangeul. \url{https://hangeul.naver.com/2014/archaicword}
\item[Noto Korean or Source Han] Google's Noto Korean fonts --- Noto Serif Korean, Noto Sans Korean. Or Adobe's Source Han fonts. 
\url{https://fonts.google.com}.
\item[Un Batang] \verb|UnBatang.ttf|. on CTAN. \url{https://ctan.org/pkg/unfonts-core}
\end{description}

To conjoining Jamos to build a syllable with one of these fonts, 
it is necessary to provide
the \texttt{[Script=Hangul]} option.\footnote{%
	the option should be \\
	\texttt{[Script=Hangul,Renderer=Harfbuzz]}\\
	or\\
	\texttt{[Script=Hangul,Renderer=OpenType]},\\
	when the document is processed with \LuaLaTeX.}
%	The \LuaLaTeX\ version should be over 1.11, that is,
%	the \LaTeX\ format of LuaHB\TeX\ is needed.}
But when the package option \texttt{[pmfont=]} is given,
that will be done by the package automatically.

For example, you can specify Hamchorom Batang LVT font by yourself as like:
\begin{verbatim}
\newfontfamily\pmjamofont{HCR Batang LVT}[Script=Hangul]
\end{verbatim}
and then issue \verb|\pmjamofont| command in the scope of Hangul to be typeset.\footnote{%
	When \texttt{pmfont=} option is given, the \texttt{Script=Hangul} is
	automatically activated by the package.}
But these processes will be done by the package itself when 
\begin{verbatim}
\usepackage[pmfont={HCR Batang LVT}]{pmhanguljamo}
\end{verbatim}
is declared in the preamble.

It is recommended that the \emph{proper} font should be used consistently.

\medskip

In case the font you take is not \emph{proper}, you are to meet the warning
message at the console and log file,
\begin{verbatim}
 Package fontspec Warning: (fontspec)
 Font "batang" does not contain requested Script "Hangul".
\end{verbatim}
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{Transliteration Rule of This Package: \texttt{[method=pm]}}\label{sec:pmmethod}

\subsection{Tone Marks and Syllable Serapator}

This method assumes that every Hangul syllable has \emph{Tone Mark} which
must be explicitly put at the end of it. Table~\ref{tab:tonemark} 
shows the input scheme of them.

\begin{table}[h]
\centering
\caption{Tone Marks} \label{tab:tonemark}
\begin{tabular}{c|l}
\hline
input & description \\ \hline
\texttt{/} & for \emph{PyeongSeong}, no dot \\ \hline
\texttt{;} & for \emph{GeoSeong}, single dot on the left of a character, [U+302E] \\ \hline
\texttt{:} & for \emph{SangSeong}, double dots on the left of a character, [U+302F] \\ \hline
\end{tabular}
\end{table}

The tone marks were used in the 15th century, but in the modern Korean they are
out of use. Nevertheless the \verb|/| mark in this package is also used in order to depict
the completion of composing a syllable --- i.e., syllable separator. So DO NOT miss it.

However, it is possible to omit `\verb|/|' mark at the end of a word, i.e., just before \texttt{<space>}, or at the end of the argument of \verb|\jamoword|.
Note that before the puctuation mark --- period, comma, etc., omitting \verb|/| is not permitted.

\subsection{Transliteration rules}

\subsubsection{Consonants}

Table~\ref{tab:cons} shows the transliteration rule for the consonants which are
used in the leading and trailing position of a syllable.

\begin{table}[h]
\centering
\caption{Consonants} \label{tab:cons}
\fontspec{UnDotum.ttf}
\begin{tabular}{ll|ll|ll|ll}
\hline
ㄱ & g & ㄴ & n & ㄷ & d & ㄹ & r \\
ㅁ & m & ㅂ & b & ㅅ & s & ㅇ & \textbf{q} \\
ㅈ & j & ㅊ & c & ㅋ & k & ㅌ & t \\
ㅍ & p & ㅎ & h & \char"3181 & \textbf{f} & \char"317F & \textbf{z} \\
\char"3186 & \textbf{x} & & w & & & & \\
\hline 
\end{tabular}
\end{table}

\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}. 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 The letter for `\textkorean{\jmcc{Q}}' is \texttt{q}, which is a bit strange, but commonly accepted `\texttt{ng}' was not to be chosen. It is reserved for another consonant `\textkorean{\jamoword{@ng/}}'
\item The letters `f, z, x' are more freely selected. These letters are the lost ones in Modern Korean.
\item The `light labial consonants', \textkorean{\jmcc{BQ}, \jmcc{PQ}} in the Old Hangul can be input as `bq, pq, bbq, mq'. 
%\footnote{\emph{Jungseong Filler} is not provided.} 
\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 In the Modern Korean, only `gg, dd, bb, ss, jj' are additionally permitted in the leading consonant position,
But in the Old Hangul this limitation was not applied. So \emph{Choseong} can have multiple consonants, e.g., `bsg', `bsd', `ss', `sd' etc.
\item The leading `zero consonant' can be omitted. So if a syllable begins with vowel, then the leading `\textkorean{\jmcc{Q}}' will appear. You can write the leading `\verb|q|' of a syllable or not.
For example, `\verb|\jamoword{qaq}|' and `\verb|\jamoword{aq}|' will generate the same result `\jamo{qaq}'.
\item The letter `w' is chosen to present \emph{Choseong Filler}. For example, \verb|\jamoword{wan}| renders \jamoword{wan}.
\item [compatibility] The letters that `x', `q', and `f' corresponds to are changed from version 1.0. If the style of former version is needed, put \texttt{[compat=0.5]} option in the \verb|\usepackage| line. Then \texttt{x} will be rendered as `\jmcc{Q}', \texttt{q} as `\jmcc{F}', and \texttt{f} as `\jmcc{X}'.
\end{enumerate}

\subsubsection{Vowels}

Table~\ref{tab:vow} shows the transliteration rule for vowels. 

\begin{table}[h]
\centering
\caption{Vowels}\label{tab:vow}
\ttfamily\fontspec{UnDotum.ttf}
\begin{tabular}{ll|ll|ll|ll|ll}
\hline
ㅏ & a & ㅓ & e & ㅗ & o & ㅜ & u & ㅡ & \textbf{v} \\
ㅣ & i & \jmcc{@} & \textbf{@}  & & & & & & \\ \hline
ㅑ & ya & ㅕ & ye & ㅛ & yo & ㅠ & yu & \kern-.3em\jmcc{@}\kern-.6em\jmcc{@} & @@ \\ \hline
ㅐ & ay, ai & ㅔ & ey, ei & ㅚ & oy, oi & ㅟ & uy, ui & ㅢ & vy, vi \\ 
ㅒ & yay, yai & ㅖ & yey, yei & \jmcc{YOI} & yoi & \jmcc{YUI} & yui & \jmcc{@I} & @i \\ \hline
ㅘ & oa & ㅙ & oay, oai & ㅝ & ue & ㅞ & uey, uei &  & * \\ \hline
\end{tabular}
\end{table}

\begin{enumerate}
\item The rule for vowels may look a bit unfamiliar. But it is simple and easily rememberable.

\item The letter `v' is never considered to be a vowel. But this package 
determined it to stand for the vowel `\textkorean{\jmcc{V}}'. In fact,
the roman alphabets fall short of the vowels. This allocation is arbitrary.

\item The lost `Arae-A' is allocated to `@', and the rare `Double Arae-A' to `@@', which are forgotten vowels in Modern Korean.

\item The \emph{Jungseong Filler} ([U+1160]) can be input with \verb|*|. For example, \verb|\jamoword{h*n}| renders \jamoword{h*n}.
\end{enumerate}

\subsubsection{Compatibility Jamos}

The compatibility Jamo block in Unicode contains several Hangul Jamo characters,
which cannot be used to compose Hangul syllables, and are considered
independent Jamo characters respectively.

To input the compatibility Jamos in the arguments of \verb|\jamoword| or \verb|jamotext|, 
you are to type them in their capital letters (upper cases). And every compatibility Jamo has to be
separated with syllable separator --- \verb|/|. 
Because the \verb|@| character has no upper case, write \verb|W| instead of \verb|@| to display compatibility `Arae-A'.

Here is an example:
\begin{quote}
\begin{verbatim}
\jamoword{W/nvn a/rai/a/ra/go bu/rv/go A/oa 
    bi/svs/ha/gei irg/nvn/da}
\end{verbatim}
\textkorean{\jamoword{W/nvn a/rai/a/ra/go bu/rv/go A/oa bi/svs/ha/gei irg/nvn/da}}
\end{quote}

\subsection{ASCII-Escaping Trick}
Sometimes it is needed to locate a few math materials or ASCII stuffs
in the midst of Jamo Hangul texts. The tricky syntax 
\begin{verbatim}
   !{<ASCII stuffs>}
\end{verbatim}
makes it possible to insert non-Jamo ASCII characters into \texttt{jamotext}
context. Note that it is not allowed in the arguments of \verb|\jamoword|.

\begin{verbatim}
\begin{jamotext}
in/gan/i pog/jeq/goa eg/ab/ei 
!{tyranny and oppression} 
dai/haq/ha/nvn ma/ji/mag su/dan/v/ro/se 
!{as a last resort}
ban/ran/vr ir/v/ki/do/rog gaq/yo/bad/ji 
anh/v/rye/myen

pi/ta/go/ra/sv/vi jeq/ri/ !{\unskip :} 
!{$a^2+b^2=c^2$}.
\end{jamotext}
\end{verbatim}

\noindent Result:\\
\begin{jamotext}
in/gan/i pog/jeq/goa eg/ab/ei 
!{tyranny and oppression} 
dai/haq/ha/nvn ma/ji/mag su/dan/v/ro/se 
!{as a last resort}
ban/ran/vr ir/v/ki/do/rog gaq/yo/bad/ji 
anh/v/rye/myen

pi/ta/go/ra/sv/vi jeq/ri/ !{\unskip :} !{$a^2+b^2=c^2$}.
\end{jamotext}

\bigskip

The \verb|!{| mark must be located in the head of a word.
(To remove the preceding space of a word, \verb|\unskip| is
used in the example.) This trick will be useful when using
math equations, \LaTeX\ macros, or English words along with long Jamo Hangul texts.

By the time this ASCII-escaping trick is available with \texttt{method=pm} and \texttt{method=frkim}.
And do not forget that it can be used only in the \texttt{jamotext}
environment.

\subsection{Examples: \texttt{method=pm}}\label{sec:exam}

Now, we will show a few practical examples, where
the \emph{korean} environment of \pkg{polyglossia} package is used.
The preamble is like this:

\begin{verbatim}
\usepackage{pmhanguljamo}
\usepackage{polyglossia}
\setotherlanguage{korean}
\newfontfamily\hangulfont{Noto Serif KR}[Script=Hangul]
\end{verbatim}

\subsubsection{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}
na bo/gi/ga yeg/gye/ue \\
ga/sir ddai/ei/nvn \\
mar ebs/i go/i bo/nai dv/ri/u/ri/da/.

yeq/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}
\end{verse}
\end{verbatim}

\begin{verse}
\begin{korean}
\begin{jamotext}
na bo/gi/ga yeg/gye/ue \\
ga/sir ddai/ei/nvn \\
mar ebs/i go/i bo/nai dv/ri/u/ri/da/.

yeq/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}
\end{verse}

\subsubsection{pre-1933 Hangul}

A 15th century text with tone marks (\emph{BangJeom}).

\begin{verbatim}
\begin{korean}
\begin{jamotext}
	na/ras;mar:ss@/mi;
	中dyuf/國guig;ei; dar/a;
	文mun/字jj@q;oa;ro; se/rv/ s@/m@s/di; a/ni;h@r/ss@i;
	i;ren jyen/c@;ro; e/rin; 百b@ig;姓syef;i; 
	ni/rv/go;jye; horx; bai; i/sye;do;
	m@/c@m;nai: jei bdv;dvr; si/re; pye/di; mod:h@rx no;mi; ha/ni;ra
\end{jamotext}
\end{korean}
\end{verbatim}

\begin{quote}
\begin{korean}
\begin{jamotext}
	na/ras;mar:ss@/mi;
	中dyuf/國guig;ei; dar/a;
	文mun/字jj@q;oa;ro; se/rv/ s@/m@s/di; a/ni;h@r/ss@i;
	i;ren jyen/c@;ro; e/rin; 百b@ig;姓syef;i; 
	ni/rv/go;jye; horx; bai; i/sye;do;
	m@/c@m;nai: jei bdv;dvr; si/re; pye/di; mod:h@rx no;mi; ha/ni;ra
\end{jamotext}
\end{korean}
\end{quote}

And another example of 17th century, from \jamo{du/si/en/hai}, \emph{Selected Translations of 
Du Fu's Poems}, without tone marks.

\begin{verbatim}
\begin{verse}
\begin{korean}
\begin{jamotext}
g@/r@/mi p@/r@/ni sai de/ug h@i/o/,\\
moy/hi pe/re/h@/ni gos/ bi/ci bvr bvd/n@n d@s/do/da/.\\
ors bo/mi bon/d@in sdo di/na/ga/n@/ni \\
e/nv na/ri i do/ra/gar h@i/o/.
\end{jamotext}
\end{korean}
\end{verse}
\end{verbatim}

\begin{verse}
\begin{korean}
\begin{jamotext}
g@/r@/mi p@/r@/ni sai de/ug h@i/o/,\\
moy/hi pe/re/h@/ni gos/ bi/ci bvr bvd/n@n d@s/do/da/.\\
ors bo/mi bon/d@in sdo di/na/ga/n@/ni \\
e/nv na/ri i do/ra/gar h@i/o/.
\end{jamotext}
\end{korean}
\end{verse}

\let\jamoword\relax
\let\jamotext\relax
\let\endjamotext\relax
\ExplSyntaxOn
\input pmhanguljamo-rrk.sty
\ExplSyntaxOff


\section{The RRK Input Method: \texttt{[method=rrk]}} \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 standard is the phonetic transcription one.
So we can make use of the former as an input method.

If the package option \texttt{[method=rrk]} is given, 
the RRK method is activated. With this rule, only `Modern Hangul' can
be typeset. You can give the option by the abbreviation form \texttt{[rrk]} or \texttt{[RRK]}.


\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{Q}}' is placed
at the head of a word, it can be ommitted. Otherwise the hyphen character (\verb|-|) should exist. 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 also 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{Example 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}

\ExplSyntaxOn
\cs_undefine:N \jamoul
\cs_undefine:N \l_inputword_seq
\cs_undefine:N \l_inputpar_seq
\cs_undefine:N \jamotext
\cs_undefine:N \endjamotext
\cs_undefine:N \jamo_word:nn
\cs_set_eq:NN \frkhangulfont \opt_pmfont_tl 
\cs_set_eq:NN \frkhangulfontfeature \opt_pmfontfeature_tl
\input{pmhanguljamo-frkim.code.tex}
\ExplSyntaxOff


\section{Fukui Rei's Transliteration Rule: \texttt{[method=frkim]}}
\label{sec:frkim}

The \texttt{frkim} stands for ``Fukui Rei's k\TeX{}'' and ``input method''.
Prof.~Fukui Rei (Tokyo University) proposed his own transliteration rules of Hangul romanization, and wrote a \TeX{} macro package named \emph{hangulTeX} in 1993, with
which it was possible to typeset Hangul by roman-alphabet inputs.

To select this rule, give \texttt{[method=frkim]} option to the package.

\subsection{The rule}

Table~\ref{tab:ktex} shows the rule of hangulTeX. All the rules
can be used with this package.

\begin{table}[h]
\centering\small
\caption{The transliteration rule of hangul\TeX}\label{tab:ktex}
\ttfamily
\begin{tblr}{
	colspec={llllllllll},
	hline{1,Z}={1pt},
	hline{2-Y}={.4pt},
	vline{3,5,7,9}={.4pt},
}
\SetCell[c=10]{c,bg=azure5,fg=white} Consonants &&&&&&&&&\\
ㄱ & g & ㄴ & n & ㄷ & d & ㄹ & r & ㅁ & m \\
ㅂ & b & ㅅ & s & ㅇ & ' x & ㅇ & q & ㅈ & j \\
ㅊ & c & ㅋ & k & ㅌ & t & ㅍ & p & ㅎ & h  \\
ㄲ & G & ㄸ & D & ㅃ & B & ㅆ & S & ㅉ & J \\
ㅸ & v & ㅿ& z & ㆁ & Q & ㆆ & X & & \\
%\SetCell[c=10]{l} &&&&&&&&& \\
\end{tblr}
\hfil
\begin{tblr}{
	colspec={llllllll},
	hline{1,Z}={1pt},
	hline{2-Y}={.4pt},
	vline{3,5,7,9}={.4pt},
}
\SetCell[c=8]{c,fg=white,bg=azure5} Vowels &&&&&&&\\
ㅏ & a  & ㅓ & e   & ㅗ & o   & ㅜ & u  \\
ㅡ & y  & ㅣ & i   & ㆍ & @   & ㅑ & ia  \\
ㅕ & ie & ㅛ & io  & ㅠ & iu  & ㅐ & ai \\
ㅔ & ei & ㅒ & iai & ㅖ & iei & ㅘ & oa \\
ㅙ & oai & ㅚ & oi & ㅝ & ue  & ㅞ & uei \\
ㅟ & ui  & ㅢ & yi & ㆎ & @i  &    &  \\
\end{tblr}
\end{table}

\activatefrcccmds
\begin{enumerate}
\item The leading zero-consonant (\frccq) can be input with \verb|'| (right quote) or \verb|x|. The default is \verb|'|, and \verb|\zeroisx| macro
switches this action. And the macros \verb|\rq| can be used in the position of \verb|'| (closing quote) when `zero' is \verb|'| (\verb|\zeroisrq|). For example,
\verb|\hg{{``}gug'e\rq\rq}| \hg{{``}gug'e\rq\rq}. \verb|\zeroisx\hg{{``}gugxe{''}}| {\zeroisx\hg{{``}gugxe{''}}}.

\item The trailing I-Eung (\frccq) is made by \verb|q|, and the lost character
Yes-I-Eung (\frccQ) is by \verb|Q|.

\item Apart from \emph{hangulTeX}, with this package it is permitted to omit the leading zero-consonant in the position of the head of a word. That is, \verb|'annieq| and \verb|annieq| are identical. But if the letter is in the midst of a word, it can not be ommited.

\item The \emph{hangulTeX} commands \verb|\hg|, \verb|\hangul|, and \verb|\endhangul| are provided. And \verb|\jamoword| is the same as \verb|\hg|, 
and \texttt{jamotext} environment can be used with.

\item We extended the Old-Hangul feature of this input method. The plural consonants in the leading position were not implemented in the \emph{hangulTeX}, which can be done by dispicting the starting position of the plural leading consonants with \verb|-| (dash). Moreover, in the heading position of a word,
this mark can be left out. For example, \verb|\hg{bsumei}| \hg{bsumei}; \verb|\hg{gy-bsgyi'iei}| \hg{gy-bsgyi'iei}. 
\end{enumerate}

\subsection{Examples}

\subsubsection{Modern Hangul}

The following example text was taken from \emph{hangulTeX} manual (1994).
(All the heading \verb|'|'s in every word can be left out now.)

\begin{verbatim}
\hangul
nydas'ebs'i hoiram'i morgo'on pamun'yn 'yi'oiro simgaghan 
ges'i'ese goanrigoa samusir'yi 'ohu najer'yr 'oanjenhi 
gierDannai noh'aSda. goanrigoa jig'uendyr'i GiriGiri mo'ie 
juqgunanbaq'yro Sod'a noh'yn mardyr'yn doro ju'uedam'a 
bomien daicuq 'ui'oa gat'yn nai'ioq'i doigeiSnyndei, 
murron gy ga'undeinyn mindosig'i Siburiedain burpieqdo
saqdaq bubun'yr cajihago 'iS'eSda.

mindosig'yn juro 'os'i nargairanyn jenrai'yi sogdam'yr 
dyr'e gyren joqriu'yi nargairyr dargonyn seisaq'yr huerhuer
nar'adanir su 'ebs'ym'yr nunu'i gaqjohanyn pien'i'eSda. 
gy'yi mar'yn sasaiqhoar'i 'ebs'ejinyn seim'iranyn coqgag
sa'uen 'ugihoan'yi jujaqgoa majbaro toqhaiSda.
\endhangul
\end{verbatim}

\begin{quote}
\hangul
nydas'ebs'i hoiram'i morgo'on pamun'yn 'yi'oiro simgaghan 
ges'i'ese goanrigoa samusir'yi 'ohu najer'yr 'oanjenhi 
gierDannai noh'aSda. goanrigoa jig'uendyr'i GiriGiri mo'ie 
juqgunanbaq'yro Sod'a noh'yn mardyr'yn doro ju'uedam'a 
bomien daicuq 'ui'oa gat'yn nai'ioq'i doigeiSnyndei, 
murron gy ga'undeinyn mindosig'i Siburiedain burpieqdo
saqdaq bubun'yr cajihago 'iS'eSda.

mindosig'yn juro 'os'i nargairanyn jenrai'yi sogdam'yr 
dyr'e gyren joqriu'yi nargairyr dargonyn seisaq'yr huerhuer
nar'adanir su 'ebs'ym'yr nunu'i gaqjohanyn pien'i'eSda. 
gy'yi mar'yn sasaiqhoar'i 'ebs'ejinyn seim'iranyn coqgag
sa'uen 'ugihoan'yi jujaqgoa majbaro toqhaiSda.
\endhangul
\end{quote}

And another example:

\begin{verbatim}
\begin{jamotext}
	caig'yr hanguen gajigo iS'eSji'io. Gaman pioji'ei 
	sonbadagmanhan jag'yn caig'iji'io. cesjaq'yr nemgimien
	nun'i nairigon haji'io.

	baramdo jamdyn supsog, jamdyn hiensasinamudyr tumieqhan
	murgoanman Gai'e iS'eSji'io. gajaq kygo uramhan sasinamu 
	mit'ei daqsin'yn memcu'eSji'io. daqsin'i namuduqci'ei 
	dyq'yr gidaija biroso nun'i nairigi sijaghaiSji'io.
	edi'eidyn dahgiman hamien nog'aberinyn nun.
	gyDaiJym haise Gocnun'i Gai'enaSgeiSji'io.
\end{jamotext}
\end{verbatim}

\begin{quote}
\begin{jamotext}
	caig'yr hanguen gajigo iS'eSji'io. Gaman pioji'ei 
	sonbadagmanhan jag'yn caig'iji'io. cesjaq'yr nemgimien
	nun'i nairigon haji'io.

	baramdo jamdyn supsog, jamdyn hiensasinamudyr tumieqhan
	murgoanman Gai'e iS'eSji'io. gajaq kygo uramhan sasinamu 
	mit'ei daqsin'yn memcu'eSji'io. daqsin'i namuduqci'ei 
	dyq'yr gidaija biroso nun'i nairigi sijaghaiSji'io.
	edi'eidyn dahgiman hamien nog'aberinyn nun.
	gyDaiJym haise Gocnun'i Gai'enaSgeiSji'io.
\end{jamotext}
\end{quote}

The following example shows `ASCII-escaping trick' in
\texttt{jamotext} environment.

\begin{verbatim}
\begin{jamotext}
jiggagsamgaghieq !{$\triangle ABC$}'yi sei bien !{$a,b,c$}
sa'i'ei !{$a^2+b^2=c^2$}'in goangieiga seqribhanda.
\end{jamotext}
\end{verbatim}

\begin{quote}
\begin{jamotext}
jiggagsamgaghieq !{$\triangle ABC$}'yi sei bien !{$a,b,c$}
sa'i'ei !{$a^2+b^2=c^2$}'in goangieiga seqribhanda.
\end{jamotext}
\end{quote}

The font can be changed with \verb|\setpmhangulfont| command.

\begin{verbatim}
\hg{iuguhan iegsa'oa jentoq'ei bicnanyn}
\setpmhangulfont{Noto Sans CJK KR}
\hg{uri daihangugmin'yn}
\end{verbatim}

\begin{quote}
\hg{iuguhan iegsa'oa jentoq'ei bicnanyn}
\setpmhangulfont{Noto Sans CJK KR}
\hg{uri daihangugmin'yn}
\end{quote}

\subsubsection{Old Hangul}

\begin{verbatim}
\jamoword{nagpo'yi sdar'irnienni bando jinsaq oggieq gasda 
	goaqhanjien'yisie jiegsoqja masna mijinjieqhoi
	h@'orca'yi simanh@mi joiga doi'ia siaqjiei d@irohasa
	jintoi'yi n@icisim@i gar ba'yr mornadeni du'iusan
	sir'ieqgieisie bu'in-sd@ig'yro jisih@giro oassa'oni
	e'iebbi iegisosie}
\end{verbatim}

\begin{quote}
\jamoword{nagpo'yi sdar'irnienni bando jinsaq oggieq gasda 
	goaqhanjien'yisie jiegsoqja masna mijinjieqhoi
	h@'orca'yi simanh@mi joiga doi'ia siaqjiei d@irohasa
	jintoi'yi n@icisim@i gar ba'yr mornadeni du'iusan
	sir'ieqgieisie bu'in-sd@ig'yro jisih@giro 
	oassa'oni e'iebbi iegisosie}
\end{quote}

The Tone-Marks (\emph{BangJeom}) are not supported in itself.
But it is easy to facilitate them. See the following case.

\begin{verbatim}
\catcode`\:=\active \catcode`\;=\active
\def:{\char"302F}\def;{\char"302E}
\hg{naras;mar:S@mi; 中diuQ國guig;'ei; dar'a;
    文mun字J@q;'oa;ro; sery s@m@sdi; ani;h@rS@i;
    i;ren jienc@;ro; erin; 百b@ig;姓sieQ;'i nirygo;jie;
    horX; bai; isie;do m@c@m;nai: jei bdy;dyr 
    sire; piedi; mod:h@rX no;mi; hani;ra.}
\end{verbatim}

\begin{quote}
\catcode`\:=\active \catcode`\;=\active
\def:{\char"302F}\def;{\char"302E}
\hg{naras;mar:S@mi; 中diuQ國guig;'ei; dar'a;
    文mun字J@q;'oa;ro; sery s@m@sdi; ani;h@rS@i;
    i;ren jienc@;ro; erin; 百b@ig;姓sieQ;'i nirygo;jie;
    horX; bai; isie;do m@c@m;nai: jei bdy;dyr 
    sire; piedi; mod:h@rX no;mi; hani;ra.}
\end{quote}

\section{Further Information}


For more examples and information about this package, 
please read the documentation 
\href{http://mirrors.ctan.org/language/korean/pmhanguljamo/doc/pmhanguljamo-kdoc.pdf}{\texttt{pmhanguljamo-kdoc.pdf}}
(in Korean).


\section{Acknowledgements}

Thanks go to yihoze at the KTUG board, there he commented, 
``The IM apps I've tried such as Korean Windows Old Hangul IM or Saenaru IM 
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
confident way of typesetting Korean than the keyboard IM solutions.''\footnote{\url{http://www.ktug.org/xe/index.php?mid=KTUG_open_board&document_srl=240134}}

\end{document}