Skip to content

Commit

Permalink
Make \abbr part of Rd.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@85516 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Nov 13, 2023
1 parent 41c7dd6 commit 682b3c1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion share/Rd/macros/system.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@
\newcommand{\proglang}{\ifelse{latex}{\out{\textsf{#1}}}{#1}}

% To indicate an abbreviation.
\newcommand{\abbr}{#1}
% \newcommand{\abbr}{#1}
7 changes: 5 additions & 2 deletions src/library/tools/R/Rd2HTML.R
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ Rd2HTML <-
"\\dots"="...",
"\\ldots"="...")
## These correspond to idiosyncratic wrappers
HTMLLeft <- c("\\acronym"='<abbr><span class="acronym">',
HTMLLeft <- c("\\abbr"='<abbr>',
"\\acronym"='<abbr><span class="acronym">',
"\\donttest"="",
"\\env"='<span class="env">',
"\\file"='&lsquo;<span class="file">',
Expand All @@ -483,7 +484,8 @@ Rd2HTML <-
"\\sQuote"="&lsquo;",
"\\dQuote"="&ldquo;",
"\\verb"='<code style="white-space: pre;">&#8288;')
HTMLRight <- c("\\acronym"='</span></abbr>',
HTMLRight <- c("\\abbr"="</abbr>",
"\\acronym"='</span></abbr>',
"\\donttest"="",
"\\env"="</span>",
"\\file"='</span>&rsquo;',
Expand Down Expand Up @@ -792,6 +794,7 @@ Rd2HTML <-
enterPara(doParas)
of1(HTMLEscapes[tag])
},
"\\abbr" =,
"\\acronym" =,
"\\donttest" =,
"\\env" =,
Expand Down
1 change: 1 addition & 0 deletions src/library/tools/R/Rd2latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ Rd2latex <- function(Rd, out = "", defines = .Platform$OS.type,
inCode <<- FALSE
},
## simple wrappers
"\\abbr" =,
"\\acronym" =,
"\\bold"=,
"\\dfn"=,
Expand Down
1 change: 1 addition & 0 deletions src/library/tools/R/Rd2txt.R
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ Rd2txt <-
put(" <", utils::URLencode(lines2str(as.character(block[[1L]]))), ">")
},
"\\Sexpr"= put(as.character.Rd(block, deparse=TRUE)),
"\\abbr" =,
"\\acronym" =,
"\\cite"=,
"\\dfn"= ,
Expand Down
1 change: 1 addition & 0 deletions src/library/tools/R/RdConv2.R
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ checkRd <- function(Rd, defines = .Platform$OS.type, stages = "render",
"\\dots" =,
"\\ldots" =,
"\\R" = has_text <<- TRUE,
"\\abbr" =,
"\\acronym" =,
"\\env" =,
"\\file" =,
Expand Down
1 change: 1 addition & 0 deletions src/library/tools/src/gramRd.y
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,7 @@ static keywords[] = {

/* These macros take one LaTeX-like argument. */

{ "\\abbr", LATEXMACRO },
{ "\\acronym", LATEXMACRO },
{ "\\bold", LATEXMACRO },
{ "\\cite", LATEXMACRO },
Expand Down

0 comments on commit 682b3c1

Please sign in to comment.