Skip to content

Commit 5ecdb04

Browse files
committed
amend 8442b5a: the separator for fig/tab labels was accidentally changed from ':' to '', and it should be '' only for theorems
1 parent a39e8f4 commit 5ecdb04

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bookdown
22
Type: Package
33
Title: Authoring Books and Technical Documents with R Markdown
4-
Version: 0.33.3
4+
Version: 0.33.4
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("Christophe", "Dervieux", , "cderv@posit.co", role = c("ctb"),

R/ebook.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,11 @@ resolve_refs_md = function(content, ref_table, to_md = output_md()) {
120120
for (j in ids) {
121121
m = sprintf('\\(\\\\#%s\\)', j)
122122
if (grepl(m, content[i])) {
123-
id = ''; sep = ':'
124123
type = gsub('^([^:]+).*$', '\\1', j)
125-
if (type %in% c(theorem_abbr, 'fig', 'tab')) {
126-
id = sprintf('<span id="%s"></span>', j)
127-
sep = ''
128-
}
124+
sep = if (type %in% theorem_abbr) '' else ':'
125+
id = if (type %in% c(theorem_abbr, 'fig', 'tab')) {
126+
sprintf('<span id="%s"></span>', j)
127+
} else ''
129128
label = label_prefix(type, sep = sep)(ref_table[j])
130129
content[i] = sub(m, paste0(id, label, ' '), content[i])
131130
break

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy