hiki2latex 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19db0d3ce1734124d87933a0d864f22b0342d454
4
- data.tar.gz: 295674f0bd086645168ba1a8ef8cfe45966341d5
3
+ metadata.gz: 92eca670f6a09adb9947776c1712af52b6026782
4
+ data.tar.gz: 0934a39c0b790fa0109515ba4a65a190641fa96b
5
5
  SHA512:
6
- metadata.gz: 78a7fa03e07d8d23e0e0ccda6a2c40274eb34d6318f274b01f86a9efeafb02b37cc4e378b86af2f6ece8a7ed91a95418f58d722c061b8319f20ee5d919244ecc
7
- data.tar.gz: 03b7f9a41730fd7ffb8e6f7b098643eead2052f470f5e88d80eec4f8b1e0b37805b71ce49cea97c4a5e4a89fa87af77e8015c3065d4ee22add4986e73a198b89
6
+ metadata.gz: 7f73f24c082fe1776af855c7cefb72336832dddf23819a63c1f02d9306e155bb98c9e95495e1007020ccd1bcc5b9684ab86074010322345ebcb60df882c03716
7
+ data.tar.gz: 7fa1548a848cd330d8ba836e5aa68634399c4f4ca2c211a41921a534755dad61bb028fa1900a018311d8753dbf29733cbbb4644151afca44ffed98095ea636a8
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *~
11
+ #*
@@ -98,7 +98,7 @@ class LatexOutput
98
98
  when 'math'
99
99
  @f << "\$#{tmp[1]}\$"
100
100
  else
101
- @f << "Don\'t know \verb|{{#{str}}}|\n"
101
+ @f << "Don\'t know \\verb|{{#{str}}}|\n"
102
102
  end
103
103
  end
104
104
 
@@ -118,7 +118,7 @@ class LatexOutput
118
118
  # when 'attach_view'
119
119
  # @f << "\n\\includegraphics[scale=0.3]\{./#{tmp[1]}\}\n"
120
120
  else
121
- %Q(\\verb\|{{#{src}}}\|)
121
+ @f << %Q(\\verb\|{{#{src}}}\|)
122
122
  end
123
123
  end
124
124
 
@@ -139,7 +139,7 @@ class LatexOutput
139
139
  patterns = [/\$(.+?)\$/ , /verb\|(.+?)\|/ , /equation(.+?)equation/m ]
140
140
  patterns.each{|pattern|
141
141
  str.gsub!(pattern) {|text|
142
- p text
142
+ # p text
143
143
  if text =~ /\\_/ then
144
144
  text.gsub!(/\\_/,"_")
145
145
  else
@@ -1,3 +1,3 @@
1
1
  module Hiki2latex
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiki2latex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishitani
@@ -114,7 +114,6 @@ files:
114
114
  - bin/setup
115
115
  - exe/hiki2latex
116
116
  - hiki2latex.gemspec
117
- - lib/#hiki2latex.rb#
118
117
  - lib/hiki2latex.rb
119
118
  - lib/hiki2latex/hiki2latex.rb
120
119
  - lib/hiki2latex/version.rb
data/lib/#hiki2latex.rb# DELETED
@@ -1,62 +0,0 @@
1
- require 'optparse'
2
- require "hiki2latex/version"
3
- #require "hiki2latex/hikidoc"
4
- require "hiki2latex/hiki2latex"
5
-
6
- module Hiki2latex
7
- class Command
8
-
9
- def self.run(argv=[])
10
- new(argv).execute
11
- end
12
-
13
- def initialize(argv=[])
14
- @argv = argv
15
- @pre=@head=@post=nil
16
- end
17
-
18
- def execute
19
- @argv << '--help' if @argv.size==0
20
- command_parser = OptionParser.new do |opt|
21
- opt.on('-v', '--version','show program Version.') { |v|
22
- opt.version = Hiki2latex::VERSION
23
- puts opt.ver
24
- }
25
- opt.on('-l VALUE','--level','set Level for output section.'){|level| @level=level.to_i}
26
- opt.on('-p FILE', '--plain','make Plain document.') { |file| plain_doc(file) }
27
- opt.on('-b FILE', '--bare','make Bare document.') { |file| bare_doc(file) }
28
- opt.on('--head FILE', 'put headers of maketitle file.') { |file| @head=file }
29
- opt.on('--pre FILE', 'put preamble file.') { |file| @pre=file }
30
- opt.on('--post FILE', 'put post file.') { |file| @post=file }
31
- end
32
- command_parser.banner = "Usage: hiki2latex [options] FILE"
33
- command_parser.parse!(@argv)
34
- # p @argv
35
- plain_doc(@argv[0]) if @argv[0]!=nil
36
- exit
37
- end
38
-
39
- def plain_doc(file)
40
- if @pre==nil then
41
- puts "\\documentclass[12pt,a4paper]{jsarticle}"
42
- puts "\\usepackage[dvipdfmx]{graphicx}"
43
- else
44
- puts File.read(@pre)
45
- end
46
- puts "\\begin{document}"
47
- puts File.read(@head) if @head!=nil
48
- puts HikiDoc.to_latex(File.read(file))
49
- puts File.read(@post) if @post!=nil
50
- puts "\\end{document}"
51
- end
52
- def bare_doc(file)
53
- puts HikiDoc.to_latex(File.read(file),{:level=>@level})
54
- end
55
-
56
- end
57
- end
58
-
59
-
60
- =begin
61
- =end
62
-