This repository has been archived on 2021-02-05. You can view files and clone it, but cannot push or open issues or pull requests.
ipcv/resource/Sources/LocalProcessing/mhsetup.sty
Nguyễn Anh Khoa a43837539e init
2019-05-14 22:37:19 +07:00

166 lines
4.9 KiB
TeX

%%
%% This is file `mhsetup.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% mhsetup.dtx (with options: `package')
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% 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.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Morten H\o gholm.
%%
%% This work consists of the files mhsetup.dtx and mhsetup.ins and
%% the derived file mhsetup.sty.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mhsetup}
[2004/10/10 v1.0b programming setup (MH)]
\def\MHInternalSyntaxOn{
\edef\MHInternalSyntaxOff{%
\catcode`\noexpand\~=\the\catcode`\~\relax
\catcode`\noexpand\ =\the\catcode`\ \relax
\catcode`\noexpand\^^I=\the\catcode`\^^I\relax
\catcode`\noexpand\@=\the\catcode`\@\relax
\catcode`\noexpand\:=\the\catcode`\:\relax
\catcode`\noexpand\_=\the\catcode`\_\relax
\endlinechar=\the\endlinechar\relax
}%
\catcode`\~=10\relax
\catcode`\ =9\relax
\catcode`\^^I=9\relax
\makeatletter
\catcode`\_=11\relax
\catcode`\:=11\relax
\endlinechar=` %
\relax
}
\MHInternalSyntaxOn
\AtEndOfPackage{\MHInternalSyntaxOff}
\let\MH_let:NwN \let
\def\MH_let:cN #1#2{
\expandafter\MH_let:NwN \csname#1\endcsname#2}
\def\MH_let:cc #1#2{
\expandafter\MH_let:NwN\csname#1\expandafter\endcsname
\csname#2\endcsname}
\def\MH_new_boolean:n #1{
\expandafter\@ifdefinable\csname if_boolean_#1:\endcsname{
\@namedef{boolean_#1_true:}
{\MH_let:cN{if_boolean_#1:}\iftrue}
\@namedef{boolean_#1_false:}
{\MH_let:cN{if_boolean_#1:}\iffalse}
\@nameuse{boolean_#1_false:}%
}
}
\def\MH_set_boolean_F:n #1{ \@nameuse{boolean_#1_false:} }
\def\MH_set_boolean_T:n #1{ \@nameuse{boolean_#1_true:} }
\def\MH_if_boolean:nTF #1{
\@nameuse{if_boolean_#1:}
\expandafter\@firstoftwo
\else:
\expandafter\@secondoftwo
\fi:
}
\def\MH_if_boolean:nT #1{
\@nameuse{if_boolean_#1:}
\expandafter\@firstofone
\else:
\expandafter\@gobble
\fi:
}
\def\MH_if_boolean:nF #1{
\@nameuse{if_boolean_#1:}
\expandafter\@gobble
\else:
\expandafter\@firstofone
\fi:
}
\@ifundefined{if:w}{\MH_let:NwN \if:w =\if}{}
\@ifundefined{if_meaning:NN}{\MH_let:NwN \if_meaning:NN =\ifx}{}
\@ifundefined{else:}{\MH_let:NwN \else:=\else}{}
\@ifundefined{fi:}{\MH_let:NwN \fi:=\fi}{}
\@ifundefined{if_num:w}{\MH_let:NwN \if_num:w =\ifnum}{}
\@ifundefined{if_dim:w}{\MH_let:NwN \if_dim:w =\ifdim}{}
\@ifundefined{if_case:w}{\MH_let:NwN \if_case:w =\ifcase}{}
\@ifundefined{or:}{\MH_let:NwN \or:=\or}{}
\def\MH_cs_to_str:N {\expandafter\@gobble\string}
\@ifundefined{eTeXversion}
{
\MH_let:NwN \MH_protected:\relax
\def\MH_setlength:dn{\setlength}
\def\MH_addtolength:dn{\addtolength}
}
{
\MH_let:NwN \MH_protected:\protected
\def\MH_setlength:dn #1#2{#1=\dimexpr#2\relax\relax}
\def\MH_addtolength:dn #1#2{\advance#1 \dimexpr#2\relax\relax}
}
\def\MH_keyval_alias_with_addon:nnnn #1#2#3#4{
\@namedef{KV@#1@#2}{\@nameuse{KV@#1@#3}#4}
\@namedef{KV@#1@#2@default}{\@nameuse{KV@#1@#3@default}#4}}
\def\MH_keyval_alias:nnn #1#2#3{
\MH_keyval_alias_with_addon:nnnn {#1}{#2}{#3}{}}
\def\MH_use_choice_i:nnnn #1#2#3#4{#1}
\def\MH_use_choice_ii:nnnn #1#2#3#4{#2}
\def\MH_use_choice_iii:nnnn #1#2#3#4{#3}
\def\MH_use_choice_iv:nnnn #1#2#3#4{#4}
\long\def\MH_nospace_ifnextchar:Nnn #1#2#3{
\MH_let:NwN\reserved@d=~#1
\def\reserved@a{#2}
\def\reserved@b{#3}
\futurelet\@let@token\MH_nospace_nextchar:
}
\def\MH_nospace_nextchar:{
\if_meaning:NN \@let@token\reserved@d
\MH_let:NwN \reserved@b\reserved@a
\fi:
\reserved@b
}
\long\def\MH_nospace_testopt:nn #1#2{
\MH_nospace_ifnextchar:Nnn[
{#1}
{#1[{#2}]}
}
\def\MH_nospace_protected_testopt:n #1{
\if_meaning:NN \protect\@typeset@protect
\expandafter\MH_nospace_testopt:nn
\else:
\@x@protect#1
\fi:
}
\@ifundefined{kernel@ifnextchar}
{\MH_let:NwN \kernel@ifnextchar \@ifnextchar}
{}
\MH_let:NwN \MH_kernel_xargdef:nwwn \@xargdef
\long\def\MH_nospace_xargdef:nwwn #1[#2][#3]#4{
\@ifdefinable#1{
\expandafter\def\expandafter#1\expandafter{
\expandafter
\MH_nospace_protected_testopt:n
\expandafter
#1
\csname\string#1\endcsname
{#3}}
\expandafter\@yargdef
\csname\string#1\endcsname
\tw@
{#2}
{#4}}}
\providecommand*\MHPrecedingSpacesOff{
\MH_let:NwN \@xargdef \MH_nospace_xargdef:nwwn
}
\providecommand*\MHPrecedingSpacesOn{
\MH_let:NwN \@xargdef \MH_kernel_xargdef:nwwn
}
\endinput
%%
%% End of file `mhsetup.sty'.