review 5.6.0 → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +31 -0
- data/.github/workflows/ruby-tex.yml +5 -1
- data/.github/workflows/ruby-win.yml +1 -1
- data/.github/workflows/ruby.yml +2 -2
- data/.rubocop.yml +13 -2
- data/NEWS.ja.md +39 -0
- data/NEWS.md +38 -0
- data/README.md +1 -1
- data/doc/config.yml.sample +11 -0
- data/doc/format.ja.md +50 -2
- data/doc/format.md +50 -2
- data/lib/review/book/base.rb +2 -2
- data/lib/review/book/image_finder.rb +29 -14
- data/lib/review/book/index.rb +1 -8
- data/lib/review/builder.rb +18 -9
- data/lib/review/configure.rb +7 -0
- data/lib/review/epubmaker/epubcommon.rb +13 -7
- data/lib/review/epubmaker/epubv2.rb +0 -5
- data/lib/review/epubmaker/epubv3.rb +9 -1
- data/lib/review/epubmaker/producer.rb +2 -3
- data/lib/review/epubmaker.rb +14 -5
- data/lib/review/htmlbuilder.rb +3 -3
- data/lib/review/idgxmlbuilder.rb +4 -3
- data/lib/review/idgxmlmaker.rb +13 -2
- data/lib/review/img_graph.rb +79 -0
- data/lib/review/img_math.rb +9 -2
- data/lib/review/init.rb +3 -3
- data/lib/review/latexbuilder.rb +1 -1
- data/lib/review/lineinput.rb +2 -2
- data/lib/review/makerhelper.rb +2 -2
- data/lib/review/pdfmaker.rb +14 -6
- data/lib/review/plaintextbuilder.rb +13 -1
- data/lib/review/textmaker.rb +14 -3
- data/lib/review/update.rb +3 -7
- data/lib/review/version.rb +1 -1
- data/lib/review/yamlloader.rb +0 -3
- data/review.gemspec +3 -3
- data/samples/syntax-book/Gemfile +1 -1
- data/samples/syntax-book/ch02.re +6 -0
- data/templates/latex/review-jlreq/review-jlreq.cls +14 -0
- data/templates/latex/review-jsbook/review-jsbook.cls +14 -0
- data/templates/opf/epubv2.opf.erb +2 -0
- data/templates/opf/epubv3.opf.erb +2 -0
- data/templates/opf/opf_manifest_epubv2.opf.erb +2 -0
- data/templates/opf/opf_manifest_epubv3.opf.erb +2 -0
- data/templates/opf/opf_tocx_epubv3.opf.erb +2 -0
- metadata +22 -136
- data/test/assets/black.eps +0 -280
- data/test/assets/fit.png +0 -0
- data/test/assets/header_listener.html +0 -35
- data/test/assets/img_math/img1.png +0 -0
- data/test/assets/img_math/img2.png +0 -0
- data/test/assets/img_math/img3.png +0 -0
- data/test/assets/large.gif +0 -0
- data/test/assets/large.jpg +0 -0
- data/test/assets/large.png +0 -0
- data/test/assets/large.svg +0 -65
- data/test/assets/syntax_book_index_detail.txt +0 -60
- data/test/assets/test.xml.erb +0 -3
- data/test/assets/test_template.tex +0 -189
- data/test/assets/test_template_backmatter.tex +0 -200
- data/test/book_test_helper.rb +0 -44
- data/test/run_test.rb +0 -12
- data/test/test_book.rb +0 -588
- data/test/test_book_chapter.rb +0 -329
- data/test/test_book_part.rb +0 -53
- data/test/test_builder.rb +0 -128
- data/test/test_catalog.rb +0 -174
- data/test/test_catalog_converter_cmd.rb +0 -73
- data/test/test_compiler.rb +0 -52
- data/test/test_configure.rb +0 -91
- data/test/test_converter.rb +0 -21
- data/test/test_epub3maker.rb +0 -733
- data/test/test_epubmaker.rb +0 -931
- data/test/test_epubmaker_cmd.rb +0 -56
- data/test/test_extentions_hash.rb +0 -66
- data/test/test_helper.rb +0 -62
- data/test/test_htmlbuilder.rb +0 -3315
- data/test/test_htmltoc.rb +0 -29
- data/test/test_htmlutils.rb +0 -43
- data/test/test_i18n.rb +0 -300
- data/test/test_idgxmlbuilder.rb +0 -1529
- data/test/test_idgxmlmaker_cmd.rb +0 -50
- data/test/test_image_finder.rb +0 -81
- data/test/test_img_math.rb +0 -120
- data/test/test_index.rb +0 -287
- data/test/test_indexbuilder.rb +0 -52
- data/test/test_latexbuilder.rb +0 -2972
- data/test/test_latexbuilder_v2.rb +0 -1654
- data/test/test_lineinput.rb +0 -104
- data/test/test_location.rb +0 -30
- data/test/test_logger.rb +0 -33
- data/test/test_makerhelper.rb +0 -44
- data/test/test_markdownbuilder.rb +0 -371
- data/test/test_md2inaobuilder.rb +0 -90
- data/test/test_pdfmaker.rb +0 -354
- data/test/test_pdfmaker_cmd.rb +0 -130
- data/test/test_plaintextbuilder.rb +0 -1214
- data/test/test_preprocessor.rb +0 -196
- data/test/test_review_ext.rb +0 -30
- data/test/test_reviewheaderlistener.rb +0 -49
- data/test/test_rstbuilder.rb +0 -619
- data/test/test_sec_counter.rb +0 -156
- data/test/test_template.rb +0 -33
- data/test/test_textmaker_cmd.rb +0 -58
- data/test/test_textutils.rb +0 -187
- data/test/test_tocprinter.rb +0 -46
- data/test/test_topbuilder.rb +0 -1301
- data/test/test_update.rb +0 -473
- data/test/test_webtocprinter.rb +0 -195
- data/test/test_yamlloader.rb +0 -186
- data/test/test_zip_exporter.rb +0 -106
@@ -400,6 +400,20 @@
|
|
400
400
|
]{hyperref}
|
401
401
|
\RequirePackage{pxjahyper}
|
402
402
|
|
403
|
+
%% better line breaks for long urls
|
404
|
+
\AtBeginDocument{%
|
405
|
+
%% modified url.sty
|
406
|
+
\def\UrlBreaks{%
|
407
|
+
\do\0\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9%
|
408
|
+
\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%
|
409
|
+
\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z%
|
410
|
+
\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n%
|
411
|
+
\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z%
|
412
|
+
%%
|
413
|
+
\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]%
|
414
|
+
\do\)\do\,\do\?\do\&\do\'\do+\do\=\do\#}%
|
415
|
+
}
|
416
|
+
|
403
417
|
%% more useful macros
|
404
418
|
%% ----------
|
405
419
|
%% include fullpage graphics
|
@@ -7,7 +7,9 @@
|
|
7
7
|
<%= @opf_manifest %>
|
8
8
|
<%= @opf_toc %>
|
9
9
|
<guide>
|
10
|
+
<% if @config['cover'].present? %>
|
10
11
|
<reference type="cover" title="<%= ReVIEW::I18n.t('covertitle') %>" href="<%= @config['cover'] %>"/>
|
12
|
+
<% end %>
|
11
13
|
<% if @config['titlepage'].present? %>
|
12
14
|
<reference type="title-page" title="<%= ReVIEW::I18n.t('titlepagetitle') %>" href="titlepage.<%= @config['htmlext'] %>"/>
|
13
15
|
<% end %>
|
@@ -7,7 +7,9 @@
|
|
7
7
|
<%= @opf_manifest %>
|
8
8
|
<%= @opf_toc %>
|
9
9
|
<guide>
|
10
|
+
<% if @config['cover'].present? %>
|
10
11
|
<reference type="cover" title="<%= ReVIEW::I18n.t('covertitle') %>" href="<%= @config['cover'] %>"/>
|
12
|
+
<% end %>
|
11
13
|
<% if @config["titlepage"].present? %>
|
12
14
|
<reference type="title-page" title="<%= ReVIEW::I18n.t('titlepagetitle') %>" href="titlepage.<%= @config['htmlext'] %>"/>
|
13
15
|
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<manifest>
|
2
2
|
<item id="ncx" href="<%= @config['bookname'] %>.ncx" media-type="application/x-dtbncx+xml"/>
|
3
|
+
<% if @config['cover'] %>
|
3
4
|
<item id="<%= @config['bookname'] %>" href="<%= @config['cover'] %>" media-type="application/xhtml+xml"/>
|
5
|
+
<% end %>
|
4
6
|
<% if @config['toc'] && @config['mytoc'] %>
|
5
7
|
<item id="toc" href="<%= @config['bookname'] %>-toc.<%= @config['htmlext'] %>" media-type="application/xhtml+xml"/>
|
6
8
|
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<manifest>
|
2
2
|
<item properties="nav" id="<%= @config['bookname'] %>-toc.<%= @config['htmlext'] %>" href="<%= @config['bookname'] %>-toc.<%= @config['htmlext'] %>" media-type="application/xhtml+xml"/>
|
3
|
+
<% if @config['cover'] %>
|
3
4
|
<item id="<%= @config['bookname'] %>" href="<%= @config['cover'] %>" media-type="application/xhtml+xml"/>
|
5
|
+
<% end %>
|
4
6
|
<% if @coverimage %>
|
5
7
|
<item properties="cover-image" id="cover-<%= @coverimage.id %>" href="<%= @coverimage.file %>" media-type="<%= @coverimage.media %>"/>
|
6
8
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: review
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kmuto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: image_size
|
@@ -95,6 +95,20 @@ dependencies:
|
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: playwright-runner
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: pygments.rb
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,14 +143,14 @@ dependencies:
|
|
129
143
|
requirements:
|
130
144
|
- - "~>"
|
131
145
|
- !ruby/object:Gem::Version
|
132
|
-
version: 1.
|
146
|
+
version: 1.45.1
|
133
147
|
type: :development
|
134
148
|
prerelease: false
|
135
149
|
version_requirements: !ruby/object:Gem::Requirement
|
136
150
|
requirements:
|
137
151
|
- - "~>"
|
138
152
|
- !ruby/object:Gem::Version
|
139
|
-
version: 1.
|
153
|
+
version: 1.45.1
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
155
|
name: rubocop-performance
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,6 +259,7 @@ executables:
|
|
245
259
|
extensions: []
|
246
260
|
extra_rdoc_files: []
|
247
261
|
files:
|
262
|
+
- ".github/workflows/rubocop.yml"
|
248
263
|
- ".github/workflows/ruby-tex.yml"
|
249
264
|
- ".github/workflows/ruby-win.yml"
|
250
265
|
- ".github/workflows/ruby.yml"
|
@@ -353,6 +368,7 @@ files:
|
|
353
368
|
- lib/review/i18n.yml
|
354
369
|
- lib/review/idgxmlbuilder.rb
|
355
370
|
- lib/review/idgxmlmaker.rb
|
371
|
+
- lib/review/img_graph.rb
|
356
372
|
- lib/review/img_math.rb
|
357
373
|
- lib/review/index_builder.rb
|
358
374
|
- lib/review/init-web/finish.html
|
@@ -486,71 +502,6 @@ files:
|
|
486
502
|
- templates/web/html/layout-html5.html.erb
|
487
503
|
- templates/web/html/layout-xhtml1.html.erb
|
488
504
|
- templates/xml/container.xml.erb
|
489
|
-
- test/assets/black.eps
|
490
|
-
- test/assets/fit.png
|
491
|
-
- test/assets/header_listener.html
|
492
|
-
- test/assets/img_math/img1.png
|
493
|
-
- test/assets/img_math/img2.png
|
494
|
-
- test/assets/img_math/img3.png
|
495
|
-
- test/assets/large.gif
|
496
|
-
- test/assets/large.jpg
|
497
|
-
- test/assets/large.png
|
498
|
-
- test/assets/large.svg
|
499
|
-
- test/assets/syntax_book_index_detail.txt
|
500
|
-
- test/assets/test.xml.erb
|
501
|
-
- test/assets/test_template.tex
|
502
|
-
- test/assets/test_template_backmatter.tex
|
503
|
-
- test/book_test_helper.rb
|
504
|
-
- test/run_test.rb
|
505
|
-
- test/test_book.rb
|
506
|
-
- test/test_book_chapter.rb
|
507
|
-
- test/test_book_part.rb
|
508
|
-
- test/test_builder.rb
|
509
|
-
- test/test_catalog.rb
|
510
|
-
- test/test_catalog_converter_cmd.rb
|
511
|
-
- test/test_compiler.rb
|
512
|
-
- test/test_configure.rb
|
513
|
-
- test/test_converter.rb
|
514
|
-
- test/test_epub3maker.rb
|
515
|
-
- test/test_epubmaker.rb
|
516
|
-
- test/test_epubmaker_cmd.rb
|
517
|
-
- test/test_extentions_hash.rb
|
518
|
-
- test/test_helper.rb
|
519
|
-
- test/test_htmlbuilder.rb
|
520
|
-
- test/test_htmltoc.rb
|
521
|
-
- test/test_htmlutils.rb
|
522
|
-
- test/test_i18n.rb
|
523
|
-
- test/test_idgxmlbuilder.rb
|
524
|
-
- test/test_idgxmlmaker_cmd.rb
|
525
|
-
- test/test_image_finder.rb
|
526
|
-
- test/test_img_math.rb
|
527
|
-
- test/test_index.rb
|
528
|
-
- test/test_indexbuilder.rb
|
529
|
-
- test/test_latexbuilder.rb
|
530
|
-
- test/test_latexbuilder_v2.rb
|
531
|
-
- test/test_lineinput.rb
|
532
|
-
- test/test_location.rb
|
533
|
-
- test/test_logger.rb
|
534
|
-
- test/test_makerhelper.rb
|
535
|
-
- test/test_markdownbuilder.rb
|
536
|
-
- test/test_md2inaobuilder.rb
|
537
|
-
- test/test_pdfmaker.rb
|
538
|
-
- test/test_pdfmaker_cmd.rb
|
539
|
-
- test/test_plaintextbuilder.rb
|
540
|
-
- test/test_preprocessor.rb
|
541
|
-
- test/test_review_ext.rb
|
542
|
-
- test/test_reviewheaderlistener.rb
|
543
|
-
- test/test_rstbuilder.rb
|
544
|
-
- test/test_sec_counter.rb
|
545
|
-
- test/test_template.rb
|
546
|
-
- test/test_textmaker_cmd.rb
|
547
|
-
- test/test_textutils.rb
|
548
|
-
- test/test_tocprinter.rb
|
549
|
-
- test/test_topbuilder.rb
|
550
|
-
- test/test_update.rb
|
551
|
-
- test/test_webtocprinter.rb
|
552
|
-
- test/test_yamlloader.rb
|
553
|
-
- test/test_zip_exporter.rb
|
554
505
|
- vendor/gentombow/.gitignore
|
555
506
|
- vendor/gentombow/LICENSE
|
556
507
|
- vendor/gentombow/Makefile
|
@@ -669,73 +620,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
669
620
|
- !ruby/object:Gem::Version
|
670
621
|
version: '0'
|
671
622
|
requirements: []
|
672
|
-
rubygems_version: 3.
|
623
|
+
rubygems_version: 3.4.14
|
673
624
|
signing_key:
|
674
625
|
specification_version: 4
|
675
626
|
summary: 'Re:VIEW: a easy-to-use digital publishing system'
|
676
|
-
test_files:
|
677
|
-
- test/assets/black.eps
|
678
|
-
- test/assets/fit.png
|
679
|
-
- test/assets/header_listener.html
|
680
|
-
- test/assets/img_math/img1.png
|
681
|
-
- test/assets/img_math/img2.png
|
682
|
-
- test/assets/img_math/img3.png
|
683
|
-
- test/assets/large.gif
|
684
|
-
- test/assets/large.jpg
|
685
|
-
- test/assets/large.png
|
686
|
-
- test/assets/large.svg
|
687
|
-
- test/assets/syntax_book_index_detail.txt
|
688
|
-
- test/assets/test.xml.erb
|
689
|
-
- test/assets/test_template.tex
|
690
|
-
- test/assets/test_template_backmatter.tex
|
691
|
-
- test/book_test_helper.rb
|
692
|
-
- test/run_test.rb
|
693
|
-
- test/test_book.rb
|
694
|
-
- test/test_book_chapter.rb
|
695
|
-
- test/test_book_part.rb
|
696
|
-
- test/test_builder.rb
|
697
|
-
- test/test_catalog.rb
|
698
|
-
- test/test_catalog_converter_cmd.rb
|
699
|
-
- test/test_compiler.rb
|
700
|
-
- test/test_configure.rb
|
701
|
-
- test/test_converter.rb
|
702
|
-
- test/test_epub3maker.rb
|
703
|
-
- test/test_epubmaker.rb
|
704
|
-
- test/test_epubmaker_cmd.rb
|
705
|
-
- test/test_extentions_hash.rb
|
706
|
-
- test/test_helper.rb
|
707
|
-
- test/test_htmlbuilder.rb
|
708
|
-
- test/test_htmltoc.rb
|
709
|
-
- test/test_htmlutils.rb
|
710
|
-
- test/test_i18n.rb
|
711
|
-
- test/test_idgxmlbuilder.rb
|
712
|
-
- test/test_idgxmlmaker_cmd.rb
|
713
|
-
- test/test_image_finder.rb
|
714
|
-
- test/test_img_math.rb
|
715
|
-
- test/test_index.rb
|
716
|
-
- test/test_indexbuilder.rb
|
717
|
-
- test/test_latexbuilder.rb
|
718
|
-
- test/test_latexbuilder_v2.rb
|
719
|
-
- test/test_lineinput.rb
|
720
|
-
- test/test_location.rb
|
721
|
-
- test/test_logger.rb
|
722
|
-
- test/test_makerhelper.rb
|
723
|
-
- test/test_markdownbuilder.rb
|
724
|
-
- test/test_md2inaobuilder.rb
|
725
|
-
- test/test_pdfmaker.rb
|
726
|
-
- test/test_pdfmaker_cmd.rb
|
727
|
-
- test/test_plaintextbuilder.rb
|
728
|
-
- test/test_preprocessor.rb
|
729
|
-
- test/test_review_ext.rb
|
730
|
-
- test/test_reviewheaderlistener.rb
|
731
|
-
- test/test_rstbuilder.rb
|
732
|
-
- test/test_sec_counter.rb
|
733
|
-
- test/test_template.rb
|
734
|
-
- test/test_textmaker_cmd.rb
|
735
|
-
- test/test_textutils.rb
|
736
|
-
- test/test_tocprinter.rb
|
737
|
-
- test/test_topbuilder.rb
|
738
|
-
- test/test_update.rb
|
739
|
-
- test/test_webtocprinter.rb
|
740
|
-
- test/test_yamlloader.rb
|
741
|
-
- test/test_zip_exporter.rb
|
627
|
+
test_files: []
|
data/test/assets/black.eps
DELETED
@@ -1,280 +0,0 @@
|
|
1
|
-
%!PS-Adobe-3.0 EPSF-3.0
|
2
|
-
%%Creator: (ImageMagick)
|
3
|
-
%%Title: (test/assets/black.eps)
|
4
|
-
%%CreationDate: (2017-08-12T22:40:26+09:00)
|
5
|
-
%%BoundingBox: -0 -0 10 10
|
6
|
-
%%HiResBoundingBox: 0 0 10 10
|
7
|
-
%%DocumentData: Clean7Bit
|
8
|
-
%%LanguageLevel: 1
|
9
|
-
%%Pages: 1
|
10
|
-
%%EndComments
|
11
|
-
|
12
|
-
%%BeginDefaults
|
13
|
-
%%EndDefaults
|
14
|
-
|
15
|
-
%%BeginProlog
|
16
|
-
%
|
17
|
-
% Display a color image. The image is displayed in color on
|
18
|
-
% Postscript viewers or printers that support color, otherwise
|
19
|
-
% it is displayed as grayscale.
|
20
|
-
%
|
21
|
-
/DirectClassPacket
|
22
|
-
{
|
23
|
-
%
|
24
|
-
% Get a DirectClass packet.
|
25
|
-
%
|
26
|
-
% Parameters:
|
27
|
-
% red.
|
28
|
-
% green.
|
29
|
-
% blue.
|
30
|
-
% length: number of pixels minus one of this color (optional).
|
31
|
-
%
|
32
|
-
currentfile color_packet readhexstring pop pop
|
33
|
-
compression 0 eq
|
34
|
-
{
|
35
|
-
/number_pixels 3 def
|
36
|
-
}
|
37
|
-
{
|
38
|
-
currentfile byte readhexstring pop 0 get
|
39
|
-
/number_pixels exch 1 add 3 mul def
|
40
|
-
} ifelse
|
41
|
-
0 3 number_pixels 1 sub
|
42
|
-
{
|
43
|
-
pixels exch color_packet putinterval
|
44
|
-
} for
|
45
|
-
pixels 0 number_pixels getinterval
|
46
|
-
} bind def
|
47
|
-
|
48
|
-
/DirectClassImage
|
49
|
-
{
|
50
|
-
%
|
51
|
-
% Display a DirectClass image.
|
52
|
-
%
|
53
|
-
systemdict /colorimage known
|
54
|
-
{
|
55
|
-
columns rows 8
|
56
|
-
[
|
57
|
-
columns 0 0
|
58
|
-
rows neg 0 rows
|
59
|
-
]
|
60
|
-
{ DirectClassPacket } false 3 colorimage
|
61
|
-
}
|
62
|
-
{
|
63
|
-
%
|
64
|
-
% No colorimage operator; convert to grayscale.
|
65
|
-
%
|
66
|
-
columns rows 8
|
67
|
-
[
|
68
|
-
columns 0 0
|
69
|
-
rows neg 0 rows
|
70
|
-
]
|
71
|
-
{ GrayDirectClassPacket } image
|
72
|
-
} ifelse
|
73
|
-
} bind def
|
74
|
-
|
75
|
-
/GrayDirectClassPacket
|
76
|
-
{
|
77
|
-
%
|
78
|
-
% Get a DirectClass packet; convert to grayscale.
|
79
|
-
%
|
80
|
-
% Parameters:
|
81
|
-
% red
|
82
|
-
% green
|
83
|
-
% blue
|
84
|
-
% length: number of pixels minus one of this color (optional).
|
85
|
-
%
|
86
|
-
currentfile color_packet readhexstring pop pop
|
87
|
-
color_packet 0 get 0.299 mul
|
88
|
-
color_packet 1 get 0.587 mul add
|
89
|
-
color_packet 2 get 0.114 mul add
|
90
|
-
cvi
|
91
|
-
/gray_packet exch def
|
92
|
-
compression 0 eq
|
93
|
-
{
|
94
|
-
/number_pixels 1 def
|
95
|
-
}
|
96
|
-
{
|
97
|
-
currentfile byte readhexstring pop 0 get
|
98
|
-
/number_pixels exch 1 add def
|
99
|
-
} ifelse
|
100
|
-
0 1 number_pixels 1 sub
|
101
|
-
{
|
102
|
-
pixels exch gray_packet put
|
103
|
-
} for
|
104
|
-
pixels 0 number_pixels getinterval
|
105
|
-
} bind def
|
106
|
-
|
107
|
-
/GrayPseudoClassPacket
|
108
|
-
{
|
109
|
-
%
|
110
|
-
% Get a PseudoClass packet; convert to grayscale.
|
111
|
-
%
|
112
|
-
% Parameters:
|
113
|
-
% index: index into the colormap.
|
114
|
-
% length: number of pixels minus one of this color (optional).
|
115
|
-
%
|
116
|
-
currentfile byte readhexstring pop 0 get
|
117
|
-
/offset exch 3 mul def
|
118
|
-
/color_packet colormap offset 3 getinterval def
|
119
|
-
color_packet 0 get 0.299 mul
|
120
|
-
color_packet 1 get 0.587 mul add
|
121
|
-
color_packet 2 get 0.114 mul add
|
122
|
-
cvi
|
123
|
-
/gray_packet exch def
|
124
|
-
compression 0 eq
|
125
|
-
{
|
126
|
-
/number_pixels 1 def
|
127
|
-
}
|
128
|
-
{
|
129
|
-
currentfile byte readhexstring pop 0 get
|
130
|
-
/number_pixels exch 1 add def
|
131
|
-
} ifelse
|
132
|
-
0 1 number_pixels 1 sub
|
133
|
-
{
|
134
|
-
pixels exch gray_packet put
|
135
|
-
} for
|
136
|
-
pixels 0 number_pixels getinterval
|
137
|
-
} bind def
|
138
|
-
|
139
|
-
/PseudoClassPacket
|
140
|
-
{
|
141
|
-
%
|
142
|
-
% Get a PseudoClass packet.
|
143
|
-
%
|
144
|
-
% Parameters:
|
145
|
-
% index: index into the colormap.
|
146
|
-
% length: number of pixels minus one of this color (optional).
|
147
|
-
%
|
148
|
-
currentfile byte readhexstring pop 0 get
|
149
|
-
/offset exch 3 mul def
|
150
|
-
/color_packet colormap offset 3 getinterval def
|
151
|
-
compression 0 eq
|
152
|
-
{
|
153
|
-
/number_pixels 3 def
|
154
|
-
}
|
155
|
-
{
|
156
|
-
currentfile byte readhexstring pop 0 get
|
157
|
-
/number_pixels exch 1 add 3 mul def
|
158
|
-
} ifelse
|
159
|
-
0 3 number_pixels 1 sub
|
160
|
-
{
|
161
|
-
pixels exch color_packet putinterval
|
162
|
-
} for
|
163
|
-
pixels 0 number_pixels getinterval
|
164
|
-
} bind def
|
165
|
-
|
166
|
-
/PseudoClassImage
|
167
|
-
{
|
168
|
-
%
|
169
|
-
% Display a PseudoClass image.
|
170
|
-
%
|
171
|
-
% Parameters:
|
172
|
-
% class: 0-PseudoClass or 1-Grayscale.
|
173
|
-
%
|
174
|
-
currentfile buffer readline pop
|
175
|
-
token pop /class exch def pop
|
176
|
-
class 0 gt
|
177
|
-
{
|
178
|
-
currentfile buffer readline pop
|
179
|
-
token pop /depth exch def pop
|
180
|
-
/grays columns 8 add depth sub depth mul 8 idiv string def
|
181
|
-
columns rows depth
|
182
|
-
[
|
183
|
-
columns 0 0
|
184
|
-
rows neg 0 rows
|
185
|
-
]
|
186
|
-
{ currentfile grays readhexstring pop } image
|
187
|
-
}
|
188
|
-
{
|
189
|
-
%
|
190
|
-
% Parameters:
|
191
|
-
% colors: number of colors in the colormap.
|
192
|
-
% colormap: red, green, blue color packets.
|
193
|
-
%
|
194
|
-
currentfile buffer readline pop
|
195
|
-
token pop /colors exch def pop
|
196
|
-
/colors colors 3 mul def
|
197
|
-
/colormap colors string def
|
198
|
-
currentfile colormap readhexstring pop pop
|
199
|
-
systemdict /colorimage known
|
200
|
-
{
|
201
|
-
columns rows 8
|
202
|
-
[
|
203
|
-
columns 0 0
|
204
|
-
rows neg 0 rows
|
205
|
-
]
|
206
|
-
{ PseudoClassPacket } false 3 colorimage
|
207
|
-
}
|
208
|
-
{
|
209
|
-
%
|
210
|
-
% No colorimage operator; convert to grayscale.
|
211
|
-
%
|
212
|
-
columns rows 8
|
213
|
-
[
|
214
|
-
columns 0 0
|
215
|
-
rows neg 0 rows
|
216
|
-
]
|
217
|
-
{ GrayPseudoClassPacket } image
|
218
|
-
} ifelse
|
219
|
-
} ifelse
|
220
|
-
} bind def
|
221
|
-
|
222
|
-
/DisplayImage
|
223
|
-
{
|
224
|
-
%
|
225
|
-
% Display a DirectClass or PseudoClass image.
|
226
|
-
%
|
227
|
-
% Parameters:
|
228
|
-
% x & y translation.
|
229
|
-
% x & y scale.
|
230
|
-
% label pointsize.
|
231
|
-
% image label.
|
232
|
-
% image columns & rows.
|
233
|
-
% class: 0-DirectClass or 1-PseudoClass.
|
234
|
-
% compression: 0-none or 1-RunlengthEncoded.
|
235
|
-
% hex color packets.
|
236
|
-
%
|
237
|
-
gsave
|
238
|
-
/buffer 512 string def
|
239
|
-
/byte 1 string def
|
240
|
-
/color_packet 3 string def
|
241
|
-
/pixels 768 string def
|
242
|
-
|
243
|
-
currentfile buffer readline pop
|
244
|
-
token pop /x exch def
|
245
|
-
token pop /y exch def pop
|
246
|
-
x y translate
|
247
|
-
currentfile buffer readline pop
|
248
|
-
token pop /x exch def
|
249
|
-
token pop /y exch def pop
|
250
|
-
currentfile buffer readline pop
|
251
|
-
token pop /pointsize exch def pop
|
252
|
-
x y scale
|
253
|
-
currentfile buffer readline pop
|
254
|
-
token pop /columns exch def
|
255
|
-
token pop /rows exch def pop
|
256
|
-
currentfile buffer readline pop
|
257
|
-
token pop /class exch def pop
|
258
|
-
currentfile buffer readline pop
|
259
|
-
token pop /compression exch def pop
|
260
|
-
class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
|
261
|
-
grestore
|
262
|
-
} bind def
|
263
|
-
%%EndProlog
|
264
|
-
%%Page: 1 1
|
265
|
-
%%PageBoundingBox: 0 0 10 10
|
266
|
-
userdict begin
|
267
|
-
DisplayImage
|
268
|
-
0 0
|
269
|
-
10 10
|
270
|
-
12
|
271
|
-
10 10
|
272
|
-
1
|
273
|
-
1
|
274
|
-
1
|
275
|
-
1
|
276
|
-
0000000000000000000000000000000000000000
|
277
|
-
end
|
278
|
-
%%PageTrailer
|
279
|
-
%%Trailer
|
280
|
-
%%EOF
|
data/test/assets/fit.png
DELETED
Binary file
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html>
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:ops="http://www.idpf.org/2007/ops" xml:lang="ja">
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8" />
|
6
|
-
<link rel="stylesheet" type="text/css" href="style.css" />
|
7
|
-
<meta name="generator" content="Re:VIEW" />
|
8
|
-
<title>first chapter</title>
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<h1><a id="h1"></a><span class="secno">第1章 </span>first chapter</h1>
|
12
|
-
|
13
|
-
<h2><a id="h1-1"></a><span class="secno">1.1 </span>first section</h2>
|
14
|
-
|
15
|
-
<h3><a id="h1-1-1"></a>first <img src="images/icon1.jpg" alt="subsection" /></h3>
|
16
|
-
|
17
|
-
<h2><a id="h1-2"></a><span class="secno">1.2 </span>second section</h2>
|
18
|
-
|
19
|
-
<h3 id="dummy1"><a id="h1-2-1"></a>dummy subsection</h3>
|
20
|
-
|
21
|
-
<h2><a id="h1-3"></a><span class="secno">1.3 </span>third section</h2>
|
22
|
-
|
23
|
-
<h2 id="ch01_nonum1" notoc="true">notoc section</h2>
|
24
|
-
|
25
|
-
<h2 id="dummy2" notoc="true">notoc section</h2>
|
26
|
-
|
27
|
-
<a id="ch01_nonum3" /><h2 id="ch01_nonum3" hidden="true">nodisp section</h2>
|
28
|
-
|
29
|
-
<a id="dummy3" /><h2 id="dummy3" hidden="true">nodisp section</h2>
|
30
|
-
|
31
|
-
<h2 id="ch01_nonum5">nonum section</h2>
|
32
|
-
|
33
|
-
<h2 id="dummy4">nonum section</h2>
|
34
|
-
</body>
|
35
|
-
</html>
|
Binary file
|
Binary file
|
Binary file
|
data/test/assets/large.gif
DELETED
Binary file
|
data/test/assets/large.jpg
DELETED
Binary file
|
data/test/assets/large.png
DELETED
Binary file
|
data/test/assets/large.svg
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
3
|
-
|
4
|
-
<svg
|
5
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
6
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
7
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
8
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
10
|
-
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
11
|
-
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
12
|
-
width="250"
|
13
|
-
height="150"
|
14
|
-
viewBox="0 0 66.145832 39.687501"
|
15
|
-
version="1.1"
|
16
|
-
id="svg8"
|
17
|
-
inkscape:version="0.92.1 r15371"
|
18
|
-
sodipodi:docname="large.svg">
|
19
|
-
<defs
|
20
|
-
id="defs2" />
|
21
|
-
<sodipodi:namedview
|
22
|
-
id="base"
|
23
|
-
pagecolor="#ffffff"
|
24
|
-
bordercolor="#666666"
|
25
|
-
borderopacity="1.0"
|
26
|
-
inkscape:pageopacity="0.0"
|
27
|
-
inkscape:pageshadow="2"
|
28
|
-
inkscape:zoom="0.35"
|
29
|
-
inkscape:cx="411.42857"
|
30
|
-
inkscape:cy="545.71429"
|
31
|
-
inkscape:document-units="mm"
|
32
|
-
inkscape:current-layer="layer1"
|
33
|
-
showgrid="false"
|
34
|
-
units="px"
|
35
|
-
inkscape:window-width="1920"
|
36
|
-
inkscape:window-height="1103"
|
37
|
-
inkscape:window-x="0"
|
38
|
-
inkscape:window-y="27"
|
39
|
-
inkscape:window-maximized="1" />
|
40
|
-
<metadata
|
41
|
-
id="metadata5">
|
42
|
-
<rdf:RDF>
|
43
|
-
<cc:Work
|
44
|
-
rdf:about="">
|
45
|
-
<dc:format>image/svg+xml</dc:format>
|
46
|
-
<dc:type
|
47
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
48
|
-
<dc:title></dc:title>
|
49
|
-
</cc:Work>
|
50
|
-
</rdf:RDF>
|
51
|
-
</metadata>
|
52
|
-
<g
|
53
|
-
inkscape:label="レイヤー 1"
|
54
|
-
inkscape:groupmode="layer"
|
55
|
-
id="layer1"
|
56
|
-
transform="translate(0,-257.31247)">
|
57
|
-
<rect
|
58
|
-
id="rect10"
|
59
|
-
width="66.145836"
|
60
|
-
height="39.6875"
|
61
|
-
x="0"
|
62
|
-
y="258.44641"
|
63
|
-
style="stroke-width:0.26458332" />
|
64
|
-
</g>
|
65
|
-
</svg>
|