diff options
author | Karl Berry <karl@freefriends.org> | 2010-10-12 00:07:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-10-12 00:07:26 +0000 |
commit | baa7f8e9f03bccf6f383eab72d2945fb6a2e110d (patch) | |
tree | e3d8e915a08f103fe169e6bef2c0d62d305cb5d0 /Master/texmf-dist/tex/latex/expl3/l3msg.sty | |
parent | a8c915878e3e9b15a28df3a92b0c1ac925d6e28e (diff) |
expl3 2072 (10oct10)
git-svn-id: svn://tug.org/texlive/trunk@20059 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3msg.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3msg.sty | 127 |
1 files changed, 69 insertions, 58 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3msg.sty b/Master/texmf-dist/tex/latex/expl3/l3msg.sty index 6ed3dad14c1..4b1de84bee5 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3msg.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3msg.sty @@ -49,16 +49,18 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: l3msg.dtx 1866 2010-03-23 08:29:27Z joseph $ +\GetIdInfo$Id: l3msg.dtx 2052 2010-10-02 16:04:38Z will $ {L3 Experimental LaTeX Messages module} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} \package_check_loaded_expl: \int_set:Nn \tex_errorcontextlines:D { \c_minus_one } -\tl_const:Nn \c_msg_fatal_tl { Fatal~Error } -\tl_const:Nn \c_msg_error_tl { Error } -\tl_const:Nn \c_msg_warning_tl { Warning } -\tl_const:Nn \c_msg_info_tl { Info } +\tl_const:Nn \c_msg_error_tl { error } +\tl_const:Nn \c_msg_warning_tl { warning } +\tl_const:Nn \c_msg_info_tl { info } +\cs_new:Npn \msg_fatal_text:n #1 { Fatal~#1~error } +\cs_new:Npn \msg_see_documentation_text:n #1 + { See~the~#1~documentation~for~further~information } \tl_const:Nn \c_msg_coding_error_text_tl { This~is~a~coding~error. \msg_two_newlines: @@ -73,8 +75,7 @@ This~is~a~LaTeX~bug:~check~coding! } \tl_const:Nn \c_msg_kernel_bug_more_text_tl { - There~is~a~coding~bug~somewhere~around~here. - \msg_newline: + There~is~a~coding~bug~somewhere~around~here. \\ This~probably~needs~examining~by~an~expert. \c_msg_return_text_tl } @@ -83,19 +84,18 @@ \c_msg_return_text_tl } \tl_const:Nn \c_msg_return_text_tl { - \msg_two_newlines: + \\ \\ Try~typing~<return>~to~proceed. - \msg_newline: + \\ If~that~doesn't~work,~type~X~<return>~to~quit } \group_begin: -\char_make_letter:N\ % -\tl_to_lowercase:n{% -\group_end:% -\tl_const:Nn% -\c_msg_hide_tl % -{}% -}% +\char_make_letter:N \. +\tl_to_lowercase:n { + \group_end: + \tl_const:Nn \c_msg_hide_tl................................................ + {} +} \tl_const:Nn \c_msg_on_line_tl { on~line } \tl_const:Nn \c_msg_text_prefix_tl { msg_text ~>~ } \tl_const:Nn \c_msg_more_text_prefix_tl { msg_text_more ~>~ } @@ -143,34 +143,44 @@ \group_begin: \char_set_lccode:nn {`\&} {`\ } % { \char_set_lccode:w `\} = `\ \scan_stop: + \char_set_lccode:w `\& = `\!\scan_stop: \char_make_active:N \& - \char_make_letter:N\ % -\tl_to_lowercase:n{% -\group_end:% -\cs_new_protected:Npn\msg_direct_interrupt:xxxx#1#2#3#4{% -\group_begin:% -\cs_set_eq:NN\\\msg_newline:% -\cs_set_eq:NN\ \c_space_tl% -\msg_direct_interrupt_aux:n{#4}% -\cs_set_nopar:Npn\\{\msg_newline:#3}% -\tex_errhelp:D\l_msg_tmp_tl% -\cs_set:Npn&{% -\tex_errmessage:D{% -#1\msg_newline:% -#2\msg_two_newlines:% -\c_msg_help_text_tl% -\c_msg_hide_tl % -}% -}% -&% -\group_end:% -}% -}% + \char_make_letter:N \. +\tl_to_lowercase:n{ + \group_end: + \cs_new_protected:Npn \msg_direct_interrupt:xxxxx #1#2#3#4#5 { + \group_begin: + \cs_set_nopar:Npn \\ {\msg_newline:} + \cs_set_eq:NN \ \c_space_tl + \tl_set:Nx \l_tmpa_tl {#5} + \tl_set:Nx \l_tmpb_tl {\c_msg_no_info_text_tl} + \msg_direct_interrupt_aux:n {#5} + \tex_errhelp:D \l_msg_tmp_tl + \cs_set_nopar:Npn \\ {\msg_newline: !~#3} + \iow_term:x + {\msg_newline: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!} + \cs_set:Npn & { + \tex_errmessage:D{ + \\ #1 \\ \\ #2 \\ \\ #4 + \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl + { . \\ \c_msg_help_text_tl } + \c_msg_hide_tl................................................ + } + } + & + \group_end: + } +} \cs_new_protected:Npn \msg_direct_interrupt_aux:n #1 { + \cs_set_nopar:Npn \\ {\msg_newline: |~} \tl_if_empty:nTF {#1} { \tl_set:Nx \l_msg_tmp_tl { { \c_msg_no_info_text_tl } } }{ - \tl_set:Nx \l_msg_tmp_tl { {#1} } + \tl_set:Nx \l_msg_tmp_tl { { + |'''''''''''''''''''''''''''''''''''''''''''''''\\ + #1^^J + |...............................................^^J + } } } } \cs_new_protected:Npn \msg_direct_log:xx #1#2 { @@ -276,24 +286,24 @@ } } \msg_class_new:nn { fatal } { - \msg_direct_interrupt:xxxx - { \c_msg_fatal_tl \msg_two_newlines: } + \msg_direct_interrupt:xxxxx + { \msg_fatal_text:n {#1} : ~ "#2" } { - ( \c_msg_fatal_tl ) \c_space_tl \use:c { \c_msg_text_prefix_tl #1 / #2 :xxxx } {#3} {#4} {#5} {#6} } - { ( \c_msg_fatal_tl ) \c_space_tl } + {} + { \msg_see_documentation_text:n {#1} } { \c_msg_fatal_text_tl } \tex_end:D } \msg_class_new:nn { error } { - \msg_direct_interrupt:xxxx - { #1~\c_msg_error_tl \msg_newline: } + \msg_direct_interrupt:xxxxx + { #1~ \c_msg_error_tl : ~ "#2" } { - ( #1 ) \c_space_tl \use:c { \c_msg_text_prefix_tl #1 / #2 :xxxx } {#3} {#4} {#5} {#6} } - { ( #1 ) \c_space_tl } + {} + { \msg_see_documentation_text:n {#1} } { \cs_if_exist:cTF { \c_msg_more_text_prefix_tl #1 / #2 :xxxx } { @@ -372,27 +382,27 @@ } } \cs_new_protected:Npn \msg_kernel_fatal:nnxxxx #1#2#3#4#5#6 { - \msg_direct_interrupt:xxxx - { \c_msg_fatal_tl \msg_two_newlines: } + \msg_direct_interrupt:xxxxx + { \msg_fatal_text:n {LaTeX} } { - ( LaTeX ) \c_space_tl \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 :xxxx } {#3} {#4} {#5} {#6} } - { ( LaTeX ) \c_space_tl} + {} + { \msg_see_documentation_text:n {LaTeX3} } { \c_msg_fatal_text_tl } \tex_end:D } \msg_kernel_classes_new:n { fatal } \cs_new_protected:Npn \msg_kernel_error:nnxxxx #1#2#3#4#5#6 { - \msg_direct_interrupt:xxxx - { LaTeX~\c_msg_error_tl \msg_newline: } + \msg_direct_interrupt:xxxxx + { LaTeX~\c_msg_error_tl \c_space_tl "#2" } { - ( LaTeX ) \c_space_tl \use:c { \c_msg_text_prefix_tl LaTeX / #1 / #2 :xxxx } {#3} {#4} {#5} {#6} } - { ( LaTeX ) \c_space_tl } + {} + { \msg_see_documentation_text:n {LaTeX3} } { \cs_if_exist:cTF { \c_msg_more_text_prefix_tl LaTeX / #1 / #2 :xxxx } @@ -436,10 +446,11 @@ \c_msg_return_text_tl } \cs_set_protected:Npn \msg_kernel_bug:x #1 { - \msg_direct_interrupt:xxxx + \msg_direct_interrupt:xxxxx { \c_msg_kernel_bug_text_tl } - { !~#1 } - { ! } + { #1 } + {} + { \msg_see_documentation_text:n {LaTeX3} } { \c_msg_kernel_bug_more_text_tl } } %% |