File: add_super_and_subscripts

package info (click to toggle)
gnuhtml2latex 0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 92 kB
  • sloc: perl: 844; makefile: 6
file content (45 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Index: gnuhtml2latex/gnuhtml2latex
===================================================================
--- gnuhtml2latex.orig/gnuhtml2latex	2012-02-29 17:36:38.000000000 -0600
+++ gnuhtml2latex/gnuhtml2latex	2012-02-29 17:38:21.000000000 -0600
@@ -16,9 +16,8 @@
 
 use strict;
 use Getopt::Std;
-binmode STDOUT, ":utf8";
 
-getopts('a:bcf:gh:i:no:pst:HPS:',\%main::opts);
+getopts('a:bcf:gh:i:mno:pst:HPS:',\%main::opts);
 unless (defined $main::opts{o}) { $main::opts{o} = '{article}' }
 unless (defined $main::opts{h}) { $main::opts{h} = '' }
 unless (defined $main::opts{f}) { $main::opts{f} = '' }
@@ -84,6 +83,13 @@
 'blockquote' => '\\end{quotation}'
 );
 
+if ($main::opts{m}) {
+    $tagstable_start{'sub'} = '$_{\textrm{';
+    $tagstable_end{'sub'} = '}}$';
+    $tagstable_start{'sup'} = '$^{\textrm{';
+    $tagstable_end{'sup'} = '}}$';
+}
+
 my $mode = 0;
 my $firstfile = 1;
 my $lastfile = 1;
@@ -391,6 +397,15 @@
 
 Get the list of files to be converted from the specified filename
 
+=item -m
+
+Allow the use of some tags that require entering and exiting math mode.
+
+Currently, the superscript and subscript tags are achieved by using
+the math mode. Now, using the math mode can break some
+formatting. Math mode will only be entered in the output document if
+you specify this switch.
+
 =item -n
 
 Use numbered sections