summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/luatexja/src/ltj-base.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/luatexja/src/ltj-base.sty')
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-base.sty147
1 files changed, 1 insertions, 146 deletions
diff --git a/macros/luatex/generic/luatexja/src/ltj-base.sty b/macros/luatex/generic/luatexja/src/ltj-base.sty
index 717105e3a5..605797f3a3 100644
--- a/macros/luatex/generic/luatexja/src/ltj-base.sty
+++ b/macros/luatex/generic/luatexja/src/ltj-base.sty
@@ -13,7 +13,7 @@
\ifltj@in@latex %<*LaTeX>
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{ltj-base}[2017/05/05]
+ \ProvidesPackage{ltj-base}[2020-07-27]
\fi %</LaTeX>
%%------------------ Tiny helpers
@@ -256,151 +256,6 @@
%! つまり単なる \luatexescape.
\let\ltj@luaxescape\luatexluaescapestring
-%%------------------ Fully-expandable error messaging
-
-%! ixerrtrick パッケージから移植.
-%! 展開限定文脈でも使える \PackageError 等.
-%! Lua 関数版(luatexja/base.lua 参照)もある.
-
-%% \ltj@@error@message@a
-\begingroup
-\def~{ }
-\xdef\ltj@@error@message@a{%
- Type~~H <return>~~for immediate help%
-}%
-\endgroup
-
-%%<+> \ltj@MessageBreak
-% An analogue of \MessageBreak that is used in \ltj@GenericError, etc.
-% (\MessageBreak cannot be used there.)
-% NB: It is realized as a macro that expands to two instances
-% of the character of code 127. This marker is later detected
-% by the Lua process.
-\begingroup
-\lccode42=127
-\lowercase{
- \gdef\ltj@MessageBreak{**}
- \directlua{
- luatexja.base._error_set_break("**")
- }
-}
-\endgroup
-
-%%<+> \ltj@GenericError{<cont>}{<msg-main>}{<msg-ref>}{<msg-help>}
-% A variant of \GenericError that can be used in expansion-only
-% situation. The meanings of arguments are the same as the original
-% \GenericError.
-%%<+> \ltj@PlainError{<msg-main>}{<msg-help>}
-% A simpler error messenger available in expansion-only situations.
-% It behaves similarly to:
-% \errhelp{<msg-help}\errmessage{<msg-main>}
-\begingroup
-% with the same hack as in \GenericError...
-\lccode`\@=`\ %
-\lccode`\~=`\ %
-\lccode`\}=`\ %
-\lccode`\{=`\ %
-\catcode`\ =11\relax%
-\lowercase{%
-\endgroup%
-\def\ltj@GenericError#1#2#3#4{% not protected
-\directlua{%
-luatexja.base._error_set_message("\ltj@luaxescape{#1}",%
-"\ltj@luaxescape{#2.^^J^^J#3^^J\ltj@@error@message@a}",%
-"\ltj@luaxescape{#4}")%
-}%
-\ % use csname with four spaces as last expander
-}
-\def\ {% csname with four spaces
-\directlua{%
-luatexja.base._error_show(false)% and many spaces trail!
- %
- %
-}%
-}%
-\def\ltj@PlainError#1#2{%
-\directlua{%
-luatexja.base._error_set_message(" ",%
-"\ltj@luaxescape{#1}",%
-"\ltj@luaxescape{#2}")%
-}%
-\error % again a weird name is used
-}
-\def\error {% csname with two trailing spaces
-\directlua{%
-luatexja.base._error_show(true)% and many spaces trail!
- %
- %
-}%
-}%
-}
-
-%% \ltj@@error@on@line
-\def\ltj@@error@on@line{
- on input line \the \inputlineno
-}
-
-%% \ltj@generic@warn@info
-\def\ltj@@generic@warn@info#1#2#3#4{
- \begingroup
- \directlua{
- luatexja.base._generic_warn_info("\ltj@luaxescape{#3}",
- "\ltj@luaxescape{#4}", (#1 > 0), (#2 > 0))
- }
- \endgroup
-}
-
-%% \ltj@GenericWarning{<cont>}{<msg-main>}
-\def\ltj@GenericWarning{
- \ltj@@generic@warn@info{1}{1}
-}
-%% \ltj@GenericWarningNoLine{<cont>}{<msg-main>}
-\def\ltj@GenericWarningNoLine{
- \ltj@@generic@warn@info{1}{0}
-}
-%% \ltj@GenericInfo{<cont>}{<msg-main>}
-\def\ltj@GenericInfo{
- \ltj@@generic@warn@info{0}{1}
-}
-%% \ltj@GenericInfoNoLine{<cont>}{<msg-main>}
-\def\ltj@GenericInfoNoLine{
- \ltj@@generic@warn@info{0}{0}
-}
-
-%% \ltj@@space@seq@a
-\begingroup
-\def~{ }
-\xdef\ltj@@space@seq@a{~~~~~~~~~~~~~~~~}
-\xdef\ltj@@space@seq@b{~~~~~~~~~~~~~}
-\endgroup
-
-%% \ltj@PackageError{<pkg-name>}{<msg-main>}{<msg-help>}
-\def\ltj@PackageError#1#2#3{%
- \ltj@GenericError{(#1)\ltj@@space@seq@a}%
- {Package #1 Error: #2}%
- {See the #1 package documentation for explanation.}%
- {#3}%
-}
-%% \ltj@PackageWarning{<pkg-name>}{<msg-main>}
-\def\ltj@PackageWarning#1#2{%
- \ltj@GenericWarning{(#1)\ltj@@space@seq@a}%
- {Package #1 Warning: #2}%
-}
-%% \ltj@PackageWarningNoLine{<pkg-name>}{<msg-main>}
-\def\ltj@PackageWarningNoLine#1#2{%
- \ltj@GenericWarningNoLine{(#1)\ltj@@space@seq@a}%
- {Package #1 Warning: #2}%
-}
-%% \ltj@PackageInfo{<pkg-name>}{<msg-main>}
-\def\ltj@PackageInfo#1#2{%
- \ltj@GenericInfo{(#1)\ltj@@space@seq@b}%
- {Package #1 Info: #2}%
-}
-%% \ltj@PackageInfoNoLine{<pkg-name>}{<msg-main>}
-\def\ltj@PackageInfoNoLine#1#2{%
- \ltj@GenericInfoNoLine{(#1)\ltj@@space@seq@b}%
- {Package #1 Info: #2}%
-}
%%------------------ debug logging
\ifdefined\LuaTeXjaDebugEnabled