lib/review/book/book_unit.rb in review-5.2.0 vs lib/review/book/book_unit.rb in review-5.3.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2009-2017 Minero Aoki, Kenshi Muto
+# Copyright (c) 2009-2021 Minero Aoki, Kenshi Muto
# 2002-2008 Minero Aoki
#
# This program is free software.
# You can distribute or modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
@@ -16,11 +16,12 @@
attr_reader :book
attr_reader :path
attr_reader :lines
attr_accessor :content
- attr_reader :list_index, :table_index, :equation_index, :footnote_index,
+ attr_reader :list_index, :table_index, :equation_index,
+ :footnote_index, :endnote_index,
:numberless_image_index, :image_index, :icon_index, :indepimage_index,
:headline_index, :column_index
def initialize(file_content: nil, book: nil)
if book
@@ -54,10 +55,11 @@
@list_index = @indexes.list_index
@table_index = @indexes.table_index
@equation_index = @indexes.equation_index
@footnote_index = @indexes.footnote_index
+ @endnote_index = @indexes.endnote_index
@headline_index = @indexes.headline_index
@column_index = @indexes.column_index
if use_bib
@book.bibpaper_index = @indexes.bibpaper_index
end
@@ -112,9 +114,17 @@
equation_index[id]
end
def footnote(id)
footnote_index[id]
+ end
+
+ def endnote(id)
+ endnote_index[id]
+ end
+
+ def endnotes
+ endnote_index
end
def image(id)
return image_index[id] if image_index.key?(id)
return icon_index[id] if icon_index.key?(id)