diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/msg | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/msg')
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/README | 91 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/README_msg_doc.txt | 91 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/french_msg-msg.tex | 63 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/german_msg-msg.tex | 60 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/msg-msg.tex | 59 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/msg.pdf | bin | 0 -> 387171 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/msgtest.tex | 199 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/msg/norsk_msg-msg.tex | 44 |
8 files changed, 607 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/msg/README b/Master/texmf-dist/doc/latex/msg/README new file mode 100644 index 00000000000..8ccbc4eb975 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/README @@ -0,0 +1,91 @@ +%% +%% This is file `README_msg_doc.txt', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msg.dtx (with options: `README') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +%% +%% HERE IS THE MSG PACKAGE FOR LaTeX +%% +%% A LaTeX package to localize any package or document class. +%% +%% A LaTeX package able to issue messages in the language provided as option +%% of \documentclass or in use in the document (\languagename). All messages +%% are identified with a unique "id" and stored in a MessagesFile whose name +%% is related to the package and optionnaly to the language. +%% +%% MessagesFile, name: [<language>]_<package>-msg.tex +%% contents: \msg{<id>}{<message>} % defines the message "id". +%% \msg*{<id>}{<message>} % star form for msg emphasis. +%% \msg{*}{<error message>} % bad "id" default message. +%% Messages can have 3 more parts defined asis: +%% \msg{<id>}{<msg>}[ % defines the msg first part. +%% \msgparti{<msg_part>} % defines the msg second part. +%% \msgpartii{<msg_part>} % defines the msg third part. +%% \msgpartiii{<msg_part>}] % defines the msg fourth part. +%% Any message part can include a |#1| parameter provided from any +%% of the macros below. +%% Error messages have just a help more part as follows: +%% \msg{<id>}{<msg>}[ % defines the msg first part. +%% \help{<help_part>}] % defines the help part. +%% All messages should be fully expandable. +%% Custolization: +%% \msgheader{<head part of messages>} +%% \msgtrailer{<final part of messages>} +%% \msgencoding{<encoding of messages>}% as for inputenc. +%% Check "msg-msg.tex" file for msg's own messages file. +%% +%% Document usage: \documentclass[any_option]{any_class} +%% call: \usepackage[options,language]{msg} +%% +%% to issue the message "id": \issuemsg{<id>}(<package>)[#1] +%% One can use any message macro (defaultly \typeout) with: +%% \issuemsg[msg_macro]{<id>}(<package>)[#1] +%% Multi-parts message can't be issued through \issuemsg. +%% One can specify the macro name to issue message as an option +%% of \usepackage: \message, \wlog, \typeout, \kbtypyeout or +%% \ClassWarning, \ClassError, \PackageWarning, \PackageError, ... +%% +%% to retrieve the message "id" in \themsg (without typesetting): +%% \retrievemsg{<id>}(<package>)[#1] +%% Multi-parts message will have defined also \themsgi, +%% \themsgii and \themsgiii. +%% to get the message "id": \getmsg{<id>}(<package>)[#1] +%% +%% Usually, the requested message "id" is retrieved from +%% [<language>]_<package>-msg.tex but if there is no active language +%% or if file don't exist then message is searched in the +%% <package>-msg.tex file. +%% +%% For testing a messages file, you can code: +%% \issueallmsg[msg_macro](<package>) +%% and all messages from the file will be retrieved and issued. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~ +%% And any code from 128 to 255 +%% } +%% +\endinput +%% +%% End of file `README_msg_doc.txt'. diff --git a/Master/texmf-dist/doc/latex/msg/README_msg_doc.txt b/Master/texmf-dist/doc/latex/msg/README_msg_doc.txt new file mode 100644 index 00000000000..8ccbc4eb975 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/README_msg_doc.txt @@ -0,0 +1,91 @@ +%% +%% This is file `README_msg_doc.txt', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msg.dtx (with options: `README') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +%% +%% HERE IS THE MSG PACKAGE FOR LaTeX +%% +%% A LaTeX package to localize any package or document class. +%% +%% A LaTeX package able to issue messages in the language provided as option +%% of \documentclass or in use in the document (\languagename). All messages +%% are identified with a unique "id" and stored in a MessagesFile whose name +%% is related to the package and optionnaly to the language. +%% +%% MessagesFile, name: [<language>]_<package>-msg.tex +%% contents: \msg{<id>}{<message>} % defines the message "id". +%% \msg*{<id>}{<message>} % star form for msg emphasis. +%% \msg{*}{<error message>} % bad "id" default message. +%% Messages can have 3 more parts defined asis: +%% \msg{<id>}{<msg>}[ % defines the msg first part. +%% \msgparti{<msg_part>} % defines the msg second part. +%% \msgpartii{<msg_part>} % defines the msg third part. +%% \msgpartiii{<msg_part>}] % defines the msg fourth part. +%% Any message part can include a |#1| parameter provided from any +%% of the macros below. +%% Error messages have just a help more part as follows: +%% \msg{<id>}{<msg>}[ % defines the msg first part. +%% \help{<help_part>}] % defines the help part. +%% All messages should be fully expandable. +%% Custolization: +%% \msgheader{<head part of messages>} +%% \msgtrailer{<final part of messages>} +%% \msgencoding{<encoding of messages>}% as for inputenc. +%% Check "msg-msg.tex" file for msg's own messages file. +%% +%% Document usage: \documentclass[any_option]{any_class} +%% call: \usepackage[options,language]{msg} +%% +%% to issue the message "id": \issuemsg{<id>}(<package>)[#1] +%% One can use any message macro (defaultly \typeout) with: +%% \issuemsg[msg_macro]{<id>}(<package>)[#1] +%% Multi-parts message can't be issued through \issuemsg. +%% One can specify the macro name to issue message as an option +%% of \usepackage: \message, \wlog, \typeout, \kbtypyeout or +%% \ClassWarning, \ClassError, \PackageWarning, \PackageError, ... +%% +%% to retrieve the message "id" in \themsg (without typesetting): +%% \retrievemsg{<id>}(<package>)[#1] +%% Multi-parts message will have defined also \themsgi, +%% \themsgii and \themsgiii. +%% to get the message "id": \getmsg{<id>}(<package>)[#1] +%% +%% Usually, the requested message "id" is retrieved from +%% [<language>]_<package>-msg.tex but if there is no active language +%% or if file don't exist then message is searched in the +%% <package>-msg.tex file. +%% +%% For testing a messages file, you can code: +%% \issueallmsg[msg_macro](<package>) +%% and all messages from the file will be retrieved and issued. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~ +%% And any code from 128 to 255 +%% } +%% +\endinput +%% +%% End of file `README_msg_doc.txt'. diff --git a/Master/texmf-dist/doc/latex/msg/french_msg-msg.tex b/Master/texmf-dist/doc/latex/msg/french_msg-msg.tex new file mode 100644 index 00000000000..801c97e4771 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/french_msg-msg.tex @@ -0,0 +1,63 @@ +%% +%% This is file `french_msg-msg.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msg.dtx (with options: `french') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +\msgencoding{latin1}\msgheader{}\msgtrailer{} +\msg{1}{\filedate\space chargement de l'extension de % + localisation (\fileversion).}{} +\msg{2}{le paramètre optionnel est invalide}{} +\msg{3}{le langage demandé (\CurrentOption) n'existe pas}{} +\msg{4}{Ceci est pour tester le dispositif #1}{} +\msg{5}{ligne }{\msgparti{de l'extension ``msg'' génère le % + message de #1 \#\msgid}} +\msg{6}{extension msg \string: fin ANORMALE de fichier rencontrée % + en chargeant le fichier \msg@filename\space\string!}{} +\msg{7}{erreur de syntaxe à l'appel de \string\msg}% cas special de test + {\help{il manque le dernier argument.}} +\msgheader{MESSAGE\space\msgid\space\string:\space\string<\string<\space} +\msgtrailer{\space\string>\string>} +\msg{8}{ceci est un message personnalisé}{} +\msg{9}{ceci est un message personnalisé % + \MessageBreak et aligné}{} +\msgheader{Message\space\msgid\space(msg)\space\string:\space}\msgtrailer{} +\msg*{10}{****** Je mets en valeur \string: % + ceci est un AVERTISSEMENT ! ****** % + \MessageBreak ****** Soyez prudent.^^J}{} +\msgheader{}\msgtrailer{} +\msg{11}{L'extension msg est en service avec l'option % + \string<\string< tracefiles \string>\string>.}{} +\msg{12}{Un risque de boucle infinie a été rencontré \string; % + \MessageBreak % + vérifier le fichier des message \string: \msg@filename}% + {\help{Voir les règles à appliquer dans les fichiers de messages.}} +\msg{*}{le message id ``\msgid'' n'est pas répertorié}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~ +%% And any code from 128 to 255 +%% } +%% +\endinput +%% +%% End of file `french_msg-msg.tex'. diff --git a/Master/texmf-dist/doc/latex/msg/german_msg-msg.tex b/Master/texmf-dist/doc/latex/msg/german_msg-msg.tex new file mode 100644 index 00000000000..b17ffed7d7d --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/german_msg-msg.tex @@ -0,0 +1,60 @@ +%% +%% This is file `german_msg-msg.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msgfiles.dtx (with options: `german') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +\msgencoding{latin1}\msgheader{}\msgtrailer{} +\msg{1}{\filedate\space \fileversion\space Paket zur Verwendung % +lokalisierter Nachrichten geladen.}{} +\msg{2}{Ungültiger optionaler Parameter definiert:}{} +\msg{3}{Ungültige Sprache angefordert: ,,\CurrentOption``}{} +\msg{4}{Dies testet das #1-Feature}{} +\msg{5}{,,msg``-Paket, Zeilennummer }{\msgparti{Ausgabe der % +Nachricht \#\msgid\ #1}} +\msg{6}{msg-Paket: Ungewöhnliches Dateiende erreicht % + beim Lesen der Datei \msg@filename!}{} +\msg{7}{\string\msg\space Eingabefehler}{\help{Letztes % special test case + Argument fehlt.}} +\msgheader{Nachricht\space\msgid:\space,,}\msgtrailer{``} +\msg{8}{Dies ist eine Benutzernachricht}{}% +\msg{9}{Dies ist eine Benutzernachricht % + \MessageBreak mit ausgerichteter Fortsetzung}{} +\msgheader{Nachricht\space\msgid\space(msg):\space}\msgtrailer{} +\msg*{10}{****** Ich betone: Dies ist eine Warnung! ****** % + \MessageBreak ****** Obacht!^^J}{} +\msgheader{}\msgtrailer{} +\msg{11}{Das msg-Paket wird mit der ,,tracefiles``-Option % + verwendet.}{} +\msg{12}{Ein Risiko einer Endlosschleife ist aufgetreten; % + \MessageBreak % + Siehe Message-Datei: \msg@filename}% + {\help{Siehe Hinweise in den Message-Dateien.}} +\msg{*}{Fehlerhafte Nachrichten-ID ,,\msgid``}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +</german> +\endinput +%% +%% End of file `german_msg-msg.tex'. diff --git a/Master/texmf-dist/doc/latex/msg/msg-msg.tex b/Master/texmf-dist/doc/latex/msg/msg-msg.tex new file mode 100644 index 00000000000..96bb8f2db8b --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/msg-msg.tex @@ -0,0 +1,59 @@ +%% +%% This is file `msg-msg.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msg.dtx (with options: `english') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +\msgencoding{}\msgheader{}\msgtrailer{} +\msg{1}{\filedate\space \fileversion\space package to issue localized % + messages, now loaded.}{} +\msg{2}{invalid optional parameter provided:}{} +\msg{3}{invalid language requested: ``\CurrentOption''}{} +\msg{4}{This is to test the #1 feature}{} +\msg{5}{``msg'' package line number }{\msgparti{issues \#\msgid\ #1 message}} +\msg{6}{msg package: UNUSUAL end of file reached % + when loading \msg@filename\space file!}{} +\msg{7}{\string\msg\space syntax error}{\help{last % special test case + argument is missing.}} +\msgheader{MESSAGE\space\msgid:\space``}\msgtrailer{''} +\msg{8}{here is a customized message}{}% +\msg{9}{here is a customized message % + \MessageBreak which continuation is aligned}{} +\msgheader{Message\space\msgid\space(msg):\space}\msgtrailer{} +\msg*{10}{****** I emphasize: this is a WARNING! ****** % + \MessageBreak ****** Be careful.^^J}{} +\msgheader{}\msgtrailer{} +\msg{11}{The msg package is in use with ``tracefiles'' option.}{} +\msg{12}{A risk of infinite loop arose; % + \MessageBreak % + please check the message file: \msg@filename}% + {\help{Look at rules to apply in messages files.}} +\msg{*}{erroneous message id ``\msgid''}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~ +%% And any code from 128 to 255 +%% } +%% +\endinput +%% +%% End of file `msg-msg.tex'. diff --git a/Master/texmf-dist/doc/latex/msg/msg.pdf b/Master/texmf-dist/doc/latex/msg/msg.pdf Binary files differnew file mode 100644 index 00000000000..2c528069b02 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/msg.pdf diff --git a/Master/texmf-dist/doc/latex/msg/msgtest.tex b/Master/texmf-dist/doc/latex/msg/msgtest.tex new file mode 100644 index 00000000000..65f51bc1902 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/msgtest.tex @@ -0,0 +1,199 @@ +% This is a second test file for the "msg" package; +% the first one being the msg.dtx file itself. +% +% You can replace "norsk" with your own language name to test +% a new messages file related to you language. +% +\documentclass[10pt]{article} + \usepackage[norsk,german,frenchb,english]{babel} + \usepackage[T1]{fontenc} + \usepackage{shortvrb} + \usepackage{msg}% +% \usepackage[tracefiles]{msg}% should also be tested with "tracefiles" +% \usepackage{msg,french}% should also be tested with your language. +\begin{document} +\MakeShortVerb{|} + +\title{The "msg" package test file} +\author{}\date{} +\maketitle + +The following examples are going from the ``msg'' documentation itself. + +\section*{Examples \& tests} + |\issuemsg1(msg)| will give at the console: \\ + \centerline{\tt\getmsg1(msg)} but + |\issuemsg01(msg)| will give: \retrievemsg01(msg){\tt\themsg}. + + While defining |\def\test#1{`\issuemsg4(msg)[#1]'}| the following call + |\emph{\test{SPECIAL}}| will print: \def\test#1{`\getmsg4(msg)[#1]'}\\ + \centerline{\emph{\test{SPECIAL}}} showing that the argument + was inserted inside the message at the exact area, replacing |#1|. + + In a French document, the same codes will issue:\\ + \bgroup\selectlanguage{french} + \centerline{\tt\getmsg1(msg)} + \centerline{\retrievemsg01(msg){\tt\themsg}} + \centerline{\emph{\test{SPECIAL}}} + \egroup + + \retrievemsg1(msg) + |\retrievemsg1(msg)| will set |\themsg| with the value of + the corresponding message ; nothing is issued at the console + nor in the log, except if the |<|\emph{id}|>| is not found in + the message file. + + \noindent|\show\themsg| will explain: + + \noindent|> \themsg=macro:| + + \noindent|->|\texttt{\themsg} + + \noindent In a French document, the same code will issue: + + \bgroup\selectlanguage{french} + \retrievemsg1(msg) + \noindent|> \themsg=macro:| + + \noindent|->|\texttt{\themsg} + \egroup + + In case the message file is empty or do not contain neither the message + ``id'' nor any |\msg{*}| macro then we will obtain: + \bgroup\makeatletter + \catcode`*=\active\let*\relax%^^A for expansion when \read case. + \let\@msg@code@ast=\active%^^A to simulate a missing \msg{*}. + \retrievemsg999(msg) + + \noindent|> \themsg=macro:| + + \noindent|->|\texttt{\themsg} + \egroup + + It may also arrive that we don't find that former message (|#6|) at all + then we will issue the usual \LaTeX\ |\PackageError| macro. + + We use message \# 5 of |msg-msg.tex| file as following: + + \noindent + \def\foo#1{\retrievemsg5(msg)[#1]\themsg\the\inputlineno\ \themsgi} + |\def\foo#1{\retrievemsg5(msg)[#1]\themsg\the\inputlineno\ \themsgi}| + + \medskip\noindent + then |\emph{The \foo{test}}| will generate: + + \centerline{The \emph{\foo{test}}} + + \noindent + In a French document, the code |\emph{La \foo{test}}| will issue: + + \bgroup\selectlanguage{french} + \centerline{\emph{La \foo{test}}} + \egroup + + \medskip + We will now use the message \# 8 of |msg-msg.tex| file in order + to show the customization set in that file. + + \medskip\noindent + |\getmsg8(msg)| will generate:\\ + \getmsg8(msg) + + The following |\texttt{\getmsg9(msg)}| using + |\MessageBreak| will give at the console:\\% + {\catcode`^^J=\active\let^^J\\%^^A We try to simulate the output console. + \def\@msgalspace{\hbox{\space}}%^^A In order to simule \obeyspaces + \def\space{\@sptoken}%^^A we used \space in \msgheader argument. + \def\MessageBreak{^^J\expandafter\@msgalign\msg@header\void% + \hbox{\space}}%^^A Please explain this tt behaviour... + \texttt{\getmsg9(msg)}\\% + } + (same message issued to the console\issuemsg9(msg)).%^^A Issue it really. + + \noindent + And in a French document, the same calls will issue:\\ + \bgroup\selectlanguage{french}% + \getmsg8(msg)\\% + \catcode`<=12\catcode`>=12\relax%^^A To remove ltxdoc active chars. + \catcode`^^J=\active\let^^J\\%^^A We try to simulate the output console. + \def\@msgalspace{\hbox{\space}}%^^A In order to simule \obeyspaces + \def\space{\@sptoken}%^^A We try to simulate the output console. + \def\MessageBreak{^^J\expandafter\@msgalign\msg@header\void% + \hbox{\space}}%^^A Please explain this tt behaviour... + \texttt{\getmsg9(msg)} + + \egroup + + Below is a test of an emphasized message (|\texttt{\getmsg{10}(msg)}|): + + {\catcode`^^J=\active\let^^J\\%^^A We try to simulate the output console. + \def\msg{\@ifstar{\def\@msgskip{\\}\@msg}{\def\@msgskip{}\@msg}}% + \def\@msgalspace{\hbox{\space}}%^^A In order to simule \obeyspaces + \def\space{\@sptoken}%^^A we used \space in \msgheader argument. + \def\MessageBreak{^^J\expandafter\@msgalign\msg@header\void% + \hbox{\space}}%^^A Please explain this tt behaviour... + \noindent\texttt{\getmsg{10}(msg)}% + } + (same message issued to the console\issuemsg{10}(msg)). + + Notice that the "msg" \emph{id} can be any string, not necessarily +a string of digits. Here is an expample : + +\begin{verbatim} +\newcommand{\ID}{12} +\texttt{\getmsg{\ID}(msg)} +\end{verbatim} + +\noindent +will generate the following: \\ +\newcommand{\ID}{12}\texttt{\getmsg{\ID}(msg)} + +\section*{Test the message encoding} + +Temporary we reset the input encoding to \texttt{ascii} by +calling |\inputencoding{ascci}| +\bgroup +\inputencoding{ascii} +and switch to Norsk +\selectlanguage{norsk}% +to typeset the message \# 12 (|\getmsg{12}(msg}|):\\ +``\getmsg{12}(msg)'' +\egroup + +\section*{Message list for all messages files} + +\long\def\testlanguagefile#1{% +{\selectlanguage{#1}% Don't forget to add it to \usepackage[...]{babel} +\parindent=0pt\tt +\textsf{Message list for the ``#1'' messages file:}\\[0.5\baselineskip] +\getmsg1(msg)\hfuzz\maxdimen\\ +\getmsg2(msg)\hfuzz\maxdimen\\ +\getmsg3(msg)\hfuzz\maxdimen\\ +\getmsg4(msg)\hfuzz\maxdimen\\ +\getmsg5(msg)\hfuzz\maxdimen\\ +\getmsg6(msg)\hfuzz\maxdimen\\ +\getmsg7(msg)\hfuzz\maxdimen\\ +\getmsg8(msg)\hfuzz\maxdimen\\ +\getmsg9(msg)\hfuzz\maxdimen\\ +\getmsg{10}(msg)\hfuzz\maxdimen\\ +\getmsg{11}(msg)\hfuzz\maxdimen\\ +\getmsg{12}(msg)\hfuzz\maxdimen\\ +\getmsg{*}(msg)\par\bigskip + +\typeout{Message list for the ``#1'' messages file^^J} +\issueallmsg(msg)% +}}% + +All messages for each language are now listed +in the document and on the console. + +\testlanguagefile{english} +\testlanguagefile{french} +\testlanguagefile{norsk} +\testlanguagefile{german} + +\section*{and now?} + +You could try it on any of your document class or package... +good testing. +\end{document} diff --git a/Master/texmf-dist/doc/latex/msg/norsk_msg-msg.tex b/Master/texmf-dist/doc/latex/msg/norsk_msg-msg.tex new file mode 100644 index 00000000000..5cff0c6da58 --- /dev/null +++ b/Master/texmf-dist/doc/latex/msg/norsk_msg-msg.tex @@ -0,0 +1,44 @@ +%% +%% This is file `norsk_msg-msg.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% msgfiles.dtx (with options: `norsk') +%% +%% File is part of the "msg" package for LaTeX +%% which is designed to localize any LaTeX package +%% or document class. +%% +\msgencoding{latin1}\msgheader{}\msgtrailer{} +\msg{1}{\filedate\space \fileversion\space pakke for lokaliserte % + meldinger er nå lastet.}{} +\msg{2}{Ugyldig valgfri parameter oppgitt:}{} +\msg{3}{Ugyldig språk valgt: ``\CurrentOption''}{} +\msg{4}{Testing av en #1 funksjon}{} +\msg{5}{msg-pakken viser på linjenummer } % + {\msgparti{melding \#\msgid : #1 }} +\msg{6}{msg-pakke: Uvanlig slutt på filen nådd % + \MessageBreak under lasting av filen \msg@filename !}{} +\msg{7}{Syntaksfeil i \string\msg\space }{\help{siste % special test case + argument mangler.}} +\msgheader{MELDING\space\msgid:\space``}\msgtrailer{''} +\msg{8}{Her er en tilpasset melding}{}% +\msg{9}{Her er en tilpasset melding % + \MessageBreak hvor fortsettelsen er venstre-justert}{} +\msgheader{Message\space\msgid\space(msg):\space}\msgtrailer{} +\msg*{10}{****** Jeg uthever: Dette er en ADVARSEL! ****** % + \MessageBreak ****** Vær forsiktig.^^J}{} +\msgheader{}\msgtrailer{} +\msg{11}{msg-pakken er i bruk med tracefiles-opsjonen.}{} +\msg{12}{En risiko for uendelig løkke oppstod; % + \MessageBreak % + sjekk meldingsfila: \msg@filename}% + {\help{Undersøk reglene for meldingsfiler.}} +\msg{*}{Feilaktig meldingsid ``\msgid''}{} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This messages file is coded in full 8bit. % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\endinput +%% +%% End of file `norsk_msg-msg.tex'. |