summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-03-18 16:42:28 (GMT)
committerFred Drake <fdrake@acm.org>1999-03-18 16:42:28 (GMT)
commit03dffcce0efb65d2e31ee75b2d1a16b6b29f51a4 (patch)
treea0f468acf61c4a7b60abfac092fb0cffc27cdc4b /Doc
parent9466b9a10d1eb4c922f0a59b2116d34c8efcd2e2 (diff)
downloadcpython-03dffcce0efb65d2e31ee75b2d1a16b6b29f51a4.zip
cpython-03dffcce0efb65d2e31ee75b2d1a16b6b29f51a4.tar.gz
cpython-03dffcce0efb65d2e31ee75b2d1a16b6b29f51a4.tar.bz2
LaTeX2HTML support for the ltxmarkup package.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/perl/ltxmarkup.perl51
1 files changed, 51 insertions, 0 deletions
diff --git a/Doc/perl/ltxmarkup.perl b/Doc/perl/ltxmarkup.perl
new file mode 100644
index 0000000..9136e61
--- /dev/null
+++ b/Doc/perl/ltxmarkup.perl
@@ -0,0 +1,51 @@
+# LaTeX2HTML support for the ltxmarkup package. Doesn't do indexing.
+
+package main;
+
+
+sub ltx_next_argument{
+ my $param;
+ $param = missing_braces()
+ unless ((s/$next_pair_pr_rx/$param=$2;''/eo)
+ ||(s/$next_pair_rx/$param=$2;''/eo));
+ return $param;
+}
+
+
+sub do_cmd_macro{
+ local($_) = @_;
+ my $macro = ltx_next_argument();
+ return "<tt class='macro'>&#92;$macro</tt>" . $_;
+}
+
+sub do_cmd_env{
+ local($_) = @_;
+ my $env = ltx_next_argument();
+ return "<tt class='environment'>&#92;$env</tt>" . $_;
+}
+
+sub do_env_macrodesc{
+ local($_) = @_;
+ my $macro = ltx_next_argument();
+ my $params = ltx_next_argument();
+ return "\n<dl class='macrodesc'>"
+ . "\n<dt><b><tt class='macro'>&#92;$macro</tt></b>"
+ . "\n $params"
+ . "\n<dd>"
+ . $_
+ . "</dl>";
+}
+
+sub do_env_envdesc{
+ local($_) = @_;
+ my $env = ltx_next_argument();
+ my $params = ltx_next_argument();
+ return "\n<dl class='envdesc'>"
+ . "\n<dt><b><tt class='environment'>&#92;$env</tt></b>"
+ . "\n $params"
+ . "\n<dd>"
+ . $_
+ . "</dl>";
+}
+
+1; # Must end with this, because Perl is bogus.