review 3.0.0.preview4 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS.ja.md +61 -4
  3. data/NEWS.md +61 -4
  4. data/README.md +2 -1
  5. data/doc/config.yml.sample +48 -20
  6. data/doc/config.yml.sample-simple +7 -6
  7. data/doc/format_idg.ja.md +6 -2
  8. data/doc/pdfmaker.ja.md +95 -4
  9. data/doc/pdfmaker.md +79 -0
  10. data/doc/quickstart.ja.md +26 -3
  11. data/doc/quickstart.md +25 -3
  12. data/doc/writing_vertical.ja.md +19 -2
  13. data/lib/review/epubmaker.rb +27 -27
  14. data/lib/review/i18n.yml +1 -0
  15. data/lib/review/init.rb +34 -22
  16. data/lib/review/latexbuilder.rb +95 -18
  17. data/lib/review/pdfmaker.rb +1 -0
  18. data/lib/review/update.rb +60 -25
  19. data/lib/review/version.rb +1 -1
  20. data/review.gemspec +1 -1
  21. data/samples/sample-book/src/config.yml +3 -3
  22. data/samples/syntax-book/config.yml +3 -3
  23. data/templates/latex/config.erb +3 -0
  24. data/templates/latex/review-jlreq/README.md +97 -7
  25. data/templates/latex/review-jlreq/review-base.sty +8 -0
  26. data/templates/latex/review-jlreq/review-jlreq.cls +28 -6
  27. data/templates/latex/review-jsbook/README.md +18 -20
  28. data/templates/latex/review-jsbook/review-base.sty +15 -0
  29. data/templates/latex/review-jsbook/review-jsbook.cls +172 -230
  30. data/test/test_epubmaker_cmd.rb +1 -1
  31. data/test/test_helper.rb +3 -3
  32. data/test/test_image_finder.rb +9 -9
  33. data/test/test_latexbuilder.rb +20 -1
  34. data/test/test_makerhelper.rb +12 -12
  35. data/test/test_pdfmaker_cmd.rb +1 -1
  36. data/test/test_update.rb +18 -4
  37. data/test/test_zip_exporter.rb +7 -7
  38. data/vendor/jsclasses/.gitignore +163 -0
  39. data/vendor/jsclasses/LICENSE +25 -0
  40. data/vendor/jsclasses/Makefile +88 -0
  41. data/vendor/jsclasses/README.md +43 -0
  42. data/vendor/jsclasses/create_archive.sh +59 -0
  43. data/vendor/jsclasses/jis/Makefile +62 -0
  44. data/vendor/jsclasses/jis/jsarticle.cls +1935 -0
  45. data/vendor/jsclasses/jis/jsbook.cls +2026 -0
  46. data/vendor/jsclasses/jis/jsclasses.dtx +5961 -0
  47. data/vendor/jsclasses/jis/jsclasses.ins +8 -0
  48. data/vendor/jsclasses/jis/jslogo.dtx +413 -0
  49. data/vendor/jsclasses/jis/jslogo.ins +4 -0
  50. data/vendor/jsclasses/jis/jslogo.sty +223 -0
  51. data/vendor/jsclasses/jis/jspf.cls +1766 -0
  52. data/vendor/jsclasses/jis/jsreport.cls +2020 -0
  53. data/vendor/jsclasses/jis/jsverb.dtx +322 -0
  54. data/vendor/jsclasses/jis/jsverb.ins +4 -0
  55. data/vendor/jsclasses/jis/jsverb.sty +128 -0
  56. data/vendor/jsclasses/jis/kiyou.cls +1882 -0
  57. data/vendor/jsclasses/jis/minijs.sty +52 -0
  58. data/vendor/jsclasses/jis/okumacro.dtx +1179 -0
  59. data/vendor/jsclasses/jis/okumacro.ins +4 -0
  60. data/vendor/jsclasses/jis/okumacro.sty +455 -0
  61. data/vendor/jsclasses/jis/okuverb.dtx +243 -0
  62. data/vendor/jsclasses/jis/okuverb.ins +4 -0
  63. data/vendor/jsclasses/jis/okuverb.sty +102 -0
  64. data/vendor/jsclasses/jis/winjis.sty +87 -0
  65. data/vendor/jsclasses/jsarticle.cls +1938 -0
  66. data/vendor/jsclasses/jsbook.cls +2029 -0
  67. data/vendor/jsclasses/jsclasses.dtx +5966 -0
  68. data/vendor/jsclasses/jsclasses.ins +8 -0
  69. data/vendor/jsclasses/jsclasses.pdf +0 -0
  70. data/vendor/jsclasses/jslogo.dtx +424 -0
  71. data/vendor/jsclasses/jslogo.ins +4 -0
  72. data/vendor/jsclasses/jslogo.pdf +0 -0
  73. data/vendor/jsclasses/jslogo.sty +223 -0
  74. data/vendor/jsclasses/jspf.cls +1769 -0
  75. data/vendor/jsclasses/jsreport.cls +2023 -0
  76. data/vendor/jsclasses/jsverb.dtx +333 -0
  77. data/vendor/jsclasses/jsverb.ins +4 -0
  78. data/vendor/jsclasses/jsverb.pdf +0 -0
  79. data/vendor/jsclasses/jsverb.sty +128 -0
  80. data/vendor/jsclasses/kiyou.cls +1885 -0
  81. data/vendor/jsclasses/minijs.sty +52 -0
  82. data/vendor/jsclasses/okumacro.dtx +1184 -0
  83. data/vendor/jsclasses/okumacro.ins +4 -0
  84. data/vendor/jsclasses/okumacro.pdf +0 -0
  85. data/vendor/jsclasses/okumacro.sty +458 -0
  86. data/vendor/jsclasses/okuverb.dtx +254 -0
  87. data/vendor/jsclasses/okuverb.ins +4 -0
  88. data/vendor/jsclasses/okuverb.pdf +0 -0
  89. data/vendor/jsclasses/okuverb.sty +102 -0
  90. data/vendor/jsclasses/winjis.sty +87 -0
  91. metadata +55 -2
