When you're generating TeX or HTML code using one of the scripting languages Python or Ruby, you will have multiline strings containing code in the generated language (TeX or HTML).
Editing your programs in Vim, you may want to have the appropriate syntax highlighting in these strings. The scripts set the appropriate switches.
#!/usr/bin/env ruby
# -*- coding: None -*-
def f x
puts x
end
s = %q{$\sqrt{x^2+y^2}$}
t = <<'ENDTEX'
\hbox to \hsize {\hss This is a centered line.\hss}
\indent This is a normal paragraph.\par
ENDTEX
g = %q(some (((very nested))) string)
h = <<HERE
This is an ordinary line of text.
HERE
def e x
puts x
end
class C
class <<self
end
end
if $0 == __FILE__ then
end
# vim: syntax=ruby-tex
|
#!/usr/bin/env ruby
# -*- coding: None -*-
def f x
puts x
end
s = %q{$\sqrt{x^2+y^2}$}
t = <<'ENDTEX'
\hbox to \hsize {\hss This is a centered line.\hss}
\indent This is a normal paragraph.\par
ENDTEX
g = %q(some (((very nested))) string)
h = <<HERE
This is an ordinary line of text.
HERE
def e x
puts x
end
class C
class <<self
end
end
if $0 == __FILE__ then
end
# vim: syntax=ruby-tex
|
These files are FREE SOFTWARE and underly the GNU Lesser General Public License (LGPL). NO WARRANTY FOR NOTHING.
Software patents: The threat prevails. Please read further at FFII.
Author and maintainer: Bertram Scharpf
Latest update:
Tue Apr 5 21:59:14 2005