%%
%% This is file `kopunct.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% kopunct.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2025 by Woohyun Kang <kangwh.2003@gmail.com>
%% 
%% This file 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{kopunct}[2025/05/01 v1.2
    Package for providing macros to input Korean punctuation marks]
\newif\ifkopunct@nocdot\kopunct@nocdotfalse
\newif\ifkopunct@nocdots\kopunct@nocdotsfalse
\newif\ifkopunct@oblivoir\kopunct@oblivoirfalse
\newif\ifkopunct@oblivoironly\kopunct@oblivoironlyfalse
\def\kopunct@tildestatus{1}
\DeclareOption{nocdot}{\kopunct@nocdottrue}
\DeclareOption{nocdots}{\kopunct@nocdotstrue}
\DeclareOption{notilde}{\def\kopunct@tildestatus{0}}
\DeclareOption{cjktilde}{\def\kopunct@tildestatus{2}}
\DeclareOption{fullwidthtilde}{\def\kopunct@tildestatus{3}}
\DeclareOption{oblivoir}{\kopunct@oblivoirtrue}
\DeclareOption{oblivoironly}{%
  \kopunct@oblivoirtrue
  \kopunct@oblivoironlytrue
}
\ProcessOptions\relax
\RequirePackage{iftex}
\ifkopunct@oblivoironly\else
  \ifkopunct@nocdot\else
    \NewCommandCopy{\math@cdot}{\cdot}
    \NewCommandCopy{\text@cdot}{\textperiodcentered}
    \protected\def\cdot{\ifmmode\math@cdot\else\text@cdot\fi}
  \fi
  \ifkopunct@nocdots\else
    \NewCommandCopy{\math@cdots}{\cdots}
    \iftutex
      \def\text@cdots{…}
    \else
      \DeclareTextCommandDefault{\text@cdots}{\unichar{"2026}}
      \DeclareUnicodeCharacter{2026}{\unichar{"2026}}
    \fi
    \protected\def\cdots{\ifmmode\math@cdots\else\text@cdots\fi}
    \protected\def\Cdots{%
      \ifmmode\math@cdots\math@cdots\else\text@cdots\text@cdots\fi
    }
    \@ifundefined{hellipsis}{%
      \def\hellipsis{……}%
    }{}
    \iftutex
      \UndeclareTextCommand{\textellipsis}{TU}
    \fi
  \fi
  \newcommand*\lnat{「}\newcommand*\rnat{」}%
  \newcommand*\nat[1]{{\lnat{#1}\rnat}}%
  \newcommand*\lNat{『}\newcommand*\rNat{』}%
  \newcommand*\Nat[1]{{\lNat{#1}\rNat}}%
  \newcommand*\lhwa{〈}\newcommand*\rhwa{〉}%
  \newcommand*\hwa[1]{{\lhwa{#1}\rhwa}}%
  \newcommand*\lHwa{《}\newcommand*\rHwa{》}%
  \newcommand*\Hwa[1]{{\lHwa{#1}\rHwa}}%
  \newcommand*\ltort{〔}\newcommand*\rtort{〕}%
  \newcommand*\tort[1]{{\ltort{#1}\rtort}}%
  \newcommand*\lTort{〘}\newcommand*\rTort{〙}%
  \newcommand*\Tort[1]{{\lTort{#1}\rTort}}%
  \newcommand*\llent{【}\newcommand*\rlent{】}%
  \newcommand*\lent[1]{{\llent{#1}\rlent}}%
  \newcommand*\lLent{〖}\newcommand*\rLent{〗}%
  \newcommand*\Lent[1]{{\lLent{#1}\rLent}}%
  \newcommand*\lBrac{〚}\newcommand*\rBrac{〛}%
  \newcommand*\Brac[1]{{\lBrac{#1}\rBrac}}%
\fi
\ifcase\kopunct@tildestatus
  \or
    \iftutex\else
      \newlength\kopunct@f@size
      \newlength\kopunct@f@baslineskip
      \newcommand\TildeScaleFactor{1.5}%
      \newcommand\TildeRaise{-1.35ex}%
      \newcommand\TildeHeight{1ex}%
      \def\kopunct@tilde{%
        \setlength\kopunct@f@size{\f@size pt}%
        \setlength\kopunct@f@baslineskip\f@baselineskip
        \raisebox{\TildeRaise}[\TildeHeight][0pt]{%
          \fontsize{\TildeScaleFactor\kopunct@f@size}%
              {\baselinestretch\kopunct@f@baslineskip}%
          \selectfont\char"7E
        }%
      }%
      \DeclareTextCompositeCommand{\~}{OT1}{}{\kopunct@tilde}
      \DeclareTextCompositeCommand{\~}{T1}{}{\kopunct@tilde}
    \fi
  \or
    \iftutex
      \DeclareTextCompositeCommand{\~}{TU}{}{〜}
    \else
      \DeclareTextCompositeCommand{\~}{OT1}{}{〜}
      \DeclareTextCompositeCommand{\~}{T1}{}{〜}
    \fi
  \or
    \iftutex
      \DeclareTextCompositeCommand{\~}{TU}{}{～}
    \else
      \DeclareTextCompositeCommand{\~}{OT1}{}{～}
      \DeclareTextCompositeCommand{\~}{T1}{}{～}
    \fi
\fi
\ifkopunct@oblivoir
  \NewCommandCopy{\cntrdot}{\textperiodcentered}
  \iftutex
    \protected\def\cntrdots{…}
  \else
    \protected\def\cntrdots{\unichar{"2026}}
    \DeclareUnicodeCharacter{2026}{\unichar{"2026}}
  \fi
  \def\obldots{%
      .\kern\fontdimen3\font
      .\kern\fontdimen3\font
      .\kern\fontdimen3\font
  }
  \protected\def\obellipsis{\textellipsis\textellipsis}
  \def\snm#1{「#1」}
  \def\bnm#1{『#1』}
  \def\cnm#1{〈#1〉}
  \def\ccnm#1{《#1》}
  \protected\def\expldash{\,---\,}
  \protected\def\explpunc.#1.\ {\,---#1---\,}
\fi
\endinput
%%
%% End of file `kopunct.sty'.