@@ -24,7 +24,7 @@ class EPUBMakerCmdTest < Test::Unit::TestCase
24
24
  def test_epubmaker_cmd
25
25
  if /mswin|mingw|cygwin/ !~ RUBY_PLATFORM
26
26
  config = prepare_samplebook(@tmpdir1)
27
- builddir = @tmpdir1 + '/' + config['bookname'] + '-epub'
27
+ builddir = File.join(@tmpdir1, config['bookname'] + '-epub')
28
28
  assert !File.exist?(builddir)
29
29
 
30
30
  ruby_cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) + RbConfig::CONFIG['EXEEXT']
data/test/test_helper.rb CHANGED
@@ -12,11 +12,11 @@ end
12
12
 
13
13
  def prepare_samplebook(srcdir)
14
14
  samplebook_dir = File.expand_path('../samples/sample-book/src/', File.dirname(__FILE__))
15
- FileUtils.cp_r(Dir.glob(samplebook_dir + '/*'), srcdir)
15
+ FileUtils.cp_r(Dir.glob(File.join(samplebook_dir, '*')), srcdir)
16
16
  # copy from review-jsbook
17
17
  template_dir = File.expand_path('../templates/latex/review-jsbook/', File.dirname(__FILE__))
18
- FileUtils.cp(Dir.glob(template_dir + '/*'), File.join(srcdir, 'sty'))
19
- YAML.load(File.open(srcdir + '/config.yml'))
18
+ FileUtils.cp(Dir.glob(File.join(template_dir, '*')), File.join(srcdir, 'sty'))
19
+ YAML.load(File.open(File.join(srcdir, 'config.yml')))
20
20
  end
21
21
 
22
22
  def compile_inline(text)
@@ -12,7 +12,7 @@ class ImageFinderTest < Test::Unit::TestCase
12
12
  def test_find_path_pattern1
13
13
  dir = Dir.mktmpdir
14
14
  begin
15
- path = dir + '/builder/ch01/foo.jpg'
15
+ path = File.join(dir, 'builder/ch01/foo.jpg')
16
16
  FileUtils.mkdir_p(File.dirname(path))
17
17
  FileUtils.touch(path)
18
18
 
@@ -26,7 +26,7 @@ class ImageFinderTest < Test::Unit::TestCase
26
26
  def test_find_path_pattern2
27
27
  dir = Dir.mktmpdir
28
28
  begin
29
- path = dir + '/builder/ch01-foo.jpg'
29
+ path = File.join(dir, 'builder/ch01-foo.jpg')
30
30
  FileUtils.mkdir_p(File.dirname(path))
