lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@VerbatimInput hack


From: Samuel Lacas
Subject: @VerbatimInput hack
Date: Wed, 29 Aug 2001 10:21:10 +0200

Hi,

The following seems to work for me to include a verbatim file,
but you need to have the "awk" program available, and run
lout in "unsafe mode" (lout -U).

@SysInclude { doc }
#============================================

def @VerbatimInput
   right x
{
   def @Filter {
     awk "\'BEGIN { print \"@RawVerbatim {\";} { print $0;} END {
print \"}\";}\'"
     @FilterIn > @FilterOut
   }

   lines @Break x
} # @VerbatimInput

@Doc @Text @Begin

@VerbatimInput { @Include { "toto" } }

@End @Text
#============== Fin du fichier ==============

Note that I fell this is quite ugly, and may be lout experts on the
list will make up a better way to do that.

my 2 cents,

sL


reply via email to

[Prev in Thread] Current Thread [Next in Thread]