lib/review/latexbuilder.rb in review-5.4.0 vs lib/review/latexbuilder.rb in review-5.5.0

- old
+ new

@@ -1,8 +1,8 @@ # Copyright (c) 2002-2007 Minero Aoki # 2008-2009 Minero Aoki, Kenshi Muto -# 2010-2021 Minero Aoki, Kenshi Muto, TAKAHASHI Masayoshi +# 2010-2022 Minero Aoki, Kenshi Muto, TAKAHASHI Masayoshi # # 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. # For details of the GNU LGPL, see the file "COPYING". @@ -1285,9 +1285,31 @@ if @book.config['chapterlink'] anchor = n.tr('.', '-') macro('reviewsecref', str, sec_label(anchor)) else str + end + end + + def inline_sec(id) + if @book.config['chapterlink'] + n = super(id) + anchor = n.tr('.', '-') + macro('reviewsecref', n, sec_label(anchor)) + else + super(id) + end + rescue KeyError + app_error "unknown headline: #{id}" + end + + def inline_sectitle(id) + if @book.config['chapterlink'] + chap, id2 = extract_chapter_id(id) + anchor = chap.headline_index.number(id2).tr('.', '-') + macro('reviewsecref', super(id), sec_label(anchor)) + else + super(id) end end def inline_column_chap(chapter, id) macro('reviewcolumnref',