965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
|
# File 'lib/review/latexbuilder.rb', line 965
def texequation(lines, id = nil, caption = '')
blank
captionstr = nil
if id
puts macro('begin', 'reviewequationblock')
captionstr = if get_chap.nil?
macro('reviewequationcaption', "#{I18n.t('equation')}#{I18n.t('format_number_header_without_chapter', [@chapter.equation(id).number])}#{I18n.t('caption_prefix')}#{compile_inline(caption)}")
else
macro('reviewequationcaption', "#{I18n.t('equation')}#{I18n.t('format_number_header', [get_chap, @chapter.equation(id).number])}#{I18n.t('caption_prefix')}#{compile_inline(caption)}")
end
end
if caption_top?('equation') && captionstr
puts captionstr
end
puts macro('begin', 'equation*')
lines.each do |line|
puts line
end
puts macro('end', 'equation*')
if !caption_top?('equation') && captionstr
puts captionstr
end
if id
puts macro('end', 'reviewequationblock')
end
blank
end
|