summaryrefslogtreecommitdiff
path: root/language/korean/HLaTeX/contrib/hfn-u.tex
blob: c2743df15810774dd9215f379305abc9fc834cdd (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
%%% hfn-u.tex for hangul lambda

\DeclareOption{첨자}{
  \def\fn@markstyle{\@makefnmark}
  \footnumbersep0pt
}
\DeclareOption{괄호}{
  \def\fn@markstyle{\@thefnmark)}
  \settowidth{\footnumbersep}{~}
}

%% 각주 내어쓰기
%% ---------------------
%% 1) 첫번째 줄
%%    두번째 줄
\DeclareOption{내어쓰기}{%
  \long\def\@makefntext#1{
    \settowidth{\foot@parindent}{\fn@markstyle}
    \@setpar{\@@par\@tempdima \hsize
      \advance\@tempdima-\foot@parindent
      \parshape\@ne\foot@parindent \@tempdima}\par
    \parindent8\p@\noindent
    \hb@xt@\z@{\hss\hss\fn@markstyle\hskip\footnumbersep}#1}
}

%% 각주 다항이어쓰기
%% ---------------------
%% 1) 첫번째 각주  2) 두번째 각주
%% 3) 세번째 각주
\DeclareOption{다항이어쓰기}{
  \input{fnpara.sty}
  \long\def\@makefntext#1{%
    \hbox{\fn@markstyle\hskip\footnumbersep #1}
  }%
}

%% 각주 단순이어쓰기
%% ---------------------
%% 1) 첫번째 각주  2) 두번째 각주  3) 세
%% 번째 각주
\DeclareOption{단순이어쓰기}{
  \input{fnpara.sty}
  \long\def\@makefntext#1{%
    \fn@markstyle\ifdim\footnumbersep=\z@\else~\fi #1
  }%
}

%% 각주 왼쪽맞춤
%% ---------------------
%% 1) 첫번째 줄
%% 두번째 줄
%% \parindent: 본문의 별행 indent
\DeclareOption{왼쪽맞춤}{
  \renewcommand\@makefntext[1]{%
    \settowidth{\foot@parindent}{\reset@font 각주}
    \parindent\foot@parindent\noindent%
    \fn@markstyle\hskip\footnumbersep #1}%
}

%% 각주 들여쓰기
%% ---------------------
%%     1) 첫번째 줄
%% 두번째 줄
%% \parindent: 본문 별행 indent의 일정 배수
%% 각주 번호 오른쪽 정렬
\DeclareOption{들여쓰기}{
  \renewcommand\@makefntext[1]{%
    \settowidth{\foot@parindent}{\reset@font 각주}
    \parindent\foot@parindent\noindent
    \hb@xt@1.5\foot@parindent{\hss\fn@markstyle}\hskip\footnumbersep #1}
}

%% 각주 들여왼쪽맞춤
%% ---------------------
%%     1) 첫번째 줄
%%     두번째 줄
\DeclareOption{들여왼쪽맞춤}{
  \renewcommand\@makefntext[1]{%
    \settowidth{\foot@parindent}{\reset@font 각주}
    \leftskip\foot@parindent
    \parindent\z@\noindent
    \fn@markstyle\hskip\footnumbersep #1
  }
}

%% 각주 들여내어쓰기
%% ---------------------
%%     1) 첫번째 줄
%%        두번째 줄
\DeclareOption{들여내어쓰기}{
  \long\def\@makefntext#1{
    \settowidth{\foot@parindent}{\reset@font 각주}
    \settowidth{\footnumbersep}{\reset@font 주}
    \divide\footnumbersep by2
    \leftskip\foot@parindent
    \@setpar{\@@par\@tempdima \hsize
      \advance\@tempdima-\foot@parindent
      \parshape\@ne\foot@parindent \@tempdima}\par
    \parindent\z@\noindent
    \hb@xt@\z@{\hss\hss\fn@markstyle\hskip\footnumbersep}#1}
}

%% 각주 들여괄호맞춤
%% ---------------------
%%     1)  첫번째 줄
%%       두번째 줄
\DeclareOption{들여괄호맞춤}{
  \def\fn@markstyle{\@thefnmark)}
  \settowidth{\footnumbersep}{~}
  \long\def\@makefntext#1{
    \settowidth{\leftskip}{\reset@font 각주}
    \settowidth{\foot@parindent}{\fn@markstyle}
    \settowidth{\footnumbersep}{\reset@font 주}
    \@setpar{\@@par\@tempdima \hsize
      \advance\@tempdima-\foot@parindent
      \parshape\@ne\foot@parindent \@tempdima}\par
    \parindent=\footnumbersep\noindent
    \hb@xt@\z@{\hss\hss\fn@markstyle}\hskip\footnumbersep #1}
}

\ExecuteOptions{첨자, 내어쓰기}

\endinput

%% end of hfn-u.tex