31
31
  FileUtils.touch(path)
32
32
 
@@ -40,7 +40,7 @@ class ImageFinderTest < Test::Unit::TestCase
40
40
  def test_find_path_pattern3
41
41
  dir = Dir.mktmpdir
42
42
  begin
43
- path = dir + '/builder/foo.jpg'
43
+ path = File.join(dir, 'builder/foo.jpg')
44
44
  FileUtils.mkdir_p(File.dirname(path))
45
45
  FileUtils.touch(path)
46
46
 
@@ -54,7 +54,7 @@ class ImageFinderTest < Test::Unit::TestCase
54
54
  def test_find_path_pattern4
55
55
  dir = Dir.mktmpdir
56
56
  begin
57
- path = dir + '/ch01/foo.jpg'
57
+ path = File.join(dir, 'ch01/foo.jpg')
58
58
  FileUtils.mkdir_p(File.dirname(path))
59
59
  FileUtils.touch(path)
60
60
 
@@ -68,7 +68,7 @@ class ImageFinderTest < Test::Unit::TestCase
68
68
  def test_find_path_pattern5
69
69
  dir = Dir.mktmpdir
70
70
  begin
71
- path = dir + '/ch01-foo.jpg'
71
+ path = File.join(dir, 'ch01-foo.jpg')
72
72
  FileUtils.mkdir_p(File.dirname(path))
73
73
  FileUtils.touch(path)
74
74
 
@@ -82,12 +82,12 @@ class ImageFinderTest < Test::Unit::TestCase
82
82
  def test_find_path_dir_symlink
83
83
  dir = Dir.mktmpdir
84
84
  begin
85
- path_src = dir + '/src'
86
- path_dst = dir + '/ch01'
85
+ path_src = File.join(dir, 'src')
86
+ path_dst = File.join(dir, 'ch01')
87
87
  FileUtils.mkdir_p(path_src)
88
88
  FileUtils.symlink(path_src, path_dst)
89
- path_srcimg = path_src + '/foo.jpg'
90
- path_dstimg = path_dst + '/foo.jpg'
89
+ path_srcimg = File.join(path_src, 'foo.jpg')
90
+ path_dstimg = File.join(path_dst, 'foo.jpg')
91
91
  FileUtils.touch(path_srcimg)
92
92
 
93
93
  finder = ReVIEW::Book::ImageFinder.new(dir, 'ch01', 'builder', ['.jpg'])
@@ -257,7 +257,7 @@ class LATEXBuidlerTest < Test::Unit::TestCase
257
257
  return true
258
258
  end
259
259
  tmpdir = Dir.mktmpdir
260
- File.write("#{tmpdir}/sample.dic", "強運\tはーどらっく\n")
260
+ File.write(File.join(tmpdir, 'sample.dic'), "強運\tはーどらっく\n")
261
261
  @book.config['pdfmaker']['makeindex'] = true
262
262
  @book.config['pdfmaker']['makeindex_dic'] = "#{tmpdir}/sample.dic"
263
263
  @builder.setup_index
@@ -591,6 +591,25 @@ class LATEXBuidlerTest < Test::Unit::TestCase
591
591
  assert_equal %Q(\\begin{reviewtable}{|p{5mm}|cr|}\n\\hline\n\\reviewth{A} & B & C \\\\ \\hline\n\\end{reviewtable}\n), actual
592
592
  end
593
593
 
594
+ def test_separate_tsize
595
+ actual = @builder.separate_tsize('|l|c|r|p{1cm}lp{1.5cm}|p{5mm}').join(',')
596
+ assert_equal 'l,c,r,p{1cm},l,p{1.5cm},p{5mm}', actual
597
+
598
+ actual = @builder.separate_tsize('|lcr').join(',')
599
+ assert_equal 'l,c,r', actual
600
+
601
+ actual = @builder.separate_tsize('{p}p{').join(',')
602
+ assert_equal '{p},p{', actual
603
+ end
604
+
605
+ def test_break_tablecell
606
+ actual = compile_block("//tsize[|latex||p{10mm}|cp{10mm}|]\n//table{\nA@<br>{}A\tB@<br>{}B\tC@<br>{}C\n//}\n")
607
+ assert_equal %Q(\\begin{reviewtable}{|p{10mm}|cp{10mm}|}\n\\hline\n\\reviewth{A\\newline{}A} & \\shortstack[l]{B\\\\\nB} & C\\newline{}C \\\\ \\hline\n\\end{reviewtable}\n), actual
608
+
609
+ actual = compile_block("//tsize[|latex||p{10mm}|cp{10mm}|]\n//table{\n1@<br>{}1\t2@<br>{}2\t3\n------------\nA@<br>{}A\tB@<br>{}B\tC@<br>{}C\n//}\n")
610
+ assert_equal %Q(\\begin{reviewtable}{|p{10mm}|cp{10mm}|}\n\\hline\n\\reviewth{1\\newline{}1} & \\reviewth{\\shortstack[l]{2\\\\\n2}} & \\reviewth{3} \\\\ \\hline\nA\\newline{}A & \\shortstack[l]{B\\\\\nB} & C\\newline{}C \\\\ \\hline\n\\end{reviewtable}\n), actual
611
+ end
612
+
594
613
  def test_emtable
