%% %% This is file 'ifptex.sty'. %% %% Copyright (c) 2017 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% %% This package is distributed under the MIT License. %% % %% avoid multiple loading \csname\if11bxipIfptexLoaded\fi\endcsname %% code guards \edef\x{% \catcode32=\the\catcode32% \catcode33=\the\catcode33% \catcode35=\the\catcode35% \catcode42=\the\catcode42% \catcode60=\the\catcode60% \catcode62=\the\catcode62% \catcode64=\the\catcode64% \catcode91=\the\catcode91% \catcode93=\the\catcode93% \relax} \catcode32=10\relax \catcode33=11 %<"> \catcode35=6 %<#> \catcode42=12 %<*> \catcode60=12 %<<> \catcode62=12 %<>> \catcode64=11 %<@> \catcode91=12 %<[> \catcode93=12 %<]> \edef\bxip@restore@codes{\x \noexpand\let\noexpand\bxip@restore@codes\relax} \def\bxipIfptexLoaded{\endinput} %% check for LaTeX \ifx\RequirePackage\@undefined %<*!LaTeX> \let\bxip@latex=f \long\def\x#1\ProvidesPackage#2[#3]{% \immediate\write-1{Package: #2 #3}} \expandafter\x \else %<*LaTeX> \let\bxip@latex=t \let\x\relax \fi % %% package declaration \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{ifptex}[2017/09/09 v1.2 pTeX checker] %% enter the big group \begingroup %--------------------------------------- helpers %% \bxip@csletcs{}{} \def\bxip@csletcs#1#2{% \expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname} %% \bxip@true{} \def\bxip@true#1{% \expandafter\let\csname#1\endcsname\iftrue} %% \bxip@false{} \def\bxip@false#1{% \expandafter\let\csname#1\endcsname\iffalse} %% switches \bxip@false{ifbxip@ok} %% \bxip@test@primitive\CS \def\bxip@test@primitive#1{% \edef\bxip@tmpa{\string#1}\edef\bxip@tmpb{\meaning#1}% \ifx\bxip@tmpa\bxip@tmpb \bxip@true{ifbxip@ok}% \else \bxip@false{ifbxip@ok}% \fi} %% \bxip@with@default{}\CS \gdef\bxip@with@default#1#2{% \def\bxip@tmpa{#2}\def\bxip@tmpb{#2[#1]}% \futurelet\bxip@tok\bxip@with@default@a} \gdef\bxip@with@default@a{% \ifx[\bxip@tok\expandafter\bxip@tmpa%] \else \expandafter\bxip@tmpb \fi} %% \bxip@check@version{}{}{