diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-23 22:55:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-23 22:55:47 +0000 |
commit | 1245444c38f58a5f2d3cc77bd773a1cf1920ef4d (patch) | |
tree | 2dad97e9d4e96f2e81790e209f23ec1e9fd22307 /Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex | |
parent | 22780f70b0a868b2b458fa5177c8100498b4d2b2 (diff) |
nicetext 0.3 (23mar10)
git-svn-id: svn://tug.org/texlive/trunk@17537 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex b/Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex new file mode 100644 index 00000000000..9e5e3dda35a --- /dev/null +++ b/Master/texmf-dist/tex/latex/nicetext/fdtxttex.tex @@ -0,0 +1,59 @@ + \makeatletter +\typeout{^^J*fdtxttex.tex* 2010/03/22 txt to TeX by dialogue^^J + (apply \string\MakeDocCorrectHook) + ^^J} + +\RequirePackage{fifinddo} + +\def\MakeDocCorrectHook#1{#1} +\catcode`\_=11 +\def\CorrectionFile{\def\mdoc_corr} +\CorrectionFile{mdoccorr.cfg} +\ResultFile{sample.tex} +\def\InputFile{\def\input_file_name} +\InputFile{sample.txt} +\newif\iftoscreen + +\def\FD_dialogue{% + \typeout{^^J% + ===========================================================^^J% + \string\CorrectionFile{\mdoc_corr} + \space (define \@backslashchar MakeDocCorrectHook)^^J% + \string\InputFile {\input_file_name}^^J% + \string\ResultFile{\result_file_name} + \space\space\space\space\space\space\space + \string\toscreen\iftoscreen true\else false\fi ^^J% + ===========================================================% + }% + \typein[\action]% + {Run with these settings? (Y)es? (C)hange? (Otherwise quit.)}% + \csname action_\action \endcsname +} +\def\run_with_settings{% + \input{\mdoc_corr}% + \WriteProvides + \ProcessFileWith{\input_file_name}{% + \WriteResult{\expandafter \MakeDocCorrectHook + \expandafter{\fdInputLine}}% + \iftoscreen + \typeout{\expandafter \MakeDocCorrectHook + \expandafter{\fdInputLine}}% + \else + \message{.}% + \fi} + \CloseResultFile + \typeout{Done.}% + \FD_dialogue +} +\expandafter\let\csname action_y\endcsname \run_with_settings +\expandafter\let\csname action_Y\endcsname \run_with_settings + +\def\change_settings{% + \typein[\change]{^^JType setting command(s).}% + \change \FD_dialogue} +\expandafter\let\csname action_c\endcsname \change_settings +\expandafter\let\csname action_C\endcsname \change_settings + +\FD_dialogue + +\stop |