From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 macros/latex/contrib/rvwrite/rvwrite.sty | 68 ++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 macros/latex/contrib/rvwrite/rvwrite.sty

(limited to 'macros/latex/contrib/rvwrite/rvwrite.sty')

diff --git a/macros/latex/contrib/rvwrite/rvwrite.sty b/macros/latex/contrib/rvwrite/rvwrite.sty
new file mode 100644
index 0000000000..dc3ea14b5f
--- /dev/null
+++ b/macros/latex/contrib/rvwrite/rvwrite.sty
@@ -0,0 +1,68 @@
+%%                                   
+%%
+%% This is file 'rvwrite.sty'.
+%%
+%% File: rvwrite.sty Copyright (c) 2010 C. V. Radhakrishnan
+%%       River Valley, Mepukada, Malayinkil, Trivandrum 695571
+%%       http://www.river-valley.com Email: <cvr@river-valley.org>
+%%       
+%% This package may be distributed under the terms of the LaTeX Project 
+%% Public License, as described in lppl.txt in the base LaTeX distribution.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%% $Id: rvwrite.sty,v 1.2 2010/08/25 08:59:06 cvr Exp cvr $
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\def\Fileversion$#1: #2 ${\gdef\fileversion{#2}}
+\def\Filedate$#1: #2 #3 ${\gdef\filedate{#2}}
+\Fileversion$Revision: 1.2 $
+\Filedate$Date: 2010/08/25 08:59:06 $
+\ProvidesPackage{rvwrite}
+   [\filedate\space\fileversion\space enhanced write registers (CVR)]
+\PackageWarningNoLine{rvwrite}
+   {****************************************\MessageBreak
+    Package rvwrite v,\fileversion\space loaded\MessageBreak
+    [enhanced write registers (CVR)]\MessageBreak
+    ****************************************}
+%
+%
+\newwrite\rvtwrite
+
+\def\dlrchr{\expandafter\@gobble\string\$}
+\def\hshchr{\expandafter\@gobble\string\#}
+\def\bslchr{\expandafter\@gobble\string\\}
+\def\lbrchr{\expandafter\@gobble\string\{}
+\def\rbrchr{\expandafter\@gobble\string\}}
+\def\tldchr{\expandafter\@gobble\string\~}
+\def\ampchr{\expandafter\@gobble\string\&}
+
+\immediate\openout\rvtwrite=\jobname-write.tex
+\immediate\write\rvtwrite{\string\documentclass{article}}
+\immediate\write\rvtwrite{ }
+\immediate\write\rvtwrite{\string\input\space ProTex.sty}
+\immediate\write\rvtwrite{\string\AlProTex{tex,<<<>>>,list,title,|,[]}}
+\immediate\write\rvtwrite{ }
+\immediate\write\rvtwrite{\string\begin{document}}
+\immediate\write\rvtwrite{ }
+
+\def\newrvwrite#1{\@ifundefined{RV@#1}{\@namedef{RV@#1}{#1}}{}%
+     \AtEndDocument{\immediate\write\rvtwrite{%
+       \string\OutputCode\string\<\jobname-#1\string\>}}}
+%
+% \rvwrite #1 => file type
+%          #2 => string(s) to write out
+\def\ervwrite#1#2{\@ifundefined{RV@#1}{\newrvwrite{#1}}{}%
+     \immediate\write\rvtwrite{\string\<\jobname-#1\string\><<<}
+      \immediate\write\rvtwrite{#2^^J>>>}}
+
+\def\rvwrite#1#2{\@ifundefined{RV@#1}{\newrvwrite{#1}}{}\def\next{#2}%
+    \immediate\write\rvtwrite{\string\<\jobname-#1\string\>%
+       <<<^^J\expandafter\strip@prefix\meaning\next^^J>>>}}
+
+\AtEndDocument{\write\rvtwrite{\space^^J\string\end{document}}}
+
+\endinput
+
+%%
+%% End of file 'rvwrite.sty'
+%%
-- 
cgit v1.2.3