595
614
  actual = compile_block("//emtable[foo]{\naaa\tbbb\n------------\nccc\tddd<>&\n//}\n//emtable{\naaa\tbbb\n------------\nccc\tddd<>&\n//}\n")
596
615
  assert_equal "\\begin{table}%%\n\\reviewtablecaption*{foo}\n\\begin{reviewtable}{|l|l|}\n\\hline\n\\reviewth{aaa} & \\reviewth{bbb} \\\\ \\hline\nccc & ddd\\textless{}\\textgreater{}\\& \\\\ \\hline\n\\end{reviewtable}\n\\end{table}\n\n\\begin{reviewtable}{|l|l|}\n\\hline\n\\reviewth{aaa} & \\reviewth{bbb} \\\\ \\hline\nccc & ddd\\textless{}\\textgreater{}\\& \\\\ \\hline\n\\end{reviewtable}\n",
@@ -18,18 +18,18 @@ class MakerHelperTest < Test::Unit::TestCase
18
18
 
19
19
  def test_copy_images_to_dir
20
20
  types = %w[png gif jpg jpeg svg pdf eps]
21
- types.each { |type| touch_file("#{@tmpdir1}/foo.#{type}") }
22
- FileUtils.mkdir("#{@tmpdir1}/subdir")
23
- touch_file("#{@tmpdir1}/subdir/foo.png")
21
+ types.each { |type| touch_file(File.join(@tmpdir1, "foo.#{type}")) }
22
+ FileUtils.mkdir(File.join(@tmpdir1, 'subdir'))
23
+ touch_file(File.join(@tmpdir1, 'subdir/foo.png'))
24
24
 
25
25
  image_files = MakerHelper.copy_images_to_dir(@tmpdir1, @tmpdir2)
26
26
 
27
27
  types.each do |type|
28
- assert File.exist?("#{@tmpdir2}/foo.#{type}"), "Copying #{type} file failed"
29
- assert image_files.include?("#{@tmpdir1}/foo.#{type}")
28
+ assert File.exist?(File.join(@tmpdir2, "foo.#{type}")), "Copying #{type} file failed"
29
+ assert image_files.include?(File.join(@tmpdir1, "foo.#{type}"))
30
30
  end
31
- assert File.exist?("#{@tmpdir2}/subdir/foo.png"), 'Copying a image file in a subdirectory'
32
- assert image_files.include?("#{@tmpdir1}/subdir/foo.png")
31
+ assert File.exist?(File.join(@tmpdir2, 'subdir/foo.png')), 'Copying a image file in a subdirectory'
32
+ assert image_files.include?(File.join(@tmpdir1, 'subdir/foo.png'))
33
33
  end
34
34
 
35
35
  def test_copy_images_to_dir_convert
@@ -39,18 +39,18 @@ class MakerHelperTest < Test::Unit::TestCase
39
39
  image_files = MakerHelper.copy_images_to_dir(@tmpdir1, @tmpdir2,
40
40
  convert: { eps: :png })
41
41
 
42
- assert File.exist?("#{@tmpdir2}/foo.eps.png"), 'EPS to PNG conversion failed'
43
- assert image_files.include?("#{@tmpdir1}/foo.eps.png")
42
+ assert File.exist?(File.join(@tmpdir2, 'foo.eps.png')), 'EPS to PNG conversion failed'
43
+ assert image_files.include?(File.join(@tmpdir1, 'foo.eps.png'))
44
44
  end
