%% file `hyperref-korean.sty`
%%
%% (C) Copyright 2024 강우현 <kangwh.2003 at gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%  http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2006/05/20 or later.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hyperref-korean}[2024/03/31 Korean localisation of hyperref package]

\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{hyperref}}
\ProcessOptions\relax
\RequirePackage{hyperref}

\def\equationautorefname{수식}%
\def\footnoteautorefname{각주}%
\def\itemautorefname{항목}%
\def\figureautorefname{그림}%
\def\tableautorefname{표}%
\def\partautorefname#1#2#3#4#5#6#7#8{제#2#3#4#5#6#7#8편}%
\def\appendixautorefname{부록}%
\def\chapterautorefname#1#2#3#4#5#6#7#8{제#2#3#4#5#6#7#8장}%
\def\sectionautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8절}%
\def\subsectionautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8절}%
\def\subsubsectionautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8절}%
\def\paragraphautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8문단}%
\def\subparagraphautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8문단}%
\def\FancyVerbLineautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8행}%
\def\theoremautorefname{정리}%
\def\pageautorefname#1#2#3#4#5#6#7#8{#2#3#4#5#6#7#8쪽}%

\@ifpackageloaded{varioref}{
  \AtBeginDocument{%
    \@ifundefined{hyper@nopatch@varioref}{
      \renewcommand\Vref@star[2][]{%
        \begingroup
          \let\T@pageref\@pagerefstar
          \vpageref[#1]{#2} \Ref*{#2}%
        \endgroup}%
      \renewcommand\Vr@f[2][]{%
        \begingroup
          \let\T@pageref\@pagerefstar
          \hyperref[{#2}]{\vpageref[#1]{#2} \Ref*{#2}}%
        \endgroup}%
      \renewcommand\vr@f[2][]{%
        \begingroup
          \let\T@pageref\@pagerefstar
          \hyperref[{#2}]{\vpageref[#1]{#2} \ref*{#2}}%
        \endgroup}%
      \renewcommand\vref@star[2][]{%
        \begingroup
          \let\T@pageref\@pagerefstar
          \vpageref[#1]{#2} \ref*{#2}%
        \endgroup}%
    }{}%
  }
}

\endinput