Skip to content

Commit aa60bda

Browse files
authored
Merge pull request #123 from jfisher-usgs/master
merge with upstream
2 parents ed66cb0 + 9ea01b3 commit aa60bda

File tree

14 files changed

+44
-35
lines changed

14 files changed

+44
-35
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ Suggests:
4646
testthat
4747
License: CC0
4848
Copyright: This software is in the public domain because it contains materials
49-
that originally came from the United States Geological Survey, an agency of
50-
the United States Department of Interior.
49+
that originally came from the USGS, an agency of the
50+
United States Department of Interior.
5151
URL: https://github.com/USGS-R/inlmisc
5252
BugReports: https://github.com/USGS-R/inlmisc/issues
5353
Encoding: UTF-8

NEWS.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
# inlmisc 0.4.7.9000
22

3+
- Add *misc/latex-packages.txt* file: contains a list of required LaTeX packages
4+
that are not included in the default installation of [TinyTeX](https://yihui.name/tinytex/);
5+
use the `inlmisc:::InstallLatexPackages()` command to install these packages into TinyTeX.
6+
7+
- In LaTeX preamble, replace **xcolor** package with **color**,
8+
eliminates an annoying warning when compiling document.
9+
310
- In `GetColors` function, add `"turbo"` color scheme.
411

5-
- In `SetHinge` function, non-backward compatible change to allocating colors on each side of hinge.
6-
The effect of this change is only perceivable when the number of colors is small (`n < 10`).
12+
- In `SetHinge` function, non-backward compatible change to allocating colors on each side
13+
of hinge, is only perceivable when the number of colors is small (`n < 10`).
714

815
- Rename `PrintHelpPages` function to `PrintPackageHelp`.
916
Preserve empty lines in the Examples section of help documentation;
10-
fix parsing bug on identifying code blocks; tidy main header for each help topic;
17+
fix parsing bug associated with identifying code blocks; tidy main header for each help topic;
1118
add `internal` argument, used to print help pages flagged with keyword `internal`;
12-
replace `hr` argument with `sep` argument;
19+
replace `hr` argument with `sep`;
1320
add `title_to_name` argument, used to replace the help-topic "title" with its "name";
1421
add `notrun` argument, used to remove `## Not run` comments;
15-
include internal links for package by default.
22+
include internal links by default.
1623

1724
- In `Grid2Polygons`, add `check_validity` argument, used to check the validity of polygons.
1825

1926
- Fix bugs in *raw/build-datasets.R* and *raw/render-tables.R* files
2027
that incorrectly called `IsColor` function.
2128

22-
- Changed package dependency from R >= 3.4.0 to R >= 3.5.0 because serialized objects
29+
- Change package dependency from R >= 3.4.0 to R >= 3.5.0 because serialized objects
2330
in serialize/load version 3 cannot be read in older versions of R.
2431

2532
# inlmisc 0.4.7

R/AddGradientLegend.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
#' AddGradientLegend(breaks, pal = GetColors(scheme = "iridescent"),
4444
#' title = "Title", loc = "bottomleft",
4545
#' inset = c(0.2, 0.1))
46+
#' AddGradientLegend(breaks, pal = GetColors(scheme = "turbo"),
47+
#' loc = "center", labels = FALSE)
4648
#' breaks <- seq(0, 2e+06, length.out = 5)
4749
#' AddGradientLegend(breaks, pal = GetColors(scheme = "discrete rainbow"),
4850
#' scientific = TRUE, strip.dim = c(1, 14),

R/PrintFigure.R

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,22 @@
6060
#' "\\usepackage[labelsep=period, labelfont=bf]{caption}",
6161
#' "\\usepackage{subcaption}",
6262
#' "\\captionsetup[figure]{skip=10pt}",
63-
#' "\\captionsetup[subfigure]{skip=-10pt, labelfont={bf, it}}",
63+
#' "\\captionsetup[subfigure]{skip=0pt, labelfont={bf, it}}",
6464
#' "\\renewcommand{\\thesubfigure}{\\Alph{subfigure}}",
6565
#' "\\begin{document}",
6666
#' "<<id, echo=FALSE, fig.width=3, fig.height=2, results='asis'>>=",
6767
#' "par(mar=c(2.1, 2.1, 1.1, 1.1))",
68-
#' "n <- 9",
69-
#' "fig <- sprintf('plot(runif(%s))', seq_len(n))",
70-
#' "headings <- sprintf('Subfigure caption, n=%s', seq_len(n))",
71-
#' "PrintFigure(fig, 3, 2, 'id', title='Figure caption', headings=headings)",
68+
#' "n <- 10",
69+
#' "fig <- sprintf('inlmisc::PlotGraph(runif(%s))', 2:n)",
70+
#' "headings <- sprintf('Subfigure caption, $n=%s$', 2:n)",
71+
#' "PrintFigure(fig, 3, 2, 'id', title='Caption', headings=headings)",
7272
#' "@",
7373
#' "\\end{document}",
7474
#' file = "figure-example.Rnw", sep = "\n")
75-
#' knitr::knit2pdf("figure-example.Rnw", clean = TRUE) # requires TeX installation
75+
#' knitr::knit2pdf("figure-example.Rnw", clean = TRUE) # requires LaTeX
7676
#' system("open figure-example.pdf")
7777
#'
78-
#' unlink("figure-example.*")
79-
#' unlink("figure", recursive = TRUE)
78+
#' unlink(c("figure-example.*", "figure"), recursive = TRUE)
8079
#' }
8180
#'
8281

R/PrintTable.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
#' PrintTable(d, colheadings, align)
124124
#' cat("\\end{document}\n")
125125
#' sink()
126-
#' tinytex::pdflatex("table-example.tex") # requires TeX
126+
#' tinytex::pdflatex("table-example.tex") # requires LaTeX
127127
#' system("open table-example.pdf")
128128
#'
129129
#' file.remove("table-example.tex", "table-example.pdf")

R/usgs_article.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#' @examples
1717
#' \dontrun{
1818
#' # install LaTeX distribution
19-
#' if (Sys.which("pdflatex") == "" && !tinytex:::is_tinytex())
19+
#' if (Sys.which("pdflatex") == "")
2020
#' tinytex::install_tinytex()
2121
#'
2222
#' # install LaTeX packages
@@ -123,7 +123,8 @@ usgs_article <- function(...) {
123123
}
124124

125125

126-
# install required LaTeX packages into TinyTeX
126+
# install required LaTeX packages that are not included
127+
# in the default installation of TinyTeX
127128
InstallLatexPackages <- function() {
128129
file <- system.file("misc", "latex-packages.txt", package="inlmisc")
129130
pkgs <- readLines(file)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Idaho National Laboratory (INL) [Project Office](https://www.usgs.gov/centers/id
1616

1717
## Install
1818

19-
You can install the stable version from [CRAN](https://CRAN.R-project.org/package=inlmisc "The Comprehensive R Archive Network")
20-
using the following command:
19+
The current release is available on [CRAN](https://CRAN.R-project.org/package=inlmisc "The Comprehensive R Archive Network"),
20+
which you can install using the following command:
2121

2222
```r
2323
install.packages("inlmisc", dependencies = TRUE)
2424
```
2525

26-
Or use the **remotes** package to install the development version from GitHub.
26+
To install the development version, you need to clone the repository and build from source, or run:
2727

2828
```r
2929
remotes::install_github("USGS-R/inlmisc", dependencies = TRUE)

inst/misc/latex-packages.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ siunitx
1616
symbol
1717
tocloft
1818
verbatimbox
19-
xcolor
2019
xpatch

inst/misc/preamble.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189

190190
\usepackage[multiple]{footmisc} % typesetting of footnotes
191191

192-
\usepackage{xcolor} % control colors
192+
\usepackage[]{color} % control colors
193193
\definecolor{Red}{rgb}{0.7,0,0}
194194
\definecolor{Blue}{rgb}{0,0,0.8}
195195

inst/rmarkdown/templates/usgs_article/skeleton/usgs.sty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148

149149
\RequirePackage[multiple]{footmisc} % typesetting of footnotes
150150

151-
\RequirePackage{xcolor} % control colors
151+
\RequirePackage[]{color} % control colors
152152
\definecolor{Red}{rgb}{0.7,0,0}
153153
\definecolor{Blue}{rgb}{0,0,0.8}
154154

0 commit comments

Comments
 (0)