45
45
  end
46
46
 
47
47
  def test_copy_images_to_dir_with_exts
48
48
  types = %w[png gif jpg jpeg svg pdf eps]
49
49
  types4epub = %w[png gif jpg jpeg svg]
50
- types.each { |type| touch_file("#{@tmpdir1}/foo.#{type}") }
50
+ types.each { |type| touch_file(File.join(@tmpdir1, "foo.#{type}")) }
51
51
  image_files = MakerHelper.copy_images_to_dir(@tmpdir1, @tmpdir2, exts: types4epub)
52
52
 
53
- types4epub.each { |type| assert image_files.include?("#{@tmpdir1}/foo.#{type}"), "foo.#{type} is not included" }
54
- (types - types4epub).each { |type| assert !image_files.include?("#{@tmpdir1}/foo.#{type}"), "foo.#{type} is included" }
53
+ types4epub.each { |type| assert image_files.include?(File.join(@tmpdir1, "foo.#{type}")), "foo.#{type} is not included" }
54
+ (types - types4epub).each { |type| assert !image_files.include?(File.join(@tmpdir1, "foo.#{type}")), "foo.#{type} is included" }
55
55
  end
56
56
  end
@@ -22,7 +22,7 @@ class PDFMakerCmdTest < Test::Unit::TestCase
22
22
  def test_pdfmaker_cmd
23
23
  if /mswin|mingw|cygwin/ !~ RUBY_PLATFORM
24
24
  config = prepare_samplebook(@tmpdir1)
25
- builddir = @tmpdir1 + '/' + config['bookname'] + '-pdf'
25
+ builddir = File.join(@tmpdir1, config['bookname'] + '-pdf')
26
26
  # assert !File.exist?(builddir)
27
27
 
28
28
  ruby_cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
data/test/test_update.rb CHANGED
@@ -234,7 +234,7 @@ EOT
234
234
  assert_match(/By default it is migrated to/, io.string)
235
235
  assert_match(/is safely replaced/, io.string)
236
236
  cont = <<EOT
237
- texdocumentclass: ["review-jsbook", "paper=a5,Q=15.46,landscape,oneside,twoside,vartwoside,onecolumn,twocolumn,titlepage,notitlepage,openright,openany,leqno,fleqn,disablejfam,draft,final,mingoth,winjis,jis,papersize,english,report,jslogo,nojslogo,cameraready=print,cover=false"]
237
+ texdocumentclass: ["review-jsbook", "paper=a5,fontsize=11pt,landscape,oneside,twoside,vartwoside,onecolumn,twocolumn,titlepage,notitlepage,openright,openany,leqno,fleqn,disablejfam,draft,final,mingoth,winjis,jis,papersize,english,report,jslogo,nojslogo,media=print,cover=false"]
238
238
  EOT
239
239
  assert_equal cont, File.read(File.join(@tmpdir, 'config.yml'))
240
240
  end
@@ -246,7 +246,7 @@ EOT
246
246
  @u.parse_ymls(@tmpdir)
247
247
  @u.update_tex_parameters
