lib/polytexnic/literal.rb in polytexnic-1.6.5 vs lib/polytexnic/literal.rb in polytexnic-1.6.6
- old
+ new
@@ -210,17 +210,18 @@
# use the nonbreak space ~.
def hyperrefs(string)
part = language_labels["part"]
chapter = language_labels["chapter"]["word"]
section = language_labels["section"]
+ appendix = language_labels["appendix"]
table = language_labels["table"]
box = language_labels["aside"]
figure = language_labels["figure"]
fig = language_labels["fig"]
listing = language_labels["listing"]
equation = language_labels["equation"]
eq = language_labels["eq"]
- linked_item = "(#{part}|#{chapter}|#{section}|#{table}|#{box}|#{figure}" +
+ linked_item = "(#{part}|#{chapter}|#{section}|#{appendix}|#{table}|#{box}|#{figure}" +
"|#{fig}\.|#{listing}|#{equation}|#{eq}\.)"
ref = /(?:#{linked_item}(~| ))*(\\(?:eq)*ref){(.*?)}/i
string.gsub!(ref) do
"\\hyperref[#{$4}]{#{$1}#{$2}#{$3}{#{$4}}}"
end