Skip to content

Commit

Permalink
introduce reviewimagecaption. Closes: #1254
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Jan 19, 2019
1 parent dea5020 commit ffa2684
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/review/latexbuilder.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2002-2007 Minero Aoki
# 2008-2009 Minero Aoki, Kenshi Muto
# 2010-2018 Minero Aoki, Kenshi Muto, TAKAHASHI Masayoshi
# 2010-2019 Minero Aoki, Kenshi Muto, TAKAHASHI Masayoshi
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -477,7 +477,7 @@ def image_image(id, caption, metric)
puts "\\includegraphics[width=\\maxwidth]{#{@chapter.image(id).path}}"
end
@doc_status[:caption] = true
puts macro('caption', compile_inline(caption)) if caption.present?
puts macro('reviewimagecaption', compile_inline(caption)) if caption.present?
@doc_status[:caption] = nil
puts macro('label', image_label(id))
puts '\end{reviewimage}'
Expand All @@ -493,7 +493,7 @@ def image_dummy(id, caption, lines)
end
puts macro('label', image_label(id))
@doc_status[:caption] = true
puts macro('caption', compile_inline(caption)) if caption.present?
puts macro('reviewimagecaption', compile_inline(caption)) if caption.present?
@doc_status[:caption] = nil
puts '\end{reviewdummyimage}'
end
Expand Down
1 change: 1 addition & 0 deletions templates/latex/review-jlreq/review-base.sty
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
\begin{reviewtablesetup}\begin{tabular}{#1}}%
{\end{tabular}\end{reviewtablesetup}}

\newcommand\reviewimagecaption[1]{\caption{#1}}
\newcommand*\reviewimgtablecaption[1]{\caption{#1}}

% コラム
Expand Down
3 changes: 3 additions & 0 deletions templates/latex/review-jsbook/review-base.sty
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
\WithSuffix\newcommand\reviewtablecaption*[1]{%
\caption*{#1}}

\newcommand\reviewimagecaption[1]{%
\caption{#1}}

\newcommand{\reviewimgtablecaption}[1]{%
\caption{#1}\vspace{-3mm}}

Expand Down

0 comments on commit ffa2684

Please sign in to comment.