248
248
  assert_match(/couldn't be converted fully/, io.string)
249
- assert_match("'paper=a5,cameraready=print,cover=false' is suggested", io.string)
249
+ assert_match("'paper=a5,media=print,cover=false' is suggested", io.string)
250
250
  cont = <<EOT
251
251
  texdocumentclass: ["jsbook", "a5paper,invalid"]
252
252
  EOT
@@ -266,6 +266,18 @@ EOT
266
266
  assert_equal cont, File.read(File.join(@tmpdir, 'config.yml'))
267
267
  end
268
268
 
269
+ def test_update_tex_parameters_review_jsbook_obsoletekey
270
+ File.write(File.join(@tmpdir, 'config.yml'), %Q(texdocumentclass: ["review-jsbook", "Q=13.5, H=20, W=40, L=34, head=20mm, gutter=20mm"]\n))
271
+ io = StringIO.new
272
+ @u.instance_eval{ @logger = ReVIEW::Logger.new(io) }
273
+ @u.parse_ymls(@tmpdir)
274
+ @u.update_tex_parameters
275
+ cont = <<EOT
276
+ texdocumentclass: ["review-jsbook", "fontsize=13.5Q, baselineskip=20H, line_length=40zw, number_of_lines=34, head_space=20mm, gutter=20mm"]
277
+ EOT
278
+ assert_equal cont, File.read(File.join(@tmpdir, 'config.yml'))
279
+ end
280
+
269
281
  def test_update_tex_parameters_review_jlreq
270
282
  File.write(File.join(@tmpdir, 'config.yml'), %Q(texdocumentclass: ["review-jlreq", ""]\n))
271
283
  io = StringIO.new
@@ -330,7 +342,7 @@ EOT
330
342
  assert_match(/By default it is migrated to/, io.string)
331
343
  assert_match(/is safely replaced/, io.string)
332
344
  cont = <<EOT
333
- texdocumentclass: ["review-jlreq", "paper=a5,fontsize=11pt,landscape,oneside,twoside,onecolumn,twocolumn,titlepage,notitlepage,openright,openany,leqno,fleqn,draft,final,report,cameraready=print,cover=false"]
345
+ texdocumentclass: ["review-jlreq", "paper=a5,fontsize=11pt,landscape,oneside,twoside,onecolumn,twocolumn,titlepage,notitlepage,openright,openany,leqno,fleqn,draft,final,report,media=print,cover=false"]
334
346
  EOT
335
347
  assert_equal cont, File.read(File.join(@tmpdir, 'config.yml'))
336
348
  end
@@ -341,13 +353,15 @@ EOT
341
353
  @u.update_tex_stys('review-jsbook', @tmpdir)
342
354
  assert_equal '', io.string
343
355
  assert_equal true, File.exist?(File.join(@tmpdir, 'sty/review-base.sty'))
344
- assert_equal true, File.exist?(File.join(@tmpdir, 'sty/gentombow09j.sty'))
356
+ assert_equal true, File.exist?(File.join(@tmpdir, 'sty/gentombow.sty'))
357
+ assert_equal true, File.exist?(File.join(@tmpdir, 'sty/jsbook.cls'))
345
358
  end
346
359
 
347
360
  def test_update_stys_new_custom
348
361
  io = StringIO.new
349
362
  @u.instance_eval{ @logger = ReVIEW::Logger.new(io) }
350
363
  @u.update_tex_stys('review-jsbook', @tmpdir)
364
+ assert_equal '', io.string
351
365
  File.write(File.join(@tmpdir, 'sty/review-custom.sty'), "% MY CUSTOM\n")
352
366
  @u.update_tex_stys('review-jsbook', @tmpdir)
353
367
  assert_equal '', io.string
@@ -8,10 +8,10 @@ class ZipExporterTest < Test::Unit::TestCase
8
8
 
9
9
  def setup
10
10
  @tmpdir = Dir.mktmpdir
11
- @epubdir = "#{@tmpdir}/epubdir"
12
- FileUtils.mkdir_p("#{@epubdir}/META-INF")
13
- FileUtils.mkdir_p("#{@epubdir}/OEBPS")
14
- File.write("#{@epubdir}/mimetype", 'application/epub+zip')
11
+ @epubdir = File.join(@tmpdir, 'epubdir')
12
+ FileUtils.mkdir_p(File.join(@epubdir, 'META-INF'))
13
+ FileUtils.mkdir_p(File.join(@epubdir, 'OEBPS'))
14
+ File.write(File.join(@epubdir, 'mimetype'), 'application/epub+zip')
15
15
 
16
16
  container_xml = <<-EOB
17
17
  <?xml version="1.0" encoding="UTF-8"?>
@@ -54,9 +54,9 @@ class ZipExporterTest < Test::Unit::TestCase
54
54
  </html>
55
55
  EOB
56
56
 
57
- File.write("#{@epubdir}/META-INF/container.xml", container_xml)
58
- File.write("#{@epubdir}/OEBPS/book.opf", book_opf)
59
- File.write("#{@epubdir}/OEBPS/ch1.xhtml", ch1_xhtml)
57
+ File.write(File.join(@epubdir, 'META-INF/container.xml'), container_xml)
58
+ File.write(File.join(@epubdir, 'OEBPS/book.opf'), book_opf)
59
+ File.write(File.join(@epubdir, 'OEBPS/ch1.xhtml'), ch1_xhtml)
60
60
  end
61
61
 
62
62
  def test_export_zipcmd
@@ -0,0 +1,163 @@
1
+ ## Core latex/pdflatex auxiliary files:
2
+ *.aux
3
+ *.lof
4
+ *.log
5
+ *.lot
6
+ *.fls
7
+ *.out
8
+ *.toc
9
+ *.fmt
10
+
11
+ ## Intermediate documents:
12
+ *.dvi
13
+ *-converted-to.*
14
+ # these rules might exclude image files for figures etc.
15
+ # *.ps
16
+ # *.eps
17
+ # *.pdf
18
+
19
+ ## Bibliography auxiliary files (bibtex/biblatex/biber):
20
+ *.bbl
21
+ *.bcf
22
+ *.blg
23
+ *-blx.aux
24
+ *-blx.bib
25
+ *.brf
26
+ *.run.xml
27
+
28
+ ## Build tool auxiliary files:
29
+ *.fdb_latexmk
30
+ *.synctex
31
+ *.synctex.gz
32
+ *.synctex.gz(busy)
33
+ *.pdfsync
34
+
35
+ ## Auxiliary and intermediate files from other packages:
36
+ # algorithms
37
+ *.alg
38
+ *.loa
39
+
40
+ # achemso
41
+ acs-*.bib
42
+
43
+ # amsthm
44
+ *.thm
45
+
46
+ # beamer
47
+ *.nav
48
+ *.snm
49
+ *.vrb
50
+
51
+ # cprotect
52
+ *.cpt
53
+
54
+ #(e)ledmac/(e)ledpar
55
+ *.end
56
+ *.[1-9]
57
+ *.[1-9][0-9]
58
+ *.[1-9][0-9][0-9]
59
+ *.[1-9]R
60
+ *.[1-9][0-9]R
61
+ *.[1-9][0-9][0-9]R
62
+ *.eledsec[1-9]
63
+ *.eledsec[1-9]R
64
+ *.eledsec[1-9][0-9]
65
+ *.eledsec[1-9][0-9]R
66
+ *.eledsec[1-9][0-9][0-9]
67
+ *.eledsec[1-9][0-9][0-9]R
68
+
69
+ # glossaries
70
+ *.acn
71
+ *.acr
72
+ *.glg
73
+ *.glo
74
+ *.gls
75
+
76
+ # gnuplottex
77
+ *-gnuplottex-*
78
+
79
+ # hyperref
80
+ *.brf
81
+
82
+ # knitr
83
+ *-concordance.tex
84
+ *.tikz
85
+ *-tikzDictionary
86
+
87
+ # listings
88
+ *.lol
89
+
90
+ # makeidx
91
+ *.idx
92
+ *.ilg
93
+ *.ind
94
+ *.ist
95
+
96
+ # minitoc
97
+ *.maf
98
+ *.mtc
99
+ *.mtc[0-9]
100
+ *.mtc[1-9][0-9]
101
+
102
+ # minted
103
+ _minted*
104
+ *.pyg
105
+
106
+ # morewrites
107
+ *.mw
108
+
109
+ # mylatexformat
110
+ *.fmt
111
+
112
+ # nomencl
113
+ *.nlo
114
+
115
+ # sagetex
116
+ *.sagetex.sage
117
+ *.sagetex.py
118
+ *.sagetex.scmd
119
+
120
+ # sympy
121
+ *.sout
122
+ *.sympy
123
+ sympy-plots-for-*.tex/
124
+
125
+ # pdfcomment
126
+ *.upa
127
+ *.upb
128
+
129
+ #pythontex
130
+ *.pytxcode
131
+ pythontex-files-*/
132
+
133
+ # Texpad
134
+ .texpadtmp
135
+
136
+ # TikZ & PGF
137
+ *.dpth
138
+ *.md5
139
+ *.auxlock
140
+
141
+ # todonotes
142
+ *.tdo
143
+
144
+ # xindy
145
+ *.xdy
146
+
147
+ # xypic precompiled matrices
148
+ *.xyc
149
+
150
+ # WinEdt, Emacs
151
+ *~
152
+ *.bak
153
+ *.sav
154
+
155
+ # endfloat
156
+ *.ttt
157
+ *.fff
158
+
159
+ # Latexian
160
+ TSWLatexianTemp*
161
+
162
+ # temporary directory
163
+ jis0/*
@@ -0,0 +1,25 @@
1
+ Copyright 1995-1999 ASCII MEDIA WORKS
2
+ Copyright 1999-2016 Haruhiko Okumura
3
+ Copyright 2016-2018 Japanese TeX Development Community
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.