html2tex 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,8 +61,26 @@ class HTML2TeX
61
61
  "\\textbf{"
62
62
  when "/em", "/i", "/strong", "/b"
63
63
  "}"
64
+ when "sup"
65
+ "$^{\\textrm{"
66
+ when "sub"
67
+ "$_{\\textrm{"
68
+ when "/sup", "/sub"
69
+ "}}$"
64
70
  when "br"
65
71
  "\\\\"
72
+ when "ol"
73
+ "\\begin{enumerate}\n"
74
+ when "/ol"
75
+ "\\end{enumerate}\n"
76
+ when "ul"
77
+ "\\begin{itemize}\n"
78
+ when "/ul"
79
+ "\\end{itemize}\n"
80
+ when "li"
81
+ "\\item "
82
+ when "/li"
83
+ "\n"
66
84
  when /^h\d/
67
85
  @squash_next = true
68
86
  HeadingProcessor.new(scanner, t, @options).to_tex + "\n\n"
data/lib/html2tex/tex.rb CHANGED
@@ -8,7 +8,8 @@ class HTML2TeX
8
8
 
9
9
  def tex_escape(s)
10
10
  return nil if s.nil?
11
- s.gsub(/[\\{}$&#%^_~]/, '\\\\\\0')
11
+ s.gsub(/\\/, "\\\\textbackslash\\").
12
+ gsub(/[{}$&#%^_~]/, '\\\\\\0')
12
13
  end
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  class HTML2TeX
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2tex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Battley
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-05-10 00:00:00 +01:00
12
+ date: 2010-05-16 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency