pkgmaker/0000755000176000001440000000000012334675514012115 5ustar ripleyuserspkgmaker/inst/0000755000176000001440000000000012330274520013056 5ustar ripleyuserspkgmaker/inst/vignette.mk0000644000176000001440000001463412330274520015244 0ustar ripleyusers## This Makefile was inspired from the RcppGSL package ## Copyright (C) 2011 Romain François and Edd Eddelbuettel ## It was modifed by Renaud Gaujoux to make it more generic and to generate the ## fake vignettes on the fly. ## Copyright (C) 2011 Renaud Gaujoux ## There is an old bug in texidvi that makes it not swallow the ~ ## marker used to denote whitespace. This is actually due to fixing ## another bug whereby you could not run texidvi on directory names ## containing a tilde (as we happen to do for Debian builds of R ## alpha/beta/rc releases). The 'tilde' bug will go away as it ## reportedly has been squashed upstream but I am still bitten by it ## on Ubuntu so for now Dirk will insist on pdflatex and this helps. #%AUTHOR_USER%# #%MAKE_R_PACKAGE%# ifndef MAKE_R_PACKAGE $(error Required make variable 'MAKE_R_PACKAGE' is not defined.) endif #ifndef AUTHOR_USER #$(error Required make variable 'AUTHOR_USER' is not defined.) #endif ifndef MAKEPDF MAKEPDF=1 endif ##--------------------------------------------------------------------- ## Everything below this should be generic and work for any package provided that ## they have the following directory inst/doc setting: ## - inst/vignettes/src: contains the Rnw files for normal vignettes ## - tests: contains R code to run unit tests that are run if not checking and ## produce the file -unitTests.pdf ##--------------------------------------------------------------------- SRC_DIR=. RNW_SRCS = #%RNW_SRCS%# PDF_OBJS=$(RNW_SRCS:.Rnw=.pdf) # allow redfining pdf targets in local mode #%PDF_OBJS%# TEX_OBJS=$(RNW_SRCS:.Rnw=.tex) ifneq (${R_HOME},) R_CHECK=1 else R_CHECK=0 # Enabling local mode? #%LOCAL_MODE%# # in local mode: use pdflatex ifdef LOCAL_MODE USE_PDFLATEX=1 endif export MAKE_R_PACKAGE ifdef LOCAL_MODE MAKEPDF=1 endif # Type of pre-install: # for back-compatibility ifdef QUICK quick=1 endif ifdef quick install=quick endif ifndef install install=yes endif ifneq ('$(install)', 'no') ifeq ('$(install)','yes') # install in temporary directory at each run TMP_INSTALL_DIR:=#%TMP_INSTALL_DIR%# FORCE_INSTALL:=TRUE else ifeq ('$(install)','quick') QUICK=1 FORCE_INSTALL:=FALSE TMP_INSTALL_DIR:=tmplib endif endif # export R_LIBS export R_LIBS:=#%R_LIBS_DEV%# endif # end install pkg endif #end not R_CHECK # Define command for temporary installation (used when make is directly called, # i.e. when not in check/build/INSTALL) ifdef TMP_INSTALL_DIR define do_install @if [ ! -d "$(TMP_INSTALL_DIR)/$(MAKE_R_PACKAGE)" ]; then \ echo "# Installing package '$(MAKE_R_PACKAGE)' in '$(TMP_INSTALL_DIR)' "; \ $(RSCRIPT) --vanilla --quiet -e "pkgmaker::quickinstall('..', '$(TMP_INSTALL_DIR)')" > Rinstall.log 2> Rinstall.err; \ if [ ! -d "$(TMP_INSTALL_DIR)/$(MAKE_R_PACKAGE)" ]; then \ echo "ERROR: Temporary installation failed: see files Rinstall.log and Rinstall.err"; \ echo "# Removing temporary library directory $(TMP_INSTALL_DIR)"; \ exit 1; \ else \ echo "# Package successfully installed"; \ fi \ fi endef else define do_install endef endif define showInfo @echo "# Using R home: $(R_HOME)" @echo "# Using R architecture: $(R_ARCH_BIN)" @echo "# Using R bin directory: $(R_BIN)" @echo "# Using R_LIBS: $(R_LIBS)" endef #%INST_TARGET%# #ifdef INST_TARGET define update_inst_doc # Copying vignette source and output files to ../inst/doc mkdir -p ../inst/doc #cp -f $1 ../inst/doc mv -f $2 ../inst/doc endef #else #define update_inst_doc # # Copying vignette output files to ../inst/doc # mkdir -p ../inst/doc # cp -f $2 ../inst/doc #endef #endif all: init $(PDF_OBJS) do_clean @echo "# All vignettes in 'vignettes' are up to date" init: # Generating vignettes for package '$(MAKE_R_PACKAGE)' # DESCRIPTION file in: #%R_PACKAGE_DESCRIPTION%# # User: #%VIGNETTE_USER%# # Maintainer(s): #%VIGNETTE_MAINTAINERS%# $(showInfo) ifdef LOCAL_MODE # Mode: Local Development [$(LOCAL_MODE)] else # Mode: Production endif ifneq ($(R_CHECK),0) # R CMD check: TRUE else # R CMD check: FALSE endif ifdef INST_TARGET # BuildVignettes: no (storing in ../inst/doc) endif # Detected vignettes: $(RNW_SRCS) # Detected targets: $(PDF_OBJS) clean: rm -fr *.bbl *.run.xml *.blg *.aux *.out *-blx.bib \ *.log *.err Rplots.pdf tests-results tmplib vignette_*.mk vignette.mk \ cleveref.sty \ runit.* ifndef LOCAL_MODE rm -f $(TEX_OBJS) endif clean-all: clean rm -fr $(TEX_OBJS) $(PDF_OBJS) $(MAKE_R_PACKAGE)-unitTests.Rnw setvars: ifeq (${R_BIN},) R_BIN=#%R_BIN%# endif RPROG:=$(R_BIN)/R RSCRIPT:=$(R_BIN)/Rscript .SECONDARY: %.tex do_clean: ifndef QUICK # Removing temporary install directory '$(TMP_INSTALL_DIR)' @-rm -rf $(TMP_INSTALL_DIR); endif # only run tests if not checking: CRAN check run the tests separately #ifdef INST_TARGET ../inst/doc/%-unitTests.pdf: #else #%-unitTests.pdf: #endif # Generating vignette for unit tests: $@ $(do_install) $(RSCRIPT) --vanilla -e "pkgmaker::makeUnitVignette('package:$(MAKE_R_PACKAGE)', check=$(R_CHECK))" >> unitTests.log ifdef LOCAL_MODE $(eval VIGNETTE_BASENAME := $(shell basename $@ .pdf)) # Compact vignette file $(RSCRIPT) --vanilla -e "pkgmaker::compactVignettes('$(VIGNETTE_BASENAME).pdf')" endif $(call update_inst_doc, $*-unitTests.Rnw, $*-unitTests.pdf) # Generate .pdf from .Rnw #ifdef INST_TARGET ../inst/doc/%.pdf: ${SRC_DIR}/%.Rnw #else #%.pdf: ${SRC_DIR}/%.Rnw #endif # Generating vignette $@ from ${SRC_DIR}/$*.Rnw $(do_install) # Compiling ${SRC_DIR}/$*.Rnw into $*.tex $(RSCRIPT) --vanilla -e "pkgmaker::rnw('${SRC_DIR}/$*.Rnw', '$*.tex');" # Generating pdf $@ from $*.tex ifdef MAKEPDF ifdef USE_PDFLATEX # Using pdflatex # LaTeX compilation 1/3 @pdflatex $* >> $*-pdflatex.log # Compiling bibliography with bibtex -bibtex $* # LaTeX compilation 2/3 @pdflatex $* >> $*-pdflatex.log # LaTeX compilation 3/3 @pdflatex $* >> $*-pdflatex.log # Compact vignettes $(RSCRIPT) --vanilla -e "pkgmaker::compactVignettes('$*.pdf')" # Remove temporary LaTeX files (but keep the .tex) rm -fr $*.toc $*.log $*.bbl $*.blg $*.aux $*.out $*-blx.bib else # Using tools::texi2dvi # LaTeX compilation 1/2 $(RSCRIPT) --vanilla -e "tools::texi2dvi( '$*.tex', pdf = TRUE, clean = FALSE )" # Compiling bibliography with bibtex -bibtex $* # LaTeX compilation 2/2 $(RSCRIPT) --vanilla -e "tools::texi2dvi( '$*.tex', pdf = TRUE, clean = TRUE )" endif endif # Update fake vignette file ./$*.Rnw $(RSCRIPT) --vanilla -e "pkgmaker::makeFakeVignette('${SRC_DIR}/$*.Rnw', '$*.Rnw')" $(call update_inst_doc, $*.Rnw, $*.pdf) pkgmaker/inst/tests/0000755000176000001440000000000012330274520014220 5ustar ripleyuserspkgmaker/inst/tests/runit.utils.r0000644000176000001440000001216712334652105016715 0ustar ripleyusers# Unit test for utils # # Author: Renaud Gaujoux ############################################################################### library(stringr) test.errorCheck <- function(){ f <- function(err=''){ success <- exitCheck() on.exit( if(success()) cat("no error\n") else cat("with error\n") ) if( err=='error' ) stop('There is an error') if( err=='try' ) try(stop('Catched error'), silent=TRUE) if( err=='tryCatch' ) tryCatch(stop('Catched error'), error = function(e){}) success(1+1) } # without error out <- capture.output(res <- f()) checkIdentical(res, 2, 'If no error: return result') checkIdentical(out, 'no error', 'If no error: correctly detected no error') # with error out <- capture.output(res <- try(f('error'), silent=TRUE)) checkTrue( is(res, 'try-error'), 'If error: effectively throws an error') checkIdentical(out, 'with error', 'If error: correctly detected the error') # with try-caught error out <- capture.output(res <- f('try')) checkIdentical( res, 2, 'If try-catched error: return result') checkIdentical(out, 'no error', 'If try-catched error: correctly detected no error') # with tryCatch-caught error out <- capture.output(res <- f('tryCatch')) checkIdentical( res, 2, 'If tryCatch-catched error: return result') checkIdentical(out, 'no error', 'If tryCatch-catched error: correctly detected no error') } test.ExposeAttribute <- function(){ x <- 1:10 checkIdentical(ExposeAttribute(x), {attr_mode(x) <- 'rw'; x} , "Using ExposeAttribute() and attr_mode <- 'rw' is equivalent") x <- 1:10 checkIdentical(capture.output(print(ExposeAttribute(x, a='r', b='rw'))), capture.output(print(x)) , "Printing object with exposed attribute is identical to plain print") checkSet <- function(x, name, msg, ...){ attr(x, name) <- 1 y <- ExposeAttribute(x, ...) eval(parse(text=str_c('y$', name, ' <- 1'))) attr_mode(y) <- NULL checkIdentical(x, y, msg) } checkSetException <- function(x, name, msg, ...){ y <- ExposeAttribute(x, ...) checkException(eval(parse(text=str_c('y$', name, ' <- 1'))), msg) } checkSet(x, 'a', "Set works if default") checkSet(x, 'a', .MODE='rw', "Set works if all args are 'rw'") checkSet(x, 'a', a='rw', "Set works if specified arg is 'rw'") checkSet(x, 'a', a='w', "Set works if specified arg is 'w'") checkSet(x, 'a', a='rw', b='r', "Set works if specified arg is 'rw', even if others are not") checkSet(x, 'ab', ab='rw', `a.*`='r', "Set works if specified arg is 'rw', even if another match is not") checkSetException(x, 'a', .MODE='r', "Set throws an error if access right is 'r'") checkSetException(x, 'a', a='r', "Set throws an error if specific access right is 'r'") checkSetException(x, 'a', a='', "Set throws an error if specific access right is ''") checkGet <- function(x, name, msg, ...){ attr(x, name) <- 1 y <- ExposeAttribute(x, ...) a <- eval(parse(text=str_c('y$', name))) checkIdentical(attr(x, name), a, msg) } checkGetException <- function(x, name, msg, ...){ y <- ExposeAttribute(x, ...) checkException(eval(parse(text=str_c('y$', name))), msg) } checkGet(x, 'a', "Get works if default") checkGet(x, 'a', .MODE='rw', "Get works if all args are 'rw'") checkGet(x, 'a', a='rw', "Get works if specified arg is 'rw'") checkGet(x, 'a', a='r', "Get works if specified arg is 'r'") checkGet(x, 'a', a='rw', b='w', "Get works if specified arg is 'rw', even if others are not") checkGet(x, 'ab', ab='r', `a.*`='w', "Get works if specified arg is 'rw', even if another match is not") checkGetException(x, 'a', .MODE='w', "Get throws an error if access right is 'r'") checkGetException(x, 'a', a='w', "Get throws an error if specific access right is 'r'") checkGetException(x, 'a', a='', "Get throws an error if specific access right is ''") } test.Sys.getenv_value <- function(){ on.exit( Sys.unsetenv('TOTO') ) # undefined returns FALSE checkIdentical(Sys.getenv_value('TOTO'), FALSE, 'undefined returns FALSE') # raw undefined returns NA checkIdentical(Sys.getenv_value('TOTO', raw = TRUE), as.character(NA), 'raw undefined returns NA') Sys.setenv(TOTO='bla') checkIdentical(Sys.getenv_value('TOTO'), 'bla', 'defined returns value') # anything false-like returns FALSE Sys.setenv(TOTO='false'); checkIdentical(Sys.getenv_value('TOTO'), FALSE, '"false" returns FALSE') Sys.setenv(TOTO='FALSE'); checkIdentical(Sys.getenv_value('TOTO'), FALSE, '"FALSE" returns FALSE') Sys.setenv(TOTO='0'); checkIdentical(Sys.getenv_value('TOTO'), FALSE, '"0" returns FALSE') } test.str_bs <- function(){ checkIdentical(str_bs("abcd"), "abcd", "No backspace returns string unchanged") checkIdentical(str_bs("abcd\b"), "abc", "One backspace at the end is OK") checkIdentical(str_bs("\babcd"), "abcd", "One leading backspace is OK") checkIdentical(str_bs("abcd\b\b"), "ab", "Two backspaces at the end is OK") checkIdentical(str_bs("abcd\b\b\b"), "a", "Three backspaces at the end is OK") checkIdentical(str_bs("abcd\b\b\b\b"), "", "As many backspaces as characters at the end is OK") checkIdentical(str_bs("abcd\b\be"), "abe", "Backspace in the middle is OK") } pkgmaker/inst/tests/runit.options.r0000644000176000001440000000375512330274520017250 0ustar ripleyusers# Unit tests for options # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### test.option_link <- function(){ opt <- setupPackageOptions(a=1,b=2,c=option_symlink('a'),d=4, RESET=TRUE) .test <- function(msg){ checkIdentical(names(opt$options('a')), 'a', paste(msg, " - options: name of target is ok")) checkIdentical(names(opt$options('c')), 'c', paste(msg, " - options: name of link is ok")) checkIdentical(opt$options('c'), setNames(opt$options('a'), 'c'), paste(msg, " - options: link ok")) checkIdentical(opt$getOption('a'), opt$getOption('c'), paste(msg, " - getOption: link ok")) } .test('Default') opt$options(a=100) .test('After setting target') opt$options(c=50) .test('After setting link') } test.resetOptions <- function(){ opt <- setupPackageOptions(a=1,b=2,c=option_symlink('a'),d=4, RESET=TRUE) .checkOptions <- function(y, msg) checkIdentical(opt$options(), y, msg) ref <- opt$options() # simple set opt$options(a=10) x <- ref x$a <- 10 .checkOptions(x, 'change default option works') opt$resetOptions() .checkOptions(ref, 'default options are reset after resetOptions()') # new option opt$options(aaa=10) x <- ref x$aaa <- 10 .checkOptions(x, 'add new option works') opt$resetOptions() .checkOptions(c(ref, aaa=10), 'new option kept after resetOptions()') opt$resetOptions(ALL=TRUE) .checkOptions(ref, 'all options are reset to default and new options are removed when ALL=TRUE') opt$options(a=20, b='c', d='toto', aaa=25) x <- ref x$a <- 20 x$b <- 'c' x$d <- 'toto' x$aaa <- 25 .checkOptions(x, '2 default options + 1 new are set correctly') opt$resetOptions('a', 'b') x$a <- 1 x$b <- 2 .checkOptions(x, 'only the specified options are reset to default when passed in argument') opt$resetOptions('bbb') .checkOptions(x, 'if some options are not present it does not affect the result') opt$resetOptions('aaa') x$aaa <- NULL .checkOptions(x, 'new options get removed') }pkgmaker/inst/package.mk0000644000176000001440000001405512330274520015007 0ustar ripleyusers## This Makefile automates common tasks in R package developement ## Copyright (C) 2013 Renaud Gaujoux #%AUTHOR_USER%# #%R_PACKAGE%# #%R_PACKAGE_PROJECT_PATH%# #%R_PACKAGE_PROJECT%# #%R_PACKAGE_SUBPROJECT_PATH_PART%# #%R_PACKAGE_OS%# #%R_PACKAGE_PATH%# #%R_PACKAGE_TAR_GZ%# # auto-conf variables #%INIT_CHECKS%# # ifndef R_PACKAGE #$(error Required make variable 'R_PACKAGE' is not defined.) endif ifndef R_PACKAGE_PATH R_PACKAGE_PATH=../pkg endif #ifndef R_LIBS R_LIBS=#%R_LIBS%# #endif RSCRIPT_DEVEL=Rscript-devel ifdef devel flavour=devel RSCRIPT=$(RSCRIPT_DEVEL) endif ifdef flavour RCMD=R$(flavour) RSCRIPT=Rscript-$(flavour) CHECK_DIR=checks/$(flavour) else CHECK_DIR=checks endif R_BIN=#%R_BIN%# ifndef RSCRIPT RSCRIPT:=$(R_BIN)/Rscript endif ifndef RCMD RCMD:=$(R_BIN)/R endif QUICK_FLAG=FALSE ifdef quick QUICK_FLAG=TRUE quick_build=TRUE R_CHECK_ARGS=--no-tests --no-vignettes endif ifdef quick_build R_BUILD_ARGS=--no-build-vignettes endif ifdef full _R_LOCAL_CHECK_=true endif ## BUILD-BINARIES COMMAND #define CMD_BUILD_BINARIES #library(devtools); #library(methods); #p <- as.package('$(R_PACKAGE_PATH)'); #pdir <- p[['path']]; #src <- paste0(p[['package']], '_', p[['version']], '.tar.gz') #run <- function(){ #tmp <- tempfile() #on.exit( unlink(tmp, recursive=TRUE) ) #cmd <- paste0("wine R CMD INSTALL -l ", tmp, ' --build ', src) #message("R CMD check command:\n", cmd) #system(cmd, intern=FALSE, ignore.stderr=FALSE) #} #run() #endef define package_info @echo -n "# R version: " @echo -n `$(RSCRIPT) --version` # R Platform: $(R_PACKAGE_OS) # Project: $(R_PACKAGE_PROJECT) # Package: $(R_PACKAGE) version $(R_PACKAGE_VERSION) # Project directory: '$(R_PACKAGE_PROJECT_PATH)' # Project sub-directory: '$(R_PACKAGE_SUBPROJECT_PATH_PART)' # Package directory: '$(R_PACKAGE_PATH)' endef all: roxygen build check dist: all staticdoc init: | $(CHECK_DIR) $(package_info) $(CHECK_DIR): mkdir -p $(CHECK_DIR) info: | $(R_PACKAGE_PATH) $(package_info) ifdef R_PACKAGE_HAS_VIGNETTES ifndef quick build: vignettes else build: init endif else build: init endif @cd $(CHECK_DIR) && \ echo "\n*** STEP: BUILD\n" && \ $(RCMD) CMD build $(R_BUILD_ARGS) "$(R_PACKAGE_PATH)" && \ echo "*** DONE: BUILD" deploy: info @echo "\n*** STEP: DEPLOY (R-CURRENT)\n" && \ $(RSCRIPT) -e "devtools::install('$(R_PACKAGE_PATH)', quick = $(QUICK_FLAG))" && \ echo "\n*** DONE: DEPLOY (R-CURRENT)" deploy-all: deploy @echo "\n*** STEP: DEPLOY (R-DEVEL)" && \ echo `$(RSCRIPT_DEVEL) --version` && \ $(RSCRIPT_DEVEL) -e "devtools::install('$(R_PACKAGE_PATH)', quick = $(QUICK_FLAG))" && \ echo "\n*** DONE: DEPLOY (R-DEVEL)" deploy-repo: build $(CHECK_DIR)/$(R_PACKAGE_TAR_GZ) @cd $(CHECK_DIR) && \ echo "\n*** STEP: DEPLOY-REPO\n" && \ cp $(R_PACKAGE_TAR_GZ) ~/projects/CRANx/src/contrib && \ echo "*** DONE: DEPLOY-REPO" #build-bin: build # @cd $(CHECK_DIR) && \ # echo "\n*** STEP: BUILD-BINARIES\n" && \ # `echo "$$CMD_BUILD_BINARIES" > build-bin.r` && \ # $(RSCRIPT) --vanilla ./build-bin.r && \ # echo "\n*** DONE: BUILD-BINARIES" check: build $(CHECK_DIR)/$(R_PACKAGE_TAR_GZ) @cd $(CHECK_DIR) && \ echo "\n*** STEP: CHECK\n" && \ mkdir -p $(R_PACKAGE_OS) && \ $(R_LIBS) $(RCMD) CMD check $(R_CHECK_ARGS) -o $(R_PACKAGE_OS) --as-cran --timings $(R_PACKAGE_TAR_GZ) && \ echo "*** DONE: CHECK" roxygen: init @cd $(CHECK_DIR) && \ echo "\n*** STEP: ROXYGEN\n" && \ roxy $(R_PACKAGE_PATH) && \ echo "\n*** DONE: ROXYGEN" staticdocs: init echo "\n*** STEP: STATICDOCS\n" && \ Rstaticdocs $(R_PACKAGE) $(target) && \ echo "\n*** DONE: STATICDOCS\n" ifdef R_PACKAGE_HAS_VIGNETTES ifdef rebuild vignettes: init rmvignettes else vignettes: init endif @cd $(CHECK_DIR) && \ cd $(R_PACKAGE_PATH)/vignettes && \ echo "\n*** STEP: BUILD VIGNETTES\n" && \ $(eval VIGNETTE_MK := $(shell cd "$(R_PACKAGE_PATH)/vignettes"; $(RSCRIPT) --vanilla -e "pkgmaker::vignetteMakefile('$(R_PACKAGE)', checkMode = FALSE)")) \ cd "$(R_PACKAGE_PATH)/vignettes" && \ make -f $(VIGNETTE_MK) && \ echo "Cleaning up ..." && \ make -f $(VIGNETTE_MK) clean && \ echo "\n*** DONE: BUILD VIGNETTES\n" rmvignettes: init @cd $(CHECK_DIR) && \ cd $(R_PACKAGE_PATH)/vignettes && \ echo "\n*** STEP: REMOVE VIGNETTES\n" && \ $(eval VIGNETTE_MK := $(shell cd "$(R_PACKAGE_PATH)/vignettes"; $(RSCRIPT) --vanilla -e "pkgmaker::vignetteMakefile('$(R_PACKAGE)', checkMode = FALSE)")) \ cd "$(R_PACKAGE_PATH)/vignettes" && \ make -f $(VIGNETTE_MK) clean-all && \ echo "\n*** DONE: REMOVE VIGNETTES\n" cp-vignettes: init @cd $(CHECK_DIR) && \ cd $(R_PACKAGE_PATH)/vignettes && \ echo "\n*** STEP: COPYING VIGNETTE FILES TO inst/doc\n" && \ mkdir -p ../inst/doc && \ cp -f *.Rnw ../inst/doc && \ echo "\n*** DONE: COPYING VIGNETTES FILES\n" endif r-forge: build @cd $(CHECK_DIR) && \ echo "\n*** STEP: R-FORGE" && \ echo -n " - package source ... " && \ tar xzf $(R_PACKAGE_TAR_GZ) -C ../r-forge/pkg$(R_PACKAGE_SUBPROJECT_PATH_PART)/ --strip 1 $(R_PACKAGE) && \ echo "OK" && \ echo -n " - static doc ... " && \ rsync --delete --recursive --cvs-exclude $(R_PACKAGE_PROJECT_PATH)/www$(R_PACKAGE_SUBPROJECT_PATH_PART)/ ../r-forge/www$(R_PACKAGE_SUBPROJECT_PATH_PART)/ && \ echo "OK" && \ echo "*** DONE: R-FORGE\n" myCRAN: build @cd $(CHECK_DIR) && \ echo "\n*** STEP: myCRAN" && \ echo -n " - package source ... " && \ cp $(R_PACKAGE_TAR_GZ) ~/projects/myCRAN/src/contrib && \ echo "OK" && \ echo " - update index ... " && \ cd ~/projects/myCRAN/ && ./update && cd - && \ echo " - update staticdocs ... " && \ cd ~/projects/myCRAN/ && rsync --delete --recursive --cvs-exclude $(R_PACKAGE_PROJECT_PATH)/www$(R_PACKAGE_SUBPROJECT_PATH_PART)/ web/$(R_PACKAGE)/ && \ echo "DONE: index" && \ echo "*** DONE: myCRAN\n" newdoc: @echo "Generating new document: $(title)" if [ ! -d "$(R_PACKAGE_PATH)/inst/examples/_src" ]; then \ mkdir -p "$(R_PACKAGE_PATH)/inst/examples/_src" \ fi \ if [ -e "$(title)" ]; then \ echo "Missing title" \ exit 1 \ fi \ echo "---\nlayout: post\ntags: [$(R_PACKAGE) $(tags)]\ncategories: $(categories)\ntitle: $(title)\n---" \ > "$(R_PACKAGE_PATH)/inst/examples/_src/`date +%F`-$(title).Rmd" pkgmaker/inst/cleveref.sty0000644000176000001440000113762212330274520015426 0ustar ripleyusers%% %% This is file `cleveref.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% cleveref.dtx (with options: `package') %% %% LaTeX package for intelligent cross-referencing. %% %% Copyright (C) 2006--2012 Toby Cubitt %% See the files README and COPYING. %% \def\packagedate{2012/09/25} \def\packageversion{0.18.6} %% This file may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.2 %% of this license or (at your option) any later version. %% The latest version of this license is in: %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.2 or later is part of all distributions of LaTeX %% version 1999/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{cleveref} [\packagedate\space v\packageversion\space Intelligent cross-referencing] %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z %% Digits \0\1\2\3\4\5\6\7\8\9 %% Exclamation \! Double quote \" Hash (number) \# %% Dollar \$ Percent \% Ampersand \& %% Acute accent \' Left paren \( Right paren \) %% Asterisk \* Plus \+ Comma \, %% Minus \- Point \. Solidus \/ %% Colon \: Semicolon \; Less than \< %% Equals \= Greater than \> Question mark \? %% Commercial at \@ Left bracket \[ Backslash \\ %% Right bracket \] Circumflex \^ Underscore \_ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \def\cref@currentlabel{} \let\cref@old@refstepcounter\refstepcounter \def\refstepcounter{% \@ifnextchar[{\refstepcounter@optarg}{\refstepcounter@noarg}%] } \def\refstepcounter@noarg#1{% \cref@old@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}} \def\refstepcounter@optarg[#1]#2{% \cref@old@refstepcounter{#2}% \cref@constructprefix{#2}{\cref@result}% \protected@edef\cref@currentlabel{% [#1][\arabic{#2}][\cref@result]% \csname p@#2\endcsname\csname the#2\endcsname}} \AtBeginDocument{% \let\cref@old@label\label \def\label{\@ifnextchar[\label@optarg\label@noarg}%] \let\cref@label\label \def\label@noarg#1{% \@bsphack% \cref@old@label{#1}% \protected@write\@auxout{}% {\string\newlabel{#1@cref}{{\cref@currentlabel}{\thepage}}}% \@esphack}% \def\label@optarg[#1]#2{% \@bsphack% \cref@old@label{#2}% \protected@edef\cref@currentlabel{% \expandafter\cref@override@label@type% \cref@currentlabel\@nil{#1}}% \protected@write\@auxout{}% {\string\newlabel{#2@cref}{{\cref@currentlabel}{\thepage}}}% \@esphack} }% end of AtBeginDocument \let\cref@old@makefntext\@makefntext \long\def\@makefntext{% \cref@constructprefix{footnote}{\cref@result}% \protected@edef\cref@currentlabel{% [footnote][\arabic{footnote}][\cref@result]% \p@footnote\@thefnmark}% \cref@old@makefntext} \let\cref@old@othm\@othm \def\@othm#1[#2]#3{% \edef\@tempa{\expandafter\noexpand% \csname cref@#1@name@preamble\endcsname}% \edef\@tempb{\expandafter\noexpand% \csname Cref@#1@name@preamble\endcsname}% \def\@tempc{#3}% \ifx\@tempc\@empty\relax% \expandafter\gdef\@tempa{}% \expandafter\gdef\@tempb{}% \else% \if@cref@capitalise% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeUppercase #3}% \else% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeLowercase #3}% \fi% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempb\expandafter{\MakeUppercase #3}% \fi% \cref@stack@add{#1}{\cref@label@types}% \cref@old@othm{#1}[#2]{#3}} \let\cref@old@xnthm\@xnthm \def\@xnthm#1#2[#3]{% \edef\@tempa{\expandafter\noexpand% \csname cref@#1@name@preamble\endcsname}% \edef\@tempb{\expandafter\noexpand% \csname Cref@#1@name@preamble\endcsname}% \def\@tempc{#2}% \ifx\@tempc\@empty\relax% \expandafter\gdef\@tempa{}% \expandafter\gdef\@tempb{}% \else% \if@cref@capitalise% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeUppercase #2}% \else% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeLowercase #2}% \fi% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempb\expandafter{\MakeUppercase #2}% \fi% \cref@stack@add{#1}{\cref@label@types}% \cref@old@xnthm{#1}{#2}[#3]} \let\cref@old@ynthm\@ynthm \def\@ynthm#1#2{% \edef\@tempa{\expandafter\noexpand% \csname cref@#1@name@preamble\endcsname}% \edef\@tempb{\expandafter\noexpand% \csname Cref@#1@name@preamble\endcsname}% \def\@tempc{#2}% \ifx\@tempc\@empty\relax% \expandafter\gdef\@tempa{}% \expandafter\gdef\@tempb{}% \else% \if@cref@capitalise% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeUppercase #2}% \else% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeLowercase #2}% \fi% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempb\expandafter{\MakeUppercase #2}% \fi% \cref@stack@add{#1}{\cref@label@types}% \cref@old@ynthm{#1}{#2}} \@ifundefined{appendix}{}{% \g@addto@macro\appendix{% \@ifundefined{chapter}{% \gdef\refstepcounter@noarg#1{% \cref@old@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \ifx\cref@result\@empty% \def\cref@result{2147483647}% \else% \edef\cref@result{2147483647,\cref@result}% \fi% \def\@tempa{#1}% \def\@tempb{section}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [appendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname} \fi% \fi% \fi}% }{% \def\refstepcounter@noarg#1{% \cref@old@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \ifx\cref@result\@empty% \def\cref@result{2147483647}% \else% \edef\cref@result{2147483647,\cref@result}% \fi% \def\@tempa{#1}% \def\@tempb{chapter}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [appendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{section}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname} \fi% \fi% \fi% \fi}% }% }% }% end of \@ifundefined{appendix} \def\@gobble@optarg{\@ifnextchar[\@@gobble@optarg\@gobble@orig}%] \def\@gobble@orig#1{} \def\@@gobble@optarg[#1]#2{} \def\cref@append@toks#1#2{\toks0={#2}% \edef\act{\noexpand#1={\the#1\the\toks0}}% \act}% \def\cref@getref#1#2{% \expandafter\let\expandafter#2\csname r@#1@cref\endcsname% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter\@firstoftwo#2}} \def\cref@getpageref#1#2{% \expandafter\let\expandafter#2\csname r@#1@cref\endcsname% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter\@secondoftwo#2}} \def\cref@getlabel#1#2{% \cref@getref{#1}{\@tempa}% \expandafter\@cref@getlabel\@tempa\@nil#2}% \def\@cref@getlabel{\@ifnextchar[%] \@@cref@getlabel{\@@cref@getlabel[][][]}} \def\@@cref@getlabel[#1][#2][#3]#4\@nil#5{\def#5{#4}} \def\cref@gettype#1#2{% \cref@getref{#1}{\@tempa}% \expandafter\@cref@gettype\@tempa\@nil#2}% \def\@cref@gettype{\@ifnextchar[%] \@@cref@gettype{\@@cref@gettype[][][]}} \def\@@cref@gettype[#1][#2][#3]#4\@nil#5{\def#5{#1}} \def\cref@getcounter#1#2{% \cref@getref{#1}{\@tempa}% \expandafter\@cref@getcounter\@tempa\@nil#2} \def\@cref@getcounter{\@ifnextchar[%] \@@cref@getcounter{\@@cref@getcounter[][][]}} \def\@@cref@getcounter[#1][#2][#3]#4\@nil#5{\def#5{#2}} \def\cref@getprefix#1#2{% \cref@getref{#1}{\@tempa}% \expandafter\@cref@getprefix\@tempa\@nil#2} \def\@cref@getprefix{\@ifnextchar[%] \@@cref@getprefix{\@@cref@getprefix[][][]}} \def\@@cref@getprefix[#1][#2][#3]#4\@nil#5{\def#5{#3}} \def\cref@override@label@type[#1][#2][#3]#4\@nil#5{[#5][#2][#3]#4} \def\cref@constructprefix#1#2{% \cref@stack@init{\@tempstack}% \edef\@tempa{\noexpand{#1\noexpand}}% \expandafter\def\expandafter\@tempa\expandafter{\@tempa{#2}}% \expandafter\@cref@constructprefix\@tempa% \cref@stack@to@list{\@tempstack}{\@tempa}% \expandafter\def\expandafter#2\expandafter{\@tempa}} \def\@cref@constructprefix#1#2{% \cref@resetby{#1}{#2}% \ifx#2\relax% \else% \edef\@tempa{\the\csname c@#2\endcsname}% \expandafter\cref@stack@push\expandafter{\@tempa}{\@tempstack}% \edef\@tempa{{#2}}% \expandafter\expandafter\expandafter\@cref@constructprefix% \expandafter\@tempa\expandafter{\expandafter#2\expandafter}% \fi} \def\cref@stack@init#1{\def#1{\@nil}} \def\cref@stack@top#1{\expandafter\@cref@stack@top#1} \def\@cref@stack@top#1,#2\@nil{#1} \def\cref@stack@pop#1{\expandafter\@cref@stack@pop#1#1} \def\@cref@stack@pop#1,#2\@nil#3{\def#3{#2\@nil}} \def\cref@stack@push#1#2{% \expandafter\@cref@stack@push\expandafter{#2}{#1}{#2}} \def\@cref@stack@push#1#2#3{\def#3{#2,#1}} \def\cref@stack@pull#1#2{\expandafter\@cref@stack@pull#2{#1}{#2}} \def\@cref@stack@pull#1\@nil#2#3{\def#3{#1#2,\@nil}} \def\cref@stack@to@list#1#2{% \cref@isstackfull{#1}% \if@cref@stackfull% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter\@cref@stack@to@list#1}% \else% \def#2{}% \fi} \def\@cref@stack@to@list#1,\@nil{#1} \def\cref@stack@topandbottom#1#2#3{% \def#2{}% \def#3{}% \cref@isstackfull{#1}% \if@cref@stackfull% \edef#2{\cref@stack@top{#1}}% \cref@stack@pop{#1}% \cref@isstackfull{#1}% \@whilesw\if@cref@stackfull\fi{% \edef#3{\cref@stack@top{#1}}% \cref@stack@pop{#1}% \cref@isstackfull{#1}}% \fi} \def\cref@stack@add#1#2{% \begingroup% \def\@arg1{#1}% \let\@tempstack#2% \newif\if@notthere% \@nottheretrue% \cref@isstackfull{\@tempstack}% \@whilesw\if@cref@stackfull\fi{% \edef\@tempb{\cref@stack@top{\@tempstack}}% \def\@tempa{#1}% \ifx\@tempa\@tempb% \@cref@stackfullfalse% \@nottherefalse% \else% \cref@stack@pop{\@tempstack}% \cref@isstackfull{\@tempstack}% \fi}% \expandafter\endgroup% \if@notthere\cref@stack@push{#1}{#2}\fi} \newif\if@cref@stackempty \newif\if@cref@stackfull \def\cref@isstackempty#1{% \def\@tempa{\@nil}% \ifx#1\@tempa\@cref@stackemptytrue% \else\@cref@stackemptyfalse\fi} \def\cref@isstackfull#1{% \def\@tempa{\@nil}% \ifx#1\@tempa\@cref@stackfullfalse% \else\@cref@stackfulltrue\fi} \def\cref@stack@sort#1#2{% \begingroup% \cref@stack@init{\@sortstack}% \edef\@element{\cref@stack@top{#1}}% \expandafter\cref@stack@push\expandafter{\@element}{\@sortstack}% \cref@stack@pop{#1}% \cref@isstackfull{#1}% \if@cref@stackfull% \edef\@tempa{\cref@stack@top{#1}}% \@whilesw\ifx\@tempa\@empty\fi{% \cref@stack@pull{}{\@sortstack}% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \let\@tempa\relax% \else% \edef\@tempa{\cref@stack@top{#1}}% \fi}% \fi% \cref@isstackfull{#1}% \@whilesw\if@cref@stackfull\fi{% \edef\@element{\cref@stack@top{#1}}% \cref@stack@pop{#1}% \def\@empties{}% \cref@isstackfull{#1}% \if@cref@stackfull% \edef\@tempa{\cref@stack@top{#1}}% \@whilesw\ifx\@tempa\@empty\fi{% \edef\@empties{\@empties,}% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \let\@tempa\relax% \else% \edef\@tempa{\cref@stack@top{#1}}% \fi}% \fi% \edef\@tempa{{\expandafter\noexpand\@element}% {\expandafter\noexpand\@empties}% {\noexpand\@sortstack}{\noexpand#2}}% \expandafter\cref@stack@insert\@tempa% \cref@isstackfull{#1}}% \expandafter\endgroup\expandafter% \def\expandafter#1\expandafter{\@sortstack}} \def\cref@stack@insert#1#2#3#4{% \let\@cmp#4% \@cref@stack@insert{}{#1}{#2}{#3}% \cref@stack@pop{#3}} \def\@cref@stack@insert#1#2#3#4{% \let\cref@iterate\relax% \cref@isstackempty{#4}% \if@cref@stackempty% \cref@stack@push{#1,#2#3}{#4}% \else% \edef\cref@elem{\cref@stack@top{#4}}% \expandafter\@cmp\expandafter{\cref@elem}{#2}{\cref@result}% \ifnum\cref@result=2\relax% \cref@stack@push{#1,#2#3}{#4}% \else% \cref@stack@pop{#4}% \edef\cref@elem{{\noexpand#1,\cref@elem}{\noexpand#2}% {\noexpand#3}{\noexpand#4}}% \expandafter\def\expandafter\cref@iterate\expandafter% {\expandafter\@cref@stack@insert\cref@elem}% \fi% \fi% \cref@iterate} \def\cref@counter@first#1#2\@nil{#1} \def\cref@counter@rest#1#2\@nil{#2} \def\cref@countercmp#1#2#3{% \begingroup% \def\@tempa{#1}% \ifx\@tempa\@empty% \def\cref@result{1}% \else% \def\@tempa{#2}% \ifx\@tempa\@empty% \def\cref@result{2}% \else% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \def\cref@result{2}% \else% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \def\cref@result{1}% \else% \cref@getcounter{#1}{\@countera}% \cref@getprefix{#1}{\@prefixa}% \cref@getcounter{#2}{\@counterb}% \cref@getprefix{#2}{\@prefixb}% \cref@stack@init{\@countstacka}% \expandafter\cref@stack@push\expandafter% {\@countera}{\@countstacka}% \ifx\@prefixa\@empty\else% \expandafter\cref@stack@push\expandafter% {\@prefixa}{\@countstacka}% \fi% \cref@stack@init{\@countstackb}% \expandafter\cref@stack@push\expandafter% {\@counterb}{\@countstackb}% \ifx\@prefixb\@empty\else% \expandafter\cref@stack@push\expandafter% {\@prefixb}{\@countstackb}% \fi% \@cref@countercmp% \fi% \fi% \fi% \fi% \expandafter\endgroup\expandafter% \chardef\expandafter#3\expandafter=\cref@result\relax} \def\@cref@countercmp{% \let\@iterate\relax% \cref@isstackempty{\@countstacka}% \if@cref@stackempty% \cref@isstackempty{\@countstackb}% \if@cref@stackempty% \def\cref@result{0}% \else% \def\cref@result{1}% \fi% \else% \cref@isstackempty{\@countstackb}% \if@cref@stackempty% \def\cref@result{2}% \else% \edef\@tempa{\cref@stack@top{\@countstacka}}% \cref@stack@pop{\@countstacka}% \edef\@tempb{\cref@stack@top{\@countstackb}}% \cref@stack@pop{\@countstackb}% \ifnum\@tempa<\@tempb\relax% \def\cref@result{1}% \else% \ifnum\@tempa>\@tempb\relax% \def\cref@result{2}% \else% \def\@iterate{\@cref@countercmp}% \fi% \fi% \fi% \fi% \@iterate} \def\cref@pagecmp#1#2#3{% \begingroup% \def\@tempa{#1}% \ifx\@tempa\@empty% \def\cref@result{1}% \else% \def\@tempa{#2}% \ifx\@tempa\@empty% \def\cref@result{2}% \else% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \def\cref@result{2}% \else% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \def\cref@result{1}% \else% \cref@getpageref{#1}{\@tempa}% \cref@getpageref{#2}{\@tempb}% \ifnum\@tempa<\@tempb\relax% \def\cref@result{1}\relax% \else% \ifnum\@tempa>\@tempb\relax% \def\cref@result{2}\relax% \else% \def\cref@result{0}\relax% \fi% \fi% \fi% \fi% \fi% \fi% \expandafter\endgroup\expandafter% \chardef\expandafter#3\expandafter=\cref@result\relax} \newif\if@cref@inresetlist \def\cref@isinresetlist#1#2{% \begingroup% \def\@counter{#1}% \def\@elt##1{##1,}% \expandafter\ifx\csname cl@#2\endcsname\relax% \def\cref@resetstack{,\@nil}% \else% \edef\cref@resetstack{\csname cl@#2\endcsname\noexpand\@nil}% \fi% \let\@nextcounter\relax% \cref@isstackfull{\cref@resetstack}% \@whilesw\if@cref@stackfull\fi{% \edef\@nextcounter{\cref@stack@top{\cref@resetstack}}% \ifx\@nextcounter\@counter% \@cref@stackfullfalse% \else% \let\@nextcounter\relax% \cref@stack@pop{\cref@resetstack}% \cref@isstackfull{\cref@resetstack}% \fi}% \ifx\@nextcounter\relax% \def\@next{\@cref@inresetlistfalse}% \else% \def\@next{\@cref@inresetlisttrue}% \fi% \expandafter% \endgroup% \@next} \def\cref@resetby#1#2{% \let#2\relax% \def\@tempa{#1}% \def\@tempb{subfigure}% \ifx\@tempa\@tempb% \cref@isinresetlist{#1}{figure}% \if@cref@inresetlist% \def#2{figure}% \fi% \fi% \def\@tempa{#1}% \def\@tempb{subtable}% \ifx\@tempa\@tempb% \cref@isinresetlist{#1}{table}% \if@cref@inresetlist% \def#2{table}% \fi% \fi% \@ifundefined{cl@parentequation}{}{% \def\@tempa{#1}% \def\@tempb{equation}% \ifx\@tempa\@tempb% \cref@isinresetlist{#1}{parentequation}% \if@cref@inresetlist% \expandafter\ifnum\c@parentequation=0\else% \def#2{parentequation}% \fi% \fi% \fi}% \def\@tempa{#1}% \def\@tempb{enumii}% \ifx\@tempa\@tempb% \def#2{enum}% \fi% \def\@tempb{enumiii}% \ifx\@tempa\@tempb% \def#2{enum}% \fi% \def\@tempb{enumiv}% \ifx\@tempa\@tempb% \def#2{enum}% \fi% \def\@tempb{enumv}% \ifx\@tempa\@tempb% \def#2{enum}% \fi% \def\@tempb{enum}% \ifx#2\@tempb% \cref@isinresetlist{#1}{enumiv}% \if@cref@inresetlist% \def#2{enumiv}% \else% \cref@isinresetlist{#1}{enumiii}% \if@cref@inresetlist% \def#2{enumiii}% \else% \cref@isinresetlist{#1}{enumii}% \if@cref@inresetlist% \def#2{enumii}% \else% \cref@isinresetlist{#1}{enumi}% \if@cref@inresetlist% \def#2{enumi}% \else% \cref@isinresetlist{#1}{part}% \if@cref@inresetlist% \def#2{part}% \else% \let#2\relax% \fi% \fi% \fi% \fi% \fi% \fi% \ifx#2\relax% \cref@isinresetlist{#1}{table}% \if@cref@inresetlist% \def#2{table}% \else% \cref@isinresetlist{#1}{subsubsection}% \if@cref@inresetlist% \def#2{subsubsection}% \else% \cref@isinresetlist{#1}{subsection}% \if@cref@inresetlist% \def#2{subsection}% \else% \cref@isinresetlist{#1}{section}% \if@cref@inresetlist% \def#2{section}% \else% \cref@isinresetlist{#1}{chapter}% \if@cref@inresetlist% \def#2{chapter}% \else% \cref@isinresetlist{#1}{part}% \if@cref@inresetlist% \def#2{part}% \else% \let#2\relax% \fi% \fi% \fi% \fi% \fi% \fi% \fi} \newif\if@cref@refconsecutive% \def\cref@isrefconsecutive#1#2{% \begingroup% \countdef\refa@counter=0% \countdef\refb@counter=1% \cref@getcounter{#1}{\cref@result}% \refa@counter=\cref@result% \cref@getcounter{#2}{\cref@result}% \refb@counter=\cref@result% \cref@getprefix{#1}{\refa@prefix}% \cref@getprefix{#2}{\refb@prefix}% \def\@after{\@cref@refconsecutivefalse}% \ifx\refa@prefix\refb@prefix% \ifnum\refa@counter=\refb@counter\relax% \def\@after{\@cref@refconsecutivetrue}% \else% \advance\refa@counter 1\relax% \ifnum\refa@counter=\refb@counter\relax% \def\@after{\@cref@refconsecutivetrue}% \fi% \fi% \fi% \expandafter\endgroup\@after} \def\cref@ispagerefconsecutive#1#2{% \begingroup% \countdef\refa@counter=0% \countdef\refb@counter=1% \cref@getpageref{#1}{\cref@result}% \refa@counter=\cref@result% \cref@getpageref{#2}{\cref@result}% \refb@counter=\cref@result% \def\@after{\@cref@refconsecutivefalse}% \ifnum\refa@counter=\refb@counter\relax% \def\@after{\@cref@refconsecutivetrue}% \else% \advance\refa@counter 1\relax% \ifnum\refa@counter=\refb@counter\relax% \def\@after{\@cref@refconsecutivetrue}% \fi% \fi% \expandafter\endgroup\@after} \def\cref@processgroup#1#2{% \edef\@nextref{\cref@stack@top{#1}}% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@grouptype{\@undefined}% \def\@groupformat{\@undefined}% \else% \expandafter\cref@gettype\expandafter{\@nextref}{\@grouptype}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@groupformat% \expandafter\expandafter\expandafter{% \csname cref@\@grouptype @format\endcsname% {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \let\@nexttype\@grouptype% \let\@nextformat\@groupformat% \@whilesw\ifx\@nextformat\@groupformat\fi{% \expandafter\cref@stack@pull\expandafter{\@nextref}{#2}% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \let\@nexttype\relax% \let\@nextformat\relax% \else% \edef\@nextref{\cref@stack@top{#1}}% \ifx\@nextref\@empty% \let\@nexttype\@grouptype% \let\@nextforamt\@groupformat% \else% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@nexttype{\@undefined}% \def\@nextformat{\@undefined}% \else% \expandafter\cref@gettype\expandafter% {\@nextref}{\@nexttype}% \def\@tempa{\@undefined}% \ifx\@nexttype\@tempa% \def\@nextformat{\@undefined}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@nextformat% \expandafter\expandafter\expandafter{% \csname cref@\@nexttype @format\endcsname% {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \fi% \fi% \fi}% } \def\cref@processgroupall#1#2{% \cref@stack@init{\@tempstack}% \edef\@nextref{\cref@stack@top{#1}}% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@grouptype{\@undefined}% \def\@groupformat{\@undefined}% \else% \expandafter\cref@gettype\expandafter{\@nextref}{\@grouptype}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@groupformat% \expandafter\expandafter\expandafter{% \csname cref@\@grouptype @format\endcsname% {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \let\@lasttype\@grouptype% \let\@lastformat\@groupformat% \cref@isstackfull{#1}% \@whilesw\if@cref@stackfull\fi{% \edef\@nextref{\cref@stack@top{#1}}% \ifx\@nextref\@empty% \ifx\@lastformat\@groupformat% \let\@nexttype\@grouptype% \let\@nextformat\@groupformat% \else% \let\@nexttype\relax% \let\@nextformat\relax% \fi% \else% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \def\@nexttype{\@undefined}% \def\@nextformat{\@undefined}% \else% \expandafter\cref@gettype\expandafter% {\@nextref}{\@nexttype}% \def\@tempa{\@undefined}% \ifx\@nexttype\@tempa% \def\@nextformat{\@undefined}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@nextformat% \expandafter\expandafter\expandafter{% \csname cref@\@nexttype @format\endcsname% {\@dummya}{\@dummyb}{\@dummyc}}% \fi% \fi% \fi% \ifx\@nextformat\@groupformat% \expandafter\cref@stack@pull\expandafter{\@nextref}{#2}% \else% \expandafter\cref@stack@pull\expandafter{\@nextref}{\@tempstack}% \fi% \cref@stack@pop{#1}% \let\@lasttype\@nexttype% \let\@lastformat\@nextformat% \cref@isstackfull{#1}}% \let#1\@tempstack} \def\cref@processconsecutive#1#2#3#4#5{% #4=0% \edef\@nextref{\cref@stack@top{#1}}% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \edef#2{\@nextref}% \let#3\relax% #4=1\relax% \else% \edef#2{\@nextref}% \let#3\relax% \edef\@nextref{\cref@stack@top{#1}}% #4=1\relax% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \ifx\@nextref\@empty% \@cref@refconsecutivefalse% \@whilesw\ifx\@nextref\@empty\fi{% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \let\@nextref\relax% \else% \edef\@nextref{\cref@stack@top{#1}}% \fi}% \else% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \edef\@tempa{{#2}{\@nextref}}% \expandafter#5\@tempa% \fi% \fi% \fi% \@whilesw\if@cref@refconsecutive\fi{% \advance#4 1% \let#3\@nextref% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \@cref@refconsecutivefalse% \else% \edef\@nextref{\cref@stack@top{#1}}% \ifx\@nextref\@empty% \@cref@refconsecutivefalse% \@whilesw\ifx\@nextref\@empty\fi{% \cref@stack@pop{#1}% \cref@isstackempty{#1}% \if@cref@stackempty% \let\@nextref\relax% \else% \edef\@nextref{\cref@stack@top{#1}}% \fi}% \else% \expandafter\ifx\csname r@\@nextref @cref\endcsname\relax% \@cref@refconsecutivefalse% \else% \edef\@tempa{{#3}{\@nextref}}% \expandafter#5\@tempa% \fi% \fi% \fi}% \fi} \DeclareRobustCommand{\cref}[1]{\@cref{cref}{#1}} \DeclareRobustCommand{\Cref}[1]{\@cref{Cref}{#1}} \DeclareRobustCommand{\crefrange}[2]{\@setcrefrange{#1}{#2}{cref}{}} \DeclareRobustCommand{\Crefrange}[2]{\@setcrefrange{#1}{#2}{Cref}{}} \@ifpackageloaded{hyperref}{\newif\if@crefstarred}{% \@ifpackageloaded{varioref}{\newif\if@crefstarred}{}} \let\if@crefstarred\iffalse% \def\@cref#1#2{% \leavevmode% \begingroup% \countdef\count@consecutive=0% \countdef\count@group=1% \count@group=1% \def\cref@variant{#1}% \newif\if@secondref% \cref@stack@init{\@refstack}% \edef\@tempa{#2}% \expandafter\cref@stack@push\expandafter{\@tempa}{\@refstack}% \cref@isstackfull{\@refstack}% \@whilesw\if@cref@stackfull\fi{% \cref@stack@init{\@refsubstack}% \if@cref@sort% \cref@processgroupall{\@refstack}{\@refsubstack}% \cref@stack@sort{\@refsubstack}{\cref@countercmp}% \else% \cref@processgroup{\@refstack}{\@refsubstack}% \fi% \ifnum\count@group=1\relax% \advance\count@group 1% \else% \cref@isstackfull{\@refstack}% \if@cref@stackfull% \@setcref@middlegroupconjunction% \else% \ifnum\count@group=2\relax% \@setcref@pairgroupconjunction% \else% \@setcref@lastgroupconjunction% \fi% \fi% \advance\count@group 1% \def\cref@variant{cref}% \fi% \if@cref@compress% \cref@processconsecutive% {\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}% {\cref@isrefconsecutive}% \else% \edef\@beginref{\cref@stack@top{\@refsubstack}}% \cref@stack@pop{\@refsubstack}% \@whilesw\ifx\@beginref\@empty\fi{% \cref@stack@pop{\@refsubstack}% \cref@isstackempty{\@refsubstack}% \if@cref@stackempty% \let\@beginref\relax% \else% \edef\@beginref{\cref@stack@top{\@refsubstack}}% \fi}% \let\@endref\relax% \count@consecutive=1\relax% \fi% \ifnum\count@consecutive=1\relax% \cref@isstackfull{\@refsubstack}% \if@cref@stackfull% \expandafter\@setcref% \expandafter{\@beginref}{\cref@variant}{@first}% \else% \expandafter\@setcref% \expandafter{\@beginref}{\cref@variant}{}% \fi% \else% \ifnum\count@consecutive=2\relax% \expandafter\@setcref% \expandafter{\@beginref}{\cref@variant}{@first}% \expandafter\cref@stack@push\expandafter% {\@endref,}{\@refsubstack}% \else% \edef\@tempa{{\@beginref}{\@endref}}% \if@cref@stackempty% \expandafter\@setcrefrange\@tempa{\cref@variant}{}% \else% \expandafter\@setcrefrange\@tempa{\cref@variant}{@first}% \fi% \fi% \fi% \@secondreftrue% \cref@isstackfull{\@refsubstack}% \@whilesw\if@cref@stackfull\fi{% \if@cref@compress% \cref@processconsecutive% {\@refsubstack}{\@beginref}{\@endref}{\count@consecutive}% {\cref@isrefconsecutive}% \else% \edef\@beginref{\cref@stack@top{\@refsubstack}}% \cref@stack@pop{\@refsubstack}% \@whilesw\ifx\@beginref\@empty\fi{% \cref@stack@pop{\@refsubstack}% \cref@isstackempty{\@refsubstack}% \if@cref@stackempty% \let\@beginref\relax% \else% \edef\@beginref{\cref@stack@top{\@refsubstack}}% \fi}% \let\@endref\relax% \count@consecutive=1\relax% \fi% \cref@isstackempty{\@refsubstack}% \if@cref@stackempty% \if@secondref% \def\@pos{@second}% \else% \def\@pos{@last}% \fi% \else% \def\@pos{@middle}% \fi% \ifnum\count@consecutive=1\relax% \edef\@tempa{{\@beginref}{cref}{\@pos}}% \expandafter\@setcref\@tempa% \else% \ifnum\count@consecutive=2\relax% \expandafter\@setcref\expandafter% {\@beginref}{cref}{@middle}% \expandafter\cref@stack@push\expandafter% {\@endref}{\@refsubstack}% \else% \edef\@tempa{{\@beginref}{\@endref}{cref}{\@pos}}% \expandafter\@setcrefrange\@tempa% \fi% \fi% \@secondreffalse% \cref@isstackfull{\@refsubstack}% }% end loop over reference substack \cref@isstackfull{\@refstack}% \if@cref@stackfull% \def\@tempa{#1}\def\@tempb{labelcref}% \ifx\@tempa\@tempb\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries\space ??}% \@latex@warning{References in label reference on page \thepage \space have different types}% \@cref@stackfullfalse% \fi% \fi% }% end loop over main reference stack \endgroup} \def\@setcref#1#2#3{% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% \else% \cref@gettype{#1}{\@temptype}% puts label type in \@temptype \cref@getlabel{#1}{\@templabel}% puts label in \@templabel \expandafter\ifx\csname #2@\@temptype @format#3\endcsname\relax% \edef\@tempa{#2}\def\@tempb{labelcref}% \ifx\@tempa\@tempb\relax% \expandafter\@@setcref\expandafter% {\csname #2@default@format#3\endcsname}{#1}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@templabel% \@latex@warning{#2 \space reference format for label type `\@temptype' undefined}% \fi% \else% \expandafter\@@setcref\expandafter% {\csname #2@\@temptype @format#3\endcsname}{#1}% \fi% \fi} \def\@@setcref#1#2{\cref@getlabel{#2}{\@templabel}#1{\@templabel}{}{}} \def\@setcrefrange#1#2#3#4{% \begingroup% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \@latex@warning{Reference `#1' on page \thepage \space% undefined}% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \nfss@text{\reset@font\bfseries ??}--% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage \space% undefined}% \else% \cref@getlabel{#2}{\@labelb}% \nfss@text{\reset@font\bfseries ??}--\@labelb% \fi% \else% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \cref@getlabel{#1}{\@labela}% \@labela--\nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage % \space undefined}% \else% \cref@gettype{#1}{\@typea}% \cref@gettype{#2}{\@typeb}% \cref@getlabel{#1}{\@labela}% \cref@getlabel{#2}{\@labelb}% \edef\@formata{\expandafter\noexpand% \csname #3range@\@typea @format#4\endcsname}% \edef\@formatb{\expandafter\noexpand% \csname #3range@\@typeb @format#4\endcsname}% \expandafter\ifx\@formata\relax% \edef\@tempa{#3}\def\@tempb{labelcref}% \ifx\@tempa\@tempb\relax% \expandafter\@@setcrefrange\expandafter% {\csname #3range@default@format#4\endcsname}{#1}{#2}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb% \@latex@warning{#3\space reference range format for label type `\@typea' undefined}% \fi% \else% \ifx\@formata\@formatb% \expandafter\@@setcrefrange\expandafter{\@formata}{#1}{#2}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@labela--\@labelb% \@latex@warning{References `#1' and `#2' in reference range on page \thepage have different types}% \fi% \fi% \fi% \fi% \endgroup} \def\@@setcrefrange#1#2#3{% \cref@getlabel{#2}{\@labela}% \cref@getlabel{#3}{\@labelb}% #1{\@labela}{\@labelb}{}{}{}{}} \def\@setcref@pairgroupconjunction{\crefpairgroupconjunction} \def\@setcref@middlegroupconjunction{\crefmiddlegroupconjunction} \def\@setcref@lastgroupconjunction{\creflastgroupconjunction} \DeclareRobustCommand{\labelcref}[1]{\@cref{labelcref}{#1}} \DeclareRobustCommand{\namecref}[1]{% \@setnamecref{cref}{#1}{}{}} \DeclareRobustCommand{\nameCref}[1]{% \@setnamecref{Cref}{#1}{}{}} \DeclareRobustCommand{\lcnamecref}[1]{% \@setnamecref{Cref}{#1}{}{\MakeLowercase}} \DeclareRobustCommand{\namecrefs}[1]{% \@setnamecref{cref}{#1}{@plural}{}} \DeclareRobustCommand{\nameCrefs}[1]{% \@setnamecref{Cref}{#1}{@plural}{}} \DeclareRobustCommand{\lcnamecrefs}[1]{% \@setnamecref{Cref}{#1}{@plural}{\MakeLowercase}} \def\@setnamecref#1#2#3#4{% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% \else% \cref@gettype{#2}{\@tempa}% \@ifundefined{#1@\@tempa @name#3}{% \protect\G@refundefinedtrue%`` \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference name for label type `\@tempa' undefined}% }{% \edef\@tempa{% \expandafter\noexpand\csname #1@\@tempa @name#3\endcsname}% \expandafter\@@setnamecref\expandafter{\@tempa}{#4}% }% \fi} \def\@@setnamecref#1#2{% \expandafter\def\expandafter\@tempa\expandafter{#1}% \expandafter#2\@tempa} \DeclareRobustCommand{\cpageref}[1]{% \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}} \DeclareRobustCommand{\Cpageref}[1]{% \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}} \DeclareRobustCommand{\cpagerefrange}[2]{% \@setcpagerefrange{#1}{#2}{cref}{}} \DeclareRobustCommand{\Cpagerefrange}[2]{% \@setcpagerefrange{#1}{#2}{Cref}{}} \DeclareRobustCommand{\labelcpageref}[1]{% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}} \def\@cpageref#1#2#3#4{% \leavevmode% \begingroup% \countdef\count@consecutive=0% \countdef\count@group=1% \countdef\@counta=2% \countdef\@countb=3% \count@group=0% \cref@stack@init{\@refstack}% \edef\@tempa{#2}% \expandafter\cref@stack@push\expandafter{\@tempa}{\@refstack}% \if@cref@sort% \cref@stack@sort{\@refstack}{\cref@pagecmp}% \fi% \cref@isstackfull{\@refstack}% \@whilesw\if@cref@stackfull\fi{% \if@cref@compress% \cref@processconsecutive% {\@refstack}{\@beginref}{\@endref}{\count@consecutive}% {\cref@ispagerefconsecutive}% \else% \edef\@beginref{\cref@stack@top{\@refstack}}% \cref@stack@pop{\@refstack}% \@whilesw\ifx\@beginref\@empty\fi{% \cref@stack@pop{\@refstack}% \cref@isstackempty{\@refstack}% \if@cref@stackempty% \let\@beginref\relax% \else% \edef\@beginref{\cref@stack@top{\@refstack}}% \fi}% \let\@endref\relax% \count@consecutive=1\relax% \fi% \ifx\@endref\relax\else% \expandafter\ifx\csname r@\@beginref @cref\endcsname\relax\else% \expandafter\ifx\csname r@\@endref @cref\endcsname\relax\else% \cref@getpageref{\@beginref}{\@tempa}% \cref@getpageref{\@endref}{\@tempb}% \ifx\@tempa\@tempb\relax% \count@consecutive=1% \let\@endref\relax% \else% \@counta=\@tempa\relax% \@countb=\@tempb\relax% \advance\@counta 1\relax% \ifnum\@counta=\@countb\relax% \count@consecutive=2% \fi% \fi% \fi% \fi% \fi% \cref@isstackempty{\@refstack}% \if@cref@stackempty% \ifcase\count@group\relax% \ifnum\count@consecutive=2\relax% \def\@pos{@first}% \else% \def\@pos{}% \fi% \or% \ifnum\count@consecutive=2\relax% \def\@pos{@middle}% \else% \def\@pos{@second}% \fi% \else% \def\@pos{@last}% \fi% \else% \ifnum\count@group=0\relax% \def\@pos{@first}% \else% \def\@pos{@middle}% \fi% \fi% \ifnum\count@consecutive=1\relax% \def\@tempa{#3}% \edef\@tempb{{\@beginref}{#1}{\@pos}}% \expandafter\@tempa\@tempb% \else% \ifnum\count@consecutive=2\relax% \def\@tempa{#3}% \edef\@tempb{{\@beginref}{#1}{\@pos}}% \expandafter\@tempa\@tempb% \expandafter\cref@stack@push\expandafter% {\@endref,}{\@refstack}% \else% \def\@tempa{#4}% \edef\@tempb{{\@beginref}{\@endref}{#1}{\@pos}}% \expandafter\@tempa\@tempb% \fi% \fi% \advance\count@group 1% \cref@isstackfull{\@refstack}% }% end loop over reference stack \endgroup} \def\@setcpageref#1#2#3{% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#1' on page \thepage \space undefined}% \else% \cref@getpageref{#1}{\@temppage}% \expandafter\ifx\csname #2@page@format#3\endcsname\relax% \edef\@tempa{#2}\def\@tempb{labelcref}% \ifx\@tempa\@tempb\relax% \expandafter\@@setcpageref\expandafter% {\csname #2@default@format#3\endcsname}{#1}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@temppage% \@latex@warning{#2 \space reference format for page references undefined}% \fi% \else% \expandafter\@@setcpageref\expandafter% {\csname #2@page@format#3\endcsname}{#1}% \fi% \fi} \def\@@setcpageref#1#2{% \cref@getpageref{#2}{\@temppage}#1{\@temppage}{}{}} \def\@setcpagerefrange#1#2#3#4{% \begingroup% \expandafter\ifx\csname r@#1@cref\endcsname\relax% \protect\G@refundefinedtrue% \@latex@warning{Reference `#1' on page \thepage \space% undefined}% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \nfss@text{\reset@font\bfseries ??}--% \nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage \space% undefined}% \else% \cref@getpageref{#2}{\@pageb}% \nfss@text{\reset@font\bfseries ??}--\@pageb% \fi% \else% \expandafter\ifx\csname r@#2@cref\endcsname\relax% \protect\G@refundefinedtrue% \cref@getpageref{#1}{\@pagea}% \@pagea--\nfss@text{\reset@font\bfseries ??}% \@latex@warning{Reference `#2' on page \thepage % \space undefined}% \else% \cref@getpageref{#1}{\@pagea}% \cref@getpageref{#2}{\@pageb}% \edef\@format{\expandafter\noexpand% \csname #3range@page@format#4\endcsname}% \expandafter\ifx\@format\relax% \edef\@tempa{#3}\def\@tempb{labelcref}% \ifx\@tempa\@tempb\relax% \expandafter\@@setcpagerefrange\expandafter% {\csname #3range@default@format#4\endcsname}{#1}{#2}% \else% \protect\G@refundefinedtrue% \nfss@text{\reset@font\bfseries ??}~\@pagea--\@pageb% \@latex@warning{#3\space reference range format for page references undefined}% \fi% \else% \expandafter\@@setcpagerefrange\expandafter{\@format}{#1}{#2}% \fi% \fi% \fi% \endgroup} \def\@@setcpagerefrange#1#2#3{% \cref@getpageref{#2}{\@pagea}% \cref@getpageref{#3}{\@pageb}% #1{\@pagea}{\@pageb}{}{}{}{}} \cref@stack@init{\cref@label@types} \newcommand{\crefdefaultlabelformat}[1]{% \def\cref@default@label##1##2##3{#1}} \newcommand{\crefname}[3]{% \@crefname{cref}{#1}{#2}{#3}{}} \newcommand{\Crefname}[3]{% \@crefname{Cref}{#1}{#2}{#3}{}} \newcommand{\creflabelformat}[2]{% \expandafter\def\csname cref@#1@label\endcsname##1##2##3{#2}% \cref@stack@add{#1}{\cref@label@types}} \newcommand{\crefrangelabelformat}[2]{% \expandafter\def\csname cref@#1@rangelabel\endcsname% ##1##2##3##4##5##6{#2}% \cref@stack@add{#1}{\cref@label@types}} \newcommand{\crefalias}[2]{% \expandafter\def\csname cref@#1@alias\endcsname{#2}} \newcommand{\crefname@preamble}[3]{% \@crefname{cref}{#1}{#2}{#3}{@preamble}} \newcommand{\Crefname@preamble}[3]{% \@crefname{Cref}{#1}{#2}{#3}{@preamble}} \def\cref@othervariant#1#2#3{\cref@@othervariant#1\@nil#2#3} \def\cref@@othervariant#1#2\@nil#3#4{% \if#1c% \def#3{C#2}% \def#4{\MakeUppercase}% \else% \def#3{c#2}% \if@cref@capitalise% \def#4{}% \else% \def#4{\MakeLowercase}% \fi% \fi} \def\@crefname#1#2#3#4#5{% \expandafter\def\csname #1@#2@name#5\endcsname{#3}% \expandafter\def\csname #1@#2@name@plural#5\endcsname{#4}% \cref@othervariant{#1}{\@tempc}{\@tempd}% \@ifundefined{\@tempc @#2@name#5}{% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \csname#1@#2@name\endcsname}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempb% \expandafter\expandafter\expandafter{% \csname#1@#2@name@plural\endcsname}% \expandafter\ifx\@tempa\@empty\else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \expandafter\@tempd\@tempa}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempb% \expandafter\expandafter\expandafter{% \expandafter\@tempd\@tempb}% \fi% \toksdef\@toksa=0% \@toksa={% \expandafter\def\csname\@tempc @#2@name#5\endcsname}% \expandafter\the\expandafter\@toksa\expandafter{\@tempa}% \@toksa={% \expandafter\def\csname\@tempc @#2@name@plural#5\endcsname}% \expandafter\the\expandafter\@toksa\expandafter{\@tempb}% }{}% \cref@stack@add{#2}{\cref@label@types}} \def\@crefconstructcomponents#1{% \@ifundefined{cref@#1@label}{% \let\@templabel\cref@default@label% }{% \expandafter\let\expandafter\@templabel% \csname cref@#1@label\endcsname% }% \@ifundefined{cref@#1@rangelabel}{% \expandafter\def\expandafter\@tempa\expandafter{% \@templabel{####1}{####3}{####4}}% \expandafter\def\expandafter\@tempb\expandafter{% \@templabel{####2}{####5}{####6}}% \toksdef\@toksa=0% \@toksa={\def\@temprangelabel##1##2##3##4##5##6}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter\crefrangepreconjunction% \expandafter\@tempa\expandafter\crefrangeconjunction\@tempb% \crefrangepostconjunction}% }{% \expandafter\let\expandafter\@temprangelabel% \csname cref@#1@rangelabel\endcsname% }% \if@cref@nameinlink% \expandafter\def\expandafter\@templabel@first\expandafter{% \@templabel{########1}{}{########3}}% \expandafter\def\expandafter\@temprangelabel@first\expandafter{% \@temprangelabel{########1}{########2}% {}{########4}{########5}{########6}}% \fi% \expandafter\def\expandafter\@templabel\expandafter{% \@templabel{########1}{########2}{########3}}% \expandafter\def\expandafter\@temprangelabel\expandafter{% \@temprangelabel{########1}{########2}{########3}% {########4}{########5}{########6}}% \if@cref@nameinlink\else% \let\@templabel@first\@templabel% \let\@temprangelabel@first\@temprangelabel% \fi% \if@cref@nameinlink% \def\@tempa##1##2{##2##1}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempname% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname cref@#1@name\endcsname}{########2}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempName% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname Cref@#1@name\endcsname}{########2}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempnameplural% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname cref@#1@name@plural\endcsname}{########2}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempNameplural% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname Cref@#1@name@plural\endcsname}{########2}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempnameplural@range% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname cref@#1@name@plural\endcsname}{########3}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempNameplural@range% \expandafter\expandafter\expandafter{% \expandafter\@tempa\expandafter% {\csname Cref@#1@name@plural\endcsname}{########3}}% \else% \expandafter\def\expandafter\@tempname\expandafter{% \csname cref@#1@name\endcsname}% \expandafter\def\expandafter\@tempName\expandafter{% \csname Cref@#1@name\endcsname}% \expandafter\def\expandafter\@tempnameplural\expandafter{% \csname cref@#1@name@plural\endcsname}% \expandafter\def\expandafter\@tempNameplural\expandafter{% \csname Cref@#1@name@plural\endcsname}% \let\@tempnameplural@range\@tempnameplural% \let\@tempNameplural@range\@tempNameplural% \fi% } \def\@crefdefineformat#1{% \begingroup% \@crefconstructcomponents{#1}% \ifx\@tempname\@empty\relax% \expandafter\def\expandafter\@tempfirst\expandafter{\@templabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempfirst% \expandafter\expandafter\expandafter{% \expandafter\@tempname\expandafter\nobreakspace\@templabel@first}% \fi% \ifx\@tempName\@empty\relax% \expandafter\def\expandafter\@tempFirst\expandafter{\@templabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempFirst% \expandafter\expandafter\expandafter{% \expandafter\@tempName\expandafter\nobreakspace\@templabel@first}% \fi% \expandafter\def\expandafter\@templabel\expandafter{\@templabel}% \toksdef\@toksa=0% \@toksa={\crefformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tempfirst}% \@toksa={\Crefformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tempFirst}% \@ifundefined{cref@#1@label}{}{% \@toksa={\labelcrefformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@templabel}}% \endgroup} \def\@crefrangedefineformat#1{% \begingroup% \@crefconstructcomponents{#1}% \ifx\@tempname\@empty\relax% \expandafter\def\expandafter\@tempfirst% \expandafter{\@temprangelabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempfirst% \expandafter\expandafter\expandafter{% \expandafter\@tempnameplural@range% \expandafter\nobreakspace\@temprangelabel@first}% \fi% \ifx\@tempName\@empty\relax% \expandafter\def\expandafter\@tempFirst% \expandafter{\@temprangelabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempFirst% \expandafter\expandafter\expandafter{% \expandafter\@tempNameplural@range% \expandafter\nobreakspace\@temprangelabel@first}% \fi% \expandafter\def\expandafter\@temprangelabel% \expandafter{\@temprangelabel}% \toksdef\@toksa=0% \@toksa={\crefrangeformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tempfirst}% \@toksa={\Crefrangeformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{\@tempFirst}% \@ifundefined{cref@#1@rangelabel}{% \@ifundefined{cref@#1@label}{\let\@tempa\relax}{\def\@tempa{}}}% {\def\@tempa{}}% \ifx\@tempa\@empty\relax% \@toksa={\labelcrefrangeformat{#1}}% \expandafter\the\expandafter\@toksa\expandafter{% \@temprangelabel}% \fi% \endgroup} \def\@crefdefinemultiformat#1{% \begingroup% \@crefconstructcomponents{#1}% \ifx\@tempnameplural\@empty\relax% \expandafter\def\expandafter\@tempfirst% \expandafter{\@templabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempfirst% \expandafter\expandafter\expandafter{% \expandafter\@tempnameplural% \expandafter\nobreakspace\@templabel@first}% \fi% \ifx\@tempNameplural\@empty\relax% \expandafter\def\expandafter\@tempFirst% \expandafter{\@templabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempFirst% \expandafter\expandafter\expandafter{% \expandafter\@tempNameplural% \expandafter\nobreakspace\@templabel@first}% \fi% \expandafter\def\expandafter\@tempsecond\expandafter{% \expandafter\crefpairconjunction\@templabel}% \expandafter\def\expandafter\@tempmiddle\expandafter{% \expandafter\crefmiddleconjunction\@templabel}% \expandafter\def\expandafter\@templast\expandafter{% \expandafter\creflastconjunction\@templabel}% \expandafter\def\expandafter\@templabel\expandafter{\@templabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempfirst}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\crefmultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempFirst}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\Crefmultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% \@ifundefined{cref@#1@label}{}{% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templabel}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\labelcrefmultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb}% \endgroup} \def\@crefrangedefinemultiformat#1{% \begingroup% \@crefconstructcomponents{#1}% \ifx\@tempnameplural\@empty\relax% \expandafter\def\expandafter\@tempfirst% \expandafter{\@temprangelabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempfirst% \expandafter\expandafter\expandafter{% \expandafter\@tempnameplural@range% \expandafter\nobreakspace\@temprangelabel@first}% \fi% \ifx\@tempNameplural\@empty\relax% \expandafter\def\expandafter\@tempFirst% \expandafter{\@temprangelabel}% \else% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempFirst% \expandafter\expandafter\expandafter{% \expandafter\@tempNameplural@range% \expandafter\nobreakspace\@temprangelabel@first}% \fi% \expandafter\def\expandafter\@tempsecond\expandafter{% \expandafter\crefpairconjunction\@temprangelabel}% \expandafter\def\expandafter\@tempmiddle\expandafter{% \expandafter\crefmiddleconjunction\@temprangelabel}% \expandafter\def\expandafter\@templast\expandafter{% \expandafter\creflastconjunction\@temprangelabel}% \expandafter\def\expandafter\@temprangelabel% \expandafter{\@temprangelabel}% \toksdef\@toksa=0% \toksdef\@toksb=1% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempfirst}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\crefrangemultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempFirst}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\Crefrangemultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% \@ifundefined{cref@#1@rangelabel}{% \@ifundefined{cref@#1@label}{\let\@tempa\relax}{\def\@tempa{}}}% {\def\@tempa{}}% \ifx\@tempa\@empty\relax% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@temprangelabel}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\labelcrefrangemultiformat{#1}}% \expandafter\the\expandafter\@toksa\the\@toksb% \fi% \endgroup} \def\@labelcrefdefinedefaultformats{% \begingroup% \toksdef\@toksa=0% \toksdef\@toksb=1% \let\@templabel\cref@default@label% \expandafter\def\expandafter\@tempa\expandafter{% \@templabel{####1}{####3}{####4}}% \expandafter\def\expandafter\@tempb\expandafter{% \@templabel{####2}{####5}{####6}}% \@toksa={\def\@temprangelabel##1##2##3##4##5##6}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter\crefrangepreconjunction% \expandafter\@tempa\expandafter\crefrangeconjunction\@tempb% \crefrangepostconjunction}% \expandafter\def\expandafter\@templabel\expandafter{% \@templabel{########1}{########2}{########3}}% \expandafter\def\expandafter\@temprangelabel\expandafter{% \@temprangelabel{########1}{########2}{########3}% {########4}{########5}{########6}}% \expandafter\def\expandafter\@tempsecond\expandafter{% \expandafter\crefpairconjunction\@templabel}% \expandafter\def\expandafter\@tempmiddle\expandafter{% \expandafter\crefmiddleconjunction\@templabel}% \expandafter\def\expandafter\@templast\expandafter{% \expandafter\creflastconjunction\@templabel}% \expandafter\def\expandafter\@temprangesecond\expandafter{% \expandafter\crefpairconjunction\@temprangelabel}% \expandafter\def\expandafter\@temprangemiddle\expandafter{% \expandafter\crefmiddleconjunction\@temprangelabel}% \expandafter\def\expandafter\@temprangelast\expandafter{% \expandafter\creflastconjunction\@temprangelabel}% \expandafter\def\expandafter\@templabel\expandafter{\@templabel}% \expandafter\def\expandafter\@temprangelabel% \expandafter{\@temprangelabel}% \@toksa={\labelcrefformat{default}}% \expandafter\the\expandafter\@toksa\expandafter{\@templabel}% \@toksa={\labelcrefrangeformat{default}}% \expandafter\the\expandafter\@toksa\expandafter{\@temprangelabel}% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templabel}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempsecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@tempmiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@templast}}% \@toksa={\labelcrefmultiformat{default}}% \expandafter\the\expandafter\@toksa\the\@toksb% \@toksb={}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@temprangelabel}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@temprangesecond}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@temprangemiddle}}% \expandafter\cref@append@toks\expandafter\@toksb\expandafter{% \expandafter{\@temprangelast}}% \@toksa={\labelcrefrangemultiformat{default}}% \expandafter\the\expandafter\@toksa\the\@toksb% \endgroup} \def\@crefdefineallformats#1{% \@crefdefineformat{#1}% \@crefrangedefineformat{#1}% \@crefdefinemultiformat{#1}% \@crefrangedefinemultiformat{#1}} \newcommand{\crefformat}[2]{\@crefformat{cref}{#1}{#2}} \newcommand{\Crefformat}[2]{\@crefformat{Cref}{#1}{#2}} \newcommand{\crefrangeformat}[2]{\@crefrangeformat{crefrange}{#1}{#2}} \newcommand{\Crefrangeformat}[2]{\@crefrangeformat{Crefrange}{#1}{#2}} \newcommand{\crefmultiformat}[5]{% \@crefmultiformat{cref}{#1}{#2}{#3}{#4}{#5}} \newcommand{\Crefmultiformat}[5]{% \@crefmultiformat{Cref}{#1}{#2}{#3}{#4}{#5}} \newcommand{\crefrangemultiformat}[5]{% \@crefrangemultiformat{crefrange}{#1}{#2}{#3}{#4}{#5}} \newcommand{\Crefrangemultiformat}[5]{% \@crefrangemultiformat{Crefrange}{#1}{#2}{#3}{#4}{#5}} \newcommand{\labelcrefformat}[2]{% \expandafter\gdef\csname labelcref@#1@format\endcsname##1##2##3{#2}} \newcommand{\labelcrefrangeformat}[2]{% \expandafter\gdef\csname labelcrefrange@#1@format\endcsname% ##1##2##3##4##5##6{#2}} \newcommand{\labelcrefmultiformat}[5]{% \expandafter\gdef\csname labelcref@#1@format@first\endcsname% ##1##2##3{#2}% \expandafter\gdef\csname labelcref@#1@format@second\endcsname% ##1##2##3{#3}% \expandafter\gdef\csname labelcref@#1@format@middle\endcsname% ##1##2##3{#4}% \expandafter\gdef\csname labelcref@#1@format@last\endcsname% ##1##2##3{#5}} \newcommand{\labelcrefrangemultiformat}[5]{% \expandafter\gdef\csname labelcrefrange@#1@format@first\endcsname% ##1##2##3##4##5##6{#2}% \expandafter\gdef\csname labelcrefrange@#1@format@second\endcsname% ##1##2##3##4##5##6{#3}% \expandafter\gdef\csname labelcrefrange@#1@format@middle\endcsname% ##1##2##3##4##5##6{#4}% \expandafter\gdef\csname labelcrefrange@#1@format@last\endcsname% ##1##2##3##4##5##6{#5}} \def\@crefformat#1#2#3{% \begingroup% \expandafter\gdef\csname #1@#2@format\endcsname##1##2##3{#3}% \cref@othervariant{#1}{\@other}{\@changecase}% \@ifundefined{\@other @#2@format}{% \toksdef\@toksa=0% \@toksa={\def\@tempa##1##2##3}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \csname#1@#2@format\endcsname{##1}{##2}{##3}}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\@changecase\@tempa{##1}{##2}{##3}}% \@toksa={% \expandafter\gdef\csname\@other @#2@format\endcsname##1##2##3}% \expandafter\the\expandafter\@toksa\expandafter{% \@tempa{##1}{##2}{##3}}% }{}% \endgroup} \def\@crefrangeformat#1#2#3{% \begingroup% \expandafter\gdef\csname #1@#2@format\endcsname% ##1##2##3##4##5##6{#3}% \cref@othervariant{#1}{\@other}{\@changecase}% \@ifundefined{\@other @#2@format}{% \toksdef\@toksa=0% \@toksa={\def\@tempa##1##2##3##4##5##6}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \csname#1@#2@format\endcsname{##1}{##2}{##3}{##4}{##5}{##6}}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\@changecase\@tempa{##1}{##2}{##3}{##4}{##5}{##6}}% \@toksa={\expandafter\gdef% \csname\@other @#2@format\endcsname##1##2##3##4##5##6}% \expandafter\the\expandafter\@toksa\expandafter{% \@tempa{##1}{##2}{##3}{##4}{##5}{##6}}% }{}% \endgroup} \def\@crefmultiformat#1#2#3#4#5#6{% \begingroup% \expandafter\gdef\csname #1@#2@format@first\endcsname##1##2##3{#3}% \expandafter\gdef\csname #1@#2@format@second\endcsname##1##2##3{#4}% \expandafter\gdef\csname #1@#2@format@middle\endcsname##1##2##3{#5}% \expandafter\gdef\csname #1@#2@format@last\endcsname##1##2##3{#6}% \cref@othervariant{#1}{\@other}{\@changecase}% \@ifundefined{\@other @#2@format@first}{% \toksdef\@toksa=0% \@toksa={\def\@tempa##1##2##3}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \csname#1@#2@format@first\endcsname{##1}{##2}{##3}}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\@changecase\@tempa{##1}{##2}{##3}}% \@toksa={% \expandafter\gdef\csname\@other @#2@format@first\endcsname% ##1##2##3}% \expandafter\the\expandafter\@toksa\expandafter{% \@tempa{##1}{##2}{##3}}% }{}% \@ifundefined{\@other @#2@format@second}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@second\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@second\endcsname% }{}% \@ifundefined{\@other @#2@format@middle}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@middle\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@middle\endcsname% }{}% \@ifundefined{\@other @#2@format@last}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@last\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@last\endcsname% }{}% \endgroup} \def\@crefrangemultiformat#1#2#3#4#5#6{% \begingroup% \expandafter\gdef\csname #1@#2@format@first\endcsname% ##1##2##3##4##5##6{#3}% \expandafter\gdef\csname #1@#2@format@second\endcsname% ##1##2##3##4##5##6{#4}% \expandafter\gdef\csname #1@#2@format@middle\endcsname% ##1##2##3##4##5##6{#5}% \expandafter\gdef\csname #1@#2@format@last\endcsname% ##1##2##3##4##5##6{#6}% \cref@othervariant{#1}{\@other}{\@changecase}% \@ifundefined{\@other @#2@format@first}{% \toksdef\@toksa=0% \@toksa={\def\@tempa##1##2##3##4##5##6}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \csname#1@#2@format@first\endcsname% {##1}{##2}{##3}{##4}{##5}{##6}}% \expandafter\expandafter\expandafter\the% \expandafter\expandafter\expandafter\@toksa% \expandafter\expandafter\expandafter{% \expandafter\@changecase\@tempa{##1}{##2}{##3}{##4}{##5}{##6}}% \@toksa={% \expandafter\gdef\csname\@other @#2@format@first\endcsname% ##1##2##3##4##5##6}% \expandafter\the\expandafter\@toksa\expandafter{% \@tempa{##1}{##2}{##3}{##4}{##5}{##6}}% }{}% \@ifundefined{\@other @#2@format@second}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@second\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@second\endcsname% }{}% \@ifundefined{\@other @#2@format@middle}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@middle\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@middle\endcsname% }{}% \@ifundefined{\@other @#2@format@last}{% \@toksa={% \expandafter\global\expandafter\let% \csname\@other @#2@format@last\endcsname}% \expandafter\the\expandafter\@toksa% \csname #1@#2@format@last\endcsname% }{}% \endgroup} \let\if@cref@hyperrefloaded\iffalse \@ifpackageloaded{hyperref}{% \@ifpackagewith{hyperref}{implicit=false}{}{% \let\if@cref@hyperrefloaded\iftrue% \PackageInfo{cleveref}{`hyperref' support loaded} \def\cref@hyperref#1{\expandafter\expandafter\expandafter% \@fourthoffive\csname r@#1\endcsname} \let\cref@old@H@refstepcounter\H@refstepcounter \def\H@refstepcounter#1{% \cref@old@H@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}} \let\refstepcounter@noarg\cref@old@refstepcounter% \def\refstepcounter@optarg[#1]#2{% \cref@old@refstepcounter{#2}% \protected@edef\cref@currentlabel{% \expandafter\cref@override@label@type% \cref@currentlabel\@nil{#1}}} \@ifundefined{appendix}{}{% \g@addto@macro\appendix{% \@ifundefined{chapter}{% \def\H@refstepcounter#1{% \cref@old@H@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \ifx\cref@result\@empty% \def\cref@result{2147483647}% \else% \edef\cref@result{2147483647,\cref@result}% \fi% \def\@tempa{#1}% \def\@tempb{section}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [appendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname} \fi% \fi% \fi}% }{% \def\H@refstepcounter#1{% \cref@old@H@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \ifx\cref@result\@empty% \def\cref@result{2147483647}% \else% \edef\cref@result{2147483647,\cref@result}% \fi% \def\@tempa{#1}% \def\@tempb{chapter}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [appendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{section}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \def\@tempa{#1}% \def\@tempb{subsubsection}% \ifx\@tempa\@tempb% \protected@edef\cref@currentlabel{% [subsubsubappendix][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}% \else% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname} \fi% \fi% \fi% \fi}% }% }% }% end of \@ifundefined{appendix} \DeclareRobustCommand{\cref}{% \@ifstar{\@crefstar{cref}}{\@crefnostar{cref}}} \DeclareRobustCommand{\Cref}{% \@ifstar{\@crefstar{Cref}}{\@crefnostar{Cref}}} \def\@crefnostar#1#2{\@cref{#1}{#2}} \def\@crefstar#1#2{% \@crefstarredtrue\@cref{#1}{#2}\@crefstarredfalse} \DeclareRobustCommand{\crefrange}{% \@ifstar{\@crefrangestar{cref}}{\@crefrangenostar{cref}}} \DeclareRobustCommand{\Crefrange}{% \@ifstar{\@crefrangestar{Cref}}{\@crefrangenostar{Cref}}} \def\@crefrangenostar#1#2#3{\@setcrefrange{#2}{#3}{#1}{}} \def\@crefrangestar#1#2#3{% \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse} \DeclareRobustCommand{\cpageref}{% \@ifstar{\@cpagerefstar{cref}}{\@cpagerefnostar{cref}}} \DeclareRobustCommand{\Cpageref}{% \@ifstar{\@cpagerefstar{Cref}}{\@cpagerefnostar{Cref}}} \def\@cpagerefnostar#1#2{% \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}} \def\@cpagerefstar#1#2{% \@crefstarredtrue% \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}% \@crefstarredfalse} \DeclareRobustCommand{\cpagerefrange}{% \@ifstar{\@cpagerefrangestar{cref}}{\@cpagerefrangenostar{cref}}} \DeclareRobustCommand{\Cpagerefrange}{% \@ifstar{\@cpagerefrangestar{Cref}}{\@cpagerefrangenostar{Cref}}} \def\@cpagerefrangenostar#1#2#3{\@setcpagerefrange{#2}{#3}{#1}{}} \def\@cpagerefrangestar#1#2#3{% \@crefstarredtrue% \@setcpagerefrange{#2}{#3}{#1}{}% \@crefstarredfalse} \DeclareRobustCommand{\labelcref}{% \@ifstar{\@labelcrefstar}{\@labelcrefnostar}} \def\@labelcrefnostar#1{\@cref{labelcref}{#1}} \def\@labelcrefstar#1{% \@crefstarredtrue% \@cref{labelcref}{#1}% \@crefstarredfalse} \DeclareRobustCommand{\labelcpageref}{% \@ifstar{\@labelcpagerefstar}{\@labelcpagerefnostar}} \def\@labelcpagerefnostar#1{% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}} \def\@labelcpagerefstar#1{% \@crefstarredtrue% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}% \@crefstarredfalse} \def\@@setcref#1#2{% \cref@getlabel{#2}{\@templabel}% \if@crefstarred% #1{\@templabel}{}{}% \else% \edef\@templink{\cref@hyperref{#2}}% #1{\@templabel}{\hyper@linkstart{link}{\@templink}}% {\hyper@linkend}% \fi} \def\@@setcrefrange#1#2#3{% \cref@getlabel{#2}{\@labela}% \cref@getlabel{#3}{\@labelb}% \if@crefstarred% #1{\@labela}{\@labelb}{}{}{}{}% \else% \edef\@linka{\cref@hyperref{#2}}% \edef\@linkb{\cref@hyperref{#3}}% #1{\@labela}{\@labelb}% {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}% {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}% \fi}% \def\@@setcpageref#1#2{% \cref@getpageref{#2}{\@temppage}% \if@crefstarred% #1{\@temppage}{}{}% \else% \edef\@templink{\cref@hyperref{#2}}% #1{\@temppage}{\hyper@linkstart{link}{\@templink}}% {\hyper@linkend}% \fi} \def\@@setcpagerefrange#1#2#3{% \cref@getpageref{#2}{\@pagea}% \cref@getpageref{#3}{\@pageb}% \if@crefstarred% #1{\@pagea}{\@pageb}{}{}{}{}% \else% \edef\@linka{\cref@hyperref{#2}}% \edef\@linkb{\cref@hyperref{#3}}% #1{\@pagea}{\@pageb}% {\hyper@linkstart{link}{\@linka}}{\hyper@linkend}% {\hyper@linkstart{link}{\@linkb}}{\hyper@linkend}% \fi}% }% end of false case of \@ifpackagewith{hyperref}{implicit=false} }{% false case of \@ifpackageloaded{hyperref} \@ifclassloaded{revtex4}{\let\if@cref@hyperrefloaded\iftrue}{}% \@ifclassloaded{revtex4-1}{\let\if@cref@hyperrefloaded\iftrue}{}% \if@cref@hyperrefloaded\relax% \let\cref@old@H@refstepcounter\H@refstepcounter% \def\H@refstepcounter#1{% \cref@old@H@refstepcounter{#1}% \cref@constructprefix{#1}{\cref@result}% \@ifundefined{cref@#1@alias}% {\def\@tempa{#1}}% {\def\@tempa{\csname cref@#1@alias\endcsname}}% \protected@edef\cref@currentlabel{% [\@tempa][\arabic{#1}][\cref@result]% \csname p@#1\endcsname\csname the#1\endcsname}}% \fi% \let\if@cref@hyperrefloaded\iffalse% }% end of \@ifpackageloaded{hyperref} \@ifpackageloaded{amsmath}{% \AtBeginDocument{ \let\cref@old@label@in@display\label@in@display \def\label@in@display{% \@ifnextchar[\label@in@display@optarg\label@in@display@noarg}%] \def\label@in@display@noarg#1{\cref@old@label@in@display{{#1}}} \def\label@in@display@optarg[#1]#2{% \cref@old@label@in@display{[#1]{#2}}} \def\ltx@label#1{\cref@label#1} }% end of AtBeginDocument \def\measure@#1{% \begingroup \measuring@true \global\eqnshift@\z@ \global\alignsep@\z@ \global\let\tag@lengths\@empty \global\let\field@lengths\@empty \savecounters@ \global\setbox0\vbox{% \let\math@cr@@@\math@cr@@@align@measure \everycr{\noalign{\global\tag@false \global\let\raise@tag\@empty \global\column@\z@}}% \let\label\@gobble@optarg% <<< cleveref modification \global\row@\z@ \tabskip\z@ \halign{\span\align@preamble\crcr #1% \math@cr@@@ \global\column@\z@ \add@amps\maxfields@\cr }% }% \restorecounters@ \ifodd\maxfields@ \global\advance\maxfields@\@ne \fi \ifnum\xatlevel@=\tw@ \ifnum\maxfields@<\thr@@ \let\xatlevel@\z@ \fi \fi \setbox\z@\vbox{% \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox }% \global\totwidth@\wd\@ne \if@fleqn \global\advance\totwidth@\@mathmargin \fi \global\let\maxcolumn@widths\@empty \begingroup \let\or\relax \loop \global\setbox\@ne\hbox{% \unhbox\@ne \unskip \global\setbox\thr@@\lastbox }% \ifhbox\thr@@ \xdef\maxcolumn@widths{ \or \the\wd\thr@@ \maxcolumn@widths}% \repeat \endgroup \dimen@\displaywidth \advance\dimen@-\totwidth@ \ifcase\xatlevel@ \global\alignsep@\z@ \let\minalignsep\z@ \@tempcntb\z@ \if@fleqn \@tempcnta\@ne \global\eqnshift@\@mathmargin \else \@tempcnta\tw@ \global\eqnshift@\dimen@ \global\divide\eqnshift@\@tempcnta \fi \or \@tempcntb\maxfields@ \divide\@tempcntb\tw@ \@tempcnta\@tempcntb \advance\@tempcntb\m@ne \if@fleqn \global\eqnshift@\@mathmargin \global\alignsep@\dimen@ \global\divide\alignsep@\@tempcnta \else \global\advance\@tempcnta\@ne \global\eqnshift@\dimen@ \global\divide\eqnshift@\@tempcnta \global\alignsep@\eqnshift@ \fi \or \@tempcntb\maxfields@ \divide\@tempcntb\tw@ \global\advance\@tempcntb\m@ne \global\@tempcnta\@tempcntb \global\eqnshift@\z@ \global\alignsep@\dimen@ \if@fleqn \global\advance\alignsep@\@mathmargin\relax \fi \global\divide\alignsep@\@tempcntb \fi \ifdim\alignsep@<\minalignsep\relax \global\alignsep@\minalignsep\relax \ifdim\eqnshift@>\z@ \if@fleqn\else \global\eqnshift@\displaywidth \global\advance\eqnshift@-\totwidth@ \global\advance\eqnshift@-\@tempcntb\alignsep@ \global\divide\eqnshift@\tw@ \fi \fi \fi \ifdim\eqnshift@<\z@ \global\eqnshift@\z@ \fi \calc@shift@align \global\tagshift@\totwidth@ \global\advance\tagshift@\@tempcntb\alignsep@ \if@fleqn \ifnum\xatlevel@=\tw@ \global\advance\tagshift@-\@mathmargin\relax \fi \else \global\advance\tagshift@\eqnshift@ \fi \iftagsleft@ \else \global\advance\tagshift@-\displaywidth \fi \dimen@\minalignsep\relax \global\advance\totwidth@\@tempcntb\dimen@ \ifdim\totwidth@>\displaywidth \global\let\displaywidth@\totwidth@ \else \global\let\displaywidth@\displaywidth \fi \endgroup } \def\gmeasure@#1{% \begingroup \measuring@true \totwidth@\z@ \global\let\tag@lengths\@empty \savecounters@ \setbox\@ne\vbox{% \everycr{\noalign{\global\tag@false \global\let\raise@tag\@empty \global\column@\z@}}% \let\label\@gobble% <<< cleveref modification \halign{% \setboxz@h{$\m@th\displaystyle{##}$}% \ifdim\wdz@>\totwidth@ \global\totwidth@\wdz@ \fi &\setboxz@h{\strut@{##}}% \savetaglength@ \crcr #1% \math@cr@@@ }% }% \restorecounters@ \if@fleqn \global\advance\totwidth@\@mathmargin \fi \iftagsleft@ \ifdim\totwidth@>\displaywidth \global\let\gdisplaywidth@\totwidth@ \else \global\let\gdisplaywidth@\displaywidth \fi \fi \endgroup } \def\multline@#1{% \Let@ \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}% \chardef\dspbrk@context\z@ \restore@math@cr \let\tag\tag@in@align \global\tag@false \global\let\raise@tag\@empty \mmeasure@{#1}% \let\tag\gobble@tag \let\label\@gobble@optarg% <<< cleveref modification \tabskip \if@fleqn \@mathmargin \else \z@skip \fi \totwidth@\displaywidth \if@fleqn \advance\totwidth@-\@mathmargin \fi \halign\bgroup \hbox to\totwidth@{% \if@fleqn \hskip \@centering \relax \else \hfil \fi \strut@ $\m@th\displaystyle{}##\endmultline@math \hfil }% $ \crcr \if@fleqn \hskip-\@mathmargin \def\multline@indent{\hskip\@mathmargin}% \else \hfilneg \def\multline@indent{\hskip\multlinegap}% \fi \iftagsleft@ \iftag@ \begingroup \ifshifttag@ \rlap{\vbox{% \normalbaselines \hbox{% \strut@ \make@display@tag }% \vbox to\lineht@{}% \raise@tag }}% \multline@indent \else \setbox\z@\hbox{\make@display@tag}% \dimen@\@mathmargin \advance\dimen@-\wd\z@ \ifdim\dimen@<\multlinetaggap \dimen@\multlinetaggap \fi \box\z@ \hskip\dimen@\relax \fi \endgroup \else \multline@indent \fi \else \multline@indent \fi #1% } \def\mmeasure@#1{% \begingroup \measuring@true \def\label{% <<< cleveref modification \@ifnextchar[\label@in@mmeasure@optarg%] \label@in@mmeasure@noarg}% \def\math@cr@@@{\cr}% \let\shoveleft\@iden \let\shoveright\@iden \savecounters@ \global\row@\z@ \setbox\@ne\vbox{% \global\let\df@tag\@empty \halign{% \setboxz@h{\@lign$\m@th\displaystyle{}##$}% \iftagsleft@ \ifnum\row@=\@ne \global\totwidth@\wdz@ \global\lineht@\ht\z@ \fi \else \global\totwidth@\wdz@ \global\lineht@\dp\z@ \fi \crcr #1% \crcr }% }% \ifx\df@tag\@empty\else\global\tag@true\fi \if@eqnsw\global\tag@true\fi \iftag@ \setboxz@h{% \if@eqnsw \stepcounter{equation}% \tagform@\theequation \else \df@tag \fi }% \global\tagwidth@\wdz@ \dimen@\totwidth@ \advance\dimen@\tagwidth@ \advance\dimen@\multlinetaggap \iftagsleft@\else \if@fleqn \advance\dimen@\@mathmargin \fi \fi \ifdim\dimen@>\displaywidth \global\shifttag@true \else \global\shifttag@false \fi \fi \restorecounters@ \endgroup } \def\label@in@mmeasure@noarg#1{% \begingroup% \measuring@false% \cref@old@label@in@display{{#1}}% \endgroup} \def\label@in@mmeasure@optarg[#1]#2{% \begingroup% \measuring@false% \cref@old@label@in@display{[#1]{#2}}% \endgroup} \let\cref@old@subequations\subequations% \let\cref@old@endsubequations\endsubequations% \cref@resetby{equation}{\cref@result}% \ifx\cref@result\relax\else% \@addtoreset{parentequation}{\cref@result}% \fi% \renewenvironment{subequations}{% \@addtoreset{equation}{parentequation}% \cref@old@subequations% }{% \gdef\cl@parentequation{}% \cref@old@endsubequations% \setcounter{parentequation}{0}% }% \def\make@df@tag@@#1{% \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}% \def\cref@currentlabel{[equation][2147483647][]#1}}} \def\make@df@tag@@@#1{% \gdef\df@tag{\tagform@{#1}% \toks@\@xp{\p@equation{#1}}% \edef\@currentlabel{\the\toks@}% \edef\cref@currentlabel{[equation][2147483647][]\the\toks@}}} }{}% end of \@ifpackageloaded{amsmath} \@ifpackageloaded{IEEEtrantools}{% \PackageInfo{cleveref}{`IEEEtrantools' support loaded} \let\cref@orig@@IEEEeqnarray\@@IEEEeqnarray \def\@@IEEEeqnarray[#1]#2{% \refstepcounter{equation}% \addtocounter{equation}{-1}% \cref@orig@@IEEEeqnarray[#1]{#2}} \let\cref@orig@IEEEeqnarrayXCR\@IEEEeqnarrayXCR \def\@IEEEeqnarrayXCR[#1]{% \if@eqnsw% \if@IEEEissubequation% %\addtocounter{equation}{1}% \refstepcounter{IEEEsubequation}% \addtocounter{IEEEsubequation}{-1}% \else% \refstepcounter{equation}% \addtocounter{equation}{-1}% \fi% \fi% \cref@orig@IEEEeqnarrayXCR[#1]} \let\cref@orig@IEEEyessubnumber\IEEEyessubnumber \def\IEEEyessubnumber{% \if@IEEEeqnarrayISinner% \if@IEEElastlinewassubequation\else% \setcounter{IEEEsubequation}{0}% \refstepcounter{IEEEsubequation}% \fi% \fi% \cref@orig@IEEEyessubnumber} \@addtoreset{IEEEsubequation}{equation}% \crefalias{IEEEsubequation}{equation}% }{}% end of \@ifpackageloaded{IEEEtrantools} \@ifpackageloaded{amsthm}{% \PackageInfo{cleveref}{`amsthm' support loaded} \let\cref@thmnoarg\@thm \def\@thm{\@ifnextchar[{\cref@thmoptarg}{\cref@thmnoarg}}%] \def\cref@thmoptarg[#1]#2#3#4{% \ifhmode\unskip\unskip\par\fi% \normalfont% \trivlist% \let\thmheadnl\relax% \let\thm@swap\@gobble% \thm@notefont{\fontseries\mddefault\upshape}% \thm@headpunct{.}% add period after heading \thm@headsep 5\p@ plus\p@ minus\p@\relax% \thm@space@setup% #2% style overrides \@topsep \thm@preskip % used by thm head \@topsepadd \thm@postskip % used by \@endparenv \def\@tempa{#3}\ifx\@empty\@tempa% \def\@tempa{\@oparg{\@begintheorem{#4}{}}[]}% \else% \refstepcounter[#1]{#3}% <<< cleveref modification \def\@tempa{\@oparg{\@begintheorem{#4}{\csname the#3\endcsname}}[]}% \fi% \@tempa} \def\@ynthm#1[#2]#3{% \edef\@tempa{\expandafter\noexpand% \csname cref@#1@name@preamble\endcsname}% \edef\@tempb{\expandafter\noexpand% \csname Cref@#1@name@preamble\endcsname}% \def\@tempc{#3}% \ifx\@tempc\@empty\relax% \expandafter\gdef\@tempa{}% \expandafter\gdef\@tempb{}% \else% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeLowercase #3}% \expandafter\expandafter\expandafter\gdef\expandafter% \@tempa\expandafter{\MakeUppercase #3}% \fi% \cref@stack@add{#1}{\cref@label@types}% \ifx\relax#2\relax% \def\@tempa{\@oparg{\@xthm{#1}{#3}}[]}% \else% \@ifundefined{c@#2}{% \def\@tempa{\@nocounterr{#2}}% }{% \@xp\xdef\csname the#1\endcsname{\@xp\@nx\csname the#2\endcsname}% \toks@{#3}% \@xp\xdef\csname#1\endcsname{% \@nx\@thm[#1]{% <<< new optional argument for theorem name \let\@nx\thm@swap% \if S\thm@swap\@nx\@firstoftwo\else\@nx\@gobble\fi% \@xp\@nx\csname th@\the\thm@style\endcsname}% {#2}{\the\toks@}}% \let\@tempa\relax% }% \fi% \@tempa} \let\@xnthm\cref@old@xnthm }{}% end of \@ifpackageloaded{amsthm} \@ifpackageloaded{ntheorem}{% \PackageInfo{cleveref}{`ntheorem' support loaded} \@ifpackagewith{ntheorem}{thref}{% \PackageWarning{cleveref}{`cleveref' supersedes `ntheorem's `thref' option}% \renewcommand{\thref}{\cref}}{} \@ifundefined{theorem@prework}{\let\theorem@prework\relax}{} \gdef\@thm#1#2#3{% \if@thmmarks% \stepcounter{end\InTheoType ctr}% \fi% \renewcommand{\InTheoType}{#1}% \if@thmmarks% \stepcounter{curr#1ctr}% \setcounter{end#1ctr}{0}% \fi% \refstepcounter[#1]{#2}% <<< cleveref modification \theorem@prework% \thm@topsepadd \theorempostskipamount% \ifvmode \advance\thm@topsepadd\partopsep\fi% \trivlist% \@topsep \theorempreskipamount% \@topsepadd \thm@topsepadd% \advance\linewidth -\theorem@indent% \advance\@totalleftmargin \theorem@indent% \parshape \@ne \@totalleftmargin \linewidth% \@ifnextchar[{\@ythm{#1}{#2}{#3}}{\@xthm{#1}{#2}{#3}}%] } }{}% end of \@ifpackageloaded{ntheorem} \@ifpackageloaded{varioref}{% \PackageInfo{cleveref}{`varioref' support loaded} \PackageInfo{cleveref}{`cleveref' supersedes `varioref's % \string\labelformat command} \def\cref@@vpageref#1[#2]#3{% \@cpageref{cref}{#3}% {\@setvpageref[#1][\vref@space]}{\@setvpagerefrange[#1]}} \def\cref@vref#1#2{% \leavevmode% \@cref{#1}{#2}\@setcref@space% \cref@@vpageref{\reftextcurrent}[]{#2}} \def\cref@vrefrange#1#2#3{% \@setcrefrange{#2}{#3}{#1}{}\@setcref@space\vpagerefrange{#2}{#3}} \def\cref@fullref#1#2{% \@cref{#1}{#2}\@setcref@space% \@cpageref{cref}{#2}{\@setfullpageref}{\@setfullpagerefrange}} \def\cref@vpagerefconjunction#1{% \def\@tempa{#1}% \def\@tempb{@second}% \ifx\@tempa\@tempb\relax% \@setcref@pairconjunction% \else% \def\@tempb{@middle}% \ifx\@tempa\@tempb\relax% \@setcref@middleconjunction% \else% \def\@tempb{@last}% \ifx\@tempa\@tempb\relax% \@setcref@lastconjunction% \fi% \fi% \fi} \def\@setcref@space{ } \def\@setvpageref[#1][#2]#3#4#5{% \cref@vpagerefconjunction{#5}% \def\vref@space{}% \begingroup% \cref@patchreftexts{#5}% \@@setvpageref{#1}[#2]{#3}% \endgroup} \def\@@setvpageref#1[#2]#3{\cref@old@@vpageref{#1}[#2]{#3}} \def\@setvpagerefrange[#1]#2#3#4#5{% \cref@vpagerefconjunction{#5}% \let\vref@space\relax% \begingroup% \cref@patchreftexts{#5}% \@@setvpagerefrange[#1]{#2}{#3}% \endgroup} \def\@@setvpagerefrange[#1]#2#3{\vpagerefrange[#1]{#2}{#3}} \def\@setfullpageref#1#2#3{% \cref@vpagerefconjunction{#3}% \begingroup% \cref@patchreftexts{#3}% \@@setfullpageref{#1}% \endgroup} \def\@@setfullpageref#1{\reftextfaraway{#1}} \def\@setfullpagerefrange#1#2#3#4{% \cref@vpagerefconjunction{#4}% \begingroup% \cref@patchreftexts{#4}% \@@setfullpagerefrange{#1}{#2}% \endgroup} \def\@@setfullpagerefrange#1#2{\reftextpagerange{#1}{#2}} \def\cref@old@@vpageref#1[#2]#3{% \leavevmode%\unskip <<< \global\advance\c@vrcnt\@ne \vref@pagenum\@tempa{\the\c@vrcnt @vr}% \vref@pagenum\@tempb{\the\c@vrcnt @xvr}% %\vref@label{\the\c@vrcnt @xvr}% <<< \ifx\@tempa\@tempb\else \vref@err{\noexpand\vref or \noexpand\vpageref at page boundary \@tempb-\@tempa\space (may loop)% }% \fi \vrefpagenum\thevpagerefnum{#3}% \vref@space \ifx\@tempa\thevpagerefnum \def\@tempc{#1}% \ifx\@tempc\@empty \unskip \else #1% \fi \else #2% \is@pos@number\thevpagerefnum {% \is@pos@number\@tempa {\@tempcnta\@tempa \advance\@tempcnta\@ne }% {\@tempcnta\maxdimen}% \ifnum \thevpagerefnum =\@tempcnta \ifodd\@tempcnta \if@twoside \reftextfaceafter \else \reftextafter \fi \else \reftextafter \fi \else \advance\@tempcnta-2 \ifnum \thevpagerefnum =\@tempcnta \ifodd\@tempcnta \reftextbefore \else \if@twoside \reftextfacebefore \else \reftextbefore \fi \fi \else \reftextfaraway{#3}% \fi \fi }% {\reftextfaraway{#3}}% \fi \vref@label{\the\c@vrcnt @xvr}% <<< \vref@label{\the\c@vrcnt @vr}% } \let\creftextcurrent\reftextcurrent \let\creftextfaceafter\reftextfaceafter \let\creftextfacebefore\reftextfacebefore \let\creftextafter\reftextafter \let\creftextbefore\reftextbefore \let\creftextfaraway\reftextfaraway \let\creftextpagerange\reftextpagerange \def\cref@patchreftexts#1{% \cref@patchreftext{reftextcurrent}{#1}% \cref@patchreftext{reftextfaceafter}{#1}% \cref@patchreftext{reftextfacebefore}{#1}% \cref@patchreftext{reftextafter}{#1}% \cref@patchreftext{reftextbefore}{#1}} \def\cref@patchreftext#1#2{% \def\@tempa{#2}% \ifx\@tempa\@empty% \def\@tempc{}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\def\csname #1\endcsname{\unskip}% %{\advance\count@group -1\reftextcurrent@orig}% \else% \long\def\@tempc{}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\def\csname #1\endcsname{\unskip}% %{\advance\count@group -1\reftextcurrent@orig}% \fi% \fi% \else% \long\def\@tempc{\unskip}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\csname #1\endcsname\expandafter{% \csname c#1\endcsname}% \else% \long\def\@tempc{}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\csname #1\endcsname\expandafter{% \csname c#1\endcsname}% \else% \def\@tempc{\unskip}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\csname #1\endcsname\expandafter{% \csname c#1\endcsname}% \else% \def\@tempc{}% \expandafter\ifx\csname #1\endcsname\@tempc\relax% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\csname #1\endcsname\expandafter{% \csname c#1\endcsname}% \fi% \fi% \fi% \fi% \fi} \def\@setcref@pairconjunction{\crefpairconjunction} \def\@setcref@middleconjunction{\crefmiddleconjunction} \def\@setcref@lastconjunction{\creflastconjunction} \AtBeginDocument{% \def\@@vpageref#1[#2]#3{\cref@@vpageref{#1}[#2]{#3}} } \if@cref@hyperrefloaded\relax% hyperref loaded \DeclareRobustCommand{\vref}{% \@ifstar{\cref@vrefstar{cref}}{\cref@vref{cref}}} \DeclareRobustCommand{\Vref}{% \@ifstar{\cref@vrefstar{Cref}}{\cref@vref{Cref}}} \DeclareRobustCommand{\vrefrange}{% \@ifstar{\cref@vrefrangestar{cref}}{\cref@vrefrange{cref}}} \DeclareRobustCommand{\Vrefrange}{% \@ifstar{\cref@vrefrangestar{Cref}}{\cref@vrefrange{Cref}}} \DeclareRobustCommand{\fullref}{% \@ifstar{\cref@fullrefstar{cref}}{\cref@fullref{cref}}} \DeclareRobustCommand{\Fullref}{% \@ifstar{\cref@fullrefstar{Cref}}{\cref@fullref{Cref}}} \def\cref@vrefstar#1#2{% \@crefstarredtrue% \cref@vref{#1}{#2}% \@crefstarredfalse} \def\cref@vrefrangestar#1#2#3{% \@crefstarredtrue% \cref@vrefrange{#1}{#2}{#3}% \@crefstarredfalse} \def\cref@fullrefstar#1#2{% \@crefstarredtrue% \cref@fullref{#1}{#2}% \@crefstarredfalse} \else% \DeclareRobustCommand{\vref}{\cref@vref{cref}} \DeclareRobustCommand{\Vref}{\cref@vref{Cref}} \DeclareRobustCommand{\vrefrange}{\cref@vrefrange{cref}} \DeclareRobustCommand{\Vrefrange}{\cref@vrefrange{Cref}} \DeclareRobustCommand{\fullref}{\cref@fullref{cref}} \DeclareRobustCommand{\Fullref}{\cref@fullref{Cref}} \fi% end of test for hyperref }{}% end of \@ifpackageloaded{varioref} \@ifpackageloaded{algorithmicx}{% \PackageInfo{cleveref}{`algorithmicx' support loaded} \g@addto@macro\ALG@step{% \addtocounter{ALG@line}{-1}% \refstepcounter{ALG@line}% \expandafter\@cref@getprefix\cref@currentlabel\@nil\cref@currentprefix% \xdef\cref@currentprefix{\cref@currentprefix}} \g@addto@macro\ALG@beginalgorithmic{% \def\cref@currentlabel{% [line][\arabic{ALG@line}][\cref@currentprefix]\theALG@line}} }{}% end of \@ifpackageloaded{algorithmicx} \@ifpackageloaded{listings}{% \PackageInfo{cleveref}{`listings' support loaded} \crefalias{lstlisting}{listing}% \crefalias{lstnumber}{line}% \lst@AddToHook{Init}{% \def\cref@currentlabel{% [line][\arabic{lstnumber}][\cref@currentprefix]\thelstnumber}} \lst@AddToHook{EveryPar}{% \expandafter\@cref@getprefix\cref@currentlabel\@nil\cref@currentprefix% \xdef\cref@currentprefix{\cref@currentprefix}} }{}% end of \@ifpackageloaded{listings} \@ifpackageloaded{algorithm2e}{% \PackageInfo{cleveref}{`algorithm2e' support loaded} \crefalias{algocf}{algorithm}% \crefalias{algocfline}{line}% }{}% end of \@ifpackageloaded{listings} \@ifpackageloaded{subfig}{% \PackageInfo{cleveref}{`subfig' support loaded} \AtBeginDocument{ \let\cref@old@refsteponlycounter\refsteponlycounter \def\refsteponlycounter{% \@ifnextchar[\refstepcounter@optarg% \cref@old@refsteponlycounter%] }} \def\sf@sub@label(#1){% \ifhyperrefloaded \protected@edef\@currentlabelname{% \expandafter\strip@period #1\relax.\relax\@@@}% \fi% \let\sf@oldlabel\cref@old@label% \let\cref@old@label\sf@@sub@label% \cref@label}% }{}% end of \@ifpackageloaded{subfig} \@ifclassloaded{memoir}{% \AtBeginDocument{ \def\sf@memsub@label(#1){% \protected@edef\mem@currentlabelname{#1}% \let\@memoldlabel\cref@old@label% \let\cref@old@label\sf@@memsub@label% \cref@label}} }{} \@ifpackageloaded{caption}{% \@ifpackagelater{caption}{2011/08/19}{}{% \PackageInfo{cleveref}{`caption' support loaded} \let\cref@old@caption@xlabel\caption@xlabel \def\caption@xlabel{% \let\cref@ORI@label\cref@old@label% \let\cref@old@label\cref@old@caption@xlabel% \let\caption@ORI@label\cref@ORI@label% \cref@label}% }% end of \@ifpackagelater }{}% end of \@ifpackageloaded{caption} \@ifpackageloaded{aliascnt}{% \PackageInfo{cleveref}{`aliascnt' support loaded} \let\cref@old@newaliascnt\newaliascnt \renewcommand*{\newaliascnt}[2]{% \cref@old@newaliascnt{#1}{#2}% \cref@resetby{#2}{\cref@result}% \ifx\cref@result\relax\else% \@addtoreset{#1}{\cref@result}% \fi} }{}% end of \@ifpackageloaded{aliascnt} \DeclareOption{poorman}{% \PackageInfo{cleveref}{option `poorman' loaded} \gdef\cref@poorman@text{} \AtBeginDocument{% \newwrite\@crefscript% \immediate\openout\@crefscript=\jobname.sed} \newif\if@cref@switched@language \@ifpackageloaded{babel}{% \AtBeginDocument{% \let\cref@old@select@language\select@language \def\select@language{% \@cref@switched@languagetrue% \cref@writelanguagerules% \cref@old@select@language} \let\cref@old@foreign@language\foreign@language \def\foreign@language{% \@cref@switched@languagetrue% \cref@writelanguagerules% \cref@old@foreign@language} \edef\cref@inputlineno{\the\inputlineno}}% }{} \AtEndDocument{% \let\select@language\cref@old@select@language% \let\foreign@language\cref@old@foreign@language% \cref@writelanguagerules} \def\cref@writelanguagerules{% \begingroup% \if@cref@switched@language% \edef\@address{\cref@inputlineno,\the\inputlineno}% \else% \def\@address{}% \fi% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefrangeconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefrangeconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefrangepreconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefrangepreconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefrangepostconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefrangepostconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefpairconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefpairconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefmiddleconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefmiddleconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \creflastconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\creflastconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefpairgroupconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefpairgroupconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \crefmiddlegroupconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\crefmiddlegroupconjunction}}% \expandafter\cref@writescript\@tempa% \expandafter\def\expandafter\cref@poorman@text\expandafter{% \creflastgroupconjunction}% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter{\@address}{\string\creflastgroupconjunction}}% \expandafter\cref@writescript\@tempa% \let\@tempstack\cref@label@types% \cref@isstackfull{\@tempstack}% \@whilesw\if@cref@stackfull\fi{% \edef\@tempa{\cref@stack@top{\@tempstack}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\cref@poorman@text% \expandafter\expandafter\expandafter{% \csname cref@\@tempa @name\endcsname}% \edef\@tempa{% \string\cref@\expandafter\noexpand\@tempa @name\space}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \expandafter\@address\expandafter}% \expandafter{\@tempa}}% \expandafter\cref@writescript\@tempa% \edef\@tempa{\cref@stack@top{\@tempstack}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\cref@poorman@text% \expandafter\expandafter\expandafter{% \csname cref@\@tempa @name@plural\endcsname}% \edef\@tempa{% \string\cref@\expandafter\noexpand\@tempa% @name@plural\space}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \expandafter\@address\expandafter}% \expandafter{\@tempa}}% \expandafter\cref@writescript\@tempa% \edef\@tempa{\cref@stack@top{\@tempstack}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\cref@poorman@text% \expandafter\expandafter\expandafter{% \csname Cref@\@tempa @name\endcsname}% \edef\@tempa{% \string\Cref@\expandafter\noexpand\@tempa @name\space}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter% {\expandafter\@address\expandafter}% \expandafter{\@tempa}}% \expandafter\cref@writescript\@tempa% \edef\@tempa{\cref@stack@top{\@tempstack}}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\cref@poorman@text% \expandafter\expandafter\expandafter{% \csname Cref@\@tempa @name@plural\endcsname}% \edef\@tempa{% \string\Cref@\expandafter\noexpand\@tempa% @name@plural\space}% \expandafter\expandafter\expandafter\def% \expandafter\expandafter\expandafter\@tempa% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter% {\expandafter\@address\expandafter}% \expandafter{\@tempa}}% \expandafter\cref@writescript\@tempa% \cref@stack@pop{\@tempstack}% \cref@isstackfull{\@tempstack}}% \endgroup% \edef\cref@inputlineno{\the\inputlineno}}% \AtEndDocument{% \immediate\closeout\@crefscript% \newread\@crefscript% \immediate\openin\@crefscript=\jobname.sed% \begingroup% \newif\if@not@eof% \def\@eof{\par }% \catcode`.=13 \catcode`*=13 \catcode`[=13 \catcode`]=13 \catcode`^=13 \catcode`$=13 %$ \catcode`\=0 \catcode`<=1 \catcode`>=2 \catcode`\\=13 \catcode`\{=12 \catcode`\}=12 \catcode`_=12 \lccode`/=92 \lccode`~=92\lowercase{\def~{\string/\string/}}% \lccode`~=42\lowercase{\def~{\string/\string*}}% \lccode`~=46\lowercase{\def~{\string/\string.}}% \lccode`~=91\lowercase{\def~{\string/\string[}}% \lccode`~=93\lowercase{\def~{\string/\string]}}% \lccode`~=94\lowercase{\def~{\string/\string^}}% \lccode`~=36\lowercase{\def~{\string/\string$}}% $ \lccode`~=0 \lccode`/=0 \catcode`~=12 \def\cref@poorman@text{}% \immediate\read\@crefscript to \@tempa% \ifx\@tempa\@eof% \@not@eoffalse% \else% \@not@eoftrue% \edef\@tempa{\@tempa}% \fi% \@whilesw\if@not@eof\fi{% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \immediate\read\@crefscript to \@tempa% \ifx\@tempa\@eof% \@not@eoffalse% \else% \@not@eoftrue% \edef\@tempa{\@tempa}% \fi}% \endgroup% \immediate\closein\@crefscript% \begingroup% \lccode`|=92 \lccode`<=123 \lccode`>=125 \lccode`C=67 \lowercase{\def\@tempa{%[| s/||label|[[^]]*|]/||label/g}} \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||usepackage|(|[.*|]|)|<0,1|>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refformat<.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refrangeformat<.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refmultiformat<.*><.*><.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||[cC]refrangemultiformat<.*><.*><.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refname<.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]reflabelformat<.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refrangelabelformat<.*><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||[cC]refdefaultlabelformat<.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||crefpairconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||crefpairgroupconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||crefmiddleconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||crefmiddlegroupconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||creflastconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{% s/||renewcommand<||creflastgroupconjunction><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||renewcommand<||[cC]ref><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \lowercase{\edef\@tempa{s/||renewcommand<||[cC]refrange><.*>//g}}% \expandafter\g@addto@macro\expandafter% \cref@poorman@text\expandafter{\@tempa^^J}% \endgroup% \newwrite\@crefscript% \immediate\openout\@crefscript=\jobname.sed% \immediate\write\@crefscript{\cref@poorman@text}% \immediate\closeout\@crefscript% }% end of \AtEndDocument \def\cref@getmeaning#1{\expandafter\@cref@getmeaning\meaning#1\@nil} \def\@cref@getmeaning#1->#2\@nil{#2} \def\cref@writescript#1#2{% \edef\@tempa{\cref@getmeaning{\cref@poorman@text}}% \immediate\write\@crefscript{#1 s/#2/\@tempa/g}} \if@cref@hyperrefloaded\relax% hyperref loaded \def\@crefnostar#1#2{% \gdef\cref@poorman@text{}% \@cref{#1}{#2}% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{\string\cref\string{#2\string}}% \else% \cref@writescript{}{\string\Cref\string{#2\string}}% \fi}% \@tempa#1\@nil} \def\@crefstar#1#2{% \gdef\cref@poorman@text{}% \@crefstarredtrue\@cref{#1}{#2}\@crefstarredfalse% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{\string\cref*\string{#2\string}}% \else% \cref@writescript{}{\string\Cref*\string{#2\string}}% \fi}% \@tempa#1\@nil} \def\@crefrangenostar#1#2#3{% \gdef\cref@poorman@text{}% \@setcrefrange{#2}{#3}{#1}{}% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{% \string\crefrange\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\Crefrange\string{#2\string}\string{#3\string}}% \fi}% \@tempa#1\@nil} \def\@crefrangestar#1#2#3{% \gdef\cref@poorman@text{}% \@crefstarredtrue\@setcrefrange{#2}{#3}{#1}{}\@crefstarredfalse% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{% \string\crefrange*\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\Crefrange*\string{#2\string}\string{#3\string}}% \fi}% \@tempa#1\@nil} \def\@cpagerefnostar#1#2{% \gdef\cref@poorman@text{}% \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{\string\cpageref\string{#2\string}}% \else% \cref@writescript{}{\string\Cpageref\string{#2\string}}% \fi}% \@tempa#1\@nil} \def\@cpagerefstar#1#2{% \gdef\cref@poorman@text{}% \@crefstarredtrue% \@cpageref{#1}{#2}{\@setcpageref}{\@setcpagerefrange}% \@crefstarredfalse% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{\string\cpageref*\string{#2\string}}% \else% \cref@writescript{}{\string\Cpageref*\string{#2\string}}% \fi}% \@tempa#1\@nil} \def\@cpagerefrangenostar#1#2#3{% \gdef\cref@poorman@text{}% \@setcpagerefrange{#2}{#3}{#1}{}% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{% \string\cpagerefrange\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\Cpagerefrange\string{#2\string}\string{#3\string}}% \fi}% \@tempa#1\@nil} \def\@cpagerefrangestar#1#2#3{% \gdef\cref@poorman@text{}% \@crefstarredtrue% \@setcpagerefrange{#2}{#3}{#1}{}% \@crefstarredfalse% \def\@tempa##1##2\@nil{% \if##1c% \cref@writescript{}{% \string\cpagerefrange*\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\Cpagerefrange*\string{#2\string}\string{#3\string}}% \fi}% \@tempa#1\@nil} \def\@labelcrefnostar#1{% \gdef\cref@poorman@text{}% \@cref{labelcref}{#1}% \cref@writescript{}{\string\labelcref\string{#1\string}}} \def\@labelcrefstar#1{% \gdef\cref@poorman@text{}% \@crefstarredtrue% \@cref{labelcref}{#1}% \@crefstarredfalse% \cref@writescript{}{\string\labelcref*\string{#1\string}}} \def\@labelcpagerefnostar#1{% \gdef\cref@poorman@text{}% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}% \cref@writescript{}{\string\labelcpageref\string{#1\string}}} \def\@labelcpagerefstar#1{% \gdef\cref@poorman@text{}% \@crefstarredtrue% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}% \@crefstarredfalse% \cref@writescript{}{\string\labelcpageref*\string{#1\string}}} \else% hyperref not loaded \DeclareRobustCommand{\cref}[1]{% \gdef\cref@poorman@text{}% \@cref{cref}{#1}% \cref@writescript{}{\string\cref\string{#1\string}}} \DeclareRobustCommand{\Cref}[1]{% \gdef\cref@poorman@text{}% \@cref{Cref}{#1}% \cref@writescript{}{\string\Cref\string{#1\string}}} \DeclareRobustCommand{\crefrange}[2]{% \gdef\cref@poorman@text{}% \@setcrefrange{#1}{#2}{cref}{}% \cref@writescript{}{% \string\crefrange\string{#1\string}\string{#2\string}}} \DeclareRobustCommand{\Crefrange}[2]{% \gdef\cref@poorman@text{}% \@setcrefrange{#1}{#2}{Cref}{}% \cref@writescript{}{% \string\Crefrange\string{#1\string}\string{#2\string}}} \DeclareRobustCommand{\cpageref}[1]{% \gdef\cref@poorman@text{}% \@cpageref{cref}{#1}{\@setcpageref}{\@setcpagerefrange}% \cref@writescript{}{\string\cpageref\string{#1\string}}} \DeclareRobustCommand{\Cpageref}[1]{% \gdef\cref@poorman@text{}% \@cpageref{Cref}{#1}{\@setcpageref}{\@setcpagerefrange}% \cref@writescript{}{\string\Cpageref\string{#1\string}}} \DeclareRobustCommand{\cpagerefrange}[2]{% \gdef\cref@poorman@text{}% \@setcpagerefrange{#1}{#2}{cref}{}% \cref@writescript{}{% \string\cpagerefrange\string{#1\string}\string{#2\string}}} \DeclareRobustCommand{\Cpagerefrange}[2]{% \gdef\cref@poorman@text{}% \@setcpagerefrange{#1}{#2}{Cref}{}% \cref@writescript{}{% \string\Cpagerefrange\string{#1\string}\string{#2\string}}} \DeclareRobustCommand{\labelcref}[1]{% \gdef\cref@poorman@text{}% \@cref{labelcref}{#1}% \cref@writescript{}{\string\labelcref\string{#1\string}}} \DeclareRobustCommand{\labelcpageref}[1]{% \gdef\cref@poorman@text{}% \@cpageref{labelcref}{#1}{\@setcpageref}{\@setcpagerefrange}% \cref@writescript{}{\string\labelcpageref\string{#1\string}}} \fi% end of test for hyperref \DeclareRobustCommand{\namecref}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{cref}{#1}{}{}% \cref@writescript{}{\string\namecref\string{#1\string}}} \DeclareRobustCommand{\nameCref}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{Cref}{#1}{}{}% \cref@writescript{}{\string\nameCref\string{#1\string}}} \DeclareRobustCommand{\lcnamecref}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{Cref}{#1}{}{\MakeLowercase}% \cref@writescript{}{\string\lcnamecref\string{#1\string}}} \DeclareRobustCommand{\namecrefs}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{cref}{#1}{@plural}{}% \cref@writescript{}{\string\namecrefs\string{#1\string}}} \DeclareRobustCommand{\nameCrefs}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{Cref}{#1}{@plural}{}% \cref@writescript{}{\string\nameCrefs\string{#1\string}}} \DeclareRobustCommand{\lcnamecrefs}[1]{% \gdef\cref@poorman@text{}% \@setnamecref{Cref}{#1}{@plural}{\MakeLowercase}% \cref@writescript{}{\string\lcnamecrefs\string{#1\string}}} \def\@setcref@pairgroupconjunction{% \crefpairgroupconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\crefpairgroupconjunction}} \def\@setcref@middlegroupconjunction{% \crefmiddlegroupconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\crefmiddlegroupconjunction}} \def\@setcref@lastgroupconjunction{% \creflastgroupconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\creflastgroupconjunction}} \let\old@@setcref\@@setcref \let\old@@setcrefrange\@@setcrefrange \let\old@@setcpageref\@@setcpageref \let\old@@setcpagerefrange\@@setcpagerefrange \if@cref@hyperrefloaded\relax% hyperref loaded \def\@@setcref#1#2{% \old@@setcref{#1}{#2}% \if@crefstarred% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\ref*{#2}}{}{}}% \else% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\ref{#2}}{}{}}% \fi} \def\@@setcrefrange#1#2#3{% \old@@setcrefrange{#1}{#2}{#3}% \if@crefstarred% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\ref*{#2}}{\ref*{#3}}{}{}{}{}}% \else% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}% \fi} \def\@@setcpageref#1#2{% \old@@setcpageref{#1}{#2}% \if@crefstarred% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\pageref*{#2}}{}{}}% \else% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\pageref{#2}}{}{}}% \fi} \def\@@setcpagerefrange#1#2#3{% \old@@setcpagerefrange{#1}{#2}{#3}% \if@crefstarred% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\pageref*{#2}}{\pageref*{#3}}{}{}{}{}}% \else% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}% \fi} \else% hyperref not loaded \def\@@setcref#1#2{% \old@@setcref{#1}{#2}% \expandafter\g@addto@macro\expandafter{% \expandafter\cref@poorman@text\expandafter}% \expandafter{#1{\ref{#2}}{}{}}} \def\@@setcrefrange#1#2#3{% \old@@setcrefrange{#1}{#2}{#3}% \expandafter\g@addto@macro% \expandafter{\expandafter\cref@poorman@text\expandafter}% \expandafter{#1{\ref{#2}}{\ref{#3}}{}{}{}{}}} \def\@@setcpageref#1#2{% \old@@setcpageref{#1}{#2}% \expandafter\g@addto@macro\expandafter{% \expandafter\cref@poorman@text\expandafter}% \expandafter{#1{\pageref{#2}}{}{}}} \def\@@setcpagerefrange#1#2#3{% \old@@setcpagerefrange{#1}{#2}{#3}% \expandafter\g@addto@macro% \expandafter{\expandafter\cref@poorman@text\expandafter}% \expandafter{#1{\pageref{#2}}{\pageref{#3}}{}{}{}{}}} \fi% end of hyperref test \let\old@@setnamecref\@@setnamecref \def\@@setnamecref#1#2{% \old@@setnamecref{#1}{#2}% \expandafter\def\expandafter\@tempa\expandafter{#1}% \def\@tempb{#2}% \expandafter\expandafter\expandafter\g@addto@macro% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter\cref@poorman@text% \expandafter\expandafter\expandafter}% \expandafter\expandafter\expandafter{\expandafter\@tempb\@tempa}} \@ifpackageloaded{varioref}{% \AtBeginDocument{% \def\@@vpageref#1[#2]#3{% \gdef\cref@poorman@text{}% \cref@@vpageref{#1}[#2]{#3}% \cref@writescript{}{\string\vpageref\string{#3\string}}} \let\old@cref@vref\cref@vref \def\cref@vref#1#2{% \gdef\cref@poorman@text{}% \old@cref@vref{#1}{#2}% \def\@tempa##1##2\@nil{% \if##1c% \if@crefstarred% \cref@writescript{}{\string\vref*\string{#2\string}}% \else% \cref@writescript{}{\string\vref\string{#2\string}}% \fi% \else% \if@crefstarred% \cref@writescript{}{\string\Vref*\string{#2\string}}% \else% \cref@writescript{}{\string\Vref\string{#2\string}}% \fi% \fi}% \@tempa#1\@nil} \let\old@cref@fullref\cref@fullref \def\cref@fullref#1#2{% \gdef\cref@poorman@text{}% \old@cref@fullref{#1}{#2}% \def\@tempa##1##2\@nil{% \if##1c% \if@crefstarred% \cref@writescript{}{\string\fullref*\string{#2\string}}% \else% \cref@writescript{}{\string\fullref\string{#2\string}}% \fi% \else% \if@crefstarred% \cref@writescript{}{\string\Fullref*\string{#2\string}}% \else% \cref@writescript{}{\string\Fullref\string{#2\string}}% \fi% \fi}% \@tempa#1\@nil} \let\old@cref@vrefrange\cref@vrefrange \def\cref@vrefrange#1#2#3{% \gdef\cref@poorman@text{}% \old@cref@vrefrange{#1}{#2}{#3}% \def\@tempa##1##2\@nil{% \if##1c% \if@crefstarred% \cref@writescript{}{% \string\vrefrange*\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\vrefrange\string{#2\string}\string{#3\string}}% \fi% \else% \if@crefstarred% \cref@writescript{}{% \string\Vrefrange*\string{#2\string}\string{#3\string}}% \else% \cref@writescript{}{% \string\Vrefrange\string{#2\string}\string{#3\string}}% \fi% \fi}% \@tempa#1\@nil} \def\@@setvpageref#1[#2]#3{% \cref@old@@vpageref{#1}[#2]{#3}% \g@addto@macro\cref@poorman@text{\vpageref{#3}}} \def\@@setvpagerefrange[#1]#2#3{% \vpagerefrange[#1]{#2}{#3}% \g@addto@macro\cref@poorman@text{\vpagerefrange{#2}{#3}}} \def\@@setfullpageref#1{% \reftextfaraway{#1}% \g@addto@macro\cref@poorman@text{\reftextfaraway{#1}}} \def\@@setfullpagerefrange#1#2{% \reftextpagerange{#1}{#2}% \g@addto@macro\cref@poorman@text{\reftextpagerange{#1}{#2}}} \def\@setcref@space{ % space here is deliberate \g@addto@macro\cref@poorman@text{ }} \def\@setcref@pairconjunction{% \crefpairconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\crefpairconjunction}} \def\@setcref@middleconjunction{% \crefmiddleconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\crefmiddleconjunction}} \def\@setcref@lastconjunction{% \creflastconjunction% \expandafter\g@addto@macro\expandafter\cref@poorman@text% \expandafter{\creflastconjunction}} }% end of \AtBeginDocument }{}% end of \@ifpackageloaded{varioref} }% end of poorman option \newif\if@cref@sort \newif\if@cref@compress \@cref@sorttrue \@cref@compresstrue \DeclareOption{sort}{% \PackageInfo{cleveref}{sorting but not compressing references} \@cref@sorttrue \@cref@compressfalse} \DeclareOption{compress}{% \PackageInfo{cleveref}{compressing but not sorting references} \@cref@sortfalse \@cref@compresstrue} \DeclareOption{sort&compress}{% \PackageInfo{cleveref}{sorting and compressing references} \@cref@sorttrue \@cref@compresstrue} \DeclareOption{nosort}{% \PackageInfo{cleveref}{neither sorting nor compressing references} \@cref@sortfalse \@cref@compressfalse} \newif\if@cref@capitalise \@cref@capitalisefalse \DeclareOption{capitalise}{% \PackageInfo{cleveref}{always capitalise cross-reference names} \@cref@capitalisetrue} \DeclareOption{capitalize}{% \PackageInfo{cleveref}{always capitalise cross-reference names} \@cref@capitalisetrue} \newif\if@cref@nameinlink \@cref@nameinlinkfalse \DeclareOption{nameinlink}{% \PackageInfo{cleveref}{include cross-reference names in hyperlinks} \@cref@nameinlinktrue} \newif\if@cref@abbrev \@cref@abbrevtrue \DeclareOption{noabbrev}{% \PackageInfo{cleveref}{no abbreviation of names} \@cref@abbrevfalse} \def\cref@addto#1#2{% \@temptokena{#2}% \ifx#1\undefined% \edef#1{\the\@temptokena}% \else% \toks@\expandafter{#1}% \edef#1{\the\toks@\the\@temptokena}% \fi% \@temptokena{}\toks@\@temptokena} \@onlypreamble\cref@addto \long\def\cref@addlanguagedefs#1#2{% \@ifpackageloaded{polyglossia}% {\AtBeginDocument{% \ifcsdef{#1@loaded}{% \expandafter\cref@addto\csname captions#1\endcsname{#2}}{}}}% {\@ifpackageloaded{babel}{% \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% \@expandtwoargs\in@{,#1,}{,\@classoptionslist,\@curroptions,}% \ifin@% \AtBeginDocument{% \expandafter\cref@addto\csname extras#1\endcsname{#2}}% \fi}{}}} \DeclareOption{english}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ to\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ and\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ and\nobreakspace}% \def\crefpairgroupconjunction@preamble{ and\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{, and\nobreakspace}% % \Crefname@preamble{equation}{Equation}{Equations}% \Crefname@preamble{figure}{Figure}{Figures}% \Crefname@preamble{table}{Table}{Tables}% \Crefname@preamble{page}{Page}{Pages}% \Crefname@preamble{part}{Part}{Parts}% \Crefname@preamble{chapter}{Chapter}{Chapters}% \Crefname@preamble{section}{Section}{Sections}% \Crefname@preamble{appendix}{Appendix}{Appendices}% \Crefname@preamble{enumi}{Item}{Items}% \Crefname@preamble{footnote}{Footnote}{Footnotes}% \Crefname@preamble{theorem}{Theorem}{Theorems}% \Crefname@preamble{lemma}{Lemma}{Lemmas}% \Crefname@preamble{corollary}{Corollary}{Corollaries}% \Crefname@preamble{proposition}{Proposition}{Propositions}% \Crefname@preamble{definition}{Definition}{Definitions}% \Crefname@preamble{result}{Result}{Results}% \Crefname@preamble{example}{Example}{Examples}% \Crefname@preamble{remark}{Remark}{Remarks}% \Crefname@preamble{note}{Note}{Notes}% \Crefname@preamble{algorithm}{Algorithm}{Algorithms}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Line}{Lines}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Eq.}{Eqs.}% \crefname@preamble{figure}{Fig.}{Figs.}% \else% \crefname@preamble{equation}{Equation}{Equations}% \crefname@preamble{figure}{Figure}{Figures}% \fi% \crefname@preamble{page}{Page}{Pages}% \crefname@preamble{table}{Table}{Tables}% \crefname@preamble{part}{Part}{Parts}% \crefname@preamble{chapter}{Chapter}{Chapters}% \crefname@preamble{section}{Section}{Sections}% \crefname@preamble{appendix}{Appendix}{Appendices}% \crefname@preamble{enumi}{Item}{Items}% \crefname@preamble{footnote}{Footnote}{Footnotes}% \crefname@preamble{theorem}{Theorem}{Theorems}% \crefname@preamble{lemma}{Lemma}{Lemmas}% \crefname@preamble{corollary}{Corollary}{Corollaries}% \crefname@preamble{proposition}{Proposition}{Propositions}% \crefname@preamble{definition}{Definition}{Definitions}% \crefname@preamble{result}{Result}{Results}% \crefname@preamble{example}{Example}{Examples}% \crefname@preamble{remark}{Remark}{Remarks}% \crefname@preamble{note}{Note}{Notes}% \crefname@preamble{algorithm}{Algorithm}{Algorithms}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Line}{Lines}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{eq.}{eqs.}% \crefname@preamble{figure}{fig.}{figs.}% \else% \crefname@preamble{equation}{equation}{equations}% \crefname@preamble{figure}{figure}{figures}% \fi% \crefname@preamble{page}{page}{pages}% \crefname@preamble{table}{table}{tables}% \crefname@preamble{part}{part}{parts}% \crefname@preamble{chapter}{chapter}{chapters}% \crefname@preamble{section}{section}{sections}% \crefname@preamble{appendix}{appendix}{appendices}% \crefname@preamble{enumi}{item}{items}% \crefname@preamble{footnote}{footnote}{footnotes}% \crefname@preamble{theorem}{theorem}{theorems}% \crefname@preamble{lemma}{lemma}{lemmas}% \crefname@preamble{corollary}{corollary}{corollaries}% \crefname@preamble{proposition}{proposition}{propositions}% \crefname@preamble{definition}{definition}{definitions}% \crefname@preamble{result}{result}{results}% \crefname@preamble{example}{example}{examples}% \crefname@preamble{remark}{remark}{remarks}% \crefname@preamble{note}{note}{notes}% \crefname@preamble{algorithm}{algorithm}{algorithms}% \crefname@preamble{listing}{listing}{listings}% \crefname@preamble{line}{line}{lines}% \fi% \def\cref@language{english}% }}% end \AtBeginDocument and \DeclareOption \cref@addlanguagedefs{english}{% \PackageInfo{cleveref}{loaded `english' language definitions} \renewcommand{\crefrangeconjunction}{ to\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ and\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ and\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ and\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{, and\nobreakspace}% % \Crefname{equation}{Equation}{Equations}% \Crefname{figure}{Figure}{Figures}% \Crefname{subfigure}{Figure}{Figures}% \Crefname{table}{Table}{Tables}% \Crefname{subtable}{Table}{Tables}% \Crefname{page}{Page}{Pages}% \Crefname{part}{Part}{Parts}% \Crefname{chapter}{Chapter}{Chapters}% \Crefname{section}{Section}{Sections}% \Crefname{subsection}{Section}{Sections}% \Crefname{subsubsection}{Section}{Sections}% \Crefname{appendix}{Appendix}{Appendices}% \Crefname{subappendix}{Appendix}{Appendices}% \Crefname{subsubappendix}{Appendix}{Appendices}% \Crefname{subsubsubappendix}{Appendix}{Appendices}% \Crefname{enumi}{Item}{Items}% \Crefname{enumii}{Item}{Items}% \Crefname{enumiii}{Item}{Items}% \Crefname{enumiv}{Item}{Items}% \Crefname{enumv}{Item}{Items}% \Crefname{footnote}{Footnote}{Footnotes}% \Crefname{theorem}{Theorem}{Theorems}% \Crefname{lemma}{Lemma}{Lemmas}% \Crefname{corollary}{Corollary}{Corollaries}% \Crefname{proposition}{Proposition}{Propositions}% \Crefname{definition}{Definition}{Definitions}% \Crefname{result}{Result}{Results}% \Crefname{example}{Example}{Examples}% \Crefname{remark}{Remark}{Remarks}% \Crefname{note}{Note}{Notes}% \Crefname{algorithm}{Algorithm}{Algorithms}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Line}{Lines}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Eq.}{Eqs.}% \crefname{figure}{Fig.}{Figs.}% \crefname{subfigure}{Fig.}{Figs.}% \else% \crefname{equation}{Equation}{Equations}% \crefname{figure}{Figure}{Figures}% \crefname{subfigure}{Figure}{Figures}% \fi% \crefname{page}{Page}{Pages}% \crefname{table}{Table}{Tables}% \crefname{subtable}{Table}{Tables}% \crefname{part}{Part}{Parts}% \crefname{chapter}{Chapter}{Chapters}% \crefname{section}{Section}{Sections}% \crefname{subsection}{Section}{Sections}% \crefname{subsubsection}{Section}{Sections}% \crefname{appendix}{Appendix}{Appendices}% \crefname{subappendix}{Appendix}{Appendices}% \crefname{subsubappendix}{Appendix}{Appendices}% \crefname{subsubsubappendix}{Appendix}{Appendices}% \crefname{enumi}{Item}{Items}% \crefname{enumii}{Item}{Items}% \crefname{enumiii}{Item}{Items}% \crefname{enumiv}{Item}{Items}% \crefname{enumv}{Item}{Items}% \crefname{footnote}{Footnote}{Footnotes}% \crefname{theorem}{Theorem}{Theorems}% \crefname{lemma}{Lemma}{Lemmas}% \crefname{corollary}{Corollary}{Corollaries}% \crefname{proposition}{Proposition}{Propositions}% \crefname{definition}{Definition}{Definitions}% \crefname{result}{Result}{Results}% \crefname{example}{Example}{Examples}% \crefname{remark}{Remark}{Remarks}% \crefname{note}{Note}{Notes}% \crefname{algorithm}{Algorithm}{Algorithms}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Line}{Lines}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{eq.}{eqs.}% \crefname{figure}{fig.}{figs.}% \crefname{subfigure}{fig.}{figs.}% \else% \crefname{equation}{equation}{equations}% \crefname{figure}{figure}{figures}% \crefname{subfigure}{figure}{figures}% \fi% \crefname{table}{table}{tables}% \crefname{subtable}{table}{tables}% \crefname{page}{page}{pages}% \crefname{part}{part}{parts}% \crefname{chapter}{chapter}{chapters}% \crefname{section}{section}{sections}% \crefname{subsection}{section}{sections}% \crefname{subsubsection}{section}{sections}% \crefname{appendix}{appendix}{appendices}% \crefname{subappendix}{appendix}{appendices}% \crefname{subsubappendix}{appendix}{appendices}% \crefname{subsubsubappendix}{appendix}{appendices}% \crefname{enumi}{item}{items}% \crefname{enumii}{item}{items}% \crefname{enumiii}{item}{items}% \crefname{enumiv}{item}{items}% \crefname{enumv}{item}{items}% \crefname{footnote}{footnote}{footnotes}% \crefname{theorem}{theorem}{theorems}% \crefname{lemma}{lemma}{lemmas}% \crefname{corollary}{corollary}{corollaries}% \crefname{proposition}{proposition}{propositions}% \crefname{definition}{definition}{definitions}% \crefname{result}{result}{results}% \crefname{example}{example}{examples}% \crefname{remark}{remark}{remarks}% \crefname{note}{note}{notes}% \crefname{algorithm}{algorithm}{algorithms}% \crefname{listing}{listing}{listings}% \crefname{line}{line}{lines}% \fi}% end \cref@addlangagedefs \DeclareOption{german}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ bis\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ und\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ und\nobreakspace}% \def\crefpairgroupconjunction@preamble{ und\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ und\nobreakspace}% % \Crefname@preamble{equation}{Gleichung}{Gleichungen}% \Crefname@preamble{figure}{Abbildung}{Abbildungen}% \Crefname@preamble{table}{Tabelle}{Tabellen}% \Crefname@preamble{page}{Seite}{Seiten}% \Crefname@preamble{part}{Teil}{Teile}% \Crefname@preamble{chapter}{Kapitel}{Kapitel}% \Crefname@preamble{section}{Abschnitt}{Abschnitte}% \Crefname@preamble{appendix}{Anhang}{Anh\"ange}% \Crefname@preamble{enumi}{Punkt}{Punkte}% \Crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname@preamble{theorem}{Theorem}{Theoreme}% \Crefname@preamble{lemma}{Lemma}{Lemmata}% \Crefname@preamble{corollary}{Korollar}{Korollare}% \Crefname@preamble{proposition}{Satz}{S\"atze}% \Crefname@preamble{definition}{Definition}{Definitionen}% \Crefname@preamble{result}{Ergebnis}{Ergebnisse}% \Crefname@preamble{example}{Beispiel}{Beispiele}% \Crefname@preamble{remark}{Bemerkung}{Bemerkungen}% \Crefname@preamble{note}{Anmerkung}{Anmerkungen}% \Crefname@preamble{algorithm}{Algorithmus}{Algorithmen}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Zeile}{Zeilen}% % \crefname@preamble{equation}{Gleichung}{Gleichungen}% \crefname@preamble{figure}{Abbildung}{Abbildungen}% \crefname@preamble{table}{Tabelle}{Tabellen}% \crefname@preamble{page}{Seite}{Seiten}% \crefname@preamble{part}{Teil}{Teile}% \crefname@preamble{chapter}{Kapitel}{Kapitel}% \crefname@preamble{section}{Abschnitt}{Abschnitte}% \crefname@preamble{appendix}{Anhang}{Anh\"ange}% \crefname@preamble{enumi}{Punkt}{Punkte}% \crefname@preamble{footnote}{Fu\ss note}{Fu\ss noten}% \crefname@preamble{theorem}{Theorem}{Theoreme}% \crefname@preamble{lemma}{Lemma}{Lemmata}% \crefname@preamble{corollary}{Korollar}{Korollare}% \crefname@preamble{proposition}{Satz}{S\"atze}% \crefname@preamble{definition}{Definition}{Definitionen}% \crefname@preamble{result}{Ergebnis}{Ergebnisse}% \crefname@preamble{example}{Beispiel}{Beispiele}% \crefname@preamble{remark}{Bemerkung}{Bemerkungen}% \crefname@preamble{note}{Anmerkung}{Anmerkungen}% \crefname@preamble{algorithm}{Algorithmus}{Algorithmen}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Zeile}{Zeilen}% \def\cref@language{german}% }}% end \AtBeginDocument and \DeclareOption \cref@addlanguagedefs{german}{% \PackageInfo{cleveref}{loaded `german language definitions} \renewcommand{\crefrangeconjunction}{ bis\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ und\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ und\nobreakspace}% % \Crefname{equation}{Gleichung}{Gleichungen}% \Crefname{figure}{Abbildung}{Abbildungen}% \Crefname{subfigure}{Abbildung}{Abbildungen}% \Crefname{table}{Tabelle}{Tabellen}% \Crefname{subtable}{Tabelle}{Tabellen}% \Crefname{page}{Seite}{Seiten}% \Crefname{part}{Teil}{Teile}% \Crefname{chapter}{Kapitel}{Kapitel}% \Crefname{section}{Abschnitt}{Abschnitte}% \Crefname{subsection}{Abschnitt}{Abschnitte}% \Crefname{subsubsection}{Abschnitt}{Abschnitte}% \Crefname{appendix}{Anhang}{Anh\"ange}% \Crefname{subappendix}{Anhang}{Anh\"ange}% \Crefname{subsubappendix}{Anhang}{Anh\"ange}% \Crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \Crefname{enumi}{Punkt}{Punkte}% \Crefname{enumii}{Punkt}{Punkte}% \Crefname{enumiii}{Punkt}{Punkte}% \Crefname{enumiv}{Punkt}{Punkte}% \Crefname{enumv}{Punkt}{Punkte}% \Crefname{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname{theorem}{Theorem}{Theoreme}% \Crefname{lemma}{Lemma}{Lemmata}% \Crefname{corollary}{Korollar}{Korollare}% \Crefname{proposition}{Satz}{S\"atze}% \Crefname{definition}{Definition}{Definitionen}% \Crefname{result}{Ergebnis}{Ergebnisse}% \Crefname{example}{Beispiel}{Beispiele}% \Crefname{remark}{Bemerkung}{Bemerkungen}% \Crefname{note}{Anmerkung}{Anmerkungen}% \Crefname{algorithm}{Algorithmus}{Algorithmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Zeile}{Zeilen}% % \crefname{equation}{Gleichung}{Gleichungen}% \crefname{figure}{Abbildung}{Abbildungen}% \crefname{subfigure}{Abbildung}{Abbildungen}% \crefname{table}{Tabelle}{Tabellen}% \crefname{subtable}{Tabelle}{Tabellen}% \crefname{page}{Seite}{Seiten}% \crefname{part}{Teil}{Teile}% \crefname{chapter}{Kapitel}{Kapitel}% \crefname{section}{Abschnitt}{Abschnitte}% \crefname{subsection}{Abschnitt}{Abschnitte}% \crefname{subsubsection}{Abschnitt}{Abschnitte}% \crefname{appendix}{Anhang}{Anh\"ange}% \crefname{subappendix}{Anhang}{Anh\"ange}% \crefname{subsubappendix}{Anhang}{Anh\"ange}% \crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \crefname{enumi}{Punkt}{Punkte}% \crefname{enumii}{Punkt}{Punkte}% \crefname{enumiii}{Punkt}{Punkte}% \crefname{enumiv}{Punkt}{Punkte}% \crefname{enumv}{Punkt}{Punkte}% \crefname{footnote}{Fu\ss note}{Fu\ss noten}% \crefname{theorem}{Theorem}{Theoreme}% \crefname{lemma}{Lemma}{Lemmata}% \crefname{corollary}{Korollar}{Korollare}% \crefname{proposition}{Satz}{S\"atze}% \crefname{definition}{Definition}{Definitionen}% \crefname{result}{Ergebnis}{Ergebnisse}% \crefname{example}{Beispiel}{Beispiele}% \crefname{remark}{Bemerkung}{Bemerkungen}% \crefname{note}{Anmerkung}{Anmerkungen}% \crefname{algorithm}{Algorithmus}{Algorithmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Zeile}{Zeilen}}% end \cref@addlangagedefs \DeclareOption{ngerman}{% \ExecuteOptions{german} \def\cref@language{ngerman}} \cref@addlanguagedefs{ngerman}{% \PackageInfo{cleveref}{loaded `ngerman' language definitions} \renewcommand{\crefrangeconjunction}{ bis\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ und\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ und\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ und\nobreakspace}% % \Crefname{equation}{Gleichung}{Gleichungen}% \Crefname{figure}{Abbildung}{Abbildungen}% \Crefname{subfigure}{Abbildung}{Abbildungen}% \Crefname{table}{Tabelle}{Tabellen}% \Crefname{subtable}{Tabelle}{Tabellen}% \Crefname{page}{Seite}{Seiten}% \Crefname{part}{Teil}{Teile}% \Crefname{chapter}{Kapitel}{Kapitel}% \Crefname{section}{Abschnitt}{Abschnitte}% \Crefname{subsection}{Abschnitt}{Abschnitte}% \Crefname{subsubsection}{Abschnitt}{Abschnitte}% \Crefname{appendix}{Anhang}{Anh\"ange}% \Crefname{subappendix}{Anhang}{Anh\"ange}% \Crefname{subsubappendix}{Anhang}{Anh\"ange}% \Crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \Crefname{enumi}{Punkt}{Punkte}% \Crefname{enumii}{Punkt}{Punkte}% \Crefname{enumiii}{Punkt}{Punkte}% \Crefname{enumiv}{Punkt}{Punkte}% \Crefname{enumv}{Punkt}{Punkte}% \Crefname{footnote}{Fu\ss note}{Fu\ss noten}% \Crefname{theorem}{Theorem}{Theoreme}% \Crefname{lemma}{Lemma}{Lemmata}% \Crefname{corollary}{Korollar}{Korollare}% \Crefname{proposition}{Satz}{S\"atze}% \Crefname{definition}{Definition}{Definitionen}% \Crefname{result}{Ergebnis}{Ergebnisse}% \Crefname{example}{Beispiel}{Beispiele}% \Crefname{remark}{Bemerkung}{Bemerkungen}% \Crefname{note}{Anmerkung}{Anmerkungen}% \Crefname{algorithm}{Algorithmus}{Algorithmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Zeile}{Zeilen}% % \crefname{equation}{Gleichung}{Gleichungen}% \crefname{figure}{Abbildung}{Abbildungen}% \crefname{subfigure}{Abbildung}{Abbildungen}% \crefname{table}{Tabelle}{Tabellen}% \crefname{subtable}{Tabelle}{Tabellen}% \crefname{page}{Seite}{Seiten}% \crefname{part}{Teil}{Teile}% \crefname{chapter}{Kapitel}{Kapitel}% \crefname{section}{Abschnitt}{Abschnitte}% \crefname{subsection}{Abschnitt}{Abschnitte}% \crefname{subsubsection}{Abschnitt}{Abschnitte}% \crefname{appendix}{Anhang}{Anh\"ange}% \crefname{subappendix}{Anhang}{Anh\"ange}% \crefname{subsubappendix}{Anhang}{Anh\"ange}% \crefname{subsubsubappendix}{Anhang}{Anh\"ange}% \crefname{enumi}{Punkt}{Punkte}% \crefname{enumii}{Punkt}{Punkte}% \crefname{enumiii}{Punkt}{Punkte}% \crefname{enumiv}{Punkt}{Punkte}% \crefname{enumv}{Punkt}{Punkte}% \crefname{footnote}{Fu\ss note}{Fu\ss noten}% \crefname{theorem}{Theorem}{Theoreme}% \crefname{lemma}{Lemma}{Lemmata}% \crefname{corollary}{Korollar}{Korollare}% \crefname{proposition}{Satz}{S\"atze}% \crefname{definition}{Definition}{Definitionen}% \crefname{result}{Ergebnis}{Ergebnisse}% \crefname{example}{Beispiel}{Beispiele}% \crefname{remark}{Bemerkung}{Bemerkungen}% \crefname{note}{Anmerkung}{Anmerkungen}% \crefname{algorithm}{Algorithmus}{Algorithmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Zeile}{Zeilen}}% end \cref@addlangagedefs \DeclareOption{dutch}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ tot\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ en\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ en\nobreakspace}% \def\crefpairgroupconjunction@preamble{ en\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ en\nobreakspace}% % \Crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \Crefname@preamble{figure}{Figuur}{Figuren}% \Crefname@preamble{table}{Tabel}{Tabellen}% \Crefname@preamble{page}{Pagina}{Pagina's}% \Crefname@preamble{part}{Deel}{Delen}% \Crefname@preamble{chapter}{Hoofdstuk}{Hoofdstuken}% \Crefname@preamble{section}{Paragraaf}{Paragrafen}% \Crefname@preamble{appendix}{Appendix}{Appendices}% \Crefname@preamble{enumi}{Punt}{Punten}% \Crefname@preamble{footnote}{Voetnote}{Voetnoten}% \Crefname@preamble{lemma}{Lemma}{Lemma's}% \Crefname@preamble{corollary}{Corollarium}{Corollaria}% \Crefname@preamble{proposition}{Bewering}{Beweringen}% \Crefname@preamble{definition}{Definitie}{Definities}% \Crefname@preamble{result}{Resultaat}{Resultaten}% \Crefname@preamble{example}{Voorbeeld}{Voorbeelden}% \Crefname@preamble{remark}{Opmerking}{Opmerkingen}% \Crefname@preamble{note}{Aantekening}{Aantekeningen}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmen}% \Crefname@preamble{listing}{Listing}{Listings}% \Crefname@preamble{line}{Lijn}{Lijnen}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Verg.}{Verg's.}% \crefname@preamble{figure}{Fig.}{Fig's.}% \else% \crefname@preamble{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \crefname@preamble{figure}{Figuur}{Figuren}% \fi% \crefname@preamble{page}{Pagina}{Pagina's}% \crefname@preamble{table}{Tabel}{Tabellen}% \crefname@preamble{part}{Deel}{Delen}% \crefname@preamble{chapter}{Hoofdstuk}{Hoofdstukken}% \crefname@preamble{section}{Paragraaf}{Paragrafen}% \crefname@preamble{appendix}{Appendix}{Appendices}% \crefname@preamble{enumi}{Punt}{Punten}% \crefname@preamble{footnote}{Voetnote}{Voetnoten}% \crefname@preamble{theorem}{Theorema}{Theorema's}% \crefname@preamble{lemma}{Lemma}{Lemma's}% \crefname@preamble{corollary}{Corollarium}{Corollaria}% \crefname@preamble{proposition}{Bewering}{Beweringen}% \crefname@preamble{definition}{Definitie}{Definities}% \crefname@preamble{result}{Resultaat}{Resultaten}% \crefname@preamble{example}{Voorbeeld}{Voorbeelden}% \crefname@preamble{remark}{Opmerking}{Opmerkingen}% \crefname@preamble{note}{Aantekening}{Aantekeningen}% \crefname@preamble{algorithm}{Algoritme}{Algoritmen}% \crefname@preamble{listing}{Listing}{Listings}% \crefname@preamble{line}{Lijn}{Lijnen}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{verg.}{verg's.}% \crefname@preamble{figure}{fig.}{fig's.}% \else% \crefname@preamble{equation}{vergel\ij{}king}{vergel\ij{}kingen}% \crefname@preamble{figure}{figuur}{figuren}% \fi% \crefname@preamble{page}{pagina}{pagina's}% \crefname@preamble{table}{tabel}{tabellen}% \crefname@preamble{part}{deel}{delen}% \crefname@preamble{chapter}{hoofdstuk}{hoofdstukken}% \crefname@preamble{section}{paragraaf}{paragrafen}% \crefname@preamble{appendix}{appendix}{appendices}% \crefname@preamble{enumi}{punt}{punten}% \crefname@preamble{footnote}{voetnote}{voetnoten}% \crefname@preamble{theorem}{theorema}{theorema's}% \crefname@preamble{lemma}{lemma}{lemma's}% \crefname@preamble{corollary}{corollarium}{corollaria}% \crefname@preamble{proposition}{bewering}{beweringen}% \crefname@preamble{definition}{definitie}{definities}% \crefname@preamble{result}{resultaat}{resultaten}% \crefname@preamble{example}{voorbeeld}{voorbeelden}% \crefname@preamble{remark}{opmerking}{opmerkingen}% \crefname@preamble{note}{aantekening}{aantekeningen}% \crefname@preamble{algorithm}{algoritme}{algoritmen}% \crefname@preamble{listing}{listing}{listings}% \crefname@preamble{line}{lijn}{lijnen}% \fi% \def\cref@language{dutch}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{dutch}{% \PackageInfo{cleveref}{loaded `dutch' language definitions} \renewcommand{\crefrangeconjunction}{ tot\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ en\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ en\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ en\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ en\nobreakspace}% % \Crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \Crefname{figure}{Figuur}{Figuren}% \Crefname{subfigure}{Figuur}{Figuren}% \Crefname{table}{Tabel}{Tabellen}% \Crefname{subtable}{Tabel}{Tabellen}% \Crefname{page}{Pagina}{Pagina's}% \Crefname{part}{Deel}{Delen}% \Crefname{chapter}{Hoofdstuk}{Hoofdstuken}% \Crefname{section}{Paragraaf}{Paragrafen}% \Crefname{subsection}{Paragraaf}{Paragrafen}% \Crefname{subsubsection}{Paragraaf}{Paragrafen}% \Crefname{appendix}{Appendix}{Appendices}% \Crefname{subappendix}{Appendix}{Appendices}% \Crefname{subsubappendix}{Appendix}{Appendices}% \Crefname{subsubsubappendix}{Appendix}{Appendices}% \Crefname{enumi}{Punt}{Punten}% \Crefname{enumii}{Punt}{Punten}% \Crefname{enumiii}{Punt}{Punten}% \Crefname{enumiv}{Punt}{Punten}% \Crefname{enumv}{Punt}{Punten}% \Crefname{footnote}{Voetnote}{Voetnoten}% \Crefname{theorem}{Theorema}{Theorema's}% \Crefname{lemma}{Lemma}{Lemma's}% \Crefname{corollary}{Corollarium}{Corollaria}% \Crefname{proposition}{Bewering}{Beweringen}% \Crefname{definition}{Definitie}{Definities}% \Crefname{result}{Resultaat}{Resultaten}% \Crefname{example}{Voorbeeld}{Voorbeelden}% \Crefname{remark}{Opmerking}{Opmerkingen}% \Crefname{note}{Aantekening}{Aantekeningen}% \Crefname{algorithm}{Algoritme}{Algoritmen}% \Crefname{listing}{Listing}{Listings}% \Crefname{line}{Lijn}{Lijnen}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Verg.}{Verg's.}% \crefname{figure}{Fig.}{Fig's.}% \crefname{subfigure}{Fig.}{Fig's.}% \else% \crefname{equation}{Vergel\ij{}king}{Vergel\ij{}kingen}% \crefname{figure}{Figuur}{Figuren}% \crefname{subfigure}{Figuur}{Figuren}% \fi% \crefname{table}{Tabel}{Tabellen}% \crefname{subtable}{Tabel}{Tabellen}% \crefname{page}{Pagina}{Pagina's}% \crefname{part}{Deel}{Delen}% \crefname{chapter}{Hoofdstuk}{Hoofdstukken}% \crefname{section}{Paragraaf}{Paragrafen}% \crefname{appendix}{Appendix}{Appendices}% \crefname{enumi}{Punt}{Punten}% \crefname{footnote}{Voetnote}{Voetnoten}% \crefname{theorem}{Theorema}{Theorema's}% \crefname{lemma}{Lemma}{Lemma's}% \crefname{corollary}{Corollarium}{Corollaria}% \crefname{proposition}{Bewering}{Beweringen}% \crefname{definition}{Definitie}{Definities}% \crefname{result}{Resultaat}{Resultaten}% \crefname{example}{Voorbeeld}{Voorbeelden}% \crefname{remark}{Opmerking}{Opmerkingen}% \crefname{note}{Aantekening}{Aantekeningen}% \crefname{algorithm}{Algoritme}{Algoritmen}% \crefname{listing}{Listing}{Listings}% \crefname{line}{Lijn}{Lijnen}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{verg.}{verg's.}% \crefname{figure}{fig.}{fig's.}% \crefname{subfigure}{fig.}{fig's.}% \else% \crefname{equation}{vergel\ij{}king}{vergel\ij{}kingen}% \crefname{figure}{figuur}{figuren}% \crefname{subfigure}{figuur}{figuren}% \fi% \crefname{table}{tabel}{tabellen}% \crefname{subtable}{tabel}{tabellen}% \crefname{page}{pagina}{pagina's}% \crefname{part}{deel}{delen}% \crefname{chapter}{hoofdstuk}{hoofdstukken}% \crefname{section}{paragraaf}{paragrafen}% \crefname{appendix}{appendix}{appendices}% \crefname{enumi}{punt}{punten}% \crefname{footnote}{voetnote}{voetnoten}% \crefname{theorem}{theorema}{theorema's}% \crefname{lemma}{lemma}{lemma's}% \crefname{corollary}{corollarium}{corollaria}% \crefname{proposition}{bewering}{beweringen}% \crefname{definition}{definitie}{definities}% \crefname{result}{resultaat}{resultaten}% \crefname{example}{voorbeeld}{voorbeelden}% \crefname{remark}{opmerking}{opmerkingen}% \crefname{note}{aantekening}{aantekeningen}% \crefname{algorithm}{algoritme}{algoritmen}% \crefname{listing}{listing}{listings}% \crefname{line}{lijn}{lijnen}% \fi}% end \cref@addlanguagedefs \DeclareOption{french}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ \`a\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ et\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ et\nobreakspace}% \def\crefpairgroupconjunction@preamble{ et\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{, et\nobreakspace}% % \Crefname@preamble{equation}{{\'E}quation}{{\'E}quations}% \Crefname@preamble{figure}{Figure}{Figures}% \Crefname@preamble{table}{Tableau}{Tableaux}% \Crefname@preamble{page}{Page}{Pages}% \Crefname@preamble{part}{Partie}{Parties}% \Crefname@preamble{chapter}{Chapitre}{Chapitres}% \Crefname@preamble{section}{Section}{Sections}% \Crefname@preamble{appendix}{Annexe}{Annexes}% \Crefname@preamble{enumi}{Point}{Points}% \Crefname@preamble{footnote}{Note}{Notes}% \Crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \Crefname@preamble{lemma}{Lemme}{Lemmes}% \Crefname@preamble{corollary}{Corollaire}{Corollaires}% \Crefname@preamble{proposition}{Proposition}{Propositions}% \Crefname@preamble{definition}{D\'efinition}{D\'efinitions}% \Crefname@preamble{result}{R\'esultat}{R\'esultats}% \Crefname@preamble{example}{Exemple}{Exemples}% \Crefname@preamble{remark}{Remarque}{Remarques}% \Crefname@preamble{algorithm}{Algorithme}{Algorithmes}% \Crefname@preamble{listing}{Liste}{Listes}% \Crefname@preamble{line}{Ligne}{Lignes}% % \if@cref@capitalise% capitalise set \crefname@preamble{equation}{{\'E}quation}{{\'E}quations}% \crefname@preamble{figure}{Figure}{Figures}% \crefname@preamble{table}{Tableau}{Tableaux}% \crefname@preamble{page}{Page}{Pages}% \crefname@preamble{part}{Partie}{Parties}% \crefname@preamble{chapter}{Chapitre}{Chapitres}% \crefname@preamble{section}{Section}{Sections}% \crefname@preamble{appendix}{Annexe}{Annexes}% \crefname@preamble{enumi}{Point}{Points}% \crefname@preamble{footnote}{Note}{Notes}% \crefname@preamble{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \crefname@preamble{lemma}{Lemme}{Lemmes}% \crefname@preamble{corollary}{Corollaire}{Corollaires}% \crefname@preamble{proposition}{Proposition}{Propositions}% \crefname@preamble{definition}{D\'efinition}{D\'efinitions}% \crefname@preamble{result}{R\'esultat}{R\'esultats}% \crefname@preamble{example}{Exemple}{Exemples}% \crefname@preamble{remark}{Remarque}{Remarques}% \crefname@preamble{note}{Commentaire}{Commentaires}% \crefname@preamble{algorithm}{Algorithme}{Algorithmes}% \crefname@preamble{listing}{Liste}{Listes}% \crefname@preamble{line}{Ligne}{Lignes}% % \else% capitalise unset \crefname@preamble{equation}{{\'e}quation}{{\'e}quations}% \crefname@preamble{figure}{figure}{figures}% \crefname@preamble{table}{tableau}{tableaux}% \crefname@preamble{page}{page}{pages}% \crefname@preamble{part}{partie}{parties}% \crefname@preamble{chapter}{chapitre}{chapitres}% \crefname@preamble{section}{section}{sections}% \crefname@preamble{appendix}{annexe}{annexes}% \crefname@preamble{enumi}{point}{points}% \crefname@preamble{footnote}{note}{notes}% \crefname@preamble{theorem}{th\'eor\`eme}{th\'eor\`emes}% \crefname@preamble{lemma}{lemme}{lemmes}% \crefname@preamble{corollary}{corollaire}{corollaires}% \crefname@preamble{proposition}{proposition}{propositions}% \crefname@preamble{definition}{d\'efinition}{d\'efinitions}% \crefname@preamble{result}{r\'esultat}{r\'esultats}% \crefname@preamble{example}{exemple}{exemples}% \crefname@preamble{remark}{remarque}{remarques}% \crefname@preamble{note}{commentaire}{commentaires}% \crefname@preamble{algorithm}{algorithme}{algorithmes}% \crefname@preamble{listing}{liste}{listes}% \crefname@preamble{line}{ligne}{lignes}% \fi% \def\cref@language{french}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{french}{% \PackageInfo{cleveref}{loaded `french' language definitions} \renewcommand{\crefrangeconjunction}{ \`a\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ et\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ et\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ et\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ et\nobreakspace}% % \Crefname{equation}{{\'E}quation}{{\'E}quations}% \Crefname{figure}{Figure}{Figures}% \Crefname{subfigure}{Figure}{Figures}% \Crefname{table}{Tableau}{Tableaux}% \Crefname{subtable}{Tableau}{Tableaux}% \Crefname{page}{Page}{Pages}% \Crefname{part}{Partie}{Parties}% \Crefname{chapter}{Chapitre}{Chapitres}% \Crefname{section}{Section}{Sections}% \Crefname{subsection}{Section}{Sections}% \Crefname{subsubsection}{Section}{Sections}% \Crefname{appendix}{Annexe}{Annexes}% \Crefname{subappendix}{Annexe}{Annexes}% \Crefname{subsubappendix}{Annexe}{Annexes}% \Crefname{subsubsubappendix}{Annexe}{Annexes}% \Crefname{enumi}{Point}{Points}% \Crefname{enumii}{Point}{Points}% \Crefname{enumiii}{Point}{Points}% \Crefname{enumiv}{Point}{Points}% \Crefname{enumv}{Point}{Points}% \Crefname{footnote}{Note}{Notes}% \Crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \Crefname{lemma}{Lemme}{Lemmes}% \Crefname{corollary}{Corollaire}{Corollaires}% \Crefname{proposition}{Proposition}{Propositions}% \Crefname{definition}{D\'efinition}{D\'efinitions}% \Crefname{result}{R\'esultat}{R\'esultats}% \Crefname{example}{Exemple}{Exemples}% \Crefname{remark}{Remarque}{Remarques}% \Crefname{note}{Commentaire}{Commentaires}% \Crefname{algorithm}{Algorithme}{Algorithmes}% \Crefname{listing}{Liste}{Listes}% \Crefname{line}{Ligne}{Lignes}% % \if@cref@capitalise% capitalise set \crefname{equation}{{\'E}quation}{{\'E}quations}% \crefname{figure}{Figure}{Figures}% \crefname{subfigure}{Figure}{Figures}% \crefname{table}{Tableau}{Tableaux}% \crefname{subtable}{Tableau}{Tableaux}% \crefname{page}{Page}{Pages}% \crefname{part}{Partie}{Parties}% \crefname{chapter}{Chapitre}{Chapitres}% \crefname{section}{Section}{Sections}% \crefname{subsection}{Section}{Sections}% \crefname{subsubsection}{Section}{Sections}% \crefname{appendix}{Annexe}{Annexes}% \crefname{subappendix}{Annexe}{Annexes}% \crefname{subsubappendix}{Annexe}{Annexes}% \crefname{subsubsubappendix}{Annexe}{Annexes}% \crefname{enumi}{Point}{Points}% \crefname{enumii}{Point}{Points}% \crefname{enumiii}{Point}{Points}% \crefname{enumiv}{Point}{Points}% \crefname{enumv}{Point}{Points}% \crefname{footnote}{Note}{Notes}% \crefname{theorem}{Th\'eor\`eme}{Th\'eor\`emes}% \crefname{lemma}{Lemme}{Lemmes}% \crefname{corollary}{Corollaire}{Corollaires}% \crefname{proposition}{Proposition}{Propositions}% \crefname{definition}{D\'efinition}{D\'efinitions}% \crefname{result}{R\'esultat}{R\'esultats}% \crefname{example}{Exemple}{Exemples}% \crefname{remark}{Remarque}{Remarques}% \crefname{note}{Commentaire}{Commentaires}% \crefname{algorithm}{Algorithme}{Algorithmes}% \crefname{listing}{Liste}{Listes}% \crefname{line}{Ligne}{Lignes}% % \else% capitalise unset \crefname{equation}{{\'e}quation}{{\'e}quations}% \crefname{figure}{figure}{figures}% \crefname{subfigure}{figure}{figures}% \crefname{table}{tableau}{tableaux}% \crefname{subtable}{tableau}{tableaux}% \crefname{page}{page}{pages}% \crefname{part}{partie}{parties}% \crefname{chapter}{chapitre}{chapitres}% \crefname{section}{section}{sections}% \crefname{subsection}{section}{sections}% \crefname{subsubsection}{section}{sections}% \crefname{appendix}{annexe}{annexes}% \crefname{subappendix}{annexe}{annexes}% \crefname{subsubappendix}{annexe}{annexes}% \crefname{subsubsubappendix}{annexe}{annexes}% \crefname{enumi}{point}{points}% \crefname{enumii}{point}{points}% \crefname{enumiii}{point}{points}% \crefname{enumiv}{point}{points}% \crefname{enumv}{point}{points}% \crefname{footnote}{note}{notes}% \crefname{theorem}{th\'eor\`eme}{th\'eor\`emes}% \crefname{lemma}{lemme}{lemmes}% \crefname{corollary}{corollaire}{corollaires}% \crefname{proposition}{proposition}{propositions}% \crefname{definition}{d\'efinition}{d\'efinitions}% \crefname{result}{r\'esultat}{r\'esultats}% \crefname{example}{exemple}{exemples}% \crefname{remark}{remarque}{remarques}% \crefname{note}{commentaire}{commentaires}% \crefname{algorithm}{algorithme}{algorithmes}% \crefname{listing}{liste}{listes}% \crefname{line}{ligne}{lignes}% \fi}% end \cref@loadlanguagedefs \DeclareOption{spanish}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ a\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ y\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ y\nobreakspace}% \def\crefpairgroupconjunction@preamble{ y\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ y\nobreakspace}% % \Crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}% \Crefname@preamble{figure}{Figura}{Figuras}% \Crefname@preamble{table}{Cuadro}{Cuadros}% \Crefname@preamble{page}{P\'agina}{P\'aginas}% \Crefname@preamble{part}{Parte}{Partes}% \Crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}% \Crefname@preamble{section}{Apartado}{Apartados}% \Crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}% \Crefname@preamble{enumi}{Punto}{Puntos}% \Crefname@preamble{footnote}{Nota}{Notas}% \Crefname@preamble{theorem}{Teorema}{Teoremas}% \Crefname@preamble{lemma}{Lema}{Lemas}% \Crefname@preamble{corollary}{Corolario}{Corolarios}% \Crefname@preamble{proposition}{Proposici\'on}{Proposiciones}% \Crefname@preamble{definition}{Definici\'on}{Definiciones}% \Crefname@preamble{result}{Resultado}{Resultados}% \Crefname@preamble{example}{Ejemplo}{Ejemplos}% \Crefname@preamble{remark}{Observaci\'on}{Observaciones}% \Crefname@preamble{note}{Nota}{Notas}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmos}% \Crefname@preamble{listing}{Listado}{Listados}% \Crefname@preamble{line}{L\'inea}{L\'ineas}% % \if@cref@capitalise% capitalise set \crefname@preamble{equation}{Ecuaci\'on}{Ecuaciones}% \crefname@preamble{figure}{Figura}{Figuras}% \crefname@preamble{table}{Cuadro}{Cuadros}% \crefname@preamble{page}{P\'agina}{P\'aginas}% \crefname@preamble{part}{Parte}{Partes}% \crefname@preamble{chapter}{Cap\'itulo}{Cap\'itulos}% \crefname@preamble{section}{Apartado}{Apartados}% \crefname@preamble{appendix}{Ap\'endice}{Ap\'endices}% \crefname@preamble{enumi}{Punto}{Puntos}% \crefname@preamble{footnote}{Nota}{Notas}% \crefname@preamble{theorem}{Teorema}{Teoremas}% \crefname@preamble{lemma}{Lema}{Lemas}% \crefname@preamble{corollary}{Corolario}{Corolarios}% \crefname@preamble{proposition}{Proposici\'on}{Proposiciones}% \crefname@preamble{definition}{Definici\'on}{Definiciones}% \crefname@preamble{result}{Resultado}{Resultados}% \crefname@preamble{example}{Ejemplo}{Ejemplos}% \crefname@preamble{remark}{Observaci\'on}{Observaciones}% \crefname@preamble{note}{Nota}{Notas}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmos}% \crefname@preamble{listing}{Listado}{Listados}% \crefname@preamble{line}{L\'inea}{L\'ineas}% % \else% capitalise unset \crefname@preamble{equation}{ecuaci\'on}{ecuaciones}% \crefname@preamble{figure}{figura}{figuras}% \crefname@preamble{table}{cuadro}{cuadros}% \crefname@preamble{page}{p\'agina}{p\'aginas}% \crefname@preamble{part}{parte}{partes}% \crefname@preamble{chapter}{cap\'itulo}{cap\'itulos}% \crefname@preamble{section}{apartado}{apartados}% \crefname@preamble{appendix}{ap\'endice}{ap\'endices}% \crefname@preamble{enumi}{punto}{puntos}% \crefname@preamble{footnote}{nota}{notas}% \crefname@preamble{theorem}{teorema}{teoremas}% \crefname@preamble{lemma}{lema}{lemas}% \crefname@preamble{corollary}{corolario}{corolarios}% \crefname@preamble{proposition}{proposici\'on}{proposiciones}% \crefname@preamble{definition}{definici\'on}{definiciones}% \crefname@preamble{result}{resultado}{resultados}% \crefname@preamble{example}{ejemplo}{ejemplos}% \crefname@preamble{remark}{observaci\'on}{observaciones}% \crefname@preamble{note}{nota}{notas}% \crefname@preamble{algorithm}{algoritmo}{algoritmos}% \crefname@preamble{listing}{listado}{listados}% \crefname@preamble{line}{l\'inea}{l\'ineas}% \fi% \def\cref@language{spanish}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{spanish}{% \PackageInfo{cleveref}{loaded `spanish' language definitions} \renewcommand{\crefrangeconjunction}{ a\nobreakspace}% \renewcommand{\crefrangepreconjunction}{}% \renewcommand{\crefrangepostconjunction}{}% \renewcommand{\crefpairconjunction}{ y\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ y\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ y\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ y\nobreakspace}% % \Crefname{equation}{Ecuaci\'on}{Ecuaciones}% \Crefname{figure}{Figura}{Figuras}% \Crefname{subfigure}{Figura}{Figuras}% \Crefname{table}{Cuadro}{Cuadros}% \Crefname{subtable}{Cuadro}{Cuadros}% \Crefname{page}{P\'agina}{P\'aginas}% \Crefname{part}{Parte}{Partes}% \Crefname{chapter}{Cap\'itulo}{Cap\'itulos}% \Crefname{section}{Apartado}{Apartados}% \Crefname{subsection}{Apartado}{Apartados}% \Crefname{subsubsection}{Apartado}{Apartados}% \Crefname{appendix}{Ap\'endice}{Ap\'endices}% \Crefname{subappendix}{Ap\'endice}{Ap\'endices}% \Crefname{subsubappendix}{Ap\'endice}{Ap\'endices}% \Crefname{subsubsubappendix}{Ap\'endice}{Ap\'endices}% \Crefname{enumi}{Punto}{Puntos}% \Crefname{enumii}{Punto}{Puntos}% \Crefname{enumiii}{Punto}{Puntos}% \Crefname{enumiv}{Punto}{Puntos}% \Crefname{enumv}{Punto}{Puntos}% \Crefname{footnote}{Nota}{Notas}% \Crefname{theorem}{Teorema}{Teoremas}% \Crefname{lemma}{Lema}{Lemas}% \Crefname{corollary}{Corolario}{Corolarios}% \Crefname{proposition}{Proposici\'on}{Proposiciones}% \Crefname{definition}{Definici\'on}{Definiciones}% \Crefname{result}{Resultado}{Resultados}% \Crefname{example}{Ejemplo}{Ejemplos}% \Crefname{remark}{Observaci\'on}{Observaci\'on}% \Crefname{note}{Nota}{Notas}% \Crefname{algorithm}{Algoritmo}{Algoritmos}% \Crefname{listing}{Listado}{Listados}% \Crefname{line}{L\'inea}{L\'ineas}% % \if@cref@capitalise% capitalise set \crefname{equation}{Ecuaci\'on}{Ecuaciones}% \crefname{figure}{Figura}{Figuras}% \crefname{subfigure}{Figura}{Figuras}% \crefname{table}{Cuadro}{Cuadros}% \crefname{subtable}{Cuadro}{Cuadros}% \crefname{page}{P\'agina}{P\'aginas}% \crefname{part}{Parte}{Partes}% \crefname{chapter}{Cap\'itulo}{Cap\'itulos}% \crefname{section}{Apartado}{Apartados}% \crefname{subsection}{Apartado}{Apartados}% \crefname{subsubsection}{Apartado}{Apartados}% \crefname{appendix}{Ap\'endice}{Ap\'endices}% \crefname{subappendix}{Ap\'endice}{Ap\'endices}% \crefname{subsubappendix}{Ap\'endice}{Ap\'endices}% \crefname{subsubsubappendix}{Ap\'endice}{Ap\'endices}% \crefname{enumi}{Punto}{Puntos}% \crefname{enumii}{Punto}{Puntos}% \crefname{enumiii}{Punto}{Puntos}% \crefname{enumiv}{Punto}{Puntos}% \crefname{enumv}{Punto}{Puntos}% \crefname{footnote}{Nota}{Notas}% \crefname{theorem}{Teorema}{Teoremas}% \crefname{lemma}{Lema}{Lemas}% \crefname{corollary}{Corolario}{Corolarios}% \crefname{proposition}{Proposici\'on}{Proposiciones}% \crefname{definition}{Definici\'on}{Definiciones}% \crefname{result}{Resultado}{Resultados}% \crefname{example}{Ejemplo}{Ejemplos}% \crefname{remark}{Observaci\'on}{Observaci\'ones}% \crefname{note}{Nota}{Notas}% \crefname{algorithm}{Algoritmo}{Algoritmos}% \crefname{listing}{Listado}{Listados}% \crefname{line}{L\'inea}{L\'ineas}% % \else% capitalise unset \crefname{equation}{ecuaci\'on}{ecuaciones}% \crefname{figure}{figura}{figuras}% \crefname{subfigure}{figura}{figuras}% \crefname{table}{cuadro}{cuadros}% \crefname{subtable}{cuadro}{cuadros}% \crefname{page}{p\'agina}{p\'aginas}% \crefname{part}{parte}{partes}% \crefname{chapter}{cap\'itulo}{cap\'itulos}% \crefname{section}{apartado}{apartados}% \crefname{subsection}{apartado}{apartados}% \crefname{subsubsection}{apartado}{apartados}% \crefname{appendix}{ap\'endice}{ap\'endices}% \crefname{subappendix}{ap\'endice}{ap\'endices}% \crefname{subsubappendix}{ap\'endice}{ap\'endices}% \crefname{subsubsubappendix}{ap\'endice}{ap\'endices}% \crefname{enumi}{punto}{puntos}% \crefname{enumii}{punto}{puntos}% \crefname{enumiii}{punto}{puntos}% \crefname{enumiv}{punto}{puntos}% \crefname{enumv}{punto}{puntos}% \crefname{footnote}{nota}{notas}% \crefname{theorem}{teorema}{teoremas}% \crefname{lemma}{lema}{lemas}% \crefname{corollary}{corolario}{corolarios}% \crefname{proposition}{proposici\'on}{proposiciones}% \crefname{definition}{definici\'on}{definiciones}% \crefname{result}{resultado}{resultados}% \crefname{example}{ejemplo}{ejemplos}% \crefname{remark}{observaci\'on}{observaci\'ones}% \crefname{note}{nota}{notas}% \crefname{algorithm}{algoritmo}{algoritmos}% \crefname{listing}{listado}{listados}% \crefname{line}{l\'inea}{l\'ineas}% \fi}% end \cref@loadlanguagedefs \DeclareOption{italian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ a\nobreakspace}% \def\crefrangepreconjunction@preamble{da\nobreakspace}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ e\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ e\nobreakspace}% \def\crefpairgroupconjunction@preamble{ e\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ e\nobreakspace}% % \Crefname@preamble{equation}{Equazione}{Equazioni}% \Crefname@preamble{figure}{Figura}{Figure}% \Crefname@preamble{table}{Tabella}{Tabelle}% \Crefname@preamble{page}{Pagina}{Pagine}% \Crefname@preamble{part}{Parte}{Parti}% \Crefname@preamble{chapter}{Capitolo}{Capitoli}% \Crefname@preamble{section}{Sezione}{Sezioni}% \Crefname@preamble{appendix}{Appendice}{Appendici}% \Crefname@preamble{enumi}{Voce}{Voci}% \Crefname@preamble{footnote}{Nota}{Note}% \Crefname@preamble{theorem}{Teorema}{Teoremi}% \Crefname@preamble{lemma}{Lemma}{Lemmi}% \Crefname@preamble{corollary}{Corollario}{Corollari}% \Crefname@preamble{proposition}{Proposizione}{Proposizioni}% \Crefname@preamble{definition}{Definizioni}{Definizioni}% \Crefname@preamble{result}{Risultato}{Risultati}% \Crefname@preamble{example}{esempio}{esempi}% \Crefname@preamble{remark}{Osservazione}{Osservazioni}% \Crefname@preamble{note}{Nota}{Note}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmi}% \Crefname@preamble{listing}{Elenco}{Elenchi}% \Crefname@preamble{line}{Linea}{Linee}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname@preamble{equation}{Eq.}{Eq.}% \crefname@preamble{figure}{Fig.}{Fig.}% \else% \crefname@preamble{equation}{Equazione}{Equazioni}% \crefname@preamble{figure}{Figura}{Figure}% \fi% \crefname@preamble{table}{Tabella}{Tabelle}% \crefname@preamble{page}{Pagina}{Pagine}% \crefname@preamble{part}{Parte}{Parti}% \crefname@preamble{chapter}{Capitolo}{Capitoli}% \crefname@preamble{section}{Sezione}{Sezioni}% \crefname@preamble{appendix}{Appendice}{Appendici}% \crefname@preamble{enumi}{Voce}{Voci}% \crefname@preamble{footnote}{Nota}{Note}% \crefname@preamble{theorem}{Teorema}{Teoremi}% \crefname@preamble{lemma}{Lemma}{Lemmi}% \crefname@preamble{corollary}{Corollario}{Corollari}% \crefname@preamble{proposition}{Proposizione}{Proposizioni}% \crefname@preamble{definition}{Definizione}{Definizioni}% \crefname@preamble{result}{Risultato}{Risultati}% \crefname@preamble{example}{Esempio}{Esempi}% \crefname@preamble{remark}{Osservazione}{Osservazioni}% \crefname@preamble{note}{Nota}{Note}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmi}% \crefname@preamble{listing}{Elenco}{Elenchi}% \crefname@preamble{line}{Linea}{Linee}% % \else% capitalise unset \if@cref@abbrev% \crefname@preamble{equation}{eq.}{eq.}% \crefname@preamble{figure}{fig.}{fig.}% \else% \crefname@preamble{equation}{equazione}{equazioni}% \crefname@preamble{figure}{figura}{figure}% \fi% \crefname@preamble{table}{tabella}{tabelle}% \crefname@preamble{page}{pagina}{pagine}% \crefname@preamble{part}{parte}{parti}% \crefname@preamble{chapter}{capitolo}{capitoli}% \crefname@preamble{section}{sezione}{sezioni}% \crefname@preamble{appendix}{appendice}{appendici}% \crefname@preamble{enumi}{voce}{voci}% \crefname@preamble{footnote}{nota}{note}% \crefname@preamble{theorem}{teorema}{teoremi}% \crefname@preamble{lemma}{lemma}{lemmi}% \crefname@preamble{corollary}{corollario}{corollari}% \crefname@preamble{proposition}{proposizione}{proposizioni}% \crefname@preamble{definition}{definizione}{definizioni}% \crefname@preamble{result}{risultato}{risultati}% \crefname@preamble{example}{esempio}{esempi}% \crefname@preamble{remark}{osservazione}{osservazioni}% \crefname@preamble{note}{nota}{note}% \crefname@preamble{algorithm}{algoritmo}{algoritmi}% \crefname@preamble{listing}{elenco}{elenchi}% \crefname@preamble{line}{linea}{linee}% \fi% \def\cref@language{italian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{italian}{% \PackageInfo{cleveref}{loaded `italian' language definitions} \renewcommand{\crefrangeconjunction}{ a\nobreakspace}% \renewcommand\crefrangepreconjunction{da\nobreakspace}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ e\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ e\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ e\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ e\nobreakspace}% % \Crefname{equation}{Equazione}{Equazioni}% \Crefname{figure}{Figura}{Figure}% \Crefname{subfigure}{Figura}{Figure}% \Crefname{table}{Tabella}{Tabelle}% \Crefname{subtable}{Tabella}{Tabelle}% \Crefname{page}{Pagina}{Pagine}% \Crefname{part}{Parte}{Parti}% \Crefname{chapter}{Capitolo}{Capitoli}% \Crefname{section}{Sezione}{Sezioni}% \Crefname{subsection}{Sezione}{Sezioni}% \Crefname{subsubsection}{Sezione}{Sezioni}% \Crefname{appendix}{Appendice}{Appendici}% \Crefname{subappendix}{Appendice}{Appendici}% \Crefname{subsubappendix}{Appendice}{Appendici}% \Crefname{subsubsubappendix}{Appendice}{Appendici}% \Crefname{enumi}{Voce}{Voci}% \Crefname{enumii}{Voce}{Voci}% \Crefname{enumiii}{Voce}{Voci}% \Crefname{enumiv}{Voce}{Voci}% \Crefname{enumv}{Voce}{Voci}% \Crefname{footnote}{Nota}{Note}% \Crefname{theorem}{Teorema}{Teoremi}% \Crefname{lemma}{Lemma}{Lemmi}% \Crefname{corollary}{Corollario}{Corollari}% \Crefname{proposition}{Proposizione}{Proposizioni}% \Crefname{definition}{Definizione}{Definizione}% \Crefname{result}{Risultato}{Risultati}% \Crefname{example}{esempio}{esempi}% \Crefname{remark}{Osservazione}{Osservazioni}% \Crefname{note}{Nota}{Note}% \Crefname{algorithm}{Algoritmo}{Algoritmi}% \Crefname{listing}{Elenco}{Elenchi}% \Crefname{line}{Linea}{Linee}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% \crefname{equation}{Eq.}{Eq.}% \crefname{figure}{Fig.}{Fig.}% \crefname{subfigure}{Fig.}{Fig.}% \else% \crefname{equation}{Equazione}{Equazioni}% \crefname{figure}{Figura}{Figure}% \crefname{figure}{Figura}{Figure}% \fi% \crefname{table}{Tabella}{Tabelle}% \crefname{page}{Pagina}{Pagine}% \crefname{subtable}{Tabella}{Tabelle}% \crefname{part}{Parte}{Parti}% \crefname{chapter}{Capitolo}{Capitoli}% \crefname{section}{Sezione}{Sezioni}% \crefname{subsection}{Sezione}{Sezioni}% \crefname{subsubsection}{Sezione}{Sezioni}% \crefname{appendix}{Appendice}{Appendici}% \crefname{subappendix}{Appendice}{Appendici}% \crefname{subsubappendix}{Appendice}{Appendici}% \crefname{subsubsubappendix}{Appendice}{Appendici}% \crefname{enumi}{Voce}{Voci}% \crefname{enumii}{Voce}{Voci}% \crefname{enumiii}{Voce}{Voci}% \crefname{enumiv}{Voce}{Voci}% \crefname{enumv}{Voce}{Voci}% \crefname{footnote}{Nota}{Note}% \crefname{theorem}{Teorema}{Teoremi}% \crefname{lemma}{Lemma}{Lemmi}% \crefname{corollary}{Corollario}{Corollari}% \crefname{proposition}{Proposizione}{Proposizioni}% \crefname{definition}{Definizione}{Definizione}% \crefname{result}{Risultato}{Risultati}% \crefname{example}{Esempio}{Esempi}% \crefname{remark}{Osservazione}{Osservazioni}% \crefname{note}{Nota}{Note}% \crefname{algorithm}{Algoritmo}{Algoritmi}% \crefname{listing}{Elenco}{Elenchi}% \crefname{line}{Linea}{Linee}% % \else% capitalise unset \if@cref@abbrev% \crefname{equation}{eq.}{eq.}% \crefname{figure}{fig.}{fig.}% \crefname{subfigure}{fig.}{fig.}% \else% \crefname{equation}{equazione}{equazioni}% \crefname{figure}{figura}{figure}% \crefname{figure}{figura}{figure}% \fi% \crefname{table}{tabella}{tabelle}% \crefname{page}{pagina}{pagine}% \crefname{subtable}{tabella}{tabelle}% \crefname{part}{parte}{parti}% \crefname{chapter}{capitolo}{capitoli}% \crefname{section}{sezione}{sezioni}% \crefname{subsection}{sezione}{sezioni}% \crefname{subsubsection}{sezione}{sezioni}% \crefname{appendix}{appendice}{appendici}% \crefname{subappendix}{appendice}{appendici}% \crefname{subsubappendix}{appendice}{appendici}% \crefname{subsubsubappendix}{appendice}{appendici}% \crefname{enumi}{voce}{voci}% \crefname{enumii}{voce}{voci}% \crefname{enumiii}{voce}{voci}% \crefname{enumiv}{voce}{voci}% \crefname{enumv}{voce}{voci}% \crefname{footnote}{nota}{note}% \crefname{theorem}{teorema}{teoremi}% \crefname{lemma}{lemma}{lemmi}% \crefname{corollary}{corollario}{corollari}% \crefname{proposition}{proposizione}{proposizioni}% \crefname{definition}{definizione}{definizione}% \crefname{result}{risultato}{risultati}% \crefname{example}{esempio}{esempi}% \crefname{remark}{osservazione}{osservazioni}% \crefname{note}{nota}{note}% \crefname{algorithm}{algoritmo}{algoritmi}% \crefname{listing}{elenco}{elenchi}% \crefname{line}{linea}{linee}% \fi}% end \cref@loadlanguagedefs \DeclareOption{russian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{--}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ \cyri\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ \cyri\nobreakspace}% \def\crefpairgroupconjunction@preamble{ \cyri\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble% {, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}% % \Crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \Crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \Crefname@preamble{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname@preamble{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \Crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \Crefname@preamble{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \Crefname@preamble{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \Crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \Crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \Crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \Crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \Crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \Crefname@preamble{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname@preamble{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \Crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \else% \crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \fi% \crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \crefname@preamble{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname@preamble{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname@preamble{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \crefname@preamble{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname@preamble{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname@preamble{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname@preamble{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname@preamble{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname@preamble{section}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname@preamble{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname@preamble{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname@preamble{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd.}% \crefname@preamble{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% \crefname@preamble{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrm.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname@preamble{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname@preamble{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname@preamble{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyrery}% \crefname@preamble{section}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname@preamble{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname@preamble{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyrery}% \crefname@preamble{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname@preamble{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname@preamble{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname@preamble{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname@preamble{page}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}% \crefname@preamble{part}% {\cyrch\cyra\cyrs\cyrt\cyrsftsn}% {\cyrch\cyra\cyrs\cyrt\cyri}% \fi% \def\cref@language{russian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{russian}{% \PackageInfo{cleveref}{loaded `russian' language definitions} \renewcommand{\crefrangeconjunction}{--}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ \cyri\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}% {, \cyra\ \cyrt\cyra\cyrk\cyrzh\cyre\nobreakspace}% % \Crefname{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \Crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \Crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \Crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% \Crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \Crefname{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{subsubsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \Crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \Crefname{subappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{subsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{subsubsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya} \Crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \Crefname{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \Crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \Crefname{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \Crefname{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \Crefname{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \Crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \Crefname{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \Crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \Crefname{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \Crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \Crefname{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{subfigure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiv}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumv}% {\CYRP.}% {\CYRP.\cyrp.}% \else% abbrev unset \crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyrery}% \fi% \crefname{page}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra}% {\CYRS\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyrery}% \crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyrsftsn}% {\CYRCH\cyra\cyrs\cyrt\cyri}% \crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyrery}% \crefname{section}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsubsection}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl}% {\CYRR\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{appendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubsubappendix}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{footnote}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRS\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyrery}% \crefname{corollary}% {\CYRV\cyrery\cyrv\cyro\cyrd}% {\CYRV\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname{proposition}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\CYRU\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname{definition}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\CYRO\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname{example}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\CYRP\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname{note}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname{listing}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname{section}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsection}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{subsubsection}% {\cyrr\cyra\cyrz\cyrd.}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl.}% \crefname{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{subsubsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh.}% \crefname{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% {\cyrs\cyrn\cyro\cyrs\cyrk.}% \crefname{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{subfigure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd.}% \crefname{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd.}% \crefname{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn.}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% \crefname{example}% {\cyrp\cyrr\cyri\cyrm.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr.}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch.}% \crefname{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk.}% \crefname{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyrery}% \crefname{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyra}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrery}% \crefname{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumiv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{enumv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyrery}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyrery}% \crefname{section}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsection}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{subsubsection}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl}% {\cyrr\cyra\cyrz\cyrd\cyre\cyrl\cyrery}% \crefname{appendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{subsubsubappendix}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrl\cyro\cyrzh\cyre\cyrn\cyri\cyrya}% \crefname{footnote}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrs\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyrery}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyrery}% \crefname{corollary}% {\cyrv\cyrery\cyrv\cyro\cyrd}% {\cyrv\cyrery\cyrv\cyro\cyrd\cyrery}% \crefname{proposition}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyre}% {\cyru\cyrt\cyrv\cyre\cyrr\cyrzh\cyrd\cyre\cyrn\cyri\cyrya}% \crefname{definition}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyre}% {\cyro\cyrp\cyrr\cyre\cyrd\cyre\cyrl\cyre\cyrn\cyri\cyrya}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyrery}% \crefname{example}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrr\cyrery}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyre}% {\cyrp\cyrr\cyri\cyrm\cyre\cyrch\cyra\cyrn\cyri\cyrya}% \crefname{note}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyre\cyrt\cyrk\cyri}% \crefname{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyrery}% \crefname{listing}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyri\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname{page}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyre}% {\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyra\cyrh}% \crefname{part}% {\cyrch\cyra\cyrs\cyrt\cyrsftsn}% {\cyrch\cyra\cyrs\cyrt\cyri}% \fi}% end \cref@loadlanguagedefs \DeclareOption{ukrainian}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{--}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ \cyrii\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ \cyrii\nobreakspace}% \def\crefpairgroupconjunction@preamble{ \cyrt\cyra\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble% {, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}% % \Crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \Crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \Crefname@preamble{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname@preamble{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname@preamble{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \Crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \Crefname@preamble{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \Crefname@preamble{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \Crefname@preamble{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \Crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \Crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \Crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \Crefname@preamble{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname@preamble{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \Crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \else% \crefname@preamble{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname@preamble{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname@preamble{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \fi% \crefname@preamble{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \crefname@preamble{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname@preamble{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname@preamble{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname@preamble{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \crefname@preamble{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname@preamble{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname@preamble{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname@preamble{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname@preamble{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname@preamble{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \crefname@preamble{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname@preamble{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname@preamble{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname@preamble{section}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname@preamble{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname@preamble{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname@preamble{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}% \crefname@preamble{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% \crefname@preamble{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrk\cyrl.}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname@preamble{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname@preamble{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname@preamble{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname@preamble{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname@preamble{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname@preamble{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyri}% \crefname@preamble{section}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname@preamble{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname@preamble{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname@preamble{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname@preamble{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyri}% \crefname@preamble{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname@preamble{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname@preamble{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname@preamble{example}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname@preamble{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{note}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname@preamble{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname@preamble{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname@preamble{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname@preamble{page}% {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}% {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}% \crefname@preamble{part}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}% \fi% \def\cref@language{ukrainian}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{ukrainian}{% \PackageInfo{cleveref}{loaded `ukrainian' language definitions} \renewcommand{\crefrangeconjunction}{--}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ \cyrii\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ \cyrii\nobreakspace}% \renewcommand{\crefpairgroupconjunction}% { \cyrt\cyra\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}% {, \cyra\ \cyrt\cyra\cyrk\cyro\cyrzh\nobreakspace}% % \Crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \Crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \Crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \Crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \Crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \Crefname{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{subsubsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \Crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{subsubsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \Crefname{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \Crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \Crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \Crefname{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \Crefname{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \Crefname{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \Crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \Crefname{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \Crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \Crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \Crefname{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \Crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \Crefname{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \Crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \if@cref@capitalise% capitalise set \if@cref@abbrev% abbrev set \crefname{equation}% {\CYRF-\cyrl.}% {\CYRF-\cyrl.}% \crefname{figure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{subfigure}% {\CYRR\cyri\cyrs.}% {\CYRR\cyri\cyrs.}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl.}% {\CYRT\cyra\cyrb\cyrl.}% \crefname{enumi}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiii}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumiv}% {\CYRP.}% {\CYRP.\cyrp.}% \crefname{enumv}% {\CYRP.}% {\CYRP.\cyrp.}% \else% abbrev unset \crefname{equation}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\CYRF\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname{figure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\CYRR\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\CYRR\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{subtable}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\CYRT\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{enumi}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiii}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumv}% {\CYRP\cyru\cyrn\cyrk\cyrt}% {\CYRP\cyru\cyrn\cyrk\cyrt\cyri}% \fi% \crefname{chapter}% {\CYRG\cyrl\cyra\cyrv\cyra}% {\CYRG\cyrl\cyra\cyrv\cyri}% \crefname{section}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsubsection}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl}% {\CYRR\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{appendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubsubappendix}% {\CYRD\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\CYRD\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{footnote}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\CYRV\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\CYRT\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname{lemma}% {\CYRL\cyre\cyrm\cyrm\cyra}% {\CYRL\cyre\cyrm\cyrm\cyri}% \crefname{corollary}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\CYRV\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname{proposition}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\CYRT\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname{definition}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\CYRV\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname{result}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\CYRR\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname{example}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\CYRP\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname{remark}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRP\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{note}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\CYRZ\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{algorithm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\CYRA\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname{listing}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\CYRL\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyra}% {\CYRS\cyrt\cyrr\cyro\cyrk\cyri}% \crefname{page}% {\CYRS\cyrt\cyro\cyrr\cyri\cyrn\cyrk\cyra}% {\CYRS\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyri}% \crefname{part}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\CYRCH\cyra\cyrs\cyrt\cyri\cyrn\cyri}% % \else% capitalise unset \if@cref@abbrev% abbrev set \crefname{equation}% {\cyrf-\cyrl.}% {\cyrf-\cyrl.}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv.}% {\cyrg\cyrl\cyra\cyrv.}% \crefname{section}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsection}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{subsubsection}% {\cyrr\cyro\cyrz\cyrd.}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl.}% \crefname{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{subsubsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt.}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk.}% \crefname{enumi}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiii}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumiv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{enumv}% {\cyrp.}% {\cyrp.\cyrp.}% \crefname{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk.}% \crefname{figure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{subfigure}% {\cyrr\cyri\cyrs.}% {\cyrr\cyri\cyrs.}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl.}% {\cyrt\cyra\cyrb\cyrl.}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm.}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm.}% {\cyrl\cyre\cyrm\cyrm.}% \crefname{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv.}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk.}% \crefname{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn.}% \crefname{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn.}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt.}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt.}% \crefname{example}% {\cyrp\cyrr\cyri\cyrk\cyrl.}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd.}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt.}% \crefname{note}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% {\cyrz\cyra\cyrm\cyrii\cyrt.}% \crefname{algorithm}% {\cyra\cyrl\cyrg.}% {\cyra\cyrl\cyrg.}% \crefname{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn.}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg.}% \crefname{line}% {\cyrs\cyrt\cyrr\cyrk.}% {\cyrs\cyrt\cyrr\cyrk.}% \else% abbrev unset \crefname{equation}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyra}% {\cyrf\cyro\cyrr\cyrm\cyru\cyrl\cyri}% \crefname{figure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{subfigure}% {\cyrr\cyri\cyrs\cyru\cyrn\cyro\cyrk}% {\cyrr\cyri\cyrs\cyru\cyrn\cyrk\cyri}% \crefname{table}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{subtable}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrya}% {\cyrt\cyra\cyrb\cyrl\cyri\cyrc\cyrii}% \crefname{enumi}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiii}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumiv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{enumv}% {\cyrp\cyru\cyrn\cyrk\cyrt}% {\cyrp\cyru\cyrn\cyrk\cyrt\cyri}% \crefname{chapter}% {\cyrg\cyrl\cyra\cyrv\cyra}% {\cyrg\cyrl\cyra\cyrv\cyri}% \crefname{section}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsection}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{subsubsection}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl}% {\cyrr\cyro\cyrz\cyrd\cyrii\cyrl\cyri}% \crefname{appendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{subsubsubappendix}% {\cyrd\cyro\cyrd\cyra\cyrt\cyro\cyrk}% {\cyrd\cyro\cyrd\cyra\cyrt\cyrk\cyri}% \crefname{footnote}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyra}% {\cyrv\cyri\cyrn\cyro\cyrs\cyrk\cyri}% \crefname{theorem}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyra}% {\cyrt\cyre\cyro\cyrr\cyre\cyrm\cyri}% \crefname{lemma}% {\cyrl\cyre\cyrm\cyrm\cyra}% {\cyrl\cyre\cyrm\cyrm\cyri}% \crefname{corollary}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyro\cyrk}% {\cyrv\cyri\cyrs\cyrn\cyro\cyrv\cyrk\cyri}% \crefname{proposition}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% {\cyrt\cyrv\cyre\cyrr\cyrd\cyrzh\cyre\cyrn\cyrn\cyrya}% \crefname{definition}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% {\cyrv\cyri\cyrz\cyrn\cyra\cyrch\cyre\cyrn\cyrn\cyrya}% \crefname{result}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt}% {\cyrr\cyre\cyrz\cyru\cyrl\cyrsftsn\cyrt\cyra\cyrt\cyri}% \crefname{example}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd}% {\cyrp\cyrr\cyri\cyrk\cyrl\cyra\cyrd\cyri}% \crefname{remark}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrp\cyrr\cyri\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{note}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyra}% {\cyrz\cyra\cyrm\cyrii\cyrt\cyrk\cyri}% \crefname{algorithm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm}% {\cyra\cyrl\cyrg\cyro\cyrr\cyri\cyrt\cyrm\cyri}% \crefname{listing}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg}% {\cyrl\cyrii\cyrs\cyrt\cyri\cyrn\cyrg\cyri}% \crefname{line}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyra}% {\cyrs\cyrt\cyrr\cyro\cyrk\cyri}% \fi% \crefname{page}% {\cyrs\cyrt\cyro\cyrr\cyri\cyrn\cyrc\cyrii}% {\cyrs\cyrt\cyro\cyrr\cyrii\cyrn\cyrk\cyra\cyrh}% \crefname{part}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyra}% {\cyrch\cyra\cyrs\cyrt\cyri\cyrn\cyri}% \fi}% end \cref@loadlanguagedefs \DeclareOption{norsk}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ til\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ og\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ og\nobreakspace}% \def\crefpairgroupconjunction@preamble{ og\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ og\nobreakspace}% % \Crefname@preamble{equation}{Likning}{Likningene}% \Crefname@preamble{figure}{Figur}{Figurene}% \Crefname@preamble{table}{Tabell}{Tabellene}% \Crefname@preamble{page}{Side}{Siden}% \Crefname@preamble{part}{Del}{Delene}% \Crefname@preamble{chapter}{Kapittel}{Kapitlene}% \Crefname@preamble{section}{Avsnitt}{Avsnittene}% \Crefname@preamble{appendix}{Tillegg}{Tilleggene}% \Crefname@preamble{enumi}{Punkt}{Punktene}% \Crefname@preamble{footnote}{Fotnote}{Fotnotene}% \Crefname@preamble{theorem}{Teorem}{Teoremene}% \Crefname@preamble{lemma}{Lemma}{Lemma}% \Crefname@preamble{corollary}{Korollar}{Korollarene}% \Crefname@preamble{proposition}{P\aa stand}{P\aa standene}% \Crefname@preamble{definition}{Definisjon}{Definisjonene}% \Crefname@preamble{result}{Resultat}{Resultatene}% \Crefname@preamble{example}{Eksempel}{Eksemplene}% \Crefname@preamble{remark}{Bemerkning}{Bemerkningene}% \Crefname@preamble{note}{Note}{Notene}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmene}% \Crefname@preamble{listing}{Opplisting}{Opplistingene}% \Crefname@preamble{line}{Linje}{Linjene}% % \if@cref@capitalise% \crefname@preamble{page}{Side}{Siden}% \crefname@preamble{equation}{Likning}{Likningene}% \crefname@preamble{figure}{Figur}{Figurene}% \crefname@preamble{table}{Tabell}{Tabellene}% \crefname@preamble{part}{Del}{Delene}% \crefname@preamble{chapter}{Kapittel}{Kapitlene}% \crefname@preamble{section}{Avsnitt}{Avsnittene}% \crefname@preamble{appendix}{Tillegg}{Tilleggene}% \crefname@preamble{enumi}{Punkt}{Punktene}% \crefname@preamble{footnote}{Fotnote}{Fotnotene}% \crefname@preamble{theorem}{Teorem}{Teoremene}% \crefname@preamble{lemma}{Lemma}{Lemma}% \crefname@preamble{corollary}{Korollar}{Korollarene}% \crefname@preamble{proposition}{P\aa stand}{P\aa standene}% \crefname@preamble{definition}{Definisjon}{Definisjonene}% \crefname@preamble{result}{Resultat}{Resultatene}% \crefname@preamble{example}{Eksempel}{Eksemplene}% \crefname@preamble{remark}{Bemerkning}{Bemerkningene}% \crefname@preamble{note}{Note}{Notene}% \crefname@preamble{algorithm}{Algoritme}{Algoritmene}% \crefname@preamble{listing}{Opplisting}{Opplistingene}% \crefname@preamble{line}{Linje}{Linjene}% % \else% \crefname@preamble{equation}{likning}{likningene}% \crefname@preamble{figure}{figur}{figurene}% \crefname@preamble{table}{tabell}{tabeller}% \crefname@preamble{page}{side}{siden}% \crefname@preamble{part}{del}{delene}% \crefname@preamble{chapter}{kapittel}{kapitlene}% \crefname@preamble{section}{avsnitt}{avsnittene}% \crefname@preamble{appendix}{tillegg}{tilleggene}% \crefname@preamble{enumi}{punkt}{punktene}% \crefname@preamble{footnote}{fotnote}{fotnotene}% \crefname@preamble{theorem}{teorem}{teoremene}% \crefname@preamble{lemma}{lemma}{lemma}% \crefname@preamble{corollary}{korollar}{korollarene}% \crefname@preamble{proposition}{p\aa stand}{p\aa standene}% \crefname@preamble{definition}{definisjon}{definisjonene}% \crefname@preamble{result}{resultat}{resultatene}% \crefname@preamble{example}{eksempel}{eksemplene}% \crefname@preamble{remark}{bemerkning}{bemerkningene}% \crefname@preamble{note}{note}{notene}% \crefname@preamble{algorithm}{algoritme}{algoritmene}% \crefname@preamble{listing}{opplisting}{opplistingene}% \crefname@preamble{line}{linje}{linjene}% \fi% \def\cref@language{norsk}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{norsk}{% \PackageInfo{cleveref}{loaded `norsk' language definitions} \renewcommand{\crefrangeconjunction}{ til\nobreakspace}% \renewcommand\crefrangepreconjunction{}% \renewcommand\crefrangepostconjunction{}% \renewcommand{\crefpairconjunction}{ og\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ og\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ og\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ og\nobreakspace}% % \Crefname{equation}{Likning}{Likningene}% \Crefname{figure}{Figur}{Figurene}% \Crefname{subfigure}{Figur}{Figurene}% \Crefname{table}{Tabell}{Tabellene}% \Crefname{subtable}{Tabell}{Tabellene}% \Crefname{page}{Side}{Siden}% \Crefname{part}{Del}{Delene}% \Crefname{chapter}{Kapittel}{Kapitlene}% \Crefname{section}{Avsnitt}{Avsnittene}% \Crefname{subsection}{Avsnitt}{Avsnittene}% \Crefname{subsubsection}{Avsnitt}{Avsnittene}% \Crefname{appendix}{Tillegg}{Tilleggene}% \Crefname{subappendix}{Tillegg}{Tilleggene}% \Crefname{subsubappendix}{Tillegg}{Tilleggene}% \Crefname{subsubsubappendix}{Tillegg}{Tilleggene}% \Crefname{enumi}{Punkt}{Punktene}% \Crefname{enumii}{Punkt}{Punktene}% \Crefname{enumiii}{Punkt}{Punktene}% \Crefname{enumiv}{Punkt}{Punktene}% \Crefname{enumv}{Punkt}{Punktene}% \Crefname{footnote}{Fotnote}{Fotnotene}% \Crefname{theorem}{Teorem}{Teoremene}% \Crefname{lemma}{Lemma}{Lemma}% \Crefname{corollary}{Korollar}{Korollarene}% \Crefname{proposition}{P\aa stand}{P\aa standene}% \Crefname{definition}{Definisjon}{Definisjonene}% \Crefname{result}{Resultat}{Resultatene}% \Crefname{example}{Eksempel}{Eksemplene}% \Crefname{remark}{Bemerkning}{Bemerkningene}% \Crefname{note}{Note}{Notene}% \Crefname{algorithm}{Algoritme}{Algoritmene}% \Crefname{listing}{Opplisting}{Opplistingene}% \Crefname{line}{Linje}{Linjene}% % \if@cref@capitalise% \crefname{equation}{Likning}{Likningene}% \crefname{figure}{Figur}{Figurene}% \crefname{subfigure}{Figur}{Figurene}% \crefname{table}{Tabell}{Tabellene}% \crefname{subtable}{Tabell}{Tabellene}% \crefname{page}{Side}{Siden}% \crefname{part}{Del}{Delene}% \crefname{chapter}{Kapittel}{Kapitlene}% \crefname{section}{Avsnitt}{Avsnittene}% \crefname{subsection}{Avsnitt}{Avsnittene}% \crefname{subsubsection}{Avsnitt}{Avsnittene}% \crefname{appendix}{Tillegg}{Tilleggene}% \crefname{subappendix}{Tillegg}{Tilleggene}% \crefname{subsubappendix}{Tillegg}{Tilleggene}% \crefname{subsubsubappendix}{Tillegg}{Tilleggene}% \crefname{enumi}{Punkt}{Punktene}% \crefname{enumii}{Punkt}{Punktene}% \crefname{enumiii}{Punkt}{Punktene}% \crefname{enumiv}{Punkt}{Punktene}% \crefname{enumv}{Punkt}{Punktene}% \crefname{footnote}{Fotnote}{Fotnotene}% \crefname{theorem}{Teorem}{Teoremene}% \crefname{lemma}{Lemma}{Lemma}% \crefname{corollary}{Korollar}{Korollarene}% \crefname{proposition}{P\aa stand}{P\aa standene}% \crefname{definition}{Definisjon}{Definisjonene}% \crefname{result}{Resultat}{Resultatene}% \crefname{example}{Eksempel}{Eksemplene}% \crefname{remark}{Bemerkning}{Bemerkningene}% \crefname{note}{Note}{Notene}% \crefname{algorithm}{Algoritme}{Algoritmene}% \crefname{listing}{Opplisting}{Opplistingene}% \crefname{line}{Linje}{Linjene}% % \else% \crefname{equation}{likning}{likningene}% \crefname{figure}{figur}{figurene}% \crefname{subfigure}{figur}{figurene}% \crefname{table}{tabell}{tabellene}% \crefname{subtable}{tabell}{tabellene}% \crefname{page}{side}{siden}% \crefname{part}{del}{delene}% \crefname{chapter}{kapittel}{kapitlene}% \crefname{section}{avsnitt}{avsnittene}% \crefname{subsection}{avsnitt}{avsnittene}% \crefname{subsubsection}{avsnitt}{avsnittene}% \crefname{appendix}{tillegg}{tilleggene}% \crefname{subappendix}{tillegg}{tilleggene}% \crefname{subsubappendix}{tillegg}{tilleggene}% \crefname{subsubsubappendix}{tillegg}{tilleggene}% \crefname{enumi}{punkt}{punktene}% \crefname{enumii}{punkt}{punktene}% \crefname{enumiii}{punkt}{punktene}% \crefname{enumiv}{punkt}{punktene}% \crefname{enumv}{punkt}{punktene}% \crefname{footnote}{fotnote}{fotnotene}% \crefname{theorem}{teorem}{teoremene}% \crefname{lemma}{lemma}{lemma}% \crefname{corollary}{korollar}{korollarene}% \crefname{proposition}{p\aa stand}{p\aa standene}% \crefname{definition}{definisjon}{definisjonene}% \crefname{result}{resultat}{resultatene}% \crefname{example}{eksempel}{eksemplene}% \crefname{remark}{bemerkning}{bemerkningene}% \crefname{note}{note}{notene}% \crefname{algorithm}{algoritme}{algoritmene}% \crefname{listing}{opplisting}{opplistingene}% \crefname{line}{linje}{linjene}% \fi}% end \cref@loadlanguagedefs \DeclareOption{danish}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ til\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ og\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ og\nobreakspace}% \def\crefpairgroupconjunction@preamble{ og\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ og\nobreakspace}% % \Crefname@preamble{equation}{Ligning}{Ligninger}% \Crefname@preamble{figure}{Figur}{Figurer}% \Crefname@preamble{table}{Tabel}{Tabeller}% \Crefname@preamble{page}{Side}{Sider}% \Crefname@preamble{part}{Del}{Dele}% \Crefname@preamble{chapter}{Kapitel}{Kapitler}% \Crefname@preamble{section}{Afsnit}{Afsnit}% \Crefname@preamble{appendix}{Appendiks}{Appendiks}% \Crefname@preamble{enumi}{Punkt}{Punkter}% \Crefname@preamble{footnote}{Fodnote}{Fodnoter}% \Crefname@preamble{theorem}{Teorem}{Teoremer}% \Crefname@preamble{lemma}{Lemma}{Lemma}% \Crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \Crefname@preamble{proposition}{Udsagn}{Udsagn}% \Crefname@preamble{definition}{Definition}{Definitioner}% \Crefname@preamble{result}{Resultat}{Resultater}% \Crefname@preamble{example}{Eksempel}{Eksempler}% \Crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}% \Crefname@preamble{note}{Note}{Noter}% \Crefname@preamble{algorithm}{Algoritme}{Algoritmer}% \Crefname@preamble{line}{Linje}{Linjer}% % \if@cref@capitalise% \crefname@preamble{equation}{Ligning}{Ligninger}% \crefname@preamble{figure}{Figur}{Figurer}% \crefname@preamble{table}{Tabel}{Tabeller}% \crefname@preamble{page}{Side}{Sider}% \crefname@preamble{part}{Del}{Dele}% \crefname@preamble{chapter}{Kapitel}{Kapitler}% \crefname@preamble{section}{Afsnit}{Afsnit}% \crefname@preamble{appendix}{Appendiks}{Appendiks}% \crefname@preamble{enumi}{Punkt}{Punkter}% \crefname@preamble{footnote}{Fodnote}{Fodnoter}% \crefname@preamble{theorem}{Teorem}{Teoremer}% \crefname@preamble{lemma}{Lemma}{Lemma}% \crefname@preamble{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \crefname@preamble{proposition}{Udsagn}{Udsagn}% \crefname@preamble{definition}{Definition}{Definitioner}% \crefname@preamble{result}{Resultat}{Resultater}% \crefname@preamble{example}{Eksempel}{Eksempler}% \crefname@preamble{remark}{Bem\ae rkning}{Bem\ae rkninger}% \crefname@preamble{note}{Note}{Noter}% \crefname@preamble{algorithm}{Algoritme}{Algoritmer}% \crefname@preamble{line}{Linje}{Linjer}% % \else% \crefname@preamble{equation}{ligning}{ligninger}% \crefname@preamble{figure}{figur}{figurer}% \crefname@preamble{table}{tabel}{tabeller}% \crefname@preamble{page}{side}{sider}% \crefname@preamble{part}{del}{dele}% \crefname@preamble{chapter}{kapitel}{kapitler}% \crefname@preamble{section}{afsnit}{afsnit}% \crefname@preamble{appendix}{appendiks}{appendiks}% \crefname@preamble{enumi}{punkt}{punkter}% \crefname@preamble{footnote}{fodnote}{fodnoter}% \crefname@preamble{theorem}{teorem}{teoremer}% \crefname@preamble{lemma}{lemma}{lemma}% \crefname@preamble{corollary}{f\o lgeslutning}{f\o lgeslutninger}% \crefname@preamble{proposition}{udsagn}{udsagn}% \crefname@preamble{definition}{definition}{definitioner}% \crefname@preamble{result}{resultat}{resultater}% \crefname@preamble{example}{eksempel}{eksempler}% \crefname@preamble{remark}{bem\ae rkning}{bem\ae rkninger}% \crefname@preamble{note}{note}{noter}% \crefname@preamble{algorithm}{algoritme}{algoritmer}% \crefname@preamble{line}{linje}{linjer}% \fi% \def\cref@language{danish}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{danish}{% \PackageInfo{cleveref}{loaded `danish' language definitions} \renewcommand{\crefrangeconjunction@preamble}{ til\nobreakspace}% \renewcommand\crefrangepreconjunction@preamble{}% \renewcommand\crefrangepostconjunction@preamble{}% \renewcommand{\crefpairconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefmiddleconjunction@preamble}{, }% \renewcommand{\creflastconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefpairgroupconjunction@preamble}{ og\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction@preamble}{, }% \renewcommand{\creflastgroupconjunction@preamble}{ og\nobreakspace}% % \Crefname{equation}{Ligning}{Ligninger}% \Crefname{figure}{Figur}{Figurer}% \Crefname{subfigure}{Figur}{Figurer}% \Crefname{table}{Tabel}{Tabeller}% \Crefname{subtable}{Tabel}{Tabeller}% \Crefname{page}{Side}{Sider}% \Crefname{part}{Del}{Dele}% \Crefname{chapter}{Kapitel}{Kapitler}% \Crefname{section}{Afsnit}{Afsnit}% \Crefname{subsection}{Afsnit}{Afsnit}% \Crefname{subsubsection}{Afsnit}{Afsnit}% \Crefname{appendix}{Appendiks}{Appendiks}% \Crefname{subappendix}{Appendiks}{Appendiks}% \Crefname{subsubappendix}{Appendiks}{Appendiks}% \Crefname{subsubsubappendix}{Appendiks}{Appendiks}% \Crefname{enumi}{Punkt}{Punkter}% \Crefname{enumii}{Punkt}{Punkter}% \Crefname{enumiii}{Punkt}{Punkter}% \Crefname{enumiv}{Punkt}{Punkter}% \Crefname{enumv}{Punkt}{Punkter}% \Crefname{footnote}{Fodnote}{Fodnoter}% \Crefname{theorem}{Teorem}{Teoremer}% \Crefname{lemma}{Lemma}{Lemma}% \Crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \Crefname{proposition}{Udsagn}{Udsagn}% \Crefname{definition}{Definition}{Definitioner}% \Crefname{result}{Resultat}{Resultater}% \Crefname{example}{Eksempel}{Eksempler}% \Crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}% \Crefname{note}{Note}{Noter}% \Crefname{algorithm}{Algoritme}{Algoritmer}% \Crefname{line}{Linje}{Linjer}% % \if@cref@capitalise% \crefname{equation}{Ligning}{Ligninger}% \crefname{figure}{Figur}{Figurer}% \crefname{subfigure}{Figur}{Figurer}% \crefname{table}{Tabel}{Tabeller}% \crefname{subtable}{Tabel}{Tabeller}% \crefname{page}{Side}{Sider}% \crefname{part}{Del}{Dele}% \crefname{chapter}{Kapitel}{Kapitler}% \crefname{section}{Afsnit}{Afsnit}% \crefname{subsection}{Afsnit}{Afsnit}% \crefname{subsubsection}{Afsnit}{Afsnit}% \crefname{appendix}{Appendiks}{Appendiks}% \crefname{subappendix}{Appendiks}{Appendiks}% \crefname{subsubappendix}{Appendiks}{Appendiks}% \crefname{subsubsubappendix}{Appendiks}{Appendiks}% \crefname{enumi}{Punkt}{Punkter}% \crefname{enumii}{Punkt}{Punkter}% \crefname{enumiii}{Punkt}{Punkter}% \crefname{enumiv}{Punkt}{Punkter}% \crefname{enumv}{Punkt}{Punkter}% \crefname{footnote}{Fodnote}{Fodnoter}% \crefname{theorem}{Teorem}{Teoremer}% \crefname{lemma}{Lemma}{Lemma}% \crefname{corollary}{F\o lgeslutning}{F\o lgeslutninger}% \crefname{proposition}{Udsagn}{Udsagn}% \crefname{definition}{Definition}{Definitioner}% \crefname{result}{Resultat}{Resultater}% \crefname{example}{Eksempel}{Eksempler}% \crefname{remark}{Bem\ae rkning}{Bem\ae rkninger}% \crefname{note}{Note}{Noter}% \crefname{algorithm}{Algoritme}{Algoritmer}% \crefname{line}{Linje}{Linjer}% % \else% \crefname{equation}{ligning}{ligninger}% \crefname{figure}{figur}{figurer}% \crefname{subfigure}{figur}{figurer}% \crefname{table}{tabel}{tabeller}% \crefname{subtable}{tabel}{tabeller}% \crefname{page}{side}{sider}% \crefname{part}{del}{dele}% \crefname{chapter}{kapitel}{kapitler}% \crefname{section}{afsnit}{afsnit}% \crefname{subsection}{afsnit}{afsnit}% \crefname{subsubsection}{afsnit}{afsnit}% \crefname{appendix}{appendiks}{appendiks}% \crefname{subappendix}{appendiks}{appendiks}% \crefname{subsubappendix}{appendiks}{appendiks}% \crefname{subsubsubappendix}{appendiks}{appendiks}% \crefname{enumi}{punkt}{punkter}% \crefname{enumii}{punkt}{punkter}% \crefname{enumiii}{punkt}{punkter}% \crefname{enumiv}{punkt}{punkter}% \crefname{enumv}{punkt}{punkter}% \crefname{footnote}{fodnote}{fodnoter}% \crefname{theorem}{teorem}{teoremer}% \crefname{lemma}{lemma}{lemma}% \crefname{corollary}{f\o lgeslutning}{f\o lgeslutninger}% \crefname{proposition}{udsagn}{udsagn}% \crefname{definition}{definition}{definitioner}% \crefname{result}{resultat}{resultater}% \crefname{example}{eksempel}{eksempler}% \crefname{remark}{bem\ae rkning}{bem\ae rkninger}% \crefname{note}{note}{noter}% \crefname{algorithm}{algoritme}{algoritmer}% \crefname{line}{linje}{linjer}% \fi}% end \cref@loadlanguagedefs \DeclareOption{esperanto}{% \AtBeginDocument{% \def\crefrangeconjunction@preamble{ \^gis\nobreakspace}% \def\crefrangepreconjunction@preamble{}% \def\crefrangepostconjunction@preamble{}% \def\crefpairconjunction@preamble{ kaj\nobreakspace}% \def\crefmiddleconjunction@preamble{, }% \def\creflastconjunction@preamble{ kaj\nobreakspace}% \def\crefpairgroupconjunction@preamble{ kaj\nobreakspace}% \def\crefmiddlegroupconjunction@preamble{, }% \def\creflastgroupconjunction@preamble{ kaj\nobreakspace}% \Crefname@preamble{equation}{Ekvacio}{Ekvacioj}% \Crefname@preamble{part}{Parto}{Partoj}% \Crefname@preamble{chapter}{\^Capitro}{\^Capitroj}% \Crefname@preamble{section}{Sekcio}{Sekcioj}% \Crefname@preamble{appendix}{Aldono}{Aldonoj}% \Crefname@preamble{enumi}{Punkto}{Punktoj}% \Crefname@preamble{footnote}{Piednoto}{Piednotoj}% \Crefname@preamble{figure}{Figuro}{Figuroj}% \Crefname@preamble{table}{Tabelo}{Tabeloj}% \Crefname@preamble{theorem}{Teoremo}{Teoremoj}% \Crefname@preamble{lemma}{Lemo}{Lemoj}% \Crefname@preamble{corollary}{Korolario}{Korolarioj}% \Crefname@preamble{proposition}{Propozicio}{Propozicioj}% \Crefname@preamble{definition}{Defino}{Definoj}% \Crefname@preamble{result}{Rezulto}{Rezultoj}% \Crefname@preamble{example}{Ekzemplo}{Ekzemploj}% \Crefname@preamble{remark}{Rimarko}{Rimarkoj}% \Crefname@preamble{note}{Noto}{Notoj}% \Crefname@preamble{algorithm}{Algoritmo}{Algoritmoj}% \Crefname@preamble{listing}{Listado}{Listadoj}% \Crefname@preamble{line}{Linio}{Linioj}% \if@cref@capitalise% \crefname@preamble{equation}{Ekvacio}{Ekvacioj}% \crefname@preamble{part}{Parto}{Partoj}% \crefname@preamble{chapter}{\^Capitro}{\^Capitroj}% \crefname@preamble{section}{Sekcio}{Sekcioj}% \crefname@preamble{appendix}{Aldono}{Aldonoj}% \crefname@preamble{enumi}{Punkto}{Punktoj}% \crefname@preamble{footnote}{Piednoto}{Piednotoj}% \crefname@preamble{figure}{Figuro}{Figuroj}% \crefname@preamble{table}{Tabelo}{Tabeloj}% \crefname@preamble{theorem}{Teoremo}{Teoremoj}% \crefname@preamble{lemma}{Lemo}{Lemoj}% \crefname@preamble{corollary}{Korolario}{Korolarioj}% \crefname@preamble{proposition}{Propozicio}{Propozicioj}% \crefname@preamble{definition}{Defino}{Definoj}% \crefname@preamble{result}{Rezulto}{Rezultoj}% \crefname@preamble{example}{Ekzemplo}{Ekzemploj}% \crefname@preamble{remark}{Rimarko}{Rimarkoj}% \crefname@preamble{note}{Noto}{Notoj}% \crefname@preamble{algorithm}{Algoritmo}{Algoritmoj}% \crefname@preamble{listing}{Listado}{Listadoj}% \crefname@preamble{line}{Linio}{Linioj}% \else% \crefname@preamble{equation}{ekvacio}{ekvacioj}% \crefname@preamble{part}{parto}{partoj}% \crefname@preamble{chapter}{\^capitro}{\^capitroj}% \crefname@preamble{section}{sekcio}{sekcioj}% \crefname@preamble{appendix}{aldono}{aldonoj}% \crefname@preamble{enumi}{punkto}{punktoj}% \crefname@preamble{footnote}{piednoto}{piednotoj}% \crefname@preamble{figure}{figuro}{figuroj}% \crefname@preamble{table}{tabelo}{tabeloj}% \crefname@preamble{theorem}{teoremo}{teoremoj}% \crefname@preamble{lemma}{lemo}{lemoj}% \crefname@preamble{corollary}{korolario}{korolarioj}% \crefname@preamble{proposition}{propozicio}{propozicioj}% \crefname@preamble{definition}{defino}{definoj}% \crefname@preamble{result}{rezulto}{rezultoj}% \crefname@preamble{example}{ekzemplo}{ekzemploj}% \crefname@preamble{remark}{rimarko}{rimarkoj}% \crefname@preamble{note}{noto}{notoj}% \crefname@preamble{algorithm}{algoritmo}{algoritmoj}% \crefname@preamble{listing}{listado}{listadoj}% \crefname@preamble{line}{linio}{linioj}% \fi% \def\cref@language{esperanto}% }}% end \DeclareOption and \AtBeginDocument \cref@addlanguagedefs{esperanto}{% \PackageInfo{cleveref}{loaded `esperanto' language definitions} \renewcommand{\crefrangeconjunction}{ \^gis\nobreakspace}% \renewcommand{\crefrangepreconjunction}{}% \renewcommand{\crefrangepostconjunction}{}% \renewcommand{\crefpairconjunction}{ kaj\nobreakspace}% \renewcommand{\crefmiddleconjunction}{, }% \renewcommand{\creflastconjunction}{ kaj\nobreakspace}% \renewcommand{\crefpairgroupconjunction}{ kaj\nobreakspace}% \renewcommand{\crefmiddlegroupconjunction}{, }% \renewcommand{\creflastgroupconjunction}{ kaj\nobreakspace}% \Crefname{equation}{Ekvacio}{Ekvacioj}% \Crefname{part}{Parto}{Partoj}% \Crefname{chapter}{\^Capitro}{\^Capitroj}% \Crefname{section}{Sekcio}{Sekcioj}% \Crefname{appendix}{Aldono}{Aldonoj}% \Crefname{enumi}{Punkto}{Punktoj}% \Crefname{footnote}{Piednoto}{Piednotoj}% \Crefname{figure}{Figuro}{Figuroj}% \Crefname{table}{Tabelo}{Tabeloj}% \Crefname{theorem}{Teoremo}{Teoremoj}% \Crefname{lemma}{Lemo}{Lemoj}% \Crefname{corollary}{Korolario}{Korolarioj}% \Crefname{proposition}{Propozicio}{Propozicioj}% \Crefname{definition}{Defino}{Definoj}% \Crefname{result}{Rezulto}{Rezultoj}% \Crefname{example}{Ekzemplo}{Ekzemploj}% \Crefname{remark}{Rimarko}{Rimarkoj}% \Crefname{note}{Noto}{Notoj}% \Crefname{algorithm}{Algoritmo}{Algoritmoj}% \Crefname{listing}{Listado}{Listadoj}% \Crefname{line}{Linio}{Linioj}% \if@cref@capitalise% \crefname{equation}{Ekvacio}{Ekvacioj}% \crefname{part}{Parto}{Partoj}% \crefname{chapter}{\^Capitro}{\^Capitroj}% \crefname{section}{Sekcio}{Sekcioj}% \crefname{appendix}{Aldono}{Aldonoj}% \crefname{enumi}{Punkto}{Punktoj}% \crefname{footnote}{Piednoto}{Piednotoj}% \crefname{figure}{Figuro}{Figuroj}% \crefname{table}{Tabelo}{Tabeloj}% \crefname{theorem}{Teoremo}{Teoremoj}% \crefname{lemma}{Lemo}{Lemoj}% \crefname{corollary}{Korolario}{Korolarioj}% \crefname{proposition}{Propozicio}{Propozicioj}% \crefname{definition}{Defino}{Definoj}% \crefname{result}{Rezulto}{Rezultoj}% \crefname{example}{Ekzemplo}{Ekzemploj}% \crefname{remark}{Rimarko}{Rimarkoj}% \crefname{note}{Noto}{Notoj}% \crefname{algorithm}{Algoritmo}{Algoritmoj}% \crefname{listing}{Listado}{Listadoj}% \crefname{line}{Linio}{Linioj}% \else% \crefname{equation}{ekvacio}{ekvacioj}% \crefname{part}{parto}{partoj}% \crefname{chapter}{\^capitro}{\^capitroj}% \crefname{section}{sekcio}{sekcioj}% \crefname{appendix}{aldono}{aldonoj}% \crefname{enumi}{punkto}{punktoj}% \crefname{footnote}{piednoto}{piednotoj}% \crefname{figure}{figuro}{figuroj}% \crefname{table}{tabelo}{tabeloj}% \crefname{theorem}{teoremo}{teoremoj}% \crefname{lemma}{lemo}{lemoj}% \crefname{corollary}{korolario}{korolarioj}% \crefname{proposition}{propozicio}{propozicioj}% \crefname{definition}{defino}{definoj}% \crefname{result}{rezulto}{rezultoj}% \crefname{example}{ekzemplo}{ekzemploj}% \crefname{remark}{rimarko}{rimarkoj}% \crefname{note}{noto}{notoj}% \crefname{algorithm}{algoritmo}{algoritmoj}% \crefname{listing}{listado}{listadoj}% \crefname{line}{linio}{linioj}% \fi}% end \cref@loadlanguagedefs \edef\@curroptions{\@ptionlist{\@currname.\@currext}}% \@expandtwoargs\in@{,capitalise,}{% ,\@classoptionslist,\@curroptions,}% \ifin@% \ExecuteOptions{capitalise}% \else% \@expandtwoargs\in@{,capitalize,}{% ,\@classoptionslist,\@curroptions,}% \ifin@% \ExecuteOptions{capitalise}% \fi% \fi% \@expandtwoargs\in@{,nameinlink,}{% ,\@classoptionslist,\@curroptions,}% \ifin@% \ExecuteOptions{nameinlink}% \fi% \crefdefaultlabelformat{#2#1#3} \if@cref@nameinlink% \creflabelformat{equation}{#2\textup{(#1)}#3}% \else% \creflabelformat{equation}{\textup{(#2#1#3)}}% \fi \@labelcrefdefinedefaultformats \@ifpackageloaded{polyglossia}% {\ifcsdef{languagename}% {\ExecuteOptions{\languagename}}% {\PackageWarning{cleveref}% {`polyglossia' loaded but default language not set - defaulting to english}% \ExecuteOptions{english}}}% {\ExecuteOptions{english}} \ProcessOptions*\relax \AtBeginDocument{% \edef\@tempa{% \expandafter\noexpand\csname extras\cref@language\endcsname}% \@ifundefined{crefrangeconjunction}{% \let\crefrangeconjunction\crefrangeconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefrangeconjunction\expandafter}% \expandafter{\crefrangeconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \@ifundefined{crefrangepreconjunction}{% \let\crefrangepreconjunction\crefrangepreconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefrangepreconjunction\expandafter}% \expandafter{\crefrangepreconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \@ifundefined{crefrangepostconjunction}{% \let\crefrangepostconjunction\crefrangepostconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefrangepostconjunction\expandafter}% \expandafter{\crefrangepostconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \@ifundefined{crefpairconjunction}{% \let\crefpairconjunction\crefpairconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefpairconjunction\expandafter}% \expandafter{\crefpairconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% \@ifundefined{crefpairgroupconjunction}{% \let\crefpairgroupconjunction\crefpairconjunction}{}% }% \@ifundefined{crefmiddleconjunction}{% \let\crefmiddleconjunction\crefmiddleconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefmiddleconjunction\expandafter}% \expandafter{\crefmiddleconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% \@ifundefined{crefmiddlegroupconjunction}{% \let\crefmiddlegroupconjunction\crefmiddleconjunction}{}% }% \@ifundefined{creflastconjunction}{% \let\creflastconjunction\creflastconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\creflastconjunction\expandafter}% \expandafter{\creflastconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% \@ifundefined{creflastgroupconjunction}{% \edef\creflastgroupconjunction{, \creflastconjunction}}{}% }% \@ifundefined{crefpairgroupconjunction}{% \let\crefpairgroupconjunction% \crefpairgroupconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefpairgroupconjunction\expandafter}% \expandafter{\crefpairgroupconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \@ifundefined{crefmiddlegroupconjunction}{% \let\crefmiddlegroupconjunction% \crefmiddlegroupconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\crefmiddlegroupconjunction\expandafter}% \expandafter{\crefmiddlegroupconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \@ifundefined{creflastgroupconjunction}{% \let\creflastgroupconjunction% \creflastgroupconjunction@preamble% }{% \expandafter\def\expandafter\@tempb\expandafter{% \expandafter\renewcommand\expandafter% {\expandafter\creflastgroupconjunction\expandafter}% \expandafter{\creflastgroupconjunction}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempa\expandafter{\@tempb}% }% \let\@tempstack\cref@label@types% \cref@isstackfull{\@tempstack}% \@whilesw\if@cref@stackfull\fi{% \edef\@tempa{\cref@stack@top{\@tempstack}}% \@ifundefined{cref@\@tempa @name}{% \expandafter\def\expandafter\@tempb\expandafter{% \csname cref@\@tempa @name\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \csname cref@\@tempa @name@preamble\endcsname}% \expandafter\expandafter\expandafter% \let\expandafter\@tempb\@tempc% \expandafter\def\expandafter\@tempb\expandafter{% \csname cref@\@tempa @name@plural\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \csname cref@\@tempa @name@plural@preamble\endcsname}% \expandafter\expandafter\expandafter% \let\expandafter\@tempb\@tempc% }{% \edef\@tempb{% \expandafter\noexpand\csname extras\cref@language\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \expandafter\crefname\expandafter{\@tempa}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\expandafter\expandafter\@tempc% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \csname cref@\@tempa @name\endcsname}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\expandafter\expandafter\@tempc% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \csname cref@\@tempa @name@plural\endcsname}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempb\expandafter{\@tempc}% }% \@ifundefined{Cref@\@tempa @name}{% \expandafter\def\expandafter\@tempb\expandafter{% \csname Cref@\@tempa @name\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \csname Cref@\@tempa @name@preamble\endcsname}% \expandafter\expandafter\expandafter% \let\expandafter\@tempb\@tempc% \expandafter\def\expandafter\@tempb\expandafter{% \csname Cref@\@tempa @name@plural\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \csname Cref@\@tempa @name@plural@preamble\endcsname}% \expandafter\expandafter\expandafter% \let\expandafter\@tempb\@tempc% }{% \edef\@tempb{% \expandafter\noexpand\csname extras\cref@language\endcsname}% \expandafter\def\expandafter\@tempc\expandafter{% \expandafter\Crefname\expandafter{\@tempa}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\expandafter\expandafter\@tempc% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \csname Cref@\@tempa @name\endcsname}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\expandafter\expandafter\@tempc% \expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter{% \csname Cref@\@tempa @name@plural\endcsname}}% \expandafter\expandafter\expandafter\cref@addto% \expandafter\@tempb\expandafter{\@tempc}% }% \@ifundefined{cref@\@tempa @format}{% \@ifundefined{cref@\@tempa @name}{}{% \expandafter\@crefdefineformat\expandafter{\@tempa}}}{}% \@ifundefined{crefrange@\@tempa @format}{% \@ifundefined{cref@\@tempa @name@plural}{}{% \expandafter\@crefrangedefineformat\expandafter{\@tempa}}}{}% \@ifundefined{cref@\@tempa @format@first}{% \@ifundefined{cref@\@tempa @name@plural}{}{% \expandafter\@crefdefinemultiformat\expandafter{\@tempa}}}{}% \@ifundefined{crefrange@\@tempa @format@first}{% \@ifundefined{cref@\@tempa @name@plural}{}{% \expandafter\@crefrangedefinemultiformat% \expandafter{\@tempa}}}{}% \cref@stack@pop{\@tempstack}% \cref@isstackfull{\@tempstack}}% \@ifundefined{cref@subsection@name}{% \let\cref@subsection@name\cref@section@name% \let\cref@subsection@name@plural\cref@section@name@plural}{}% \@ifundefined{Cref@subsection@name}{% \let\Cref@subsection@name\Cref@section@name% \let\Cref@subsection@name@plural\Cref@section@name@plural}{}% \@ifundefined{cref@subsection@format}{% \let\cref@subsection@format\cref@section@format}{}% \@ifundefined{Cref@subsection@format}{% \let\Cref@subsection@format\Cref@section@format}{}% \@ifundefined{crefrange@subsection@format}{% \let\crefrange@subsection@format% \crefrange@section@format}{}% \@ifundefined{Crefrange@subsection@format}{% \let\Crefrange@subsection@format% \Crefrange@section@format}{}% \@ifundefined{cref@subsection@format@first}{% \let\cref@subsection@format@first% \cref@section@format@first}{}% \@ifundefined{Cref@subsection@format@first}{% \let\Cref@subsection@format@first% \Cref@section@format@first}{}% \@ifundefined{cref@subsection@format@second}{% \let\cref@subsection@format@second% \cref@section@format@second}{}% \@ifundefined{Cref@subsection@format@second}{% \let\Cref@subsection@format@second% \Cref@section@format@second}{}% \@ifundefined{cref@subsection@format@middle}{% \let\cref@subsection@format@middle% \cref@section@format@middle}{}% \@ifundefined{Cref@subsection@format@middle}{% \let\Cref@subsection@format@middle% \Cref@section@format@middle}{}% \@ifundefined{cref@subsection@format@last}{% \let\cref@subsection@format@last% \cref@section@format@last}{}% \@ifundefined{Cref@subsection@format@last}{% \let\Cref@subsection@format@last% \Cref@section@format@last}{}% \@ifundefined{crefrange@subsection@format@first}{% \let\crefrange@subsection@format@first% \crefrange@section@format@first}{}% \@ifundefined{Crefrange@subsection@format@first}{% \let\Crefrange@subsection@format@first% \Crefrange@section@format@first}{}% \@ifundefined{crefrange@subsection@format@second}{% \let\crefrange@subsection@format@second% \crefrange@section@format@second}{}% \@ifundefined{Crefrange@subsection@format@second}{% \let\Crefrange@subsection@format@second% \Crefrange@section@format@second}{}% \@ifundefined{crefrange@subsection@format@middle}{% \let\crefrange@subsection@format@middle% \crefrange@section@format@middle}{}% \@ifundefined{Crefrange@subsection@format@middle}{% \let\Crefrange@subsection@format@middle% \Crefrange@section@format@middle}{}% \@ifundefined{crefrange@subsection@format@last}{% \let\crefrange@subsection@format@last% \crefrange@section@format@last}{}% \@ifundefined{Crefrange@subsection@format@last}{% \let\Crefrange@subsection@format@last% \Crefrange@section@format@last}{}% \@ifundefined{cref@subsubsection@name}{% \let\cref@subsubsection@name\cref@section@name% \let\cref@subsubsection@name@plural\cref@section@name@plural}{}% \@ifundefined{Cref@subsection@name}{% \let\Cref@subsection@name\Cref@section@name% \let\Cref@subsection@name@plural\Cref@section@name@plural}{}% \@ifundefined{cref@subsubsection@format}{% \let\cref@subsubsection@format% \cref@subsection@format}{}% \@ifundefined{Cref@subsubsection@format}{% \let\Cref@subsubsection@format% \Cref@subsection@format}{}% \@ifundefined{crefrange@subsubsection@format}{% \let\crefrange@subsubsection@format% \crefrange@subsection@format}{}% \@ifundefined{Crefrange@subsubsection@format}{% \let\Crefrange@subsubsection@format% \Crefrange@subsection@format}{}% \@ifundefined{cref@subsubsection@format@first}{% \let\cref@subsubsection@format@first% \cref@subsection@format@first}{}% \@ifundefined{Cref@subsubsection@format@first}{% \let\Cref@subsubsection@format@first% \Cref@subsection@format@first}{}% \@ifundefined{cref@subsubsection@format@second}{% \let\cref@subsubsection@format@second% \cref@subsection@format@second}{}% \@ifundefined{Cref@subsubsection@format@second}{% \let\Cref@subsubsection@format@second% \Cref@subsection@format@second}{}% \@ifundefined{cref@subsubsection@format@middle}{% \let\cref@subsubsection@format@middle% \cref@subsection@format@middle}{}% \@ifundefined{Cref@subsubsection@format@middle}{% \let\Cref@subsubsection@format@middle% \Cref@subsection@format@middle}{}% \@ifundefined{cref@subsubsection@format@last}{% \let\cref@subsubsection@format@last% \cref@subsection@format@last}{}% \@ifundefined{Cref@subsubsection@format@last}{% \let\Cref@subsubsection@format@last% \Cref@subsection@format@last}{}% \@ifundefined{crefrange@subsubsection@format@first}{% \let\crefrange@subsubsection@format@first% \crefrange@subsection@format@first}{}% \@ifundefined{Crefrange@subsubsection@format@first}{% \let\Crefrange@subsubsection@format@first% \Crefrange@subsection@format@first}{}% \@ifundefined{crefrange@subsubsection@format@second}{% \let\crefrange@subsubsection@format@second% \crefrange@subsection@format@second}{}% \@ifundefined{Crefrange@subsubsection@format@second}{% \let\Crefrange@subsubsection@format@second% \Crefrange@subsection@format@second}{}% \@ifundefined{crefrange@subsubsection@format@middle}{% \let\crefrange@subsubsection@format@middle% \crefrange@subsection@format@middle}{}% \@ifundefined{Crefrange@subsubsection@format@middle}{% \let\Crefrange@subsubsection@format@middle% \Crefrange@subsection@format@middle}{}% \@ifundefined{crefrange@subsubsection@format@last}{% \let\crefrange@subsubsection@format@last% \crefrange@subsection@format@last}{}% \@ifundefined{Crefrange@subsubsection@format@last}{% \let\Crefrange@subsubsection@format@last% \Crefrange@subsection@format@last}{}% \@ifundefined{cref@subappendix@name}{% \let\cref@subappendix@name\cref@appendix@name% \let\cref@subappendix@name@plural% \cref@appendix@name@plural}{}% \@ifundefined{Cref@subappendix@name}{% \let\Cref@subappendix@name\Cref@section@name% \let\Cref@subappendixsection@name@plural% \Cref@appendix@name@plural}{}% \@ifundefined{cref@subappendix@format}{% \let\cref@subappendix@format\cref@appendix@format}{}% \@ifundefined{Cref@subappendix@format}{% \let\Cref@subappendix@format\Cref@appendix@format}{}% \@ifundefined{crefrange@subappendix@format}{% \let\crefrange@subappendix@format% \crefrange@appendix@format}{}% \@ifundefined{Crefrange@subappendix@format}{% \let\Crefrange@subappendix@format% \Crefrange@appendix@format}{}% \@ifundefined{cref@subappendix@format@first}{% \let\cref@subappendix@format@first% \cref@appendix@format@first}{}% \@ifundefined{Cref@subappendix@format@first}{% \let\Cref@subappendix@format@first% \Cref@appendix@format@first}{}% \@ifundefined{cref@subappendix@format@second}{% \let\cref@subappendix@format@second% \cref@appendix@format@second}{}% \@ifundefined{Cref@subappendix@format@second}{% \let\Cref@subappendix@format@second% \Cref@appendix@format@second}{}% \@ifundefined{cref@subappendix@format@middle}{% \let\cref@subappendix@format@middle% \cref@appendix@format@middle}{}% \@ifundefined{Cref@subappendix@format@middle}{% \let\Cref@subappendix@format@middle% \Cref@appendix@format@middle}{}% \@ifundefined{cref@subappendix@format@last}{% \let\cref@subappendix@format@last% \cref@appendix@format@last}{}% \@ifundefined{Cref@subappendix@format@last}{% \let\Cref@subappendix@format@last% \Cref@appendix@format@last}{}% \@ifundefined{crefrange@subappendix@format@first}{% \let\crefrange@subappendix@format@first% \crefrange@appendix@format@first}{}% \@ifundefined{Crefrange@subappendix@format@first}{% \let\Crefrange@subappendix@format@first% \Crefrange@appendix@format@first}{}% \@ifundefined{crefrange@subappendix@format@second}{% \let\crefrange@subappendix@format@second% \crefrange@appendix@format@second}{}% \@ifundefined{Crefrange@subappendix@format@second}{% \let\Crefrange@subappendix@format@second% \Crefrange@appendix@format@second}{}% \@ifundefined{crefrange@subappendix@format@middle}{% \let\crefrange@subappendix@format@middle% \crefrange@appendix@format@middle}{}% \@ifundefined{Crefrange@subappendix@format@middle}{% \let\Crefrange@subappendix@format@middle% \Crefrange@appendix@format@middle}{}% \@ifundefined{crefrange@subappendix@format@last}{% \let\crefrange@subappendix@format@last% \crefrange@appendix@format@last}{}% \@ifundefined{Crefrange@subappendix@format@last}{% \let\Crefrange@subappendix@format@last% \Crefrange@appendix@format@last}{}% \@ifundefined{cref@subsubappendix@name}{% \let\cref@subsubappendix@name\cref@appendix@name% \let\cref@subsubappendix@name@plural% \cref@appendix@name@plural}{}% \@ifundefined{Cref@subsubappendix@name}{% \let\Cref@subsubappendix@name\Cref@section@name% \let\Cref@subsubappendixsection@name@plural% \Cref@appendix@name@plural}{}% \@ifundefined{cref@subsubappendix@format}{% \let\cref@subsubappendix@format% \cref@subappendix@format}{}% \@ifundefined{Cref@subsubappendix@format}{% \let\Cref@subsubappendix@format% \Cref@subappendix@format}{}% \@ifundefined{crefrange@subsubappendix@format}{% \let\crefrange@subsubappendix@format% \crefrange@subappendix@format}{}% \@ifundefined{Crefrange@subsubappendix@format}{% \let\Crefrange@subsubappendix@format% \Crefrange@subappendix@format}{}% \@ifundefined{cref@subsubappendix@format@first}{% \let\cref@subsubappendix@format@first% \cref@subappendix@format@first}{}% \@ifundefined{Cref@subsubappendix@format@first}{% \let\Cref@subsubappendix@format@first% \Cref@subappendix@format@first}{}% \@ifundefined{cref@subsubappendix@format@second}{% \let\cref@subsubappendix@format@second% \cref@subappendix@format@second}{}% \@ifundefined{Cref@subsubappendix@format@second}{% \let\Cref@subsubappendix@format@second% \Cref@subappendix@format@second}{}% \@ifundefined{cref@subsubappendix@format@middle}{% \let\cref@subsubappendix@format@middle% \cref@subappendix@format@middle}{}% \@ifundefined{Cref@subsubappendix@format@middle}{% \let\Cref@subsubappendix@format@middle% \Cref@subappendix@format@middle}{}% \@ifundefined{cref@subsubappendix@format@last}{% \let\cref@subsubappendix@format@last% \cref@subappendix@format@last}{}% \@ifundefined{Cref@subsubappendix@format@last}{% \let\Cref@subsubappendix@format@last% \Cref@subappendix@format@last}{}% \@ifundefined{crefrange@subsubappendix@format@first}{% \let\crefrange@subsubappendix@format@first% \crefrange@subappendix@format@first}{}% \@ifundefined{Crefrange@subsubappendix@format@first}{% \let\Crefrange@subsubappendix@format@first% \Crefrange@subappendix@format@first}{}% \@ifundefined{crefrange@subsubappendix@format@second}{% \let\crefrange@subsubappendix@format@second% \crefrange@subappendix@format@second}{}% \@ifundefined{Crefrange@subsubappendix@format@second}{% \let\Crefrange@subsubappendix@format@second% \Crefrange@subappendix@format@second}{}% \@ifundefined{crefrange@subsubappendix@format@middle}{% \let\crefrange@subsubappendix@format@middle% \crefrange@subappendix@format@middle}{}% \@ifundefined{Crefrange@subsubappendix@format@middle}{% \let\Crefrange@subsubappendix@format@middle% \Crefrange@subappendix@format@middle}{}% \@ifundefined{crefrange@subsubappendix@format@last}{% \let\crefrange@subsubappendix@format@last% \crefrange@subappendix@format@last}{}% \@ifundefined{Crefrange@subsubappendix@format@last}{% \let\Crefrange@subsubappendix@format@last% \Crefrange@subappendix@format@last}{}% \@ifundefined{cref@subsubsubappendix@format}{% \let\cref@subsubsubappendix@format% \cref@subsubappendix@format}{}% \@ifundefined{Cref@subsubsubappendix@format}{% \let\Cref@subsubsubappendix@format% \Cref@subsubappendix@format}{}% \@ifundefined{crefrange@subsubsubappendix@format}{% \let\crefrange@subsubsubappendix@format% \crefrange@subsubappendix@format}{}% \@ifundefined{Crefrange@subsubsubappendix@format}{% \let\Crefrange@subsubsubappendix@format% \Crefrange@subsubappendix@format}{}% \@ifundefined{cref@subsubsubappendix@format@first}{% \let\cref@subsubsubappendix@format@first% \cref@subsubappendix@format@first}{}% \@ifundefined{Cref@subsubsubappendix@format@first}{% \let\Cref@subsubsubappendix@format@first% \Cref@subsubappendix@format@first}{}% \@ifundefined{cref@subsubsubappendix@format@second}{% \let\cref@subsubsubappendix@format@second% \cref@subsubappendix@format@second}{}% \@ifundefined{Cref@subsubsubappendix@format@second}{% \let\Cref@subsubsubappendix@format@second% \Cref@subsubappendix@format@second}{}% \@ifundefined{cref@subsubsubappendix@format@middle}{% \let\cref@subsubsubappendix@format@middle% \cref@subsubappendix@format@middle}{}% \@ifundefined{Cref@subsubsubappendix@format@middle}{% \let\Cref@subsubsubappendix@format@middle% \Cref@subsubappendix@format@middle}{}% \@ifundefined{cref@subsubsubappendix@format@last}{% \let\cref@subsubsubappendix@format@last% \cref@subsubappendix@format@last}{}% \@ifundefined{Cref@subsubsubappendix@format@last}{% \let\Cref@subsubsubappendix@format@last% \Cref@subsubappendix@format@last}{}% \@ifundefined{crefrange@subsubsubappendix@format@first}{% \let\crefrange@subsubsubappendix@format@first% \crefrange@subsubappendix@format@first}{}% \@ifundefined{Crefrange@subsubsubappendix@format@first}{% \let\Crefrange@subsubsubappendix@format@first% \Crefrange@subsubappendix@format@first}{}% \@ifundefined{crefrange@subsubsubappendix@format@second}{% \let\crefrange@subsubsubappendix@format@second% \crefrange@subsubappendix@format@second}{}% \@ifundefined{Crefrange@subsubsubappendix@format@second}{% \let\Crefrange@subsubsubappendix@format@second% \Crefrange@subsubappendix@format@second}{}% \@ifundefined{crefrange@subsubsubappendix@format@middle}{% \let\crefrange@subsubsubappendix@format@middle% \crefrange@subsubappendix@format@middle}{}% \@ifundefined{Crefrange@subsubsubappendix@format@middle}{% \let\Crefrange@subsubsubappendix@format@middle% \Crefrange@subsubappendix@format@middle}{}% \@ifundefined{crefrange@subsubsubappendix@format@last}{% \let\crefrange@subsubsubappendix@format@last% \crefrange@subsubappendix@format@last}{}% \@ifundefined{Crefrange@subsubsubappendix@format@last}{% \let\Crefrange@subsubsubappendix@format@last% \Crefrange@subsubappendix@format@last}{}% \@ifundefined{cref@subfigure@format}{% \let\cref@subfigure@format% \cref@figure@format}{}% \@ifundefined{Cref@subfigure@format}{% \let\Cref@subfigure@format% \Cref@figure@format}{}% \@ifundefined{crefrange@subfigure@format}{% \let\crefrange@subfigure@format% \crefrange@figure@format}{}% \@ifundefined{Crefrange@subfigure@format}{% \let\Crefrange@subfigure@format% \Crefrange@figure@format}{}% \@ifundefined{cref@subfigure@format@first}{% \let\cref@subfigure@format@first% \cref@figure@format@first}{}% \@ifundefined{Cref@subfigure@format@first}{% \let\Cref@subfigure@format@first% \Cref@figure@format@first}{}% \@ifundefined{cref@subfigure@format@second}{% \let\cref@subfigure@format@second% \cref@figure@format@second}{}% \@ifundefined{Cref@subfigure@format@second}{% \let\Cref@subfigure@format@second% \Cref@figure@format@second}{}% \@ifundefined{cref@subfigure@format@middle}{% \let\cref@subfigure@format@middle% \cref@figure@format@middle}{}% \@ifundefined{Cref@subfigure@format@middle}{% \let\Cref@subfigure@format@middle% \Cref@figure@format@middle}{}% \@ifundefined{cref@subfigure@format@last}{% \let\cref@subfigure@format@last% \cref@figure@format@last}{}% \@ifundefined{Cref@subfigure@format@last}{% \let\Cref@subfigure@format@last% \Cref@figure@format@last}{}% \@ifundefined{crefrange@subfigure@format@first}{% \let\crefrange@subfigure@format@first% \crefrange@figure@format@first}{}% \@ifundefined{Crefrange@subfigure@format@first}{% \let\Crefrange@subfigure@format@first% \Crefrange@figure@format@first}{}% \@ifundefined{crefrange@subfigure@format@second}{% \let\crefrange@subfigure@format@second% \crefrange@figure@format@second}{}% \@ifundefined{Crefrange@subfigure@format@second}{% \let\Crefrange@subfigure@format@second% \Crefrange@figure@format@second}{}% \@ifundefined{crefrange@subfigure@format@middle}{% \let\crefrange@subfigure@format@middle% \crefrange@figure@format@middle}{}% \@ifundefined{Crefrange@subfigure@format@middle}{% \let\Crefrange@subfigure@format@middle% \Crefrange@figure@format@middle}{}% \@ifundefined{crefrange@subfigure@format@last}{% \let\crefrange@subfigure@format@last% \crefrange@figure@format@last}{}% \@ifundefined{Crefrange@subfigure@format@last}{% \let\Crefrange@subfigure@format@last% \Crefrange@figure@format@last}{}% \@ifundefined{cref@subtable@format}{% \let\cref@subtable@format% \cref@table@format}{}% \@ifundefined{Cref@subtable@format}{% \let\Cref@subtable@format% \Cref@table@format}{}% \@ifundefined{crefrange@subtable@format}{% \let\crefrange@subtable@format% \crefrange@table@format}{}% \@ifundefined{Crefrange@subtable@format}{% \let\Crefrange@subtable@format% \Crefrange@table@format}{}% \@ifundefined{cref@subtable@format@first}{% \let\cref@subtable@format@first% \cref@table@format@first}{}% \@ifundefined{Cref@subtable@format@first}{% \let\Cref@subtable@format@first% \Cref@table@format@first}{}% \@ifundefined{cref@subtable@format@second}{% \let\cref@subtable@format@second% \cref@table@format@second}{}% \@ifundefined{Cref@subtable@format@second}{% \let\Cref@subtable@format@second% \Cref@table@format@second}{}% \@ifundefined{cref@subtable@format@middle}{% \let\cref@subtable@format@middle% \cref@table@format@middle}{}% \@ifundefined{Cref@subtable@format@middle}{% \let\Cref@subtable@format@middle% \Cref@table@format@middle}{}% \@ifundefined{cref@subtable@format@last}{% \let\cref@subtable@format@last% \cref@table@format@last}{}% \@ifundefined{Cref@subtable@format@last}{% \let\Cref@subtable@format@last% \Cref@table@format@last}{}% \@ifundefined{crefrange@subtable@format@first}{% \let\crefrange@subtable@format@first% \crefrange@table@format@first}{}% \@ifundefined{Crefrange@subtable@format@first}{% \let\Crefrange@subtable@format@first% \Crefrange@table@format@first}{}% \@ifundefined{crefrange@subtable@format@second}{% \let\crefrange@subtable@format@second% \crefrange@table@format@second}{}% \@ifundefined{Crefrange@subtable@format@second}{% \let\Crefrange@subtable@format@second% \Crefrange@table@format@second}{}% \@ifundefined{crefrange@subtable@format@middle}{% \let\crefrange@subtable@format@middle% \crefrange@table@format@middle}{}% \@ifundefined{Crefrange@subtable@format@middle}{% \let\Crefrange@subtable@format@middle% \Crefrange@table@format@middle}{}% \@ifundefined{crefrange@subtable@format@last}{% \let\crefrange@subtable@format@last% \crefrange@table@format@last}{}% \@ifundefined{Crefrange@subtable@format@last}{% \let\Crefrange@subtable@format@last% \Crefrange@table@format@last}{}% \@ifundefined{cref@enumii@format}{% \let\cref@enumii@format% \cref@enumi@format}{}% \@ifundefined{Cref@enumii@format}{% \let\Cref@enumii@format% \Cref@enumi@format}{}% \@ifundefined{crefrange@enumii@format}{% \let\crefrange@enumii@format% \crefrange@enumi@format}{}% \@ifundefined{Crefrange@enumii@format}{% \let\Crefrange@enumii@format% \Crefrange@enumi@format}{}% \@ifundefined{cref@enumii@format@first}{% \let\cref@enumii@format@first% \cref@enumi@format@first}{}% \@ifundefined{Cref@enumii@format@first}{% \let\Cref@enumii@format@first% \Cref@enumi@format@first}{}% \@ifundefined{cref@enumii@format@second}{% \let\cref@enumii@format@second% \cref@enumi@format@second}{}% \@ifundefined{Cref@enumii@format@second}{% \let\Cref@enumii@format@second% \Cref@enumi@format@second}{}% \@ifundefined{cref@enumii@format@middle}{% \let\cref@enumii@format@middle% \cref@enumi@format@middle}{}% \@ifundefined{Cref@enumii@format@middle}{% \let\Cref@enumii@format@middle% \Cref@enumi@format@middle}{}% \@ifundefined{cref@enumii@format@last}{% \let\cref@enumii@format@last% \cref@enumi@format@last}{}% \@ifundefined{Cref@enumii@format@last}{% \let\Cref@enumii@format@last% \Cref@enumi@format@last}{}% \@ifundefined{crefrange@enumii@format@first}{% \let\crefrange@enumii@format@first% \crefrange@enumi@format@first}{}% \@ifundefined{Crefrange@enumii@format@first}{% \let\Crefrange@enumii@format@first% \Crefrange@enumi@format@first}{}% \@ifundefined{crefrange@enumii@format@second}{% \let\crefrange@enumii@format@second% \crefrange@enumi@format@second}{}% \@ifundefined{Crefrange@enumii@format@second}{% \let\Crefrange@enumii@format@second% \Crefrange@enumi@format@second}{}% \@ifundefined{crefrange@enumii@format@middle}{% \let\crefrange@enumii@format@middle% \crefrange@enumi@format@middle}{}% \@ifundefined{Crefrange@enumii@format@middle}{% \let\Crefrange@enumii@format@middle% \Crefrange@enumi@format@middle}{}% \@ifundefined{crefrange@enumii@format@last}{% \let\crefrange@enumii@format@last% \crefrange@enumi@format@last}{}% \@ifundefined{Crefrange@enumii@format@last}{% \let\Crefrange@enumii@format@last% \Crefrange@enumi@format@last}{}% \@ifundefined{cref@enumiii@format}{% \let\cref@enumiii@format% \cref@enumii@format}{}% \@ifundefined{Cref@enumiii@format}{% \let\Cref@enumiii@format% \Cref@enumii@format}{}% \@ifundefined{crefrange@enumiii@format}{% \let\crefrange@enumiii@format% \crefrange@enumii@format}{}% \@ifundefined{Crefrange@enumiii@format}{% \let\Crefrange@enumiii@format% \Crefrange@enumii@format}{}% \@ifundefined{cref@enumiii@format@first}{% \let\cref@enumiii@format@first% \cref@enumii@format@first}{}% \@ifundefined{Cref@enumiii@format@first}{% \let\Cref@enumiii@format@first% \Cref@enumii@format@first}{}% \@ifundefined{cref@enumiii@format@second}{% \let\cref@enumiii@format@second% \cref@enumii@format@second}{}% \@ifundefined{Cref@enumiii@format@second}{% \let\Cref@enumiii@format@second% \Cref@enumii@format@second}{}% \@ifundefined{cref@enumiii@format@middle}{% \let\cref@enumiii@format@middle% \cref@enumii@format@middle}{}% \@ifundefined{Cref@enumiii@format@middle}{% \let\Cref@enumiii@format@middle% \Cref@enumii@format@middle}{}% \@ifundefined{cref@enumiii@format@last}{% \let\cref@enumiii@format@last% \cref@enumii@format@last}{}% \@ifundefined{Cref@enumiii@format@last}{% \let\Cref@enumiii@format@last% \Cref@enumii@format@last}{}% \@ifundefined{crefrange@enumiii@format@first}{% \let\crefrange@enumiii@format@first% \crefrange@enumii@format@first}{}% \@ifundefined{Crefrange@enumiii@format@first}{% \let\Crefrange@enumiii@format@first% \Crefrange@enumii@format@first}{}% \@ifundefined{crefrange@enumiii@format@second}{% \let\crefrange@enumiii@format@second% \crefrange@enumii@format@second}{}% \@ifundefined{Crefrange@enumiii@format@second}{% \let\Crefrange@enumiii@format@second% \Crefrange@enumii@format@second}{}% \@ifundefined{crefrange@enumiii@format@middle}{% \let\crefrange@enumiii@format@middle% \crefrange@enumii@format@middle}{}% \@ifundefined{Crefrange@enumiii@format@middle}{% \let\Crefrange@enumiii@format@middle% \Crefrange@enumii@format@middle}{}% \@ifundefined{crefrange@enumiii@format@last}{% \let\crefrange@enumiii@format@last% \crefrange@enumii@format@last}{}% \@ifundefined{Crefrange@enumiii@format@last}{% \let\Crefrange@enumiii@format@last% \Crefrange@enumii@format@last}{}% \@ifundefined{cref@enumiv@format}{% \let\cref@enumiv@format% \cref@enumiii@format}{}% \@ifundefined{Cref@enumiv@format}{% \let\Cref@enumiv@format% \Cref@enumiii@format}{}% \@ifundefined{crefrange@enumiv@format}{% \let\crefrange@enumiv@format% \crefrange@enumiii@format}{}% \@ifundefined{Crefrange@enumiv@format}{% \let\Crefrange@enumiv@format% \Crefrange@enumiii@format}{}% \@ifundefined{cref@enumiv@format@first}{% \let\cref@enumiv@format@first% \cref@enumiii@format@first}{}% \@ifundefined{Cref@enumiv@format@first}{% \let\Cref@enumiv@format@first% \Cref@enumiii@format@first}{}% \@ifundefined{cref@enumiv@format@second}{% \let\cref@enumiv@format@second% \cref@enumiii@format@second}{}% \@ifundefined{Cref@enumiv@format@second}{% \let\Cref@enumiv@format@second% \Cref@enumiii@format@second}{}% \@ifundefined{cref@enumiv@format@middle}{% \let\cref@enumiv@format@middle% \cref@enumiii@format@middle}{}% \@ifundefined{Cref@enumiv@format@middle}{% \let\Cref@enumiv@format@middle% \Cref@enumiii@format@middle}{}% \@ifundefined{cref@enumiv@format@last}{% \let\cref@enumiv@format@last% \cref@enumiii@format@last}{}% \@ifundefined{Cref@enumiv@format@last}{% \let\Cref@enumiv@format@last% \Cref@enumiii@format@last}{}% \@ifundefined{crefrange@enumiv@format@first}{% \let\crefrange@enumiv@format@first% \crefrange@enumiii@format@first}{}% \@ifundefined{Crefrange@enumiv@format@first}{% \let\Crefrange@enumiv@format@first% \Crefrange@enumiii@format@first}{}% \@ifundefined{crefrange@enumiv@format@second}{% \let\crefrange@enumiv@format@second% \crefrange@enumiii@format@second}{}% \@ifundefined{Crefrange@enumiv@format@second}{% \let\Crefrange@enumiv@format@second% \Crefrange@enumiii@format@second}{}% \@ifundefined{crefrange@enumiv@format@middle}{% \let\crefrange@enumiv@format@middle% \crefrange@enumiii@format@middle}{}% \@ifundefined{Crefrange@enumiv@format@middle}{% \let\Crefrange@enumiv@format@middle% \Crefrange@enumiii@format@middle}{}% \@ifundefined{crefrange@enumiv@format@last}{% \let\crefrange@enumiv@format@last% \crefrange@enumiii@format@last}{}% \@ifundefined{Crefrange@enumiv@format@last}{% \let\Crefrange@enumiv@format@last% \Crefrange@enumiii@format@last}{}% \@ifundefined{cref@enumv@format}{% \let\cref@enumv@format% \cref@enumiv@format}{}% \@ifundefined{Cref@enumv@format}{% \let\Cref@enumv@format% \Cref@enumiv@format}{}% \@ifundefined{crefrange@enumv@format}{% \let\crefrange@enumv@format% \crefrange@enumiv@format}{}% \@ifundefined{Crefrange@enumv@format}{% \let\Crefrange@enumv@format% \Crefrange@enumiv@format}{}% \@ifundefined{cref@enumv@format@first}{% \let\cref@enumv@format@first% \cref@enumiv@format@first}{}% \@ifundefined{Cref@enumv@format@first}{% \let\Cref@enumv@format@first% \Cref@enumiv@format@first}{}% \@ifundefined{cref@enumv@format@second}{% \let\cref@enumv@format@second% \cref@enumiv@format@second}{}% \@ifundefined{Cref@enumv@format@second}{% \let\Cref@enumv@format@second% \Cref@enumiv@format@second}{}% \@ifundefined{cref@enumv@format@middle}{% \let\cref@enumv@format@middle% \cref@enumiv@format@middle}{}% \@ifundefined{Cref@enumv@format@middle}{% \let\Cref@enumv@format@middle% \Cref@enumiv@format@middle}{}% \@ifundefined{cref@enumv@format@last}{% \let\cref@enumv@format@last% \cref@enumiv@format@last}{}% \@ifundefined{Cref@enumv@format@last}{% \let\Cref@enumv@format@last% \Cref@enumiv@format@last}{}% \@ifundefined{crefrange@enumv@format@first}{% \let\crefrange@enumv@format@first% \crefrange@enumiv@format@first}{}% \@ifundefined{Crefrange@enumv@format@first}{% \let\Crefrange@enumv@format@first% \Crefrange@enumiv@format@first}{}% \@ifundefined{crefrange@enumv@format@second}{% \let\crefrange@enumv@format@second% \crefrange@enumiv@format@second}{}% \@ifundefined{Crefrange@enumv@format@second}{% \let\Crefrange@enumv@format@second% \Crefrange@enumiv@format@second}{}% \@ifundefined{crefrange@enumv@format@middle}{% \let\crefrange@enumv@format@middle% \crefrange@enumiv@format@middle}{}% \@ifundefined{Crefrange@enumv@format@middle}{% \let\Crefrange@enumv@format@middle% \Crefrange@enumiv@format@middle}{}% \@ifundefined{crefrange@enumv@format@last}{% \let\crefrange@enumv@format@last% \crefrange@enumiv@format@last}{}% \@ifundefined{Crefrange@enumv@format@last}{% \let\Crefrange@enumv@format@last% \Crefrange@enumiv@format@last}{}% \let\cref@language\relax% }% end of \AtBeginDocument \InputIfFileExists{cleveref.cfg}% {\PackageInfo{cleveref}{reading definitions from cleveref.cfg}}{} \endinput %% %% End of file `cleveref.sty'. pkgmaker/inst/doc/0000755000176000001440000000000012334654065013635 5ustar ripleyuserspkgmaker/inst/doc/pkgmaker-unitTests.R0000644000176000001440000000041612334654065017562 0ustar ripleyusers ## ----setup, include=FALSE------------------------------------------------ pkg <- 'pkgmaker' require( pkg, character.only=TRUE ) prettyVersion <- packageDescription(pkg)$Version prettyDate <- format(Sys.Date(), '%B %e, %Y') authors <- packageDescription(pkg)$Author pkgmaker/inst/doc/pkgmaker-unitTests.pdf0000644000176000001440000030103412334653770020134 0ustar ripleyusers%PDF-1.5 % 9 0 obj << /Length 925 /Filter /FlateDecode >> stream xVMs6W !|[ML{pM*+dIP}Pؙd >|A'e ^k.1;MAD"$y@lˈǴ})k1O& qjL˨&8'L(LA[ g+AvrqI  휶 @B!(Gߝd ) tSxW1j]AP+pHs#[/" tNB 0EN5aG7qB #!HI[JrH{}\Iɞ endstream endobj 24 0 obj << /Length 690 /Filter /FlateDecode >> stream xڵUMo0WwJ=Rj\BTU߯S'@,j=y~#g UE"3H NpxCw"[ @=vz!u|\ v"J 0O*;?jrEM-76Q4uu P!;AFfKtCA̳LC2>1 $t!eߝȹCL|In7at6m.>F ET |?Eqy&;%A'N!tarL8 .`Qjaޠ%a|{ SEQx>b0F iޞk<> stream xڍT5 ҍtH7HwH, !!HIHw(%HJ( /g;sgyD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\A{ʶo?zb=8}8VzNۆDo ]?L[~/R=}e(´rVMeu'WvV+SΦN6ߛw :r'Pj6R΢EH_kEh64>=8?4 4ZF i0h0MC֦}ʤiChy߇_>]0;1̇?0'k{l z>޼jŦZ"s[0 blȎ Ntnq)zBP(My (lP[UW{Pgg?r~TSh P%ܾ(Ԭ8^(8G8QN69@Fl4[Ӭ})P~lC͋,>xL*폖z\Է]6\z4٪Ⱦ:;GFPq|75E(_@=u0m(9ԄGꄱ.okWz id֛"= yu+{ע|w-ҷt]X7VޙpViϵY7Qw?zrM}j޹ϳZaηwܯ]f-ϔݔge|-rI4rn֝k{ŀū.#KIBr^PYc,ޓNS'iS̚ h"k=˧.2<m#i;}ԕ7]\VbjƞӛAngQbMy8.\Qly/S endstream endobj 59 0 obj << /Type /XRef /Index [0 60] /Size 60 /W [1 3 1] /Root 57 0 R /Info 58 0 R /ID [<4721F43E8B44A0F9BBBD601D002BDFB6> <4721F43E8B44A0F9BBBD601D002BDFB6>] /Length 171 /Filter /FlateDecode >> stream xнQ;QDQAţf21й2"("My V)]> PH0!`70{[x#YO!CN S8&ܪn*VQ}յ/Qfճ.lueQ}5 | endstream endobj startxref 98423 %%EOF pkgmaker/inst/doc/pkgmaker.Rnw0000644000176000001440000000356512334654065016137 0ustar ripleyusers%\VignetteIndexEntry{Overview of Utilities in the pkgmaker Package} %\VignetteDepends{knitr,bibtex} %\VignetteCompiler{knitr} %\VignetteEngine{knitr::knitr} \documentclass[a4paper]{article} \usepackage[colorlinks]{hyperref} % for hyperlinks \usepackage{a4wide} \usepackage{xspace} \usepackage[all]{hypcap} % for linking to the top of the figures or tables % add preamble from pkgmaker <>= library(pkgmaker) pkgmaker::latex_preamble() @ \title{Overview of Utilities in the pkgmaker Package\\ \small Version \Sexpr{utils::packageVersion('pkgmaker')}} \author{Renaud Gaujoux} \begin{document} \maketitle \section{Knitr hooks} \subsection{hook\_try: showing error message in try statements} This hooks aims at showing the error message generated by \code{try} blocks, which are otherwise not shown in the generated document. \subsubsection*{Hook registration} <>= library(knitr) knit_hooks$set(try = pkgmaker::hook_try) @ \subsubsection*{Usage} <>= try( stop('this error will not appear in the document')) @ Using chunk option \code{try = TRUE}, the error message is shown in the document: <>= txt <- 'this error will be shown' try( stop(txt) ) @ Note that by default, the error message is not highlighted by \code{knitr} as an error but only as a normal message. This is because highlighting apparently relies on an actual error signal condition being raised, which in turn makes the package building process \code{R CMD build} fail. However, it is still possible to hightlight the error when generating a document outside a package, by using the chunk option \code{try = FALSE}: <>= txt <- 'this error will be shown' try( stop(txt) ) @ \pagebreak \section{Session Info} <>= toLatex(sessionInfo()) @ \end{document} pkgmaker/inst/doc/pkgmaker.pdf0000644000176000001440000031661712334653772016153 0ustar ripleyusers%PDF-1.5 % 17 0 obj << /Length 1598 /Filter /FlateDecode >> stream xYYs6~ׯ$} g"' zڇI:iQf2DK$R%)+@Qi2vMcw>FGoG/qMxL׊W("TAFS&:QUy r&_M5/\3Y/ftV#K:""HgYv䈈I91JH2&:qbܧKdd@D8&L-p &neV),͟=% eJ.ԗi(+M7E<8<vJЄ X `^B˃rQwtB3+ʯejt4ka6#HњS d5x) Đ"2$9s c>\CXP 6/fNJ*k4}.-,uIl8$=EI-=Q)/=3xW~$m\d@pΧ;aY'"gYU ԍC`$ٓLD:Ʊ\9È52W[ɼL`l :X?XysMZqtV0sv<$EVn軹Dǣ9[ 5܊_q#..]Y+}xXX*qd9XcƤ*Q=p'&i)wV~3j>˥!tR? [ 3--j}w:RDrKe* #p G*-< c(T?|kA%'=Lv@><8]ժ6AsqrH U0E+џJs0+a.8y@W36g0m7F ģ[zC}~K ;?OǏoH#g.?H}ӫS4Z!?xQ,ygƋ/~v;;C濍O#Eʘߛˆ߹Vr` endstream endobj 33 0 obj << /Length 743 /Filter /FlateDecode >> stream xڵVMo@WhKfR%0 ހMc8 'v3o罙[3 [.p{^\g ,[eKaӦKؤiNy$OkWct&/Ar)A/UsW _mGp cC=l{!pSLK0etz T! '%݋;Kvh)$| 8|"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FtR#@z >a1Xrz?G)ǿp"PwLHqMLoshbsH .ZQPqzKK9`A5vsq|x=V:$syi%:YU7FS%6p>1GφR.Gnq }QƂЦ߂i.t7C&1;r1[zjZu_KXF~1uPtEj"㝾W=sEl]75~~{R~ْdbG:+bnkt6.`|! z X1K !@=̨+ tmF-fTmY+Ev>짆,ŘO '^[6}g;zwxMg0e ~ |L/@Ţ ~ >,b\!v([dds68j[(G6馥Ӯ> @5]e{<@&(i8Hirw[,_ Ĵ75[}G1ypl3%~hRFLrhVc+ox6d4amo,A HP endstream endobj 69 0 obj << /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.14)/Keywords() /CreationDate (D:20140514134810+02'00') /ModDate (D:20140514134810+02'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) kpathsea version 6.1.1) >> endobj 2 0 obj << /Type /ObjStm /N 56 /First 414 /Length 2487 /Filter /FlateDecode >> stream xZYs8~ׯc[JM8$vs8Y?6csG="c~ PI[qITYPu ,cY5 &2&Ƈ /QaR& gGmƙjQR#PbtDmb'?T %wN Ùj7e!Ṫb58dB!Q Mc?-MZCٴ2 '7&0Qk(]L^SΈQ‹ l3EF{Z=POO|L.ccBS-2u\+ZeD8S\ijN*i{hr ѱ Zl48d1u Ticqćp)pBfQƙ!-ՋĀ,zRiU:^z+|dX^ZrdF#RB<~ x'~]{'(pxӸ64 $+%[K: Lj>-iY| lM=8cP9Jȅ7$)@CR }I-iM\2ev`8ܥVOF+CSXR`E#Jc*4Dt[ 7CԗivKKgtjSPN6Y:a$C-ElZ.$9 /"31.aKw@bu"HЭ4edzi8ӸlLp8b4D#d;Ռ2bc^ Fkqa=I3ޫh;Ǔb{z5-a}#=:3z-x>9Oyg4zi)bw?e_ORqK_<6vM]:>R'WymΩ+y?&pnI6˝O<=o\۶q)F׺֕Vͭ6myl{;b϶c[-7ۗz[X֛=$0+js5nʶWٞ;[S.ˠ9L!^R+]n^I1%h5F&5>,-M4Lt{6gg͋(r#vYZ6`̷fۓ մG{q=Տnyt Vֳ|L񹹅H>bS r)Yv _!eWݒ3/!k;5*|y5HiI\*pIQ˜U6ͧ:?Dc%Z endstream endobj 70 0 obj << /Type /XRef /Index [0 71] /Size 71 /W [1 3 1] /Root 68 0 R /Info 69 0 R /ID [<6F501097C9B81501CE087CEAAC5425B8> <6F501097C9B81501CE087CEAAC5425B8>] /Length 189 /Filter /FlateDecode >> stream x;2s!y xDDC$v,@ ielŒ:(tZw|=ŕDJd/_Em%Re:![1ЇSMAN`(Z+9lBjuhk~uh ul}EsT۞ :OT0+>ĉ endstream endobj startxref 105431 %%EOF pkgmaker/inst/doc/pkgmaker.R0000644000176000001440000000136012334654065015561 0ustar ripleyusers ## ----pkgmaker_preamble, message = FALSE, echo=FALSE, results='asis'------ library(pkgmaker) pkgmaker::latex_preamble() ## ----hook_try------------------------------------------------------------ library(knitr) knit_hooks$set(try = pkgmaker::hook_try) ## ----without_try--------------------------------------------------------- try( stop('this error will not appear in the document')) ## ----with_try, try = NA-------------------------------------------------- txt <- 'this error will be shown' try( stop(txt) ) ## ----with_try_highlight, try = TRUE-------------------------------------- txt <- 'this error will be shown' try( stop(txt) ) ## ----sessionInfo, echo=FALSE, results='asis'----------------------------- toLatex(sessionInfo()) pkgmaker/inst/doc/pkgmaker-unitTests.Rnw0000644000176000001440000000503412334654065020130 0ustar ripleyusers \documentclass[10pt]{article} %\VignetteDepends{knitr} %\VignetteIndexEntry{pkgmaker-unitTests} %\VignetteCompiler{knitr} %\VignetteEngine{knitr::knitr} \usepackage{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} <>= pkg <- 'pkgmaker' require( pkg, character.only=TRUE ) prettyVersion <- packageDescription(pkg)$Version prettyDate <- format(Sys.Date(), '%B %e, %Y') authors <- packageDescription(pkg)$Author @ \usepackage[colorlinks]{hyperref} \author{\Sexpr{authors}} \title{\texttt{\Sexpr{pkg}}: Unit testing results\footnote{Vignette computed on Wed May 14 13:48:07 2014}} \date{\texttt{\Sexpr{pkg}} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \section{Details} \begin{verbatim} RUNIT TEST PROTOCOL -- Wed May 14 13:48:07 2014 *********************************************** Number of test functions: 6 Number of errors: 0 Number of failures: 0 1 Test Suite : package:pkgmaker - 6 test functions, 0 errors, 0 failures Details *************************** Test Suite: package:pkgmaker Test function regexp: ^test. Test file regexp: ^runit.*.[rR]$ Involved directory: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests --------------------------- Test file: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests/runit.options.r test.option_link: (12 checks) ... OK (0.01 seconds) test.resetOptions: (9 checks) ... OK (0 seconds) --------------------------- Test file: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests/runit.utils.r test.errorCheck: (8 checks) ... OK (0 seconds) test.ExposeAttribute: (20 checks) ... OK (0.01 seconds) test.str_bs: (7 checks) ... OK (0 seconds) test.Sys.getenv_value: (6 checks) ... OK (0 seconds) Total execution time *************************** user system elapsed 0.187 0.000 0.187 \end{verbatim} \section*{Session Information} \begin{itemize}\raggedright \item R version 3.1.0 (2014-04-10), \verb|x86_64-pc-linux-gnu| \item Locale: \verb|LC_CTYPE=en_US.UTF-8|, \verb|LC_NUMERIC=C|, \verb|LC_TIME=en_US.UTF-8|, \verb|LC_COLLATE=en_US.UTF-8|, \verb|LC_MONETARY=en_US.UTF-8|, \verb|LC_MESSAGES=en_US.UTF-8|, \verb|LC_PAPER=en_US.UTF-8|, \verb|LC_NAME=C|, \verb|LC_ADDRESS=C|, \verb|LC_TELEPHONE=C|, \verb|LC_MEASUREMENT=en_US.UTF-8|, \verb|LC_IDENTIFICATION=C| \item Base packages: base, datasets, graphics, grDevices, methods, stats, utils \item Other packages: pkgmaker~0.22, registry~0.2, RUnit~0.4.26, stringr~0.6.2 \item Loaded via a namespace (and not attached): codetools~0.2-8, digest~0.6.4, tools~3.1.0, xtable~1.7-3 \end{itemize} \end{document} pkgmaker/tests/0000755000176000001440000000000012330274520013243 5ustar ripleyuserspkgmaker/tests/doRUnit.R0000644000176000001440000000032412330274520014751 0ustar ripleyusers# Run all unit tests in installed directory unitTests # # Author: Renaud Gaujoux ############################################################################### pkgmaker::utest('package:pkgmaker', quiet=FALSE) pkgmaker/NAMESPACE0000644000176000001440000000707712330274520013333 0ustar ripleyusersexport(cgetAnywhere) export(require.quiet) export(testRversion) export(Rversion) export(str_out) export(str_desc) export(str_fun) export(str_diff) export(extractLocalFun) export(allFormals) export(new2) export(oneoffVariable) export(sVariable) export(exitCheck) export(orderVersion) export(sortVersion) export(hasArg2) export(ExposeAttribute) export(attr_mode) export("attr_mode<-") export(userIs) export(expand_list) export(expand_dots) export(hasEnvar) export(requireRUnit) export(checkPlot) export(checkWarning) export(makeUnitVignette) export(writeUnitVignette) export(utestFramework) export(unit.test) export(packageTestEnv) export(utest) export(utestPath) export(addnames) export(getLoadingNamespace) export(isLoadingNamespace) export(isNamespaceLoaded) export(isDevNamespace) export(addNamespaceExport) export(ns_get) export(R.exec) export(R.CMD) export(R.SHLIB) export(compile_src) export(packageEnv) export(topns_name) export(topns) export(str_ns) export(packagePath) export(isPackageInstalled) export(packageData) export(ldata) export(onLoad) export(onUnload) export(postponeAction) export(runPostponedAction) export(simpleRegistry) export(setupPackageOptions) export(option_symlink) export(is_option_symlink) export(option_symlink_target) export(as.package_options) export(mkoptions) export(packageOptions) export(listPackageOptions) export(is_NA) export(isFALSE) export(isNumber) export(isReal) export(isInteger) export(isString) export(is.dir) export(is.file) export(hasNames) export(packageRegistry) export(packageRegistries) export(hasPackageRegistry) export(setPackageRegistry) export(regfetch) export(pkgreg_fetch) export(pkgreg_remove) export(setPackageRegistryEntry) export(write.pkgbib) export(packageReference) export(citecmd) export(quickinstall) export(requirePackage) export(packageDependencies) export(install.dependencies) export(setBiocMirror) export(getBiocMirror) export(getBiocRepos) export(setCRANMirror) export(CRAN) export(add_lib) export(isCRANcheck) export(isCRAN_timing) export(isCHECK) export(Sys.getenv_value) export(inSweave) export(makeFakeVignette) export(latex_preamble) export(latex_bibliography) export(isManualVignette) export(rnw) export(as.rnw) export(rnwCompiler) export(rnwWrapper) export(rnwDriver) export(rnwIncludes) export(rnwChildren) export(parsePackageCitation) export(vignetteMakefile) export(compactVignettes) export(list.libs) export(libname) export(source_files) export(file_extension) export(setPackageExtraHandler) export(packageExtraHandler) export(setPackageExtra) export(packageExtra) export(packageExtraRunner) export(install.extras) export(install.extrapackages) export(alphacol) export(mfrow) export(RdSection2latex) export(CLIArgumentParser) export(parseCMD) export(packageCLI) export(knit_ex) export(hook_try) export(hook_backspace) export(str_bs) export(hook_toggle) export(write_PACKAGES_index) import(codetools) import(digest) import(stats) import(methods) import(registry) import(stringr) importFrom(utils,.DollarNames) importFrom(xtable,xtable) importFrom(grDevices,col2rgb) importFrom(tools,Rd_db) S3method(print,str_diff) S3method(.DollarNames,ExposeAttribute) S3method("$",ExposeAttribute) S3method("$<-",ExposeAttribute) S3method(print,ExposeAttribute) S3method(addnames,default) S3method(addnames,vector) S3method(addnames,array) S3method(addnames,matrix) S3method(print,package_options) S3method("[[",package_options) S3method("[[<-",package_options) S3method(format,package_subregistry) S3method(format,package_metaregistry) S3method(print,package_metaregistry) S3method(xtable,package_metaregistry) S3method(runVignette,rnw_knitr) S3method(runVignette,rnw_sweave) pkgmaker/R/0000755000176000001440000000000012330274520012302 5ustar ripleyuserspkgmaker/R/repositories.R0000644000176000001440000000674212330274520015165 0ustar ripleyusers# Project: pkgmaker # # Author: Renaud Gaujoux # Created: Feb 13, 2014 ############################################################################### .PACKAGES_fields <- c('Package', 'Version') #' Generate CRAN-like Repository Index #' #' @param path path to the repository's root directory #' @param output output filename -- relative to the repository root \code{path}. #' @param pattern regular expression used to filter the names of the packages that will appear in #' the index. #' @param title title of the index page #' @param robots.file logical that indicates if a file \code{robots.txt} that hides the repository from #' search engine robots should be created. #' @export write_PACKAGES_index <- function(path = '.', output = 'index.html', pattern = NULL, title = 'Packages', robots.file = TRUE){ # parameters dir <- path sel <- .PACKAGES_fields # load package list from contrib repo_dir <- normalizePath(dir) contrib_dir <- contrib.url(repo_dir) repo <- paste0('file://', repo_dir) contrib <- contrib.url(repo) contrib_path <- contrib.url('.') # change to repo base directory od <- setwd(repo_dir) on.exit( setwd(od) ) # write PACKAGES files makePACKAGES <- function(dir = '.'){ od <- setwd(dir) on.exit( setwd(od) ) smessage('Generating PACKAGES file for ', dir, ' ... ') n <- tools::write_PACKAGES('.', fields = sel) message('OK [', n, ']') n } makePACKAGES(contrib_path) smessage('Generating HTML page in ', repo_dir, appendLF = TRUE) if( robots.file ){ write("User-agent: *\nDisallow: /\n\n", file = file.path(repo_dir, 'robots.txt')) } smessage('Reading PACKAGES file in ', contrib_path, ' ... ') p <- available.packages(contrib, fields = sel) message('OK [', nrow(p), ']') if( !is.null(pattern) ){ smessage('Selecting packages matching pattern "', pattern, '" only ... ') i <- grep(pattern, p[, 'Package']) message('OK [', length(i), '/', nrow(p), ']') p <- p[i, , drop = FALSE] } df <- as.data.frame(p[, sel, drop = FALSE], stringsAsFactors = FALSE) # write index page smessage('Loading required packages ... ') qlibrary('ReportingTools') qlibrary('hwriter') message('OK') smessage('Generating ', output, ' ... ') index <- HTMLReport(shortName = tools::file_path_sans_ext(output), title = title) # link to source package linkPackage <- function(df, ...){ pkg_src <- file.path(sub(file.path(repo, ''), '', contrib, fixed = TRUE), as.character(df$Package)) df$Package <- hwrite(as.character(df$Package), link = sprintf("%s_%s.tar.gz", pkg_src, df$Version), table=FALSE) df } # maintainer email emailMaintainer <- function(df, ...){ if( !is.null(df$Maintainer) ){ df$Maintainer <- gsub(".*<([^>]+)> *$", "\\1", df$Maintainer) } df } # publish publish(knit2html(quiet = TRUE, text = "Install packages from this repository as follows (in an R console): ```{r, eval = FALSE} # install BiocInstaller (only once) source('http://bioiconductor.org/biocLite.R') # install package BiocInstaller::biocLite('', siteRepos = '') ```", fragment.only = TRUE), index) publish(df, index, name=title, .modifyDF = list(emailMaintainer, linkPackage)) finish(index) message('OK') message() invisible(normalizePath(output)) } pkgmaker/R/utils.R0000644000176000001440000006306012330274623013576 0ustar ripleyusers# General utility functions # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### # or-NULL operator (borrowed from Hadley Wickham) '%||%' <- function(x, y) if( !is.null(x) ) x else y #' Get Anywhere #' #' Similar to \code{\link{getAnywhere}}, but looks for the value of its argument. #' #' @param x a single character string #' #' @export cgetAnywhere <- function(x){ do.call("getAnywhere", list(x)) } #' Silent Require #' #' Silently require a package. #' #' @inheritParams base::require #' @param ... extra arguments passed to \code{\link{require}}. #' #' @export require.quiet <- function(package, character.only = FALSE, ...){ if( !character.only ) package <- as.character(substitute(package)) utils::capture.output(suppressMessages(suppressWarnings( res <- do.call('require', list(package=package, ..., character.only=TRUE, quietly=TRUE)) ))) res } #' Testing R Version #' #' Compares current R version with a given target version, which may be useful #' for implementing version dependent code. #' #' @param x target version to compare with. #' @param test numeric value that indicates the comparison to be carried out. #' The comparison is based on the result from #' \code{utils::compareVersion(R.version, x)}: #' \itemize{ #' \item 1: is R.version > \code{x}? #' \item 0: is R.version = \code{x}? #' \item -1: is R.version < \code{x}? #' } #' #' @return a logical #' @export #' @examples #' #' testRversion("2.14") #' testRversion("2.15") #' testRversion("10") #' testRversion("10", test = -1) #' testRversion("< 10") #' testRversion(Rversion()) #' testRversion(paste0('=', Rversion())) #' testRversion <- function(x, test=1L){ rv <- Rversion() op <- '==' if( grepl("^[=<>]", str_trim(x)) ){ m <- str_match(x, "^([<>=]=?)(.*)") if( is.na(m[, 1]) ) stop('Invalid version specification: ', x) op <- m[, 2] if( op == '=' ) op <- '==' x <- str_trim(m[, 3L]) if( !missing(test) ) warning("Ignoring argument `test`: comparison operator was passed in argument `x`") test <- 0L } do.call(op, list(utils::compareVersion(rv, x), test)) } #' Complete R version #' #' Returns the complete R version, e.g. 2.15.0 #' #' @export #' @examples #' Rversion() #' Rversion <- function(){ paste(R.version$major, R.version$minor, sep='.') } #' Formatting Utilities #' #' \code{str_out} formats character vectors for use in show methods or #' error/warning messages. #' #' @param x character vector #' @param max maximum number of values to appear in the list. If \code{x} has #' more elements than \code{max}, a \code{"..."} suffix is appended. #' @param quote a logical indicating whether the values should be quoted with #' single quotes (defaults) or not. #' @param use.names a logical indicating whether names should be added to the #' list as \code{NAME=VAL, ...} or not (default). #' @param sep separator character #' @param total logical that indicates if the total number of elements should be #' appended to the formatted string as \code{"'a', ..., 'z' ( total)"}. #' #' @return a single character string #' #' @examples #' #' x <- letters[1:10] #' str_out(x) #' str_out(x, 8) #' str_out(x, Inf) #' str_out(x, quote=FALSE) #' str_out(x, total = TRUE) #' #' @export str_out <- function(x, max=3L, quote=is.character(x), use.names=FALSE, sep=", ", total = FALSE){ if( is_NA(max) ) max <- Inf suffix <- NULL nTotal <- length(x) if( max > 2 && length(x) > max ){ suffix <- "..." x <- c(head(x, max-1), tail(x, 1)) } x <- head(x, max) # add quotes if necessary quote <- if( isTRUE(quote) ) "'" else if( is.character(quote) ) quote if( !is.null(quote) ) x <- unlist(lapply(x, function(v) paste(quote,v,quote, sep=''))) else if( all(sapply(x, isInteger)) ) x <- unlist(lapply(x, function(v) str_c(v,'L'))) # add names if necessary if( use.names && !is.null(names(x)) ){ nm <- str_c(names(x),'=') x <- paste(ifelse(nm=='=','',nm), x, sep='') } # insert suffix if( !is.null(suffix) ){ x <- c(head(x, length(x)-1L), suffix, tail(x, 1L)) } s <- paste(paste(x, collapse=sep), sep='') if( total ) s <- paste0(s, ' (', nTotal, ' total)') # return formatted string s } #' \code{str_desc} builds formatted string from a list of complex values. #' #' @param object an R object #' @param exdent extra indentation passed to str_wrap, and used if the output #' should spread over more than one lines. #' #' @rdname str_out #' @export str_desc <- function(object, exdent=0L){ p <- sapply(object, function(x){ if( is.atomic(x) && length(x) == 1L ) x else paste("<", class(x), ">", sep='') }) str_wrap(str_out(p, NA, use.names=TRUE, quote=FALSE), exdent=exdent) } #' \code{str_fun} extracts and formats a function signature. #' It typically formats the output \code{capture.output(args(object))}. #' @rdname str_out #' @export #' @examples #' str_fun(install.packages) str_fun <- function(object){ s <- capture.output(args(object)) paste(s[-length(s)], collapse="\n") } # From example in ?toupper capwords <- function(s, strict = FALSE) { cap <- function(s) paste(toupper(substring(s,1,1)), {s <- substring(s,2); if(strict) tolower(s) else s}, sep = "", collapse = " " ) sapply(strsplit(s, split = " "), cap, USE.NAMES = !is.null(names(s))) } #' Finding Differences Between Strings #' #' Computes which characters differ between two strings. #' #' @param x a single string #' @param y a single string #' @return an integer vector containing the index of all mis-matched characters #' in the first string. #' @export #' #' @examples #' #' # strings to compare #' x <- "once upon a time" #' y <- "once upon a time there was" #' z <- "once upon two times" #' #' # diff: x - y #' d <- str_diff(x, y) #' d #' str(d) #' #' # other comparisons #' str_diff(y, x) #' str_diff(x, x) #' str_diff(x, z) #' str_diff(y, z) #' str_diff <- function(x, y){ sx <- strsplit(x,'')[[1]] sy <- strsplit(y,'')[[1]] n <- min(length(sx), length(sy)) res <- mapply('!=', head(sx,n), head(sy,n)) wres <- which(res) if( length(sx) > length(sy) ) wres <- c(wres, (n+1):length(sx)) attr(wres, 'str') <- list(x=x,y=y) class(wres) <- 'str_diff' wres } #' @S3method print str_diff print.str_diff <- function(x, ...){ s <- attr(x, 'str') n <- max(nchar(s$x), nchar(s$y)) d <- rep('.', n) d[x] <- '*' if( (n2 <- nchar(s$y)-nchar(s$x)) ) d[(n-abs(n2)+1):n] <- if( n2 > 0L ) '-' else '+' cat(str_c(s$x, collapse=''), "\n") cat(str_c(d, collapse=''), "\n") cat(str_c(s$y, collapse=''), "\n") } #' Extracting Local Function Definition #' #' @description #' \code{extractLocalFun} Extracts local function from wrapper functions of the following type, typically #' used in S4 methods: #' \samp{ #' function(a, b, ...)\{ #' .local <- function(a, b, c, d, ...)\{\} #' .local(a, b, ...) #' \} #' } #' #' @param f definition of the wrapper function #' #' @return a function #' @export #' @rdname formals extractLocalFun <- function(f){ bf <- body(f) txt <- as.character(bf)[2] # in R-2.14.2 -- at least, as.character does not return the complete body # so some text manipulation is necessary if( !grepl("\\{", txt) ){ sf <- capture.output(print(bf)) w <- tail(grep("^\\s*\\.local\\(", sf), 1L) txt <- paste(sf[-w], collapse="\n") } expr <- parse(text=txt) e <- new.env() eval(expr, e) } #' Extended Formal Extraction #' #' Works for methods that are created (setMethod) as a wrapper function to an #' internal function named .local. #' #' @inheritParams extractLocalFun #' @return a paired list like the one returned by \code{\link{formals}}. #' #' @export #' @import codetools #' @rdname formals allFormals <- function(f){ # look inside method for S4 methods if( is(f, 'MethodDefinition') ){ # check if the method is defined as a wrapper function f <- f@.Data lf <- try(codetools::getAssignedVar(body(f)), silent=TRUE) if( !identical(lf, '.local') ) return( formals(f) ) # extract arguments from local function lfun <- extractLocalFun(f) res <- formals(lfun) # set default values from the generic, only for arguments that have no # default values in the method generic_args <- formals(f) meth_no_default <- sapply(res, is.symbol) gen_no_default <- sapply(generic_args, is.symbol) generic_args <- generic_args[ !gen_no_default ] generic_args <- generic_args[ names(generic_args) %in% names(res[meth_no_default]) ] if( length(generic_args) ){ res[names(generic_args)] <- generic_args } # return complete list of arguments res }else if( is.function(f) ) formals(f) } #' Alternative S4 Constructor #' #' An alternative version of \code{\link{new}} to create objects based on a list #' of values. #' #' @param class Class name to instanciate #' @param ... extra arguments from which slot values are extracted by exact #' matching of names. #' #' @export #' @examples #' #' setClass('A', contain='character', representation(x='numeric', y='character')) #' #' # identical behaviour with standard calls #' identical(new('A'), new2('A')) #' identical(new('A', x=1), new2('A', x=1)) #' #' # but if passing that are names not slots #' identical(new('A'), new2('A', b=1)) #' identical(new('A', x=1), new2('A', x=1, b=3)) #' identical(new('A', x=1), new2('A', x=1, b=3)) #' #' # standard `new` would coerce first unnamed argument into parent of 'A' (i.e. 'character') #' new('A', list(x=1)) #' new('A', list(x=1, y='other')) #' # `new2` rather use it to initialise the slots it can find in the list #' identical(new('A', x=1), new2('A', list(x=1))) #' identical(new('A', x=1, y='other'), new2('A', list(x=1, y='other'))) #' #' new2 <- function(class, ...){ sl <- getSlots(class) if( nargs() == 1L ) return( new(class) ) dots <- list(...) if( nargs() == 2L && is.null(names(dots)) ){ l <- dots[[1]] if( !is.list(l) ) stop("Invalid call: single unnamed argument must be a list") dots <- l } if( is.null(names(dots)) || any(names(dots)=='') ) stop("Invalid call: all slot arguments must be named") dots <- dots[names(dots) %in% names(sl)] do.call('new', c(list(class), dots)) } #' One-off Global Variables #' #' Defines a function that allow to get/assign a global variable whose value is #' ensured to be reset after each access. #' #' @param default default value to which the global variable is reset after each #' access. Default is \code{NULL}. #' #' @return a function with one argument (\code{value}) that provides get/set access #' to a global variable. #' If called with a value, it assigns this value to the global variable. #' If called with no argument, it returns the current value of the global variable and #' reset it to its default value -- as defined at its creation. #' #' @export #' #' @examples #' #' x <- oneoffVariable(0) #' # returns default value #' x() #' # assign a value #' x(3) #' # get the value #' x() #' # second call returns default value again #' x() #' oneoffVariable <- function(default=NULL){ .var <- default function(value){ if( missing(value) ){ res <- .var .var <<- default res }else .var <<- value } } ## Exit Error Checker ## ## This function defines a function that checks if an error has been ## thrown after its definition. ## It may be used to perform tasks on function exit depending on ## how the function exit (normal return or with an error). ## ## The function \code{errorCheck} itself is meant to be called at ## the beginning of functions that use \code{\link{on.exit}} to ## perform tasks when exiting. ## The error checker function returned, when used in \code{on.exit} ## expressions, enables to distinguish between a normal exit and ## an exit due to an error, allowing is to perform tasks specific ## to each scenario. ## ## IMPORTANT: this function is not 100\% perfect in the sense that ## it will detect an error as soon as one has been thrown, even it ## is catched before the exit -- with \code{\link{try}} or ## \code{\link{tryCatch}}. ## ## @export ## @examples ## ## # define some function ## f <- function(err){ ## ## # initialise an error checker ## isError <- errorCheck() ## ## # do something on exit that depends on the error status ## on.exit({ ## if(isError()) cat("with error: cleanup\n") ## else cat("no error: do nothing\n") ## }) ## ## # throw an error here ## if( err ) stop('There is an error') ## ## 1+1 ## } ## ## # without error ## f(FALSE) ## # with error ## try( f(TRUE) ) ## #errorCheck <- function(){ # # # initialise with unique error message # .err <- tryCatch(stop('ERROR_CHECK:', digest(tempfile())), error=function(e) conditionMessage(e)) # tb_digest <- function() digest(capture.output(traceback(max.lines=NULL))) # .traceback <- tb_digest() # # function(){ # # error message is different # # tb_digest() != .traceback # length(grep(.err, msg, fixed=TRUE, invert=TRUE)) == 1L # } #} #' Global Static Variable #' #' \code{sVariable} defines a function that acts as a global #' static variable. #' #' @param default default value for the static variable. #' #' @export #' @examples #' #' # define variable #' x <- sVariable(1) #' # get value (default) #' x() #' # set new value: return old value #' old <- x(3) #' old #' # get new value #' x() #' sVariable <- function(default=NULL){ .val <- default function(value){ if( missing(value) ) .val else{ old <- .val .val <<- value old } } } #' Exit Error Checks #' #' \code{exitCheck} provides a mechanism to distinguish the exit status #' in \code{\link{on.exit}} expressions. #' #' It generates a function that is used wihtin a function's body to #' "flag" normal exits and in its \code{\link{on.exit}} expression #' to check the exit status of a function. #' Note that it will correctly detect errors only if all normal exit #' are wrapped into a call to it. #' #' @export #' #' @examples #' #' # define some function #' f <- function(err){ #' #' # initialise an error checker #' success <- exitCheck() #' #' # do something on exit that depends on the error status #' on.exit({ #' if(success()) cat("Exit with no error: do nothing\n") #' else cat("Exit with error: cleaning up the mess ...\n") #' }) #' #' # throw an error here #' if( err ) stop('There is an error') #' #' success(1+1) #' } #' #' # without error #' f(FALSE) #' # with error #' try( f(TRUE) ) #' exitCheck <- function(){ .success <- FALSE function(x){ if( nargs() == 0L ) .success else{ .success <<- TRUE x } } } #' Ordering Version Numbers #' #' Orders a vector of version numbers, in natural order. #' #' @param x a character vector of version numbers #' @param decreasing a logical that indicates if the ordering should be decreasing #' #' @export #' @examples #' #' v <- c('1.0', '1.03', '1.2') #' order(v) #' orderVersion(v) #' orderVersion <- function(x, decreasing=FALSE){ tx <- gsub("[^0-9]+",".", paste('_', x, sep='')) stx <- strsplit(tx, ".", fixed=TRUE) mtx <- max(sapply(stx, length)) tx <- sapply(stx, function(v) paste(sprintf("%06i", c(as.integer(v[-1]),rep(0, mtx-length(v)+1))), collapse='.') ) order(tx, decreasing=decreasing) } #' @param ... extra parameters passed to \code{orderVersion} #' #' @export #' @rdname orderVersion #' @examples #' #' sort(v) #' sortVersion(v) sortVersion <- function(x, ...){ x[orderVersion(x, ...)] } #' Checking for Missing Arguments #' #' This function is identical to \code{\link{hasArg}}, except that #' it accepts the argument name as a character string. #' This avoids to have a check NOTE about invisible binding variable. #' #' @param name the name of an argument as a character string. #' #' @export #' @examples #' #' f <- function(...){ hasArg2('abc') } #' f(a=1) #' f(abc=1) #' f(b=1) #' hasArg2 <- function (name) { name <- as.name(name) ## apply methods::hasArg aname <- as.character(substitute(name)) fnames <- names(formals(sys.function(sys.parent()))) if (is.na(match(aname, fnames))) { if (is.na(match("...", fnames))) FALSE else { dotsCall <- eval(quote(substitute(list(...))), sys.parent()) !is.na(match(aname, names(dotsCall))) } } else eval(substitute(!missing(name)), sys.frame(sys.parent())) ## } #' Exposing Object Attributes #' #' The function \code{ExposeAttribute} creates an S3 object that #' exposes all attributes of any R object, by making them accessible via #' methods \code{\link{$}} and/or \code{\link{$<-}}. #' #' @param object any R object whose attributes need to be exposed #' @param ... attributes, and optionally their respective values or #' access permissions. #' See argument \code{value} of \code{attr_mode} for details on the #' way of specifying these. #' @param .MODE access mode: #' \describe{ #' \item{\dQuote{r}:}{ (read-only) only method \code{$} is defined} #' \item{\dQuote{w}:}{ (write-only) only method \code{$<-} is defined} #' \item{\dQuote{rw}:}{ (read-write) both methods \code{$} and \code{$<-} #' are defined} #' } #' @param .VALUE logical that indicates if the values of named arguments #' in \code{...} should be considered as attribute assignments, #' i.e. that the result object has these attributes set with the specified values. #' In this case all these attributes will have the access permission #' as defined by argument \code{.MODE}. #' #' @export ExposeAttribute <- function(object, ..., .MODE='rw', .VALUE=FALSE){ # setup exposed arguments args <- list(...) if( length(args) ){ # use the same mode for all attributes if( isString(.MODE) == 1L ) .MODE <- rep(.MODE, length(args)) else if( length(.MODE) != length(args) ){ stop("Argument .MODE must provide an access mode for each argument in `...`.") } if( is.null(names(args)) ) # add names if necessary args <- setNames(args, rep('', length(args))) un <- names(args)=='' if( any(!sapply(args[un], isString)) ) stop("All unnamed argument must be the name of an attribute, i.e. a character string.") # set attributes that have values if requested if( .VALUE ){ sapply(names(args)[!un], function(x){ attr(object, x) <<- args[[x]] }) }else{ # or use the values as access permission .MODE[!un] <- args[!un] } # # store exposed attributes with names as regular expressions eargs <- ifelse(un, args, names(args)) eargs <- as.list(setNames(.MODE, eargs)) # add ereg start-end names(eargs) <- paste('^', names(eargs), '$', sep='') }else{ eargs <- .MODE } # store access rights attr(object, '.ExposeAttribute') <- eargs class(object) <- c(class(object), 'ExposeAttribute') object } .getEAmode <- function(x, name, ..., RAW..=FALSE){ ea <- attr(x, '.ExposeAttribute') if( is.null(ea) ) return() if( is.character(ea) && !RAW.. ) ea <- list(`^.*$`=ea) if( missing(name) ) return(ea) name <- name[name != '.ExposeAttribute'] # determine access mode m <- lapply(names(ea), function(p){ m <- grep(p, name, value=TRUE) setNames(rep(ea[[p]], length(m)), m) }) unlist(m) # } #' @importFrom utils .DollarNames #' @S3method .DollarNames ExposeAttribute .DollarNames.ExposeAttribute <- function(x, pattern=""){ att <- grep(pattern, names(attributes(x)), value=TRUE) if( nchar(pattern) > 1 ) att <- unique(c(substring(pattern, 2), att)) # filter out based on the access permissions mode <- .getEAmode(x, att) if( !length(mode) ) return(character()) mode <- mode[mode != ''] # add `<-` suffix to write only attributes if( length(wonly <- which(mode=='w')) ) names(mode)[wonly] <- paste(names(mode)[wonly], '<- ') names(mode) } #' @S3method $ ExposeAttribute `$.ExposeAttribute` <- function(x, name){ if( is.null(attr(x, name)) ) stop("Object `", deparse(substitute(x)),"` has no attribute '", name, "'.") mode <- .getEAmode(x, name) if( !length(mode) ){ stop("Could not access attribute via `$`: attribute '", name, "' is not exposed. Use `attr(x, '", name, "').") } if( !any(grepl('r', mode)) ){ stop("Could not access exposed attribute '", name, "': permission denied [mode='", mode,"'].") } attr(x, name) } #' @S3method $<- ExposeAttribute `$<-.ExposeAttribute` <- function(x, name, value){ mode <- .getEAmode(x, name) if( !length(mode) ){ stop("Could not write attribute via `$<-`: attribute '", name, "' is not exposed. Use `attr(x, '", name, "') <- value.") } if( !any(grepl('w', mode)) ){ stop("Could not write attribute '", name, "': permission denied [mode='", mode,"'].") } attr(x, name) <- value x } #' @S3method print ExposeAttribute print.ExposeAttribute <- function(x, ...){ # remove EA stuff attr_mode(x) <- NULL # call next print method print(x, ...) } #' \code{attr_mode} and \code{attr_mode<-} get and sets the access mode of #' \code{ExposeAttribute} objects. #' #' @param x an \code{ExposeAttribute} object #' @param value replacement value for mode. #' It can be \code{NULL} to remove the ExposeAttribute wrapper, #' a single character string to define a permission for all atributes #' (e.g., \code{'rw'} or \code{'r'}), or a list specifying access permission #' for specific attributes or classes of attributes defined by regular expressions. #' For example, \code{list(a='r', b='w', `blabla.*`='rw')} set attribute \code{'a'} #' as read-only, attribute \code{'b'} as write-only, all attributes that start with #' \code{'blabla'} in read-write access. #' #' @export #' @rdname ExposeAttribute attr_mode <- function(x){ .getEAmode(x, RAW..=TRUE) } #' @export #' @rdname ExposeAttribute `attr_mode<-` <- function(x, value){ if( is.null(value) ){ attr(x, '.ExposeAttribute') <- NULL class(x) <- class(x)[!class(x) %in% "ExposeAttribute"] }else if( isString(value) ){ x <- ExposeAttribute(x, .MODE=value) }else if( is.list(value) ){ args <- c(list(x), names(value), list(.MODE=setNames(value, NULL), .VALUE=FALSE)) x <- do.call('ExposeAttribute', args) }else{ stop("Invalid value: a character string or a list is expected") } x } #' Checking R User #' #' Tests if the current R user is amongst a given set of users. #' #' @param user the usernames to check for, as a character vector. #' #' @export userIs <- function(user){ setNames(Sys.info()['user'], NULL) %in% user } #' Expanding Lists #' #' \code{expand_list} expands a named list with a given set of default items, #' if these are not already in the list, partially matching their names. #' #' @param x input list #' @param ... extra named arguments defining the default items. #' A list of default values can also be passed as a a single unnamed argument. #' @param .exact logical that indicates if the names in \code{x} should be #' partially matched against the defaults. #' @param .names logical that only used when \code{.exact=FALSE} and indicates #' that the names of items in \code{x} that partially match some defaults should #' be expanded in the returned list. #' #' @return a list #' #' @export #' @examples #' #' expand_list(list(a=1, b=2), c=3) #' expand_list(list(a=1, b=2, c=4), c=3) #' # with a list #' expand_list(list(a=1, b=2), list(c=3, d=10)) #' # no partial match #' expand_list(list(a=1, b=2, c=5), cd=3) #' # partial match with names expanded #' expand_list(list(a=1, b=2, c=5), cd=3, .exact=FALSE) #' # partial match without expanding names #' expand_list(list(a=1, b=2, c=5), cd=3, .exact=FALSE, .names=FALSE) #' #' # works also inside a function to expand a call with default arguments #' f <- function(...){ #' cl <- match.call() #' expand_list(cl, list(a=3, b=4), .exact=FALSE) #' } #' f() #' f(c=1) #' f(a=2) #' f(c=1, a=2) #' expand_list <- function(x, ..., .exact=TRUE, .names=!.exact){ # extract defaults from ... arguments defaults <- list(...) if( length(defaults) == 1L && is.null(names(defaults)) ){ defaults <- defaults[[1L]] } # early exit if no defaults if( !length(defaults) ) return(x) # match names from x in defaults x_ex <- x if( !.exact ){ i <- pmatch(names(x), names(defaults)) # first expand names if necessary if( length(w <- which(!is.na(i))) ){ names(x_ex)[w] <- names(defaults)[i[w]] # apply to as well if necessary if( .names ) names(x)[w] <- names(defaults)[i[w]] } } # expand list i <- match(names(defaults), names(x_ex)) if( length(w <- which(is.na(i))) ){ n <- names(defaults)[w] lapply(n, function(m){ if( is.null(defaults[[m]]) ) x[m] <<- list(NULL) else x[[m]] <<- defaults[[m]] }) } x } #' \code{expand_dots} expands the \code{...} arguments of the function #' in which it is called with default values, using \code{expand_list}. #' It can \strong{only} be called from inside a function. #' #' @param .exclude optional character vector of argument names to exclude #' from expansion. #' #' @export #' @rdname expand_list #' #' @examples #' # expanding dot arguments #' #' f <- function(...){ #' expand_dots(list(a=2, bcd='a', xxx=20), .exclude='xxx') #' } #' #' # add default value for all arguments #' f() #' # add default value for `bcd` only #' f(a=10) #' # expand names #' f(a=10, b=4) #' expand_dots <- function(..., .exclude=NULL){ dotsCall <- as.list(eval(quote(substitute(list(...))), sys.parent())) if( length(dotsCall) >= 1L ) dotsCall <- dotsCall[-1L] # extract defaults from ... arguments defaults <- list(...) if( length(defaults) == 1L && is.null(names(defaults)) ){ defaults <- defaults[[1L]] } if( length(defaults) ){ excl <- names(allFormals(sys.function(sys.parent()))) if( !is.null(.exclude) ) excl <- c(excl, .exclude) defaults <- defaults[!names(defaults) %in% excl] dotsCall <- expand_list(dotsCall, defaults, .exact=FALSE) } # # return expanded dot args dotsCall } #' Check Environment Variables #' #' Tells if some environment variable(s) are defined. #' #' @param x environment variable name, as a character vector. #' #' @export #' @examples #' #' hasEnvar('_R_CHECK_TIMINGS_') #' hasEnvar('ABCD') #' hasEnvar <- function(x){ is.na(Sys.getenv(x, unset = NA, names = FALSE)) } pkgmaker/R/project.R0000644000176000001440000001002612330274520014072 0ustar ripleyusers# Utils for R package projects # # Author: Renaud Gaujoux # Created: May 1, 2013 ############################################################################### find_devpackage <- function (x) { is_package_path <- function(x, check=FALSE) { if (is.null(x)) return(FALSE) x <- normalizePath(x, mustWork = FALSE) x <- gsub("\\\\$", "", x) desc_path <- file.path(x, "DESCRIPTION") if( !check ){ file.exists(x) && file.exists(desc_path) }else{ if (!file.exists(x)) { stop("Can't find directory ", x, call. = FALSE) } if (!file.info(x)$isdir) { stop(x, " is not a directory", call. = FALSE) } desc_path <- file.path(x, "DESCRIPTION") if (!file.exists(desc_path)) { stop("No DESCRIPTION file found in ", x, call. = FALSE) } TRUE } } if (is_package_path(x)) { return(x) } config_path <- "~/.Rpackages" if (!file.exists(config_path)) { return(NULL) } config_path <- path.expand(config_path) lookup <- source(config_path)$value if (is_package_path(lookup[[x]])) { return(lookup[[x]]) } if (!is.null(lookup$default)) { default_loc <- lookup$default(x) if (is_package_path(default_loc, check=TRUE)) { return(default_loc) } } NULL } is_Mac <- function(check.gui=FALSE){ is.mac <- (length(grep("darwin", R.version$platform)) > 0) # return TRUE is running on Mac (adn optionally through GUI) is.mac && (!check.gui || .Platform$GUI == 'AQUA') } R_OS <- function(){ if( is_Mac() ) 'MacOS' else .Platform$OS.type } packageMakefile <- function(package=NULL, template=NULL, temp = FALSE, print = TRUE){ capture.output(suppressMessages({ library(pkgmaker) # library(methods) library(devtools) })) # defMakeVar <- pkgmaker::defMakeVar # subMakeVar <- pkgmaker::subMakeVar project_path <- getwd() project_name <- basename(project_path) subproject_path_part <- '' if( is.null(package) || isString(package) ){ if( isString(package) && !nzchar(package) ) package <- NULL lookup_dir <- c('pkg', '.') if( !is.null(package) ){ lookup_dir <- c(lookup_dir, file.path('pkg', package)) subproject_path_part <- file.path(package, '') } pdir <- file.path(lookup_dir, 'DESCRIPTION') if( !length(sd <- which(is.file(pdir))) ){ stop("Could not detect package source directory") } package <- pdir[sd[1L]] } package <- normalizePath(package) p <- pkg <- as.package(dirname(package)); pdir <- package_dir <- p[['path']]; ## create makefile from template # load template makefile if( is.null(template) ){ template <- packagePath('package.mk', package='pkgmaker') } l <- paste(readLines(template), collapse="\n") # user cuser <- Sys.info()["user"] l <- defMakeVar('AUTHOR_USER', cuser, l) l <- defMakeVar('R_PACKAGE', pkg$package, l) # R_PACKAGE_PATH l <- defMakeVar('R_PACKAGE_PATH', package_dir, l) # R_PACKAGE_PROJECT l <- defMakeVar('R_PACKAGE_PROJECT', project_name, l) # R_PACKAGE_PROJECT_PATH l <- defMakeVar('R_PACKAGE_PROJECT_PATH', project_path, l) l <- defMakeVar('R_PACKAGE_SUBPROJECT_PATH_PART', subproject_path_part, l) # R_BIN l <- subMakeVar('R_BIN', R.home('bin'), l) # R_PACKAGE_TAR_GZ pkg_targz <- paste0(p[['package']], '_', p[['version']], '.tar.gz') l <- defMakeVar('R_PACKAGE_TAR_GZ', pkg_targz, l) # R_PACKAGE_TYPE l <- defMakeVar('R_PACKAGE_OS', R_OS(), l) # # auto-conf variables init_var <- list(version = pkg$version) if( is.dir(file.path(package_dir, 'vignettes')) ) init_var <- c(init_var, has_vignettes=TRUE) # dump variables if( length(init_var) ){ init_var <- setNames(init_var, paste0('R_PACKAGE_', toupper(names(init_var)))) init_var_str <- str_out(init_var, Inf, use.names = TRUE, sep = "\n") l <- subMakeVar('INIT_CHECKS', init_var_str, l) } # R_CMD_CHECK rlibs <- '' if( is.dir(devlib <- file.path(dirname(pdir), 'lib')) ){ rlibs <- paste0("R_LIBS=", devlib, ' ') } l <- subMakeVar('R_LIBS', rlibs, l) # # create makefile mk <- if( temp ) tempfile('package_', tmpdir='.', fileext='.mk') else 'package.mk' cat(l, file=mk) if ( print ){ cat(mk) } invisible(l) }pkgmaker/R/registry.R0000644000176000001440000007032612330274520014305 0ustar ripleyusers# Registry utility functions # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include devutils.R #' @include is.R NULL #' Fix Registry Access Functions #' #' Fixes some of the member functions for registry objects, as defined in the #' \pkg{registry} package. #' The main fixed issue is due to the fact that key filtering does not return #' the correct entry, when an entry key is a prefix of another entry key, #' even when passed the exact key. #' #' @param regobj registry object #' #' @family registry-internals #' @keywords internal fix_registry <- function(regobj){ # get private environment .REGENV <- environment(environment(regobj$n_of_entries)$f) # do not fix twice if( isFixed <- exists('.isFixed', .REGENV, inherits=FALSE) ){ return(regobj) } # message("REGENV:\n", capture.output(print(ls(.REGENV, all=TRUE)))) # message("env(delete_entry)\n", capture.output(print(ls(environment(environment(regobj$delete_entry)$f), all=TRUE)))) # dummy variables for R CMD check PERMISSIONS <- .get_entry_indices <- .get_entry_names <- SEALED_ENTRIES <- DATA <- .delete_entry <- NULL # .get_entries .get_entries <- get('.get_entries', .REGENV, inherits=FALSE) .get_fields <- get('.get_fields', .REGENV, inherits=FALSE) hook <- function(...){ # remove fields that are not keys fld <- .get_fields() if( length(fld) ){ keyfield <- names(fld[sapply(fld, function(x) isTRUE(x$is_key) )]) index_fields <- list(...) if( !is.null(names(index_fields)) ){ i <- match(keyfield, names(index_fields)) index_fields <- index_fields[i[!is.na(i)]] } } do.call(.get_entries, index_fields) } assign('.get_entries', hook, .REGENV) # # fix bug in delete_entry hook <- function(...){ key <- list(...) isString <- function(x) is.character(x) && length(x) == 1L if( length(key) == 1L && isString(key[[1L]]) ){ errmsg <- paste0("Could not delete entry '", key[[1L]],"': ") if (!PERMISSIONS["delete_entries"]) stop(errmsg, "deletion of entries denied due to restricted permissions.", call. = FALSE) entry_index <- .get_entry_indices(key) # fix: check for exact match (on full key) if( key[[1L]] %in% .get_entry_names() ){ entry_index <- match(key[[1L]], .get_entry_names()) } #end_fix if( !length(entry_index) ){ # if( !quiet ) warning(errmsg, "not in registry.", immediate.=TRUE, call. = FALSE) return() } if (length(entry_index) != 1) stop(errmsg, "multiple matches.", call. = FALSE) if (entry_index %in% SEALED_ENTRIES) stop(errmsg, "deletion of entry not allowed in sealed registry.", call. = FALSE) DATA[entry_index] <<- NULL } else .delete_entry(...) } environment(hook) <- .REGENV regobj$delete_entry <- hook # # fix bug in get_entry hook <- function(...){ key <- list(...) isString <- function(x) is.character(x) && length(x) == 1L if( length(key) == 1L && isString(key[[1L]]) ){ res <- .get_entries(...) if( key[[1L]] %in% names(res) ) res[[key[[1L]]]] else res[[1L]] }else .get_entries(...)[[1]] } environment(hook) <- .REGENV regobj$get_entry <- hook # # flag the registry as fixed assign('.isFixed', TRUE, .REGENV) # return fixed registry regobj } testreg <- function(){ regobj <- registry() regobj$set_field("X", type = TRUE) regobj$set_field("Y", type = "character") regobj$set_field("index", type = "character", is_key = TRUE, index_FUN = match_partial_ignorecase) # fix regobj <- fix_registry(regobj) regobj$set_entry(X = TRUE, Y = "bla", index = "test") regobj$set_entry(X = TRUE, Y = "bloblo", index = "test2") regobj$set_entry(X = FALSE, Y = "foo", index = c("test", "bar")) regobj } #' Creates or Retrieves a Package Meta Registry #' #' This function is used in \code{\link{setPackageRegistry}} and #' \code{\link{packageRegistry}} to create or query meta registries. #' #' @keywords internal .packageMetaRegistry <- function(package, quiet=FALSE, create=FALSE){ # library(registry) metaregname <- '.packageRegistry' # get package environment e <- packageEnv(package) # get namespace name nm <- packageName(e) # create registry environment if necessary if( !exists(metaregname, e, inherits=FALSE) ){ if( !create ){ if( quiet ) return(NULL) # throw error stop("Meta registry in package `", nm, "` does not exist.") } # if( !isLoadingNamespace(e) ){ # stop("Can only create a package meta-registry when loading it" # ," [loading namespace: ", if(!is.null(ns <- getLoadingNamespace()) ) ns else 'none', "].") # } message("Creating meta registry in package '", nm, "' ... ", appendLF=FALSE) # create registry object with special classes for the registry and entries meta <- registry(c(paste('package', nm, 'subregistry', sep='_'), 'package_subregistry') , c(paste('package', nm, 'metaregistry', sep='_'), 'package_metaregistry')) ## set fields # access key meta$set_field("key", type="character", is_key = TRUE, index_FUN = match_exact) # sub-registry object meta$set_field("regobj", type="registry", is_mandatory = TRUE) # human readable description meta$set_field("description", type="character", is_mandatory = TRUE) # short object description meta$set_field("entrydesc", type="character", is_mandatory = TRUE) # parent package = owner of the primary registry meta$set_field("parent", type="character", default = '') # owner package (its value is forced) meta$set_field("package", type="character", default = nm, alternatives=nm) # # fix registry meta <- fix_registry(meta) # add package attribute attr(meta, 'package') <- nm # store within the calling package environment assign(metaregname, meta, envir = e) message('OK') } # get package meta registry get(metaregname, envir=e, inherits = FALSE) } #' Package Registry #' #' \code{packageRegistry} provides ways to create query package specific #' registries. #' #' Package registries are organised in a meta-registry (a registry of registries) within a package's namespace. #' Each registry can be used to store sets of built-in or user-defined objects #' in an organised way, e.g. algorithms or datasets. #' #' A package meta-registry is a \code{\link[registry:regobj]{registry}} object, #' whose entries are \code{\link[registry:regobj]{registry}} objects themselves. #' A sub-registry entry is defined by the following fields: #' \describe{ #' \item{key}{The sub-registry's accession key/identifier (a character string).} #' \item{regobj}{The sub-registry itself (a \code{registry} object)} #' \item{description}{Human readable description of the purpose of the registry (a character string)} #' \item{description}{Short human readable description of the type of entries (a character string)} #' \item{package}{owner package, which is forced to be the package in which the meta registry #' is defined.} #' \item{parent}{The name of the package that holds the parent registry, which we #' call the primary package. #' This field is non empty for cross-package registries, i.e. registries that #' derive from primary package's own registry. #' Their entries are defined when (lazy-)loading the dependent package's namespace.} #' } #' #' Note that this function cannot be called from the global environment, but from #' a package namespace, e.g., when a package is lazy-loaded on installation or loaded #' via the function \code{\link[devtools]{load_all}} from the \pkg{devtools} package. #' #' @param regname Name of a sub-registry, used as its identifier. #' @param quiet a logical that indicates that one should return the (meta-)registry if it exists, #' or \code{NULL} otherwise, without throwing any error. #' @param entry logical that indicates if the corresponding meta registry entry should #' be directly returned, without any other processing. #' @param update logical that indicates if the package registry should be updated, by adding/removing #' entries from other loaded/unloaded packages. #' @param package package where to store or look for the registry. #' @return a \code{\link[registry:regobj]{registry}} object or \code{NULL} (see argument #' \code{quiet}). #' #' @import registry #' @rdname registry #' @export packageRegistry <- function(regname=NULL, quiet=FALSE, entry=FALSE, update=!entry, package=topenv(parent.frame())){ # library(registry) metaregname <- '.packageRegistry' name <- regname # get package environment e <- packageEnv(package) # get namespace name nm <- packageName(e) # get package meta-registry pkgreg <- .packageMetaRegistry(package, quiet) # return meta registry if no name is specified if( is.null(name) ) return(pkgreg) else{ if( is.null(pkgreg) ){ if( quiet ) return(NULL) # throw error stop("Could not find registry '", name, "' in package `", nm, "`: meta registry does not exist.") } # retrieve sub-registry entry nm <- packageSlot(pkgreg) reg <- regfetch(pkgreg, key=name, exact=TRUE, error=FALSE) if( is.null(reg) ){# not found if( quiet ) return(NULL) # throw error stop("Could not find registry `", name, "` in package `", nm, "`.") }else{ # synchronise and substitute by primary sub-registry (if necessary) if( update ) reg <- .update_pkgreg(reg) # return plain registry entry if requested if( entry ) return(reg) # return sub-registry object reg$regobj } } } .update_pkgreg <- local({ .cacheNS <- list() .cacheMD5 <- list() function(regentry){ verbose <- getOption('verbose') # directly return entry if: # - one is loading the namespace of the package (primary or not) if( isLoadingNamespace(regentry$package) ) return(regentry) # - not a primary registry if( nchar(regentry$parent) > 0L ) return(regentry) primary <- regentry$package primaryreg <- regentry$regobj key <- regentry$key fullkey <- str_c(primary, '::', key) # sync if loaded packages changed hash <- digest(c(.cacheNS[[fullkey]], ns <- loadedNamespaces())) # print(ns) # print(.cacheNS) if( !identical(hash, .cacheMD5[[fullkey]]) ){ if( verbose ) message('Updating registry ', fullkey, " ... ", appendLF=FALSE) # remove entries from unloaded packages if( length(.cacheNS[[fullkey]]) && length(notloaded <- setdiff(.cacheNS[[fullkey]], ns)) ){ ndel <- sapply(notloaded, function(p){ if( verbose > 1L ) message("\n Removing entries from package ", p, " ... ", appendLF=FALSE) e <- primaryreg$get_entry_names() n <- sapply(e, function(x){ rec <- primaryreg$get_entry(x) if( rec$REGISTERINGpackage == p ){ primaryreg$delete_entry(x) 1L }else 0L }) if( verbose > 1L ) message('OK [', sum(n), ']') sum(n) }) } # list packages that have local versions of this registry reglist <- packageRegistries(fullkey) # print(reglist) pkgs <- names(reglist) # add entries from new packages into the primary registry if( length(miss <- setdiff(pkgs, .cacheNS[[fullkey]])) ){ nadd <- sapply(miss, function(p){ if( verbose > 1L ) message("\n Adding entries from package ", p, " ... ", appendLF=FALSE) reg <- packageRegistry(fullkey, package=p) e <- reg$get_entries() n <- sapply(e, function(x){ # add entry if it does not exists already oldentry <- regfetch(primaryreg, KEYS=x, exact=TRUE, error=FALSE) if( is.null(oldentry) ){ do.call(primaryreg$set_entry, x) 1L }else 0L }) if( verbose > 1L ) message('OK [', sum(n), ']') sum(n) }) } # store contributing packages and MD5 hash .cacheNS[[fullkey]] <<- pkgs .cacheMD5[[fullkey]] <<- digest(c(.cacheNS[[fullkey]], ns)) if( verbose ) message('OK') } regentry } }) #' \code{packageRegistries} lists registries from loaded packages. #' #' @param primary logical that indicates if only primary registries #' should be listed. #' #' @rdname registry #' @export packageRegistries <- function(regname=NULL, package=NULL, primary=FALSE){ lns <- loadedNamespaces() if( !is.null(package) ) lns <- lns[lns %in% package] # early exit if no namespace if( !length(lns) ) return( character() ) res <- lapply(lns, function(ns){ reg <- packageRegistry(package=ns, quiet=TRUE) if( is.null(reg) ) return( character() ) regnames <- reg$get_entry_names() res <- setNames(regnames, rep(ns, length(regnames))) if( primary ){ pr <- sapply(res, function(n) reg$get_entry(n)$parent) res <- res[ nchar(pr) == 0L ] } res }) res <- unlist(res) if( !is.null(regname) ){ res <- res[res == regname] if( primary && length(res) > 1L ){ warning("Package registry - Found multiple primary registries '", regname, "' in packages " , str_out(res, Inf), " [using first one only]") res <- res[1L] } } res } #' \code{hasPackageRegistry} tells if a given package has a meta-registry or #' a given registry. #' #' @rdname registry #' @export hasPackageRegistry <- function(regname=NULL, package){ isNamespaceLoaded(package) && !is.null( packageRegistry(regname, package=package, quiet=TRUE, entry=TRUE) ) } #' @S3method format package_subregistry format.package_subregistry <- function(x, ...){ c(Key = x$key , Description = x$description , Entries = x$regobj$n_of_entries() , Parent = x$parent) } #' @S3method format package_metaregistry format.package_metaregistry <- function(x, ...){ rec <- x$get_entries() data.frame(t(sapply(rec, base::format, ...))[, -1L, drop=FALSE]) } #' @S3method print package_metaregistry print.package_metaregistry <- function(x, ...){ NextMethod('print') #registry:::print.registry(x) print(format(x, ...)) } #' @S3method xtable package_metaregistry #' @importFrom xtable xtable xtable.package_metaregistry <- function(x, ...){ d <- format(x) xtable::xtable(d, ...) } #' \code{setPackageRegistry} creates a package-specific registry within a package. #' #' Each package sub-registry has its own set of fields. #' Sub-registries defined by passing a character string in argument \code{regobj} of #' \code{setPackageRegistry} have the following fields: \code{'key'} and \code{'object'} #' #' @param regobj a \code{\link[registry:regobj]{registry}} object or a single character #' string that indicates the class of the objects that are stored in the #' sub-registry. #' See details for the list of the sub-registry's fields in this latter case. #' @param description short description line about the registry. #' It is recommended to provide such description as it makes clearer the purpose of the #' registry. #' This description is shown when the registry object is printed/formated/listed. #' @param entrydesc human readable description that is used in log messages #' when registering/removing entries. #' @param ... named values used to set extra information about the new registry, that #' are stored in the corresponding fields of the meta-registry. #' Currently not used, as no extra field other than \code{'description'} is defined. #' @param overwrite a logical that indicate if an existing registry with the same #' should be overwritten if it exists. #' #' @inheritParams packageRegistry #' @rdname registry #' @export setPackageRegistry <- function(regname, regobj , description='', entrydesc=NA , ... , package=topenv(parent.frame()) , overwrite=FALSE){ # library(registry) # force overwrite in dev mode if( missing(overwrite) && isDevNamespace(package) ){ overwrite <- TRUE } # check if sub-registry already exists oldreg <- packageRegistry(regname, quiet=TRUE, package=package) if( !is.null(oldreg) && !overwrite ){ return( oldreg ) } # get meta-registry (force creation) regenv <- .packageMetaRegistry(package, create=TRUE) nm <- packageSlot(regenv) ns_str <- str_c("package '", nm, "'") if( !is.null(oldreg) ){ if( !overwrite ){ if( isLoadingNamespace() ){ # exit if loading a namespace message("NOTE: Did not create registry '", regname,"' in ", ns_str, ": registry already exists.") return(oldreg) } stop("Could not create registry '", regname,"' in ", ns_str, ": registry already exists") }else{ message("Remove registry '", regname,"' from ", ns_str) regenv$delete_entry(regname) } } message("Creating registry '", regname,"' in ", ns_str, ' ... ', appendLF=FALSE) .add_regclass <- function(x, newcl, before){ cl <- class(x) ir <- which(cl == before) class(x) <- c(if( ir > 1 ) cl[1:(ir-1)] , newcl, cl[ir:length(cl)]) x } pkgregclass <- c(paste(regname, 'package_registry', sep='_'), 'package_registry') if( is.character(regobj) ){# regobj specifies the S4 class of the registry entries objtype <- regobj[1] regobj <- registry(entry_class = paste(regname, 'entry', sep='_') , registry_class = c(pkgregclass, 'object_subregistry')) # access key regobj$set_field("key", type="character", is_key = TRUE , index_FUN = match_partial_ignorecase) # object regobj$set_field("object", type=objtype, is_mandatory=TRUE, validity_FUN = validObject) }else if( is(regobj, 'registry') ){ if( !is(regobj, 'package_registry') ){ regobj <- .add_regclass(regobj, pkgregclass, 'registry') } }else{ message('ERROR') stop("Invalid argument 'regobj': must be a class name or a registry object.") } # add field for REGISTERING package if( !"REGISTERINGpackage" %in% regobj$get_field_names() ) regobj$set_field("REGISTERINGpackage", type='character', is_mandatory=TRUE, index_FUN=match_exact) # fix registry object regobj <- fix_registry(regobj) # add package attr(regobj, 'package') <- nm # create new meta entry regenv$set_entry(key=regname, regobj=regobj , description=description, entrydesc=entrydesc , ...) message('OK') # return newly created registry regenv$get_entry(regname)$regobj } regkeys <- function(regobj, ...){ # get keys fld <- regobj$get_fields() keyfield <- names(fld[sapply(fld, function(x) isTRUE(x$is_key) )]) if( nargs() == 1L ) return(keyfield) index_fields <- list(...) if( is.null(names(index_fields)) && length(index_fields)==1L ) index_fields <- index_fields[[1L]] index_fields <- index_fields[!sapply(index_fields, is.null)] if( !length(index_fields) ) return(list()) # remove fields that are not keys i <- match(keyfield, names(index_fields)) index_fields[i[!is.na(i)]] } #' Finds an entry in a registry. #' #' This function provides extra control on how entries are queried #' from a \code{\link[registry:regobj]{registry}} object. #' #' @param regobj a registry object #' @param ... key value(s) to look up. #' If multiple indexes are used, then the primary key should come first. #' @param all logical to indicate if hidden keys (starting with a '.') should be #' returned and output in message. #' @param error a logical that indicates if an error should be thrown if the key has no match #' or multiple matches #' @param exact a logical that indicates if matching should be exact or partial. #' Note that if exact matches exist then they are returned, independently of the #' value of \code{exact}. #' @param KEYS alternative way of passing the key value(s). #' If not missing, then arguments in \code{...} are discarded. #' @param verbose a logical that indicates if verbosity should be toggle on #' @param entry a logical that indicates if the #' @param msg a header to use in case of error. #' #' @export regfetch <- function(regobj, ..., all=FALSE, error=TRUE, exact=FALSE , KEYS = NULL , verbose=FALSE, entry=FALSE, msg=NULL){ # load the registry package # library(registry) # list -- all -- keys if no key is specified keylist <- allkeys <- regobj$get_entry_names() if( !all ) keylist <- grep("^[^.]", keylist, value=TRUE) index_fields <- if( !is.null(KEYS) ){ if( !is.list(KEYS) ) stop("Invalid argument : must be a list of field values.") KEYS }else list(...) # extract primary key key <- if( length(index_fields) ){ # remove fields that are not keys if named list if( !is.null(names(index_fields)) ) index_fields <- regkeys(regobj, index_fields) if( length(index_fields) ){ paste(unlist(index_fields), collapse='_') str_out(index_fields, Inf, use.names=TRUE) } } if( is.null(key) ){ return(keylist) } # set verbosity level if( !missing(verbose) ){ ol <- lverbose(verbose) on.exit( lverbose(ol) ) } if( !is.null(msg) ) msg <- str_c(msg, ' - ') if( regobj$n_of_entries() == 0L ){ if( error ) stop(msg, "Registry is empty: no matching entry for key ", dQuote(key), ".") else return(NULL) } # get entry d <- do.call(regobj$get_entries, index_fields) # no entry found if( is.null(d) ){ if( error ){ stop(msg, "No matching entry for key ", dQuote(key), " in the registry." , "\n Use one of: ", str_wrap(str_out(sort(allkeys), Inf), exdent=2), '.') }else return(NULL) } # look for exact matches if( is.list(index_fields) ){ ex <- sapply(d, function(x) all(mapply(identical, index_fields, x[names(index_fields)]))) }else{ ex <- names(d) == index_fields } # limit to exact mathes if( length(i <- which(ex)) ){ d <- d[i] }else if( exact ){ if( error ){ stop(msg, "No exact match for key '", key, "' in the registry." , "\n Use one of: ", str_wrap(str_out(allkeys, Inf), exdent=2), '.') }else return(NULL) } if( all ) return(d) # multiple match # str(d) if( length(d) > 1L ){ if( error ){ stop(msg, "Multiple entries found for key ", dQuote(key), ": ", str_out(sort(names(d)), Inf), '.') }else return(NA) } # check single match if( length(d) != 1L ) stop("Unexpected error: more than one entry was selected.") # return single match d <- d[[1L]] # return registry object if the entry is an automatic sub-registry if( !entry && is(regobj, 'object_subregistry') ) d$object else d } #' \code{pkgreg_fetch} fetches entries in a package registry, as set up by #' \code{\link{setPackageRegistry}}. #' #' \code{pkgreg_fetch} loads the requested package registry and uses \code{regfetch} #' to retrieve data from it. #' #' @inheritParams setPackageRegistry #' #' @rdname regfetch #' @export pkgreg_fetch <- function(regname, ..., msg=NULL, where=topenv(parent.frame())){ # get package registry regentry <- packageRegistry(regname, package=where, entry=TRUE, update=TRUE) # define addon error message if( missing(msg) && !is_NA(regentry$entrydesc) ) msg <- regentry$entrydesc # fetch from registry regfetch(regentry$regobj, ..., msg=msg) } #' \code{pkgreg_remove} removes an entry from a package registry. #' #' @param quiet a logical that indicates if the operation should be performed quietly, #' without throwing errors or warnings. #' #' @rdname regfetch #' @export pkgreg_remove <- function(regname, ..., msg=NULL, where=topenv(parent.frame()), quiet=FALSE){ # get package registry regentry <- packageRegistry(regname, package=where, entry=TRUE, update=TRUE) # define addon error message if( missing(msg) && !is_NA(regentry$entrydesc) ) msg <- regentry$entrydesc # fetch from registry entry <- regfetch(regentry$regobj, ..., exact=TRUE, error=FALSE, all=TRUE, msg=msg) res <- if( !is.null(entry) ){ # get the method registry and the method's fullname name <- names(entry) if( !quiet ){ msg <- paste0("Removing ", msg, " '", name, "' from registry '", regname, "'") message(msg, ' ... ', appendLF=FALSE) } # delete from registry regentry$regobj$delete_entry(name) if( !quiet ) message('OK') TRUE }else{ if( !quiet ){ name <- str_out(list(...), Inf, use.names=TRUE) warning("Could not remove ", msg, " '", name, "': no matching registry entry.", call.=FALSE) } FALSE } if( quiet ) invisible(res) else res } extract_pkg <- function(x){ sub("^(([^:]+)::)?(.*)", "\\2", x) } #' Automatic S4 Class for Registry Entries #' #' @param registry a registry object #' @param Class name of the class to generate #' @param ... extra arguments passed to \code{\link{setClass}}. #' setClassRegistry <- function(registry, Class, ...){ # setClass(Class, representation, prototype, contains=character(), # validity, access, where, version, sealed, package, # S3methods = FALSE) f <- registry$get_fields() slots <- sapply(f, '[[', 'type', simplify=FALSE) args <- list(Class, representation=do.call('representation', slots)) # if( !hasArg(validity) ){ # .validity <- # sapply(f, function(x){ # if(x$is_mandatory) # function(object){ # if() # } # }) # args$validity <- function(object){ # # } # } do.call('setClass', c(args, ...)) } #' \code{setPackageRegistryEntry} adds an entry in a package registry. #' #' @param key entry identifier. #' @param where package name or namespace that owns the registry. #' @param verbose a logical that indicates if verbosity should be toggle on. #' @param msg addon message to print at the end of the output log line, #' when \code{verbose=TRUE}. #' #' @rdname registry #' @export setPackageRegistryEntry <- function(regname, key, ..., overwrite=FALSE, verbose=FALSE , where=topenv(parent.frame()), msg=NULL){ if( isLoadingNamespace() ){ verbose <- TRUE if( missing(overwrite) ) overwrite <- TRUE } registry <- regname package <- where # check if the name provided is not empty if( nchar(key) == 0 ) stop('Invalid argument : cannot be an empty string.') # build full key, that includes the name of the top calling namespace fullkey <- key top_ns <- topns(strict=FALSE) # # retrieve package registry (it must exist or this will throw an error) package <- packageEnv(package) subregentry <- packageRegistry(registry, package=package, entry=TRUE, update=TRUE) # get regobj (do that to ensure it is updated with entries from other packages) regobj <- subregentry$regobj # setup complete list of fields fields <- list(...) objdesc <- if( !is_NA(subregentry$entrydesc) ) subregentry$entrydesc else paste(registry, 'object') objdesc <- paste(objdesc, " '", key, "'", sep='') if( length(fields)==1L ){ objdesc <- paste(objdesc, ' [', class(fields[[1L]]), ']', sep='') if( is.null(names(fields)) && is(regobj, 'object_subregistry') ) names(fields) <- 'object' } fields$key <- key regpkg <- packageName(top_ns, .Global=TRUE) fields$REGISTERINGpackage <- regpkg # str(fields) # # check if the object is already registered oldentry <- regfetch(regobj, KEYS=fields, exact=TRUE, error=FALSE, all=TRUE) # error if already exists and not overwriting if( !is.null(oldentry) && !overwrite ){ if( verbose ) message("ERROR") stop("Cannot register ", objdesc, ": key already exists.") } # add entry if( verbose ){ action <- if( is.null(oldentry) ) 'Registering' else 'Replacing' message(action, " ", objdesc, msg, " ... ", appendLF=FALSE) } # delete old entry if( !is.null(oldentry) ){ regobj$delete_entry(names(oldentry)[1L]) } # do add entry do.call(regobj$set_entry, fields) if( verbose ) message("OK") # if the registration happens during loading another package: # create local registry and add entry to it. # It will be merged to the main registry on the next call to # packageRegistry after the package is loaded. lns <- getLoadingNamespace(env=TRUE) if( !is.null(lns <- getLoadingNamespace(env=TRUE)) && !identical(lns, package) ){ # clone registry if( nchar(subregentry$parent) ){ warning("Deriving package registry '", registry, "' in package ", lns , " from ", subregentry$parent, " instead of ", subregentry$package, immediate.=TRUE) parent <- subregentry$parent }else parent <- subregentry$package fullregistry <- str_c(parent, '::', registry) if( is.null(locregobj <- packageRegistry(fullregistry, package=lns, quiet=TRUE)) ){ # clone registry locregobj <- clone_regobj(regobj, empty=TRUE) # attach to loading namespace locregobj <- setPackageRegistry(fullregistry, locregobj , description = subregentry$description , entrydesc = subregentry$entrydesc , parent = parent , package = lns) } action <- 'Adding' if( !is.null(locentry <- regfetch(locregobj, KEYS=fields, exact=TRUE, error=FALSE, all=TRUE)) ){ action <- 'Overwriting' locregobj$delete_entry(names(locentry)[1L]) } # add entry into local registry if( verbose ) message(action, " entry '", key, "' in registry '", fullregistry, "' ... ", appendLF=FALSE) do.call(locregobj$set_entry, fields) if( verbose ) message("OK") } # # return registered object regfetch(regobj, KEYS=fields, exact=TRUE) } # clone a registry object clone_regobj <- function(regobj, empty=FALSE){ tmp <- tempfile('registry') on.exit(unlink(tmp)) saveRDS(regobj, file=tmp) newreg <- readRDS(tmp) # empty entries if necessary if( empty ){ sapply(newreg$get_entry_names(), newreg$delete_entry) } newreg } pkgmaker/R/graphics.R0000644000176000001440000000172712330274520014234 0ustar ripleyusers# Graphics utilities # # Author: Renaud Gaujoux # Created: 05 Dec 2012 ############################################################################### #' Utility Functions for Graphics #' #' @name graphics-utils #' @rdname graphics-utils NULL #' \code{mfrow} returns a 2-long numeric vector suitable to use in \code{\link{par}(mfrow=x)}, #' that will arrange \code{n} panels in a single plot. #' #' @param n number of plots to be arranged. #' #' @rdname graphics-utils #' @export #' @examples #' #' mfrow(1) #' mfrow(2) #' mfrow(3) #' mfrow(4) #' mfrow(10) mfrow <- function(n){ if( n == 1 ) c(1, 1) else if( n == 2 ) c(1, 2) else if( n <= 4 ) c(2, 2) else if( n <= 6 ) c(3, 2) else if( n <= 9 ) c(3, 3) else{ sn <- floor(n / 3) c(sn + if( sn %% 3 ) 1 else 0, 3) } } round.pretty <- function(x, min=2){ if( is.null(x) ) return(NULL) n <- 0 y <- round(sort(x), n) while( any(diff(y)==0) ){ n <- n+1 y <- round(sort(x), n) } round(x, max(min,n)) } pkgmaker/R/colors.R0000644000176000001440000000123112330274520013723 0ustar ripleyusers# Color utilities # # Author: Renaud Gaujoux # Created: 30 Nov 2012 ############################################################################### #' Colour utilities #' #' \code{alphacol} adds an alpha value to a colour specification and convert to #' a hexadecimal colour string. #' #' @inheritParams grDevices::col2rgb #' #' @importFrom grDevices col2rgb #' @export #' @examples #' #' # Alphas #' alphacol('red') # do nothing #' alphacol('red', 10) #' alphacol('#aabbcc', 5) #' alphacol(4, 5) #' alphacol <- function(col, alpha=FALSE){ apply(as.character(as.hexmode(col2rgb(col, alpha))), 2, function(x) paste("#", paste(x, collapse=''), sep='')) } pkgmaker/R/devutils.R0000644000176000001440000003674412330274520014302 0ustar ripleyusers# Development utility functions # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include namespace.R #' @include unitTests.R #' @include logging.R NULL set_libPaths <- function(lib.loc=NULL){ ol <- Sys.getenv('R_LIBS') olib <- .libPaths() res <- list(R_LIBS=ol, .libPaths=olib) if( is_NA(lib.loc) ) return(res) # add lib path if( is.null(lib.loc) ) lib.loc <- .libPaths() if( is.character(lib.loc) ){ # current .libPaths .libPaths(lib.loc) # R_LIBS env variable rlibs <- paste(lib.loc, collapse=.Platform$path.sep) Sys.setenv(R_LIBS=rlibs) }else if( is.list(lib.loc) ){ Sys.setenv(R_LIBS=lib.loc$R_LIBS) .libPaths(lib.loc$.libPaths) } res } #' Executing R Commands #' #' \code{R.exec} executes a single R command via \code{\link{system2}}. #' #' @param ... extra arguments that are concatenated and appended to #' the command. #' @param lib.loc logical that indicates if the current library locations #' should be used. #' If a character vector, then it is used as the library path specification. #' #' @export R.exec <- function(..., lib.loc=NULL){ cmd <- paste(file.path(R.home('bin'), 'R'), ' ', ..., sep='', collapse='') # add lib path ol <- set_libPaths(lib.loc) on.exit(set_libPaths(ol)) message(cmd) system(cmd, intern=interactive()) } #' \code{R.CMD} executes R CMD commands. #' #' @param cmd command to run, e.g. \sQuote{check} or \sQuote{INSTALL}. #' #' @export #' @rdname R.exec R.CMD <- function(cmd, ...){ R.exec('CMD ', cmd, ' ', ...) } #' \code{R.SHLIB} executes R CMD SHLIB commands. #' #' @param libname name of the output compiled library #' #' @export #' @rdname R.exec R.SHLIB <- function(libname, ...){ R.CMD('SHLIB', '-o ', libname, .Platform$dynlib.ext, ...) } #' Compile Source Files from a Development Package #' #' @param pkg the name of the package to compile #' @param load a logical indicating whether the compiled library should be loaded #' after the compilation (default) or not. #' #' @return None #' @export compile_src <- function(pkg=NULL, load=TRUE){ if( !is.null(pkg) ){ library(devtools) p <- as.package(pkg) path <- p$path }else{ pkg <- packageName() path <- packagePath(lib=NA) # do not look installed packages } owd <- getwd() on.exit(setwd(owd)) # Compile code in /src srcdir <- file.path(path, 'src') message("# Checking '", srcdir, "' ... ", appendLF=FALSE) if( !file.exists(srcdir) ){ message("NO") } else { message("YES") message("## Compiling '",srcdir,"' ##") setwd(srcdir) Sys.setenv(R_PACKAGE_DIR=path) R.SHLIB(pkg, " *.cpp ") message("## DONE") if( load ){ if( existsFunction('load_dll', where='package:devtools') ){ # post 0.8 f <- getFunction('load_dll', where='package:devtools') f(pkg) }else{ # prior 0.8 f <- getFunction('load_c', where='package:devtools') f(pkg) } } } } #' Package Development Utilities #' #' \code{packageEnv} is a slight modification from \code{\link{topenv}}, which #' returns the top environment, which in the case of development #' packages is the environment into which the source files are loaded by #' \code{\link[devtools]{load_all}}. #' #' @param pkg package name. If missing the environment of the runtime caller #' package is returned. #' @param skip a logical that indicates if the calling namespace should be #' skipped. #' @param verbose logical that toggles verbosity #' #' @rdname devutils #' @return \code{packageEnv} returns an environment #' @export packageEnv <- function(pkg, skip=FALSE, verbose=FALSE){ # return package namespace if( !missing(pkg) && !is.null(pkg) ){ # - if the package is loaded: use asNamespace because as.environment does not # return a correct environment (don't know why) # - as.environment('package:*') will return the correct environment # in dev mode. env <- if( is.environment(pkg) ) topenv(pkg) else if( !is.null(path.package(pkg, quiet=TRUE)) ) asNamespace(pkg) else if( isLoadingNamespace(pkg) ) getLoadingNamespace(env=TRUE) else if( isNamespaceLoaded(pkg) ) asNamespace(pkg) else if( pkg %in% search() ) as.environment(pkg) else as.environment(str_c('package:', pkg)) # dev mode return(env) } envir = parent.frame() # message("parent.frame: ", str_ns(envir)) pkgmakerEnv <- topenv() # message("pkgmaker ns: ", str_ns(pkgmakerEnv)) n <- 1 skipEnv <- pkgmakerEnv while( identical(e <- topenv(envir), skipEnv) && !identical(e, emptyenv()) && !identical(e, .GlobalEnv) ){ if( verbose > 1 ) print(e) n <- n + 1 envir <- parent.frame(n) } if( !skip ){ if( identical(e, .BaseNamespaceEnv) ){ if( verbose ) message("packageEnv - Inferred ", str_ns(skipEnv)) return( skipEnv ) } if( verbose ) message("packageEnv - Detected ", str_ns(e)) return(e) } if( verbose > 1 ) message("Skipping ", str_ns(skipEnv)) # go up one extra namespace skipEnv <- e while( identical(e <- topenv(envir), skipEnv) && !identical(e, emptyenv()) && !identical(e, .GlobalEnv) ){ if( verbose > 1 ) print(e) n <- n + 1 envir <- parent.frame(n) } if( identical(e, .BaseNamespaceEnv) ){ if( verbose ) message("packageEnv - Inferred ", str_ns(skipEnv)) return( skipEnv ) } if( verbose ) message("packageEnv - Detected ", str_ns(e)) return(e) } #' \code{topns_name} returns the name of the runtime sequence of top namespace(s), #' i.e. the name of the top calling package(s), from top to bottom. #' #' \code{topns_name}: the top namespace is is not necessarily the namespace where \code{topns_name} #' is effectively called. #' This is useful for packages that define functions that need to access the #' calling namespace, even from calls nested into calls to another function from #' the same package -- in which case \code{topenv} would not give the desired #' environment. #' #' @param n number of namespaces to return #' @param strict a logicical that indicates if the global environment should #' be considered as a valid namespace. #' @param unique logical that indicates if the result should be reduced #' to contain only one occurence of each namespace. #' #' @rdname devutils #' @export topns_name <- function(n=1L, strict=TRUE, unique=TRUE){ if( n==1L && !is.null(ns <- getLoadingNamespace()) ){ return(ns) } nf <- sys.nframe() i <- 0 res <- character() while( i <= nf && length(res) < n ){ e <- sys.frame(i) if( !strict || !identical(e, .GlobalEnv) ){ pkg <- methods::getPackageName(e, create=FALSE) if( pkg != '' ){ res <- c(res, pkg) } } i <- i + 1 } if( !length(res) ){# try with packageEnv e <- packageEnv(skip=TRUE) if( isNamespace(e) ){ res <- methods::getPackageName(e) # print(res) }else{ #warning('Could not find top namespace.', immediate.=TRUE) return('') } } if( unique || n==1L ) res <- match.fun('unique')(res) if( length(res) || n>1L ) res else '' } #' \code{topns} returns the runtime top namespace, i.e. the namespace of #' the top calling package, possibly skipping the namespace where \code{topns} #' is effectively called. #' This is useful for packages that define functions that need to access the #' calling namespace, even from calls nested into calls to another function from #' the same package -- in which case \code{topenv} would not give the desired #' environment. #' #' @rdname devutils #' @export topns <- function(strict=TRUE){ ns <- topns_name(n=1L, strict=strict) if( ns == '.GlobalEnv' ) return( .GlobalEnv ) else if( nchar(ns) ) asNamespace(ns) #packageEnv(skip=TRUE, verbose=verbose) } #' \code{packageName} returns the current package's name. #' It was made internal from version 0.16, since the package \pkg{utils} #' exported its own \code{\link[utils]{packageName}} function in R-3.0.0. #' #' @param envir environment where to start looking for a package name. #' The default is to use the \strong{runtime} calling package environment. #' @param .Global a logical that indicates if calls from the global #' environment should throw an error (\code{FALSE}: default) or the string #' \code{'R_GlobalEnv'}. #' @param rm.prefix logical that indicates if an eventual prefix 'package:' #' should be removed from the returned string. #' #' @rdname devutils #' @return a character string packageName <- function(envir=packageEnv(), .Global=FALSE, rm.prefix=TRUE){ if( is.null(envir) ) envir <- packageEnv() if( is.character(envir) ){ return( sub("^package:", "", envir) ) } # retrieve package environment e <- envir # try with name from environment nm <- environmentName(e) if( identical(e, .GlobalEnv) && .Global ) return(nm) else if( isNamespace(e) || identical(e, baseenv()) ) return(nm) else if( grepl("^package:", nm) ){# should work for devtools packages if( rm.prefix ) nm <- sub("^package:", "", nm) return(nm) } # try to find the name from the package's environment (namespace) if( exists('.packageName', e) && .packageName != 'datasets' ){ if( .packageName != '' ) return(.packageName) } # get the info from the loadingNamespace info <- getLoadingNamespace(info=TRUE) if( !is.null(info) ) # check whether we are loading the namespace info$pkgname else{# error stop("Could not reliably determine package name [", nm, "]") } } #' \code{str_ns} formats a package environment/namespace for log/info messages. #' #' @rdname devutils #' @export str_ns <- function(envir=packageEnv()){ if( !is.environment(envir) ) stop("Invalid argument: must be an environment [", class(envir), ']') str_c(if( isNamespace(envir) ) 'namespace' else 'environment', " '", packageName(envir, rm.prefix=FALSE), "'") } #' \code{packagePath} returns the current package's root directory, which is #' its installation/loading directory in the case of an installed package, or #' its source directory served by devtools. #' #' @param package optional name of an installed package #' @param lib.loc path to a library of R packages where to search the package #' @param ... arguments passed to \code{\link{file.path}}. #' #' @rdname devutils #' @return a character string #' @export packagePath <- function(..., package=NULL, lib.loc=NULL){ # try to find the path from the package's environment (namespace) pname <- packageName(package) # check if one is currently loading the namespace path <- NULL if( !is.null(info <- getLoadingNamespace(info=TRUE)) && info$pkgname == pname ){ path <- info$path }else { # try loaded/installed package path <- find.package(package=pname, lib.loc=lib.loc, quiet=TRUE) } # somehow this fails when loading an installed package but is works # when loading a package during the post-install check if( !length(path) || path == '' ){ # get the info from the loadingNamespace if( !is.null(info <- getLoadingNamespace(info=TRUE)) ){ path <- info$path } } stopifnot( !is.null(path) && path != '' ) # for development packages: add inst prefix if necessary if( isDevNamespace(pname) ){ # handle special sub-directories of the package's root directory dots <- list(...) Rdirs <- c('data', 'R', 'src', 'exec', 'tests', 'demo' , 'exec', 'libs', 'man', 'help', 'html' , 'Meta') if( length(dots) && !sub("^/?([^/]+).*", "\\1", ..1) %in% Rdirs) path <- file.path(path,'inst') } # add other part of the path file.path(path, ...) } #' \code{isPackageInstalled} checks if a package is installed. #' #' @rdname devutils #' @export isPackageInstalled <- function(..., lib.loc=NULL){ inst <- utils::installed.packages(lib.loc=lib.loc) pattern <- '^([a-zA-Z.]+)(_([0-9.]+)?)?$'; res <- sapply(list(...), function(p){ vers <- gsub(pattern, '\\3', p) print(vers) pkg <- gsub(pattern, '\\1', p) print(pkg) if( !(pkg %in% rownames(inst)) ) return(FALSE); p.desc <- inst[pkg,] if( (vers != '') && compareVersion(vers, p.desc['Version']) > 0 ) return(FALSE); TRUE }) all(res) } #stripLatex <- function(x){ # gsub("\\\\.\\{(.)\\}", "\\1", x) #} #' \code{as.package} is enhanced version of \code{\link[devtools]{as.package}}, #' that is not exported not to mask the original function. #' It could eventually be incorporated into \code{devtools} itself. #' Extra arguments in \code{...} are passed to \code{\link{find.package}}. #' #' @param x package specified by its installation/development path or its name #' as \code{'package:*'}. #' @param quiet a logical that indicate if an error should be thrown if a #' package is not found. It is also passed to \code{\link{find.package}}. #' @param extract logical that indicates if DESCRIPTION of package #' source files should be extracted. #' In this case there will be no valid path. #' #' @rdname devutils as.package <- function(x, ..., quiet=FALSE, extract=FALSE){ if( is.null(x) ) return( devtools::as.package() ) if( devtools::is.package(x) ) return(x) if( extract && grepl("\\.tar\\.gz$", x) ){ # source file # extract in tempdir tmp <- tempfile(x) on.exit( unlink(tmp, recursive=TRUE) ) pkg <- basename(sub("_[0-9.]+\\.tar\\.gz$", '', x)) desc <- file.path(pkg, 'DESCRIPTION') untar(x, desc, exdir=tmp) return(devtools::as.package(file.path(tmp, pkg))) } else { # check for 'package:*' if( grepl('^package:', x) ){ libs <- .libPaths() pkg <- sub('^package:', '', x) p <- lapply(libs, find.package, package=pkg, quiet=TRUE, verbose=FALSE) p <- unlist(p[sapply(p, length)>0]) if( !length(p) ){ if( !quiet ) stop("Could not find installed package ", pkg) return() } x <- p[1L] } } # try development packages res <- try(devtools::as.package(x), silent=TRUE) if( !is(res, 'try-error') ) return(res) # try loaded or installed packages if( length(res <- find.package(package=x, quiet=TRUE)) ) return(devtools::as.package(res)) if( quiet ) stop("Could not find package ", x) NULL } NotImplemented <- function(msg){ stop("Not implemented - ", msg) } #' Loading Package Data #' #' Loads package data using \code{\link[utils]{data}}, but allows the user to avoid #' NOTEs for a \sQuote{non visible binding variable} to be thrown when checking a package. #' This is possible because this function returns the loaded data. #' #' @param list character vector containing the names of the data to load. #' @inheritParams utils::data #' @param ... other arguments eventually passed to \code{\link[utils]{data}}. #' #' @return the loaded data. #' #' @export #' @examples #' #' \dontrun{ mydata <- packageData('mydata') } #' packageData <- function(list, envir = .GlobalEnv, ...){ # same as utils::data if no 'list' argument if( missing(list) ) return( data(..., envir=envir) ) # load into environment data(list=list, ..., envir = envir) # return the loaded data if( length(list) == 1L ) get(list, envir=envir) else sapply(list, get, envir=envir, simplify=FALSE) } #' \code{ldata} loads a package data in the parent frame. #' It is a shortcut for \code{packageData(list, ..., envir=parent.frame())}. #' #' @rdname packageData #' @export #' @examples #' #' \dontrun{ #' # in a package' source => won't issue a NOTE #' myfunction function(){ #' mydata <- ldata('mydata') #' } #' } #' ldata <- function(list, ...){ e <- parent.frame() packageData(list=list, ..., envir=e) } pkgmaker/R/files.R0000644000176000001440000000414712330274520013535 0ustar ripleyusers# Filesystem related functions # # Author: Renaud Gaujoux ############################################################################### #' Library Files Utilities #' #' Lists binary library files in a directory #' #' @param dir directory #' @param all.platforms a logical that indicates whether to list library files for #' the current platform only (default) or all platforms (Unix, Windows, Mac). #' @param ... extra arguments passed to \code{\link{list.files}}. #' #' @return a character vector #' @export #' @rdname libutils list.libs <- function(dir, ..., all.platforms=FALSE){ p <- if( !all.platforms ){ str_c("\\", .Platform$dynlib.ext, "$") }else{ p <- str_c("(\\.", c('so', 'dll'), , ')', collapse='|') str_c(p, '$') } list.files(dir, pattern=p, ...) } #' \code{libname} extracts library names from a path, removing the #' directory part of the path, as well as the platform #' specific library extension. #' #' @param x a filename #' #' @export #' @rdname libutils #' #' @examples #' #' libname('mylib.so') #' libname('/some/path/somewhere/mylib.dll') #' libname <- function(x){ sub(str_c("\\", .Platform$dynlib.ext, "$"), "", basename(x)) } #' Source Multiple Files #' #' Vectorised version of \code{source}. #' #' @param x character vector containing filenames #' @inheritParams base::list.files #' @param ... extra arguments passed to \code{\link{source}}. #' #' @export source_files <- function(x, pattern=NULL, ...){ if( length(x) == 1L && is.dir(x) ) x <- list.files(x, pattern=pattern, full.names=TRUE) invisible(sapply(x, source, ...)) } #' Extract File Extension #' #' @param x path as a character vector. #' @param ext extension to append instead of the original extension. #' #' @export #' #' @examples #' #' file_extension('alpha.txt') #' file_extension(paste('aa.tt', 1:5, sep='')) #' # change extension #' file_extension(paste('aa.tt', 1:5, sep=''), 'pdf') #' file_extension(paste('aatt', 1:5, sep=''), 'pdf') #' file_extension <- function(x, ext=NULL){ if( is.null(ext) ) sub(".*\\.([^.]{3})$","\\1",x) else str_c(sub("(.*)(\\.([^.]{3}))$","\\1", x), '.', sub("^.", '', ext)) }pkgmaker/R/namespace.R0000644000176000001440000001055212330274520014364 0ustar ripleyusers# Namespace related functions # # Author: Renaud Gaujoux # Creation: 30 Apr 2012 ############################################################################### is_funcall <- function(fun){ n <- sys.nframe() i <- 1 dg <- digest(fun) while( i <= n ){ f <- sys.function(i) ca <- sys.call(i) # cat(digest(f), dg, getPackageName(environment(f), FALSE), "\n") if( digest(f) == dg ) return(i) i <- i + 1 } FALSE } is_pkgcall <- function(pkg){ pkg %in% pkg_calls() } pkg_calls <- function(){ n <- sys.nframe() - 1 i <- 1 res <- character() while( i <= n ){ f <- sys.function(i) e <- environment(f) if( !is.null(e) ){ pkg <- methods::getPackageName(e, create=FALSE) if( pkg != '' ) res <- c(res, pkg) } i <- i + 1 } res } #' Namespace Development Functions #' #' \code{getLoadingNamespace} returns information about the loading namespace. #' It is a wrapper to \code{\link{loadingNamespaceInfo}}, that does not throw #' an error. #' #' @param env logical that indicates that the namespace's environment (i.e. the #' namespace itself) should be returned. #' @param info logical that indicates that the complete information list should #' be returned #' #' @return the name of the loading namespace if \code{env} and \code{info} are #' \code{FALSE}, an environment if \code{env=TRUE}, a list with elements #' \code{pkgname} and \code{libname} if \code{info=TRUE}. #' #' @rdname namespace #' @export #' getLoadingNamespace <- function(env=FALSE, info=FALSE, nodev=FALSE){ is.loading <- try(nsInfo <- loadingNamespaceInfo(), silent=TRUE) if( !is(is.loading, 'try-error') ){ if( env ) asNamespace(as.name(nsInfo$pkgname)) else if( info ){ nsInfo$path <- file.path(nsInfo$libname, nsInfo$pkgname) nsInfo }else nsInfo$pkgname }else if( !nodev ){ # devtools namespaces are allowed if( is_pkgcall('devtools') && (i <- is_funcall(devtools::load_all)) ){ # find out the package that is currently being loaded by load_all e <- sys.frame(i) pkg <- e$pkg # extract namespace if( env ) asNamespace(pkg$package) else if( info ){ list( pkgname = pkg$package , path = pkg$path , libname = dirname(pkg$path) ) }else pkg$package } } else NULL } #' Tests if a namespace is being loaded. #' #' @param ns the name of a namespace or a namespace whose loading state is tested. #' If missing \code{isLoadingNamespace} test if any namespace is being loaded. #' @param nodev logical that indicates if loading devtools namespace should #' be discarded. #' #' @rdname namespace #' @export isLoadingNamespace <- function(ns, nodev=FALSE){ if( missing(ns) ) !is.null(getLoadingNamespace(nodev=nodev)) else{ nspkg <- getLoadingNamespace(nodev=nodev, env=is.environment(ns)) if( is.null(nspkg) ) FALSE else identical(nspkg, ns) } } #' \code{isNamespaceLoaded} tests if a given namespace is loaded, without loading it, #' contrary to \code{\link{isNamespace}}. #' #' @rdname namespace #' @export isNamespaceLoaded <- function(ns){ if( is.environment(ns) ){ if( !isNamespace(ns) ) return(FALSE) else ns <- getPackageName(ns) } if( isString(ns) ) ns %in% loadedNamespaces() else stop("Invalid argument `ns`: only support strings and environments.") } #' \code{isDevNamespace} tests the -- current -- namespace is a devtools namespace. #' #' @rdname namespace #' @export isDevNamespace <- function(ns){ if( missing(ns) ){ e <- parent.frame() ns <- methods::getPackageName(topenv(e)) } # cannot be true if the namespace is not loaded if( !isNamespaceLoaded(ns) ) return( FALSE ) # get the namespace environment if( isString(ns) ) ns <- asNamespace(ns) # check for the presence of a .__DEVTOOLS__ object exists('.__DEVTOOLS__', where=ns) } #' Dynamically adds exported objects into the loading namespace. #' #' @param x character vector containing the names of R objects to export in the #' loading namespace. #' #' @rdname namespace #' @export addNamespaceExport <- function(x){ ns <- pkgmaker::getLoadingNamespace(env=TRUE) if( !is.null(ns) ){ namespaceExport(ns, x) } } #' \code{ns_get} gets an object from a given namespace. #' @rdname namespace #' @export ns_get <- function(x, ns){ if( !isNamespace(ns) ) ns <- asNamespace(ns) get(x, ns) } pkgmaker/R/logging.R0000644000176000001440000000334612330274520014061 0ustar ripleyusers# Logging system # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include utils.R NULL #' Internal verbosity option #' @param val logical that sets the verbosity level. #' @return the old verbose level #' @keywords internal lverbose <- local({ .val <- NA function(val){ if( missing(val) ) return(.val) oval <- .val .val <<- val invisible(oval) } }) #' Tells if all verbose messages should be #' @rdname lverbose lsilent <- function(){ l <- lverbose() is.na(l) || l == 0L } #' Tells if verbosity is on. #' @rdname lverbose is.verbose <- function(){ l <- lverbose() !is.na(l) && l >= 0L } #' Prints out a message (on sdtout) if verbose mode is on. #' #' @param ... arguments passed to \code{...} \code{\link{cat}} #' @param appendLF logical indicating if an endline character should be appended #' at the end of the message. Passed to \code{\link{cat}}. #' @rdname lverbose #' vmessage <- function(...){ lmessage(..., level=1L) } #' Prints out a message (on sdtout) if the verbosity level is greater than a #' given value. #' #' @param level verbosity level threshold (numeric value) above which the #' message should be printed out. #' This threshold is compared with the current verbosity level as returned by #' \code{lverbose}. #' @param ... arguments passed to \code{...} \code{\link{lmessage}} or \code{\link{cat}} #' @param appendLF logical indicating if an endline character should be appended #' at the end of the message. Passed to \code{\link{cat}}. #' #' @rdname lverbose #' lmessage <- function(..., level=1L, appendLF=TRUE){ l <- lverbose() if( !is.na(l) && l >= level ) cat(..., if(appendLF) "\n", sep='') } pkgmaker/R/unitTests.R0000644000176000001440000006673612334651603014456 0ustar ripleyusers# Unit tests utilities # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include utils.R #' @include logging.R NULL #' Load RUnit Compatible Package #' #' Loads the package responsible for the implementation of the RUnit framework, #' choosing amongst \sQuote{RUnitX}, \sQuote{svUnit} and \sQuote{RUnit}. #' #' @param ... arguments passed to \code{\link{requirePackage}}. #' #' @return nothing #' @export #' requireRUnit <- local({ .cache <- NULL function(...){ if( !is.null(.cache) ) return(.cache) has_pkg <- function(x) length(find.package(x, quiet=TRUE)) > 0L ruf <- c('RUnit', 'svUnit') runit <- NULL for( pkg in ruf){ if( require.quiet(pkg, character.only=TRUE) ){ runit <- pkg break } } if( is.null(runit) ) stop("Cannot find any package providing RUnit framework.") message("Using RUnit framework provider: ", runit) .cache <<- runit # return name of the loaded framework invisible(runit) } }) # Borrowed from RUnit::.existsTestLogger .existsTestLogger <- function(envir = .GlobalEnv){ exists(".testLogger", envir = envir) && inherits(.testLogger, "TestLogger") } #' Enhancing RUnit Logger #' #' Adds a function or a local variable to RUnit global logger. #' #' @param name name of the function or variable to add #' @param value object to append to the logger. #' If \code{value} is a function it is added to the list and is accessible via #' \code{.testLogger$name}. #' If \code{value} is a variable it is added to the local environment and is #' therefore accessible in all logging functions. #' @param logger an optional RUnit logger object. #' If missing or \code{NULL}, the object \code{.testLogger} is searched in #' \code{.GlobalEnv} -- and an error is thrown if it does not exist. #' #' @return the modified logger object. Note that the global object is also #' modified if \code{logger} is \code{NULL}. #' addToLogger <- function(name, value, logger=NULL){ logobj <- if( !is.null(logger) ) logger else{ if( !.existsTestLogger() ) stop("No global logger exists") get('.testLogger', envir=.GlobalEnv) } # get local logger environment logenv <- environment(logobj$incrementCheckNum) if( is.function(value) ){# add function to logger if( is.null(logobj[[name]]) ){ environment(value) <- logenv logobj[[name]] <- value # update global logger if necessary if( is.null(logger) ){ ge <- .GlobalEnv assign('.testLogger', logobj, envir=ge) } } }else{ # assign object in logger's local environment if not already there if( !exists(name, envir=logenv) ) assign(name, value, envir=logenv) } # return modified logger object logobj } #' Plot in Unit Tests #' #' Saves a plot in a PNG file that will be included in unit test HTML reports. #' #' @param expr expression that generate th eplot #' @param width plot width #' @param height plot height (not used) #' @param msg plot msg explaining the plot . It will be used as the caption #' #' @export #' @keywords internal checkPlot <- function(expr, msg=NULL, width=1000, height=NULL){ # get stuff from RUnit uf <- requireRUnit() if( is.null(uf) || uf != 'RUnit' ) return(TRUE) #.existsTestLogger <- RUnit:::.existsTestLogger .testLogger <- if( .existsTestLogger() ) .GlobalEnv$.testLogger if (missing(expr)) { stop("'expr' is missing.") } plotfile <- if (.existsTestLogger()) { .testLogger$incrementCheckNum() if( is.null(.testLogger$setPlot) ){ # add .plot list to logger environment addToLogger('.plots', NULL) # add function setPlot to logger .plots <- NULL # to trick R CMD check addToLogger('setPlot', function(name, msg=''){ ##@bdescr ## add a plot to a test function. ##@edescr ##@in testFuncName : [character] name of test function ##@in name : [character] filename ##@in msg : [character] message string ##@edescr if( is.null(.plots) ) .plots <<- list() .plots[[name]] <<- msg } ) # add function setPlot to logger .getTestData <- .currentTestSuiteName <- .currentSourceFileName <- .getCheckNum <- NULL # not to get NOTES is R CMD check addToLogger('getPlotfile', function(name, msg=''){ td <- .getTestData() # TODO from test function name #fname <- tail(names(td[[.currentTestSuiteName]]$sourceFileResults[[.currentSourceFileName]]), 1L) fname <- basename(tempfile(paste(.currentTestSuiteName, '_', .currentSourceFileName, '_', sep=''))) paste(fname, .getCheckNum(), sep='_') } ) # update local object with modified global logger .testLogger <- .GlobalEnv$.testLogger } .testLogger$getPlotfile() } else tempfile(tmpdir='.') # add extension to plot file plotfile <- paste(plotfile, 'png', sep='.') # reset the msg if none was provided if( is.null(msg) ) msg <- plotfile #plot in the PNG file png(filename=plotfile, width=width) # evaluate the expression that generates the plot res <- try( eval(expr, envir = parent.frame()) ) # close the graphic device dev.off() # test if everything went alright fileinfo <- file.info(plotfile) if( inherits(res, "try-error") || is.na(fileinfo$size[1]) || fileinfo$size[1] == 0 ){ #make sure the plot file is removed unlink(plotfile) if (.existsTestLogger()) { .testLogger$setFailure() } stop("Problem when generating plot:", res, msg) } if (.existsTestLogger()) { .testLogger$setPlot(plotfile, msg) } return(TRUE) } if( FALSE ){ library(NMF, lib='build/lib') utest('pkg/inst/tests/runit.algorithms.r', fun='test.brunet', framework='RUnit') } #' Extra Check Functions for RUnit #' #' \code{checkWarning} checks if a warning is generated by an expression, and #' optionally follows an expected regular expression pattern. #' #' @param expr an R expression #' @param expected expected value as regular expression pattern. #' If a logical, then it specifies if a warning is expected or not. #' #' For backward compatibility, a \code{NULL} value is equivalent to \code{TRUE}. #' @param msg informative message to add to the error in case of failure #' #' @export #' @rdname uchecks #' #' @examples #' #' # check warnings #' checkWarning({ warning('ah ah'); 3}) #' checkWarning({ warning('ah oh ah'); 3}, 'oh') #' try( checkWarning(3) ) #' try( checkWarning({ warning('ah ah'); 3}, 'warn you') ) #' checkWarning <- function(expr, expected=TRUE, msg=NULL){ # get stuff from RUnit uf <- requireRUnit() #.existsTestLogger <- RUnit:::.existsTestLogger .testLogger <- if( .existsTestLogger() ) .GlobalEnv$.testLogger if (missing(expr)) { stop("'expr' is missing") } # if (is.null(silent)) { # silent <- FALSE # warning("'silent' has to be of type 'logical'. Was NULL. Set to FALSE.") # } # if (.existsTestLogger()) { .testLogger$incrementCheckNum() } pf <- parent.frame() warns <- NULL withCallingHandlers(eval(expr, envir = pf) , warning = function(w){ warns <<- c(warns, w$message) } ) # check that some warning was thrown if( length(warns) == 0L ){ if( isFALSE(expected) ) return( TRUE ) if (.existsTestLogger()) { .testLogger$setFailure() } stop("Warning not generated as expected\n", msg) } if( isFALSE(expected) ){ if (.existsTestLogger()) { .testLogger$setFailure() } stop("Warning generated while none was expected:\n" , " - Warning(s): ", if(length(warns)>1)"\n * ", str_out(warns, Inf, sep="\n * ") ,"\n" , msg) } # check warnings if( is.null(expected) || isTRUE(expected) ) return(TRUE) if( any(grepl(expected, warns)) ) return(TRUE) # throw error if (.existsTestLogger()) { .testLogger$setFailure() } stop("Warning does not match expected pattern:\n" , " - Warning(s): ", if(length(warns)>1)"\n * ", str_out(warns, Inf, sep="\n * ") ,"\n" , " - Pattern: '", expected,"'\n" , msg) TRUE } #' Make Vignette for Unit Tests #' #' Builds a vignette for unit tests in a package using the \code{\link{utest}} #' and a template vignette file. #' #' @param pkg Package name #' @param file Output file (.Rnw, .tex, or .pdf) #' @param ... extra arguments passed to \code{\link{utest}}. #' @param check logical that indactes the cal was made from R CMD check, in which case the vignette #' is updated only if results of unit tests can be found in the unit test output directory, #' where they would have been generated by \code{\link{utest}}. #' #' @return Result of running unit test suite #' #' @export #' makeUnitVignette <- function(pkg, file=paste(pkg, '-unitTests.pdf', sep=''), ..., check=FALSE){ package <- pkg pkg <- sub("^package:", "", pkg) # generate the vignette for unit test on exit if( !is.null(file) ) on.exit( writeUnitVignette(pkg, file, check=check) ) # load this package if( !require(pkg, character.only = TRUE ) ){ stop("Could not load package '", pkg, "' for testing [libPath= ", str_out(.libPaths(), Inf), "]") } # run unit tests if not check or if the test results are not there (e.g., R CMD build) # if( userIs('renaud') ){ # env <- str_trim(capture.output(system('env', intern=TRUE))) # if( check ) write(env, file="~/check_env.txt") # else write(env, file="~/make_env.txt") # } # if( !check || !is.dir(utestPath(package=package)) ){ if( !check ){ # force running all tests utestCheckMode(FALSE) # run unit tests tests <- utest(package, ...) # check for errors err <- getErrors(tests) errMsg <- NULL if( err$nFail > 0) { errMsg <- c(errMsg, sprintf( "unit test problems: %d failures\n", err$nFail)) } if( err$nErr > 0) { errMsg <- c(errMsg, sprintf( "unit test problems: %d errors\n", err$nErr)) } # stop if any failure or error occured if( length(errMsg) > 0L ) stop(errMsg) # return result of unit test suite err }else{ # do nothing: tests should have been already run by R CMD check } } #' Writes Unit Tests Vignette #' #' Writes a vignette that contains the results from running unit test suites. #' #' @param pkg Package name #' @param file Output Sweave (.Rnw) file #' @param results result file or output character vector #' @param check logical that indactes the cal was made from R CMD check, #' in which case the vignette is updated only if results of unit tests can #' be found in the unit test output directory, where they would have been #' generated by \code{\link{utest}}. #' #' @export #' writeUnitVignette <- function(pkg, file, results=NULL, check=FALSE){ Rnw.template <- " \\documentclass[10pt]{article} %\\VignetteDepends{knitr} %\\VignetteIndexEntry{@pkg@-unitTests} %\\VignetteCompiler{knitr} %\\VignetteEngine{knitr::knitr} \\usepackage{vmargin} \\setmargrb{0.75in}{0.75in}{0.75in}{0.75in} <>= pkg <- '@pkg@' require( pkg, character.only=TRUE ) prettyVersion <- packageDescription(pkg)$Version prettyDate <- format(Sys.Date(), '%B %e, %Y') authors <- packageDescription(pkg)$Author @ \\usepackage[colorlinks]{hyperref} \\author{\\Sexpr{authors}} \\title{\\texttt{\\Sexpr{pkg}}: Unit testing results@resNote@} \\date{\\texttt{\\Sexpr{pkg}} version \\Sexpr{prettyVersion} as of \\Sexpr{prettyDate}} \\begin{document} \\maketitle @results@ \\section*{Session Information} @sessionInfo@ \\end{document} " verbatim_wrap <- function(...){ c("\\\\begin{verbatim}\n", ..., "\n\\\\end{verbatim}") } # default is to load the unit test results from the global output directory if( is.null(results) ){ upath <- utestPath(package=pkg) results <- list.files(upath, pattern="\\.txt$", full.names=TRUE) if( !length(results) ){ results <- verbatim_wrap('Could not find any unit test result in "', upath, '"') } } if( is.file(results[1L]) ){ resFile <- results[1L] name <- str_match(resFile, "([^.]+)\\.[^.]+$")[,2L] results <- c(str_c("\\\\section{", name, "}"), verbatim_wrap(readLines(resFile))) }else{ resFile <- NULL } results <- paste(results, collapse="\n") # substitute template variables contents <- Rnw.template # package name contents <- gsub("@pkg@", pkg, contents) # unit test results contents <- gsub("@results@", results, contents) # session info (as when calling this function) contents <- gsub("@sessionInfo@", gsub("\\", "\\\\", paste(toLatex(sessionInfo()), collapse="\n"), fixed=TRUE), contents) # note on how tests were performed resnote <- str_c("\\footnote{Vignette computed ", if( check ) ' via R CMD check/build ', ' on ', date(),"}") if( check ){ # add path to included file if compiled from R CMD check (for debug purposes) lfile <- gsub("([_$])", "\\\\\\1", paste(resFile, collapse="\\\\")) resnote <- str_c(resnote, " \\footnote{File: '", lfile, "'}") } contents <- gsub("@resNote@", gsub("\\", "\\\\", resnote, fixed=TRUE), contents) fileext <- toupper(file_extension(file)) fileext <- charmatch(fileext, c('RNW', 'TEX', 'PDF')) if( is_NA(fileext) ) stop("Invalid output file extension [",fileext,"] from file '", file, "'") fileRNW <- if( fileext == 1L ) file else str_c(pkg, '-unitTests.Rnw') fileTEX <- if( fileext == 2L ) file else str_c(pkg, '-unitTests.tex') filePDF <- if( fileext == 3L ) file else str_c(pkg, '-unitTests.pdf') # write into Rnw file writeLines(contents, fileRNW) if( fileext == 1L ) return() # compile vignette rnw(fileRNW, fileTEX) if( fileext == 2L ) return() # Run texi2dvi tex file res <- tools::texi2dvi(fileTEX, pdf = TRUE, clean = TRUE ) # copy file in main check directory if( check ) file.copy(filePDF, '../../..') res } # Unit test frameworks data .UFdata <- list( RUnit = list( file_pattern="^runit.*\\.[rR]$" , fun_pattern="^test\\." , check_pattern = "^check.+" , check_functions = c( 'checkTrue' , 'checkIdentical' , 'checkEquals' , 'checkEqualsNumeric' , 'checkException' ) ) , testthat = list( file_pattern="^test.*\\.[rR]$" , check_pattern = "^(expect_.+)|(test_that$)" , check_functions = c( "test_that" , "expect_equal" , "expect_equivalent" , "expect_error" , "expect_false" , "expect_identical" , "expect_is" , "expect_match" , "expect_message" , "expect_output" , "expect_that" , "expect_true" , "expect_warning" ) ) ) #' Inferring Unit Test Framework #' #' @param x an filename, a function or the body of a function #' @param eval a logical that indicates if the value of \code{x} should be used. #' #' @return the name of the framework as a character string or NULL if #' it could not be detected. #' #' @import codetools #' @export utestFramework <- function(x, eval=FALSE){ # check if one should detect within an expression expr <- if( missing(eval) || !eval ) substitute(x) else if( is.function(x) ) body(x) # walk code using codetools looking up for known test functions if( !is.null(expr) ){ cw <- makeCodeWalker(leaf= function(e, w) if( is.symbol(e) ) cat(e, "\n")) s <- str_trim(capture.output(walkCode(expr, cw))) if( length(s) > 1L ){ for( f in names(.UFdata) ){ if( any(s %in% .UFdata[[f]]$check_functions) ){ return(f) } } } # not found without evaluating if( !missing(eval) && !eval ) return() if( missing(eval) ){ # try evaluating return(utestFramework(x, eval=TRUE)) } } if( !is.character(x) ) stop("Invalid argument `x`: expecting a character string") path <- x framework <- NULL tf <- if( is.dir(path) ) list.files(path, "\\.[rR]$") else path for( f in names(.UFdata) ){ if( any(grepl(.UFdata[[f]]$file_pattern, tf)) ){ return(f) } } if( is.null(framework) ) stop("Could not determine unit test framework used in directory: '", path, "'") framework } #' Embedded Unit Tests #' #' The function \code{unit.test} provides a way to write unit tests embedded within #' package source files. #' These tests are stored and organised in the package namespace, and can be run using #' the unified interface provided by the function \code{link{utest}}. #' Both Runit and testthat tests are supported -- and automatically detected. #' #' #' @param x single character string used as test identifier/label #' @param expr expression containing the actual test commands. #' It is not evaluated, but only stored in the package namespace. #' @param framework Unit test framework #' @param envir the definition environment of object \code{x}. #' #' @return a test function with no arguments that wrapping around \code{expr} #' #' @import digest #' @export #' unit.test <- function(x, expr, framework=NULL, envir=parent.frame()){ sid <- as.character(deparse(substitute(x))) hash <- suppressWarnings(digest(x)) # get test environment eTest <- packageTestEnv() # wrap test into a function f <- function(){} environment(f) <- eTest body(f) <- substitute({expr}) if( !grepl('"', sid) ) { lmessage('Creating unit test for object: `', sid, '`') eval(substitute(attr(x, 'test') <- f, list(x=substitute(x), f=f)), envir) }else lmessage('Creating unit test: ', sid) # add the test to the package test environment eTest[[str_c(sid, ':', hash)]] <- list(test=f, name=sid, object=is.name(x)) # return the test function f } #' Returns the package internal environment where unit tests are stored. #' #' @param pkg package name. #' If missing the caller's package is assumed. #' #' @export packageTestEnv <- function(pkg){ if( !missing(pkg) && !is.null(pkg) ){ e <- packageEnv(pkg) return( e$.packageTest ) } e <- packageEnv() # create test environment if necessary if( is.null(e$.packageTest) ) e$.packageTest <- new.env(parent=e) e$.packageTest } list.tests <- function(x, pattern=NULL){ } #unit.test(packageEnv, {print('test for packageEnv')}) #unit.test('lmlm', {print('test for something else')}) #utest <- function(x, ..., framework="RUnit", PACKAGE=NULL){ # # if( missing(x) ) # x <- packagePath('unitTests', PACKAGE=PACKAGE) # else if( class(x)[1] != 'character') # return( UseMethod('utest', x) ) # # if( is.null(framework) ){ # stop("Not implemented") # }else{ # # change directory to run tests # owd <- setwd(x) # on.exit(setwd(owd)) # # run tests under selected framework # class(x) <- framework # utest(x, ..., PACKAGE=PACKAGE) # # output test result # } #} #' Running Unit Tests #' #' Run unit tests in a variety of settings. #' This is still \strong{very} experimental. #' #' @param x object to which a unit test is attached #' @param ... extra arguments to allow extensions and are passed to #' the unit framework running funcitons. #' #' @inline #' @export setGeneric('utest', function(x, ...) standardGeneric('utest')) #' Run the unit test assoicated to a function. #' #' @param run a logical that indicates if the unit test should be run setMethod('utest', 'function', function(x, run = TRUE){ # get actual name of the function sid <- as.character(deparse(substitute(x, parent.frame()))) # remove leading namespace specifications sid <- sub("^[^:]+:::?", "", sid) # get the package's pkg <- attr(x, 'package') eTest <- packageTestEnv(pkg) if( is.null(eTest) ) return() tfun <- ls(eTest, pattern=str_c("^", sid, ":")) } ) #' Run a package test suite #' #' @param filter pattern to match files that contain the definition of #' the unit tests functions to run. #' @param fun patter to match the test functions to run. #' @param testdir directory where to look for the test files #' @param framework unit test framework #' @param quiet a logical that indicates if the tests should be run silently #' @param lib.loc path to a library where installed packages are searched for. #' Used is of the form \code{x='package:*'}. #' setMethod('utest', 'character', function(x, filter="^runit.+\\.[rR]$", fun="^test\\.", ... , testdir='tests', framework=c('RUnit', 'testthat') , quiet = Sys.getenv("RCMDCHECK") != "FALSE" , lib.loc = NULL){ cat("#########################\n") # define environment variable that identifies a test run (if not already defined) if( is.na(utestCheckMode(raw = TRUE)) ){ oldUM <- utestCheckMode(TRUE) on.exit( utestCheckMode(oldUM), add=TRUE) } #print(system('env')) # detect type of input string path <- if( grepl("^package:", x) ){# installed package pkg <- sub("^package:", "", x) if( is.null(path <- path.package(pkg, quiet=TRUE)) ){ library(pkg, character.only=TRUE, lib.loc=lib.loc) path <- path.package(pkg) } file.path(path, testdir) }else{ # try to find a corresponding development package if( require.quiet(devtools) && is.package(pkg <- as.package(x, quiet=TRUE)) ){ load_all(pkg, TRUE) file.path(pkg$path, 'inst', testdir) }else{ # assume x is a path x } } # check that the path exists if( !file.exists(path) ){ if( !hasArg(testdir) ){ # try another default opath <- path path <- file.path(dirname(path), 'unitTests') if( !file.exists(path) ) stop("Could not find any default unit test directory ['", opath, "' nor '", path, "'].") } else { stop("Unit test directory '", path, "' does not exist") } } message("Running unit tests in: '", path, "'") # detect unit test framework: RUnit or testthat? framework <- if( missing(framework) ) utestFramework(path) else match.arg(framework) message("Using unit test framework: ", framework) # load default patterns up <- .UFdata[[framework]] if( missing(filter) ) filter <- up$file_pattern if( missing(fun) ) fun <- up$fun_pattern # run tests path <- normalizePath(path) # remove/create output directory opath <- utestPath(package=x) if( file.exists( opath ) ){ unlink(opath, recursive=TRUE) } dir.create(opath, recursive=TRUE) # copy results in working directory on exit on.exit( { if( file.exists(opath) ) file.copy(opath, '.', recursive=TRUE) } , add=TRUE) # if( is.dir(path) ){ # all tests in a directory if( framework == 'RUnit' ){ # RUnit requireRUnit("Running RUnit test suites") s <- defineTestSuite(x, path , testFileRegexp=filter , testFuncRegexp=fun, ...) str(s) utest(s, quiet=quiet, outdir=opath) }else if( framework == 'testthat' ){ # testthat requirePackage('testthat', "Running testthat unit test suites") test_dir(path, filter=filter, ...) } }else{ # single test file if( framework == 'RUnit' ){ # RUnit requireRUnit("Running RUnit unit test file") runTestFile(path, testFuncRegexp=fun, ...) }else if( framework == 'testthat' ){ # testthat requirePackage('testthat', "Running testthat unit test file") test_file(path, ...) } } } ) setOldClass('RUnitTestSuite') #' Runs a RUnit test suite #' #' @param outdir output directory setMethod('utest', 'RUnitTestSuite', function(x, ..., quiet=FALSE, outdir=NULL){ requireRUnit("Running RUnit test suites") pathReport <- file.path(outdir, str_c("utest.", sub("[:]", "_", x$name))) t <- system.time({ if( quiet ){ suppressWarnings(suppressMessages(out <- capture.output( tests <- runTestSuite(x, ...) ))) }else tests <- runTestSuite(x, ...) }) ## Report to stdout and text files cat("------------------- UNIT TEST SUMMARY ---------------------\n\n") summary_file <- paste(pathReport, ".Summary.txt", sep="") printTextProtocol(tests, showDetails=FALSE, fileName=summary_file) # append timing st <- c("\nTotal execution time\n***************************" , paste(capture.output(print(t)), collapse="\n")) write(st, file=summary_file, append=TRUE) # detailed report details_file <- paste(pathReport, ".Details.txt", sep="") printTextProtocol(tests, showDetails=TRUE, fileName=details_file) write(st, file=details_file, append=TRUE) # ## Report to HTML file printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep="")) ## Return stop() to cause R CMD check stop in case of ## - failures i.e. FALSE to unit tests or ## - errors i.e. R errors tmp <- getErrors(tests) if(tmp$nFail > 0 | tmp$nErr > 0) { # filter failures and errors test_summary <- capture.output(.summaryRUnit(tests, c('error', 'failure'), print = TRUE)) stop(paste0(test_summary, collapse = "\n")) # stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail, # ", #R errors: ", tmp$nErr, ")\n\n", sep="")) } tests } ) .summaryRUnit <- function(testData, type = c('error', 'failure', 'deactivated'), print = FALSE){ # taken from printTextProtocol res <- testData for (tsName in names(testData)) { if( print ){ cat("Functions:", testData[[tsName]]$nTestFunc, "|" , "Errors:", testData[[tsName]]$nErr, "|" , "Failures:", testData[[tsName]]$nFail, "\n") } srcFileRes <- testData[[tsName]][["sourceFileResults"]] for (i in seq_along(srcFileRes)) { fname <- basename(names(srcFileRes)[i]) testFuncNames <- names(srcFileRes[[i]]) keep <- integer() for (j in seq_along(testFuncNames)) { funcList <- srcFileRes[[i]][[testFuncNames[j]]] if (funcList$kind %in% type){ keep <- c(keep, j) if( print ){ if (funcList$kind == "error") { cat("ERROR in ", fname, "::", testFuncNames[j], ": ", funcList$msg, sep = "") } else if (funcList$kind == "failure") { cat("FAILURE in ", fname, "::", testFuncNames[j], ": ", funcList$msg, sep = "") } else if (funcList$kind == "deactivated") { cat("DEACTIVATED ", fname, "::", testFuncNames[j], ": ", funcList$msg, sep = "") } } } } if( length(keep) ) res[[tsName]][["sourceFileResults"]][[i]] <- srcFileRes[[i]][keep] else res[[tsName]][["sourceFileResults"]] <- res[[tsName]][["sourceFileResults"]][-i] } } invisible(res) } #' Unit Tests Result Directory #' #' Returns the path to the directory where the results of unit tests are stored. #' This path is used by \code{\link{utest}} to save unit test results, which are #' read by \code{\link{makeUnitVignette}} to update the unit test vignette when #' runnning R CMD check. #' #' @param ... extra arguments passed to \code{\link{packagePath}}, e.g., \code{package}. #' #' @export utestPath <- function(...){ packagePath('tests-results', ...) } #uTest <- function(file, fun, ...){ # # library(RUnit) # tdir <- packagePath('unitTests') # ufiles <- list.files(tdir) # # get.tfile <- function(file){ # i <- grep(paste(file,"(\\.[rR])?",sep=''), ufiles) # if( length(i) > 0L ) ufiles[i[1L]] # else NULL # } # # tfile <- file # if( is.null(tfile <- get.tfile(tfile)) ){ # tfile <- paste('runit.', file, sep='') # if( is.null(tfile <- get.tfile(tfile)) ){ # tfile <- paste('testthat.', file, sep='') # if( is.null(tfile <- get.tfile(tfile)) ) # stop("Could not find test file '", file, "' (nor runit.% or testthat.% versions) in '", tdir, "'") # } # } # tfile <- file.path(tdir, tfile) # # if( !missing(fun) ){ # e <- new.env() # source(tfile, local=e) # tfun <- fun # if( !exists(tfun, e, inherits=FALSE) ){ # tfun <- paste('test.', fun, sep='') # if( !exists(tfun, e, , inherits=FALSE) ) # stop("Could not find test function '", fun, "' (not test.% version) in '", tfile, "'") # } # tfun <- gsub(".", "\\.", tfun, fixed=TRUE) # runTestFile(tfile, testFuncRegexp=str_c("^", tfun, "$"), ...) # }else # runTestFile(tfile, ...) #} pkgmaker/R/data.R0000644000176000001440000000304512330274520013340 0ustar ripleyusers# Data related functions # # Author: Renaud Gaujoux # Creation: 18 Jun 2012 ############################################################################### #' Generating Names #' #' Generates names or dimnames for objects. #' #' @param x object whose names are generated. #' #' @export #' @rdname addnames addnames <- function(x, ...){ UseMethod('addnames') } #' @S3method addnames default #' @rdname addnames addnames.default <- function(x, ...){ if( is.vector(x) ) addnames.vector(x, ...) else stop("no applicable method for 'addnames' applied to an object of class ", class(x)) } #' @param prefix prefix string to use. A vector can be used to specify a prefix #' for each dimension of \code{x}. #' Names are build as \code{}. #' @param sep separator used between the prefix and the numeric index. #' @param ... extra arguments to allow extension and passed to the next method. #' #' @S3method addnames vector #' @rdname addnames addnames.vector <- function(x, prefix='x', sep='', ...){ names(x) <- paste(prefix, 1:length(x), sep=sep) x } #' @S3method addnames array #' @rdname addnames addnames.array <- function(x, prefix=letters[1:length(dim(x))], sep='', ...){ d <- dim(x) # recycle prefix if necessary if( length(prefix) != length(d) ) prefix <- rep(prefix, length(d)) dimnames(x) <- lapply(seq_along(d), function(i) paste(prefix[i], 1:d[i], sep=sep)) x } #' @S3method addnames matrix #' @rdname addnames addnames.matrix <- function(x, prefix=c('row', 'col'), ...){ addnames.array(x, prefix=prefix, ...) } pkgmaker/R/bibtex.R0000644000176000001440000002236512330274520013712 0ustar ripleyusers# Bibtex related functions # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' Generate a Bibtex File from Package Citations #' #' Generates a Bibtex file from a list of packages or all the installed packages. #' It is useful for adding relevant citations in Sweave documents. #' #' Multiple citations are handled by adding a numeric suffix to the Bibtex key #' (other than the first/main citation) as \code{"\%i"} (e.g. pkg, pkg2, pkg3). #' #' This function has now been integrated by Romain François in the bibtex package. #' #' @encoding utf8 #' #' @param entry a \code{\link{bibentry}} object or a character vector of package #' names. If \code{NULL}, then the list of all installed packages is used. #' @param file output Bibtex file. It can be specified as a filename (as a single #' character string), NULL for \code{stdout}, or a \code{link{connection}} object. #' If \code{file} is a character string, an extension '.bib' is appended if not #' already present. #' @param prefix character string to prepend to the generated packages' Bibtex key. #' @param append a logical that indicates that the Bibtex entries should be added #' to the file. If \code{FALSE} (default), the file is overwritten. #' @param verbose a logical to toggle verbosity. If \code{file=NULL}, verbosity #' is forced off. #' #' @return the list of Bibtex objects -- invisibly. #' @author #' Renaud Gaujoux, based on the function \code{Rpackages.bib} #' from Achim Zeileis (see \emph{References}). #' #' @references #' \emph{[R] Creating bibtex file of all installed packages?} #' Achim Zeileis. R-help mailing list. #' \url{https://stat.ethz.ch/pipermail/r-help/2009-December/222201.html} #' #' @seealso \code{link{connection}}, \code{link{bibentry}} #' #' @export #' @examples #' #' write.pkgbib(c('bibtex', 'utils', 'tools'), file='references') #' bibs <- bibtex::read.bib('references.bib') #' write.pkgbib(bibs, 'references2.bib') #' md5 <- tools::md5sum(c('references.bib', 'references2.bib')) #' md5[1] == md5[2] #' \dontshow{ stopifnot(md5[1] == md5[2]) } #' #' # write to stdout() #' write.pkgbib(c('bibtex', 'utils', 'tools'), file=NULL) #' #' # clean up #' unlink(c('references.bib', 'references2.bib')) #' write.pkgbib <- function(entry=NULL, file="Rpackages.bib", prefix='', append = FALSE, verbose = TRUE) { # special handling of file=NULL: use stdout() if( is.null(file) ){ file <- stdout() verbose <- FALSE } ## use all installed packages if nothing is specified if( is.null(entry) ){ if( verbose ) message("Generating Bibtex entries for all installed packages ", appendLF=FALSE) entry <- unique(installed.packages()[,1]) if( verbose ) message("[", length(entry), "]") } bibs <- if( is(entry, 'bibentry') ) entry else if( is.character(entry) ){ if( length(entry) == 0 ){ if( verbose ) message("Empty package list: nothing to be done.") return(invisible()) } pkgs <- entry bibs <- sapply(pkgs, function(x) try(citation(x)), simplify=FALSE) #bibs <- lapply(pkgs, function(x) try(toBibtex(citation(x)))) n.installed <- length(bibs) ## omit failed citation calls ok <- sapply(bibs, is, 'bibentry') pkgs <- pkgs[ok] bibs <- bibs[ok] n.converted <- sum(ok) ## add bibtex keys to each entry pkgs <- lapply(seq_along(pkgs), function(i){ if(length(bibs[[i]]) > 1) paste(prefix, pkgs[i], c('', 2:length(bibs[[i]])), sep = "") else paste(prefix, pkgs[i], sep='') }) pkgs <- do.call("c", pkgs) bibs <- do.call("c", bibs) # formatting function for bibtex keys: # names with special characters must be enclosed in {}, others not. as.bibkey <- function(x){ i <- grep("[.]", x) if( length(i) > 0 ) x[i] <- paste("{", x[i], "}", sep='') x } #bibs <- mapply(function(b,k){ if( is.null(b$key) ) b$key <- as.bibkey(k); b}, bibs, pkgs, SIMPLIFY=FALSE) bibs <- mapply(function(b,k){ if( is.null(b$key) ) b$key <- k; b}, bibs, pkgs, SIMPLIFY=FALSE) bibs <- do.call("c", bibs) if(verbose) message("Converted ", n.converted, " of ", n.installed, " package citations to BibTeX") bibs } else stop("Invalid argument `entry`: expected a bibentry object or a character vector of package names.") if( length(bibs) == 0 ){ if( verbose ) message("Empty bibentry list: nothing to be done.") return(invisible()) } ## write everything to the .bib file not_anonymous <- !identical(file,'') fh <- if( is.character(file) ){ if( not_anonymous && !grepl("\\.bib$", file) ) # add .bib extension if necessary file <- paste(file, '.bib', sep='') fh <- file(file, open = if(append && not_anonymous) "a+" else "w+" ) if( not_anonymous ) on.exit( if( isOpen(fh) ) close(fh) ) fh } else if( is(file, 'connection') ) file else stop("Invalid argument `file`: expected a filename, NULL, or a connection [", class(file), "]") if( !is(fh, 'connection') ) stop("Invalid connection: ", fh) file.desc <- summary(fh)['description'] if( verbose ) message(if( append ) "Adding " else "Writing ", length(bibs) , " Bibtex entries ... ", appendLF=FALSE) writeLines(toBibtex(bibs), fh) if(verbose) message("OK\nResults written to file '", file.desc, "'") ## return Bibtex items invisibly if( !not_anonymous ) attr(bibs, 'connection') <- fh invisible(bibs) } #' @rdname pkgmaker-defunct write.bib <- function(...){ .Defunct('write.pkgbib', package = 'pkgmaker') } #' Package References #' #' Create a citation string from package specific BibTex entries, suitable to #' be used in Rd files. #' The entries are looked in a file named REFERNCES.bib in the package's root #' directory (i.e. inst/ in development mode). #' #' @param key character vector of BibTex keys #' @param short logical that indicates if the reference should be shorten as #' First Author et al. if it has more than one author. #' @return a character string containing the text formated BibTex entries #' #' @export packageReference <- function(key, short=FALSE){ bibs <- bibtex::read.bib(file=packageReferenceFile()) k <- sapply(bibs, function(x) x$key) mk <- match(key, k) sel <- mk[!is.na(mk)] if( !length(sel) ) return("") if( !short ){ paste(format(bibs[sel]), collapse="\n\n") }else{ sapply(bibs[sel], function(x){ if( length(x$author$family) <= 1L ) paste(x$author$family, '(', x$year, ')', sep='') else{ paste(x$author$family[[1]], ' et al. (', x$year, ')', sep='') } }) } } #' Citing Package References #' #' Create a citation command from package specific BibTex entries, suitable to #' be used in Rd files or Latex documents. #' The entries are looked in a file named REFERNCES.bib in the package's root #' directory (i.e. inst/ in development mode). #' #' @param key character vector of BibTex keys #' @param ... extra arguments passed to \code{format.bibentry}. #' @param REFERENCES package or bibentry specification #' @return a character string containing the text formated BibTex entries #' #' @export #' citecmd <- local({ .init <- list(REFERENCES=NULL, KEYS=NULL) .cache <- .init function(key, ..., REFERENCES=NULL){ # detect package name if necessary if( is.null(REFERENCES) ){ # reset if explicitly passed NULL if( hasArg(REFERENCES) ) .cache <<- .init if( is.null(.cache$REFERENCES) ){ pkg <- Sys.getenv('R_PACKAGE_NAME') if( !nchar(pkg) ) pkg <- Sys.getenv('R_INSTALL_PKG') if( !nchar(pkg) ) pkg <- Sys.getenv('MAKE_R_PACKAGE') if( !nchar(pkg) ) stop("Could not identify package") # load REFERENCES from detected package .cache$REFERENCES <<- bibtex::read.bib(package=pkg) } REFERENCES <- .cache$REFERENCES } # load relevant Bibtex file REFERENCES <- if( is(REFERENCES, 'bibentry') ) REFERENCES else if( is.character(REFERENCES) ){ p <- str_match(REFERENCES, "^package:(.*)")[,2] if( is.na(p) ) bibtex::read.bib(file=REFERENCES) else bibtex::read.bib(package=p) }else stop("Invalid argument `REFERENCES`: expected bibentry object or character string [", class(REFERENCES), "]") # update the cache if no keys are provided if( missing(key) ){ .cache$REFERENCES <<- REFERENCES if( hasArg(REFERENCES) ) return(invisible(.cache$KEYS)) else return(.cache$KEYS) } # check key type if( !is.character(key) ) stop("Invalid argument `key`: must be a character vector.") # extract the Bibtex keys refkey <- sapply(REFERENCES, function(x) x$key) pkgs <- str_match(key, "^package:(.*)")[,2] nokey <- !key %in% refkey i_pkgs <- which(nokey && !is.na(pkgs)) if( length(i_pkgs) > 0L ){ # only include \cite{key} if running Sweave .cache$KEYS <<- unique(c(.cache$KEYS, key[i_pkgs])) key[i_pkgs] <- pkgs[i_pkgs] } paste("\\cite{", key, "}", sep='') # if( inSweave() ) paste("\\cite{", k, "}", sep='') # else paste(format(REFERENCES[k %in% key], ...), collapse="\n\n") } }) citecmd_pkg <- function(key, ...){ citecmd(str_c('package:', key), ...) } #' Bibtex Utilities #' #' \code{packageReferenceFile} returns the path to a package REFERENCES.bib file. #' #' @param PACKAGE package name #' #' @rdname bibtex packageReferenceFile <- function(PACKAGE=NULL) packagePath('REFERENCES.bib', package=PACKAGE) pkgmaker/R/package-extra.R0000644000176000001440000002012712330274520015143 0ustar ripleyusers# Package extra action registry # # Author: renaud ############################################################################### #' @include devutils.R NULL .getExtraEnv <- function(package){ if( missing(package) || is.null(package) ) where <- topns(FALSE) else if( isString(package) ) { package <- sub("^package:", "", package) if( package == 'R_GlobalEnv') where <- .GlobalEnv else where <- asNamespace(package) } else stop("Invalid argument `package`: must be missing or a package name.") where } # extra handler registry extra_handlers <- setPackageRegistry('extra_handler', 'function' , description = 'Handler functions for package-specific extra tasks' , entrydesc = 'extra handler') # extra action registry extra_actions <- registry() extra_actions$set_field("key", type="character", is_key = TRUE, index_FUN = match_exact) extra_actions$set_field("package", type="character", is_key = TRUE, index_FUN = match_exact) extra_actions$set_field("handler", type='character', is_mandatory=TRUE, is_key=TRUE) extra_actions$set_field("args", type='list', default=list()) extra_actions <- setPackageRegistry('extra_action', extra_actions , description = 'Handler functions for package-specific extra actions' , entrydesc = 'extra action') #' Install/Run Extra Things After Standard Package Installation #' #' @description #' These functions define a framework to register actions for which default sets of arguments #' can be defined when (lazy-)loading a package, and run later on, e.g., after the package #' is installed using dedicated commands. #' #' \code{setPackageExtraHandler} defines main action handler functions, for which #' actions are defined as a set of arguments and registered using \code{setPackageExtra}. #' #' @param handler name of a handler, e.g, \code{'install'}. #' It must be unique across all handlers registered by any other packages. #' @param fun handler function that will be called with the arguments registered #' with \code{packageExtra(name, ...)} #' @param package package name where to store/look for the internal registries. #' End users should not need to use this argument. #' #' @return the runner function associated with the newly registered handler, #' as built by \code{packageExtraRunner}. #' #' @rdname packageExtra #' @export setPackageExtraHandler <- function(handler, fun, ...){ # add entry to the registry setPackageRegistryEntry('extra_handler', handler, fun, ...) # build associated runner runner <- packageExtraRunner(handler) } #' \code{packageExtraHandler} retrieves a given handler from the registry. #' #' @param ... extra arguments passed to internal function calls. #' In \code{packageExtraHandler}, these are passed to \code{\link{pkgreg_fetch}}. #' #' In \code{setPackageExtra}, these define default arguments for the handler function. #' These are overwritten by arguments in the call to runner function if any. #' #' @rdname packageExtra #' @export packageExtraHandler <- function(handler=NULL, ...){ # load handler from registry pkgreg_fetch('extra_handler', key=handler, ...) } #' \code{setPackageExtra} registers extra actions for a given handler. #' #' For example, calling \code{setPackageExtra('install', pkgs='non_CRAN_pkg', repos='http://non-standard-repo')} #' in a source file of package 'myPkg' registers the call #' \code{install.packages('non_CRAN_pkg', repos='http://non-standard-repo', ...)} #' in a registry internal to the package. #' All calls to \code{setPackageExtra('install', ...)} can then be run by the user, as #' a post installation step via \code{install.extrapackages('myPkg', ..)}. #' #' @param extra name of the extra action. #' @param .wrap logical that indicates if a function that runs the extra action should #' be returned or only the default arguments #' #' @rdname packageExtra #' @export setPackageExtra <- function(handler, extra, ...){ # check that a handler is defined in the registry fhandler <- packageExtraHandler(handler, exact=TRUE, error=FALSE) if( is.null(fhandler) ){ handlers <- packageExtraHandler() stop("Could not register action '", extra, "': handler '", handler, "' is not defined" , if( length(handlers) ){ str_c(".\n Available handlers are: ", str_out(handlers, Inf)) } else " [handler registry is empty]." ) } args <- list(...) pkg <- packageName(topenv(parent.frame()), .Global=TRUE) setPackageRegistryEntry('extra_action', key=extra, handler=handler, args=args , package = pkg , msg=str_c(" for handler '", handler, "'")) } .wrapExtra <- function(fhandler, args=list()){ # define wrapper function f <- function(...){ cl <- match.call() cl[[1L]] <- as.name('fhandler') # add default arguments lapply(names(args), function(a){ if( !a %in% names(cl) ) cl[[a]] <<- as.name(substitute(a, list(a=a))) }) eval(cl) } # set registered arguments as default arguments formals(f) <- c(args, formals(f)) f } #' \code{packageExtra} retrieve a given extra action, either as its registry entry, #' or as a function that would perform the given action. #' @rdname packageExtra #' @export packageExtra <- function(handler=NULL, extra=NULL, package=NULL, .wrap=FALSE){ # load extra registry extras <- pkgreg_fetch('extra_action', key=extra, handler=handler, package=package , exact=TRUE, all=!.wrap) # return whole registry if no other argument is provided if( missing(handler) || is.null(extra) || !.wrap ) return( extras ) args <- extras$args fhandler <- packageExtraHandler(handler, package='pkgmaker') if( is.null(fhandler) ){ handlers <- packageExtraHandler(package='pkgmaker') stop("Could not find action handler '", handler, "' in pkgmaker global handler registry.\n" , " Available handlers are: ", str_out(handlers, Inf)) } # define wrapper function .wrapExtra(fhandler, args) } #' \code{packageExtraRunner} defines a function to run all or some of the actions registered #' for a given handler in a given package. #' For example, the function \code{install.extrapackages} is the runner defined for the extra handler \code{'install'} #' via \code{packageExtraRunner('install')}. #' #' @param .verbose logical that indicates if verbose messages about the extra actions being #' run should be displayed. #' #' @rdname packageExtra #' @export packageExtraRunner <- function(handler){ .handler <- handler function(package, extra=NULL, handler=NULL, ..., .verbose=getOption('verbose')){ if( missing(handler) ) handler <- .handler .local <- function(p, ...){ # load list of extras extras <- packageExtra(handler=handler, extra=extra, package=p) # execute extras sapply(extras, function(def, ...){ e <- def$key h <- def$handler f <- packageExtra(handler=h, extra=e, package=p, .wrap=TRUE) if( .verbose ){ message("# Running extra action '", h, ':', e, "' ...") message("# Action: ", str_fun(f)) on.exit( message("# ERROR [", e, "]\n") ) } res <- f(...) if( .verbose ){ on.exit() message("# OK [", e, "]\n") } res } , ...) } invisible(sapply(package, .local, ...)) } } #' \code{install.extrapackages} runs all extra actions registered for a given package. #' #' @rdname packageExtra #' @export install.extras <- packageExtraRunner(NULL) #' \code{install.extrapackages} install sets of packages that can enhance a #' package, but may not be available from CRAN. #' #' \code{install.extrapackages} is defined as the extra handler for #' the extra action handler \code{'install.packages'}. #' All arguments in \code{...} are passed to \code{\link{install.packages}}. #' By default, packages that are already installed are not re-installed. #' An extra argument \code{force} allows to force their installation. #' The packages are loaded if their installation is successful. #' #' @rdname packageExtra #' @export install.extrapackages <- setPackageExtraHandler('install.packages', function(pkgs, ..., force=FALSE){ res <- sapply(pkgs, function(pkg, ...){ if( force || !require.quiet(pkg, character.only=TRUE) ){ install.packages(pkg, ...) require(pkg, character.only=TRUE) }else message("Loaded extra package: ", pkg) }, ...) } ) pkgmaker/R/options.R0000644000176000001440000003233512334612042014125 0ustar ripleyusers# Package specific option system # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include unitTests.R #' @include devutils.R NULL #' Package Specific Options #' #' The following functions to access/set the options from the set are assigned #' in \code{envir}: #' \describe{ #' \item{Options}{} #' \item{GetOption}{} #' } #' #' @param ... a single named list or named arguments that provide the default #' options and their values. #' @param NAME name of the set of options. #' This is used as a prefix for the name of the associated global #' option: \code{package:}. #' @param ENVIR environment where the option wrapper functions will be defined. #' No function is defined if \code{ENVIR=NULL} #' @param RESET a logical that indicates whether the option set should overwrite #' one that already exists if necessary. #' The default is \code{FALSE} (i.e. no reset), except when loading a namespace, #' either from an installed package or a development package -- with devtools. #' If \code{FALSE}, an error is thrown if trying to setup options with the same name. #' #' @export setupPackageOptions <- function(..., NAME=NULL, ENVIR=topenv(parent.frame()), RESET = isLoadingNamespace()){ defaults <- .list_or_named_dots(...) # do not write into the Global environment e <- parent.frame() if( missing(ENVIR) && identical(e, .GlobalEnv) ){ ENVIR <- NULL } # get calling package pkg <- packageName(.Global=TRUE) # prefix for the wrapper functions fprefix <- if( is.null(NAME) ) tolower(pkg) else NAME # define name for the option set optname <- pkg if( !is.null(NAME) ) optname <- paste(optname, NAME, sep=':') # create package_options object optobj <- as.package_options(optname, defaults=defaults) # check if options with the same key are not already registered OLD <- getOption(optobj$name) if( !is.null(OLD) && !RESET ) stop("Package specific options '", OLD$name, "' already exist: " , " (", length(OLD$options())," default option(s))") # register the package_options object in global options message(if( is.null(OLD) ) "Setting" else "Resetting" , " package specific options: ", optobj$name , " (", length(optobj$options())," default option(s))") options(setNames(list(optobj), optobj$name)) # (re)load registered package_options object from global options optobj <- getOption(optobj$name) stopifnot( !is.null(optobj) ) # define wrapper functions in the supplied environment if( !is.null(ENVIR) ){ isfun <- unlist(eapply(optobj, is.function)) isfun <- isfun[names(isfun) != 'newOptions'] ifun <- which(isfun) lapply(names(isfun)[ifun], function(x){ f <- get(x, envir=optobj) assign(paste(fprefix, x, sep='.'), f, envir=ENVIR) }) } # return package_options object optobj } is.package_options <- function(x){ is(x, 'package_options') } #' @S3method print package_options print.package_options <- function(x, ...){ cat("\n", sep='') cat("Registered: ", !is.null(getOption(x$name)), "\n", sep='') def <- if( identical(x$.options, x$.defaults) ) " " # show options if( length(x$.options) ){ cat("Options",def,":\n", sep=''); str(x$.options) }else cat("Options: none\n") # show defaults if( is.null(def) ){ cat("Defaults:\n"); str(x$.defaults) } } #' \code{option_symlink} creates a symbolic link to option \code{x}. #' #' @export #' @rdname options option_symlink <- function(x){ if( !is.character(x) ) stop("Symbolic link options must be character strings") structure(x, class='option_symlink') } #' \code{is_option_symlink} tests if \code{x} is a symbolic link option. #' #' @param opts a list of options #' #' @export #' @rdname options is_option_symlink <- function(x, opts){ if( missing(opts) ) is(x, 'option_symlink') else is(opts[[x]], 'option_symlink') } #' \code{option_symlink_target} returns the end target option of a symbolic link #' option \code{x}. #' #' @export #' @rdname options option_symlink_target <- function(x, opts){ if( !is.list(opts) ) stop("invalid argument `opts`: must be a list object") n <- 0 track <- NULL while( is_option_symlink(x, opts) ){ if( x %in% track ) stop("cycling symbolic link options: ", str_out(c(track, x), Inf, sep=' -> ')) track <- c(track, x) x <- opts[[x]] n <- n + 1 } x } # unit test for option symbolic links unit.test('option_symlink', { opt <- setupPackageOptions(a=1,b=2,c=option_symlink('a'),d=4) .test <- function(msg){ checkIdentical(names(opt$options('a')), 'a', paste(msg, " - options: name of target is ok")) checkIdentical(names(opt$options('c')), 'c', paste(msg, " - options: name of link is ok")) checkIdentical(opt$options('c'), setNames(opt$options('a'), 'c'), paste(msg, " - options: link ok")) checkIdentical(opt$getOption('a'), opt$getOption('c'), paste(msg, " - getOption: link ok")) } .test('Default') opt$options(a=100) .test('After setting target') opt$options(c=50) .test('After setting link') }) #' \code{as.package_options} creates an object such as the #' ones used to stores package specific options. #' #' @param x a character string, a list or an object of class #' \code{package_options}. #' @param defaults \code{NULL} or a list of default options #' with their values. #' #' @export #' @rdname options as.package_options <- function(..., defaults=NULL){ args <- .list_or_named_dots(...) x <- if( is.null(names(args)) ) args[[1]] if( !is.null(names(args)) ) defaults <- args if( is.null(x) ) x <- basename(tempfile('')) # early exit if already a package_options object if( is.package_options(x) ){ # new defaults?: clone into a new package_options object if( !missing(defaults) && is.list(defaults) ){ optname <- basename(tempfile(str_c(x$name, '_'))) x <- as.package_options(x$.options, defaults) x$name <- optname } return(x) } # create a package_options object .OPTOBJ <- structure(list2env(list(name=NULL, .options=NULL, .defaults=defaults)) , class='package_options') if( is.character(x) ){ # build name as 'package:*' x <- sub("^package:", '', x) .OPTOBJ$name <- paste('package:', x[1L], sep='') }else if( is.list(x) ){ .OPTOBJ$name <- tempfile('package:') .OPTOBJ$.options <- x }else stop("Invalid argument `x`: must be a character string or a list.") # define options() .OPTOBJ$options <- function(...){ # call .options on package_options object .options(..., .DATA=.OPTOBJ) } # define getOption .OPTOBJ$getOption <- function (x, default = NULL) { # use local specific function options() options <- .OPTOBJ$options if (missing(default)) return(options(x)[[1L]]) if (x %in% names(options())) options(x)[[1L]] else default } # define newOption .OPTOBJ$newOptions <- function(...){ defs <- .list_or_named_dots(..., named.only=TRUE) lapply(seq_along(defs), function(i){ name <- names(defs)[i] value <- defs[[i]] # check defaults in_opts <- name %in% names(.OPTOBJ$.defaults) && !identical(.OPTOBJ$.defaults[[name]], value) if( in_opts && !isLoadingNamespace() ){ message("Skipping option ", .OPTOBJ$name, "::`", name, "`: already defined with another default value") }else{ if( in_opts ) message("Overwriting option ", .OPTOBJ$name, "::`", name, "` : already defined with another default value") .OPTOBJ$.defaults[[name]] <- value .OPTOBJ$.options[[name]] <- value } }) invisible() } # define resetOptions .OPTOBJ$resetOptions <- function(..., ALL=FALSE){ defaults <- .OPTOBJ$.defaults if( ALL ){ .OPTOBJ$.options <- NULL } if( length(list(...)) > 0L ){ onames <- c(...) if( !is.character(onames) ) stop('character strings expected for resetting option names') defaults <- defaults[names(defaults) %in% onames] if( length(not_default <- onames[!onames %in% names(defaults)]) ){ .OPTOBJ$.options[not_default] <- NULL } } if( length(defaults) ){ .OPTOBJ$options(defaults) } } # define showOptions .OPTOBJ$printOptions <- function() print(.OPTOBJ) # initialise with default options .OPTOBJ$resetOptions() # return pacakge_options object .OPTOBJ } #' The method \code{[[} is equivalent to \code{options()} or \code{getOption(...)}: #' e.g. \code{obj[[]]} returns the list of options defined in \code{obj}, and #' \code{obj[['abc']]} returns the value of option \code{'abc'}. #' #' @param ... arguments passed to \code{getOption} (only first one is used). #' #' @rdname options #' @S3method [[ package_options "[[.package_options" <- function(x, ...){ if( missing(..1) ) x$options() else x$getOption(..1) } #' @S3method [[<- package_options "[[<-.package_options" <- function(x, i, value){ x$.options[[i]] <- value } ##' @S3method [[ package_options #`[[.package_options` <- function(x, ..., follow=FALSE){ # # if( missing(..1) ) as.list(x$.options) # else if( follow ){ # x$.options[[option_symlink_target(..1, x)]] # }else x$.options[[..1]] #} # ##' @S3method [[<- package_options #`[[<-.package_options` <- function(x, i, ..., value){ # # follow <- if( missing(..1) ) FALSE else ..1 # if( follow ){ # old <- x[[i]] # if( is_option_symlink(old) && !is_option_symlink(value) ) # x$.options[[option_symlink_target(i, x)]] <- value # }else x$.options[[i]] <- value #} .list_or_named_dots <- function(..., named.only=FALSE){ dots <- list(...) if( length(dots) == 0L ) return() params <- dots if( is.null(names(dots)) && length(dots)==1L ){ if ( is.list(dots[[1L]]) ){ params <- dots[[1L]] if( is.null(names(params)) || any(names(params)=='') ) stop("single list argument must only have named elements") } } if( named.only ){ if( is.null(names(params)) || any(names(params)=='') ) stop("all arguments be named") } params } #' Quick Option-like Feature #' #' \code{mkoptions} is a function that returns a function that #' behaves like \code{\link[base]{options}}, with an attached #' internal/local list of key-value pairs. #' #' @rdname local-options #' @seealso \code{\link{setupPackageOptions}} #' @export #' #' @examples #' f <- mkoptions(a=3, b=list(1,2,3)) #' str(f()) #' f('a') #' f('b') #' str(old <- f(a = 10)) #' str(f()) #' f(old) #' str(f()) #' mkoptions <- function(...){ .DATA <- new.env(parent=emptyenv()) .defaults <- list(...) .DATA$.options <- list(...) function(...){ .options(..., .DATA=.DATA) } } #' \code{.options} is a low-level function that mimics the behaviour #' of the base function \code{\link[base]{options}}, given a set #' of key-value pairs. #' It is the workhorse function used in \code{mkoptions} and package-specific #' option sets (see \code{\link{setupPackageOptions}}) #' #' @param ... list of keys or key-value pairs. #' For \code{mkoptions} these define inital/default key-value pairs. #' @param .DATA a list or an environment with an element \code{.options}. #' #' @rdname local-options .options <- function(..., .DATA){ opts <- if( is.package_options(.DATA) || is.environment(.DATA) ) .DATA$.options else .DATA params <- .list_or_named_dots(...) # return complete option list if no other argument was passed if( is.null(params) ) return(opts) # initialise opts to an empty list if necessary if( is.null(opts) ) opts <- list() stopifnot( is.list(opts) ) # READ ACCESS if ( is.null(names(params)) ){ if( !is.character(c(...)) ) stop('character strings expected for option names') cparams <- c(...) # retrieve options as a list (use sapply to also get non-existing options) res <- sapply(cparams, function(n){ # follow link if necessary opts[[option_symlink_target(n, opts)]] }, simplify=FALSE) return(res) } # WRITE ACCESS old <- sapply(names(params), function(name){ # assign the new value into the options environment val <- params[[name]] old <- opts[[name]] # change value of target if symlink and the new value is not a symlink if( is_option_symlink(old) && !is_option_symlink(val) ) opts[[option_symlink_target(name, opts)]] <<- val else opts[[name]] <<- val # return the option's old value old } , simplify = FALSE ) #old <- old[!sapply(old, is.null)] # update package_options object in place if necessary (NB: it is an environment) if( is.package_options(.DATA) || is.environment(.DATA) ) .DATA$.options <- opts # return old values of the modified options return( invisible(old) ) } #' \code{packageOptions} provides access to package specific options from a #' given package that were defined with \code{setupPackageOptions}, and behaves as the base function \code{\link[base]{options}}. #' #' @param PACKAGE a package name #' @inheritParams base::options #' #' @export #' @rdname options packageOptions <- function(..., PACKAGE = packageName()){ # create/retrieve a package_options object from .DATA optobj <- as.package_options(PACKAGE) optobj <- getOption(optobj$name) # call the package_options object's options() function optobj$options(...) } #' \code{listPackageOptions} returns the names of all option #' currently defined with \code{setupPackageOptions}. #' #' @return a character vector (possibly empty). #' #' @export #' @rdname options #' @examples #' listPackageOptions() #' listPackageOptions <- function(){ grep('^package:', names(options()), value=TRUE) } pkgmaker/R/knitr.R0000644000176000001440000002701512330274520013561 0ustar ripleyusers# Project: pkgmaker # # Author: renaud gaujoux # Created: Oct 23, 2013 ############################################################################### #' Knitr Extensions #' #' \code{knit_ex} is a utility function for running small knitr examples, #' e.g., to illustrate functionalities or issues. #' #' @param x text to knit as a character vector #' @param ... arguments passed to \code{\link[knitr]{knit2html}} or \code{\link[knitr]{knit}} #' @param quiet logical that indicates if knitting should be quiet (no progress bars etc..). #' @param open logical, only used when \code{x} is in .Rmd format, that indicates #' if the generated document result should be open in a browse, instead of #' being printed on screen. #' Not that a browser will not open in non-interactive sessions, and the result will #' be returned invisibly. #' #' @return #' \code{knit_ex} returns the generated code, although invisibly when \code{open=TRUE}. #' #' @export #' @examples #' #' library(knitr) #' knit_ex("1 + 1") #' knit_ex <- function(x, ..., quiet = TRUE, open = FALSE){ library(knitr) # substitute special markup for Rmd markup (necessary for knit_ex examples) x <- gsub("^^^", "```", x, fixed = TRUE) if( !(html_chunks <- any(grepl("```{", x, fixed = TRUE))) ){ if( all(!grepl(">>=", x, fixed = TRUE)) ){ x <- c("```{r}", x, "```") html_chunks <- TRUE } } x <- paste0(x, collapse = "\n") if( any(html_chunks) ){ res <- knit2html(text = x, ..., fragment.only = TRUE, quiet = quiet) if( open ){ tmp <- tempfile("knit_ex", fileext = '.html') cat(res, file = tmp, sep = "\n") if( interactive() ) browseURL(tmp) return(invisible(res)) } }else{ res <- knit(text = x, ..., quiet = quiet) } cat(res) } try_message <- function(signal = FALSE){ function(expr){ tryCatch(expr, error = function(e){ if( signal ) message(e) else message('Error: ', conditionMessage(e)) invisible() }) } } #' \code{hook_try} is a knitr hook to enable showing error #' messages thrown by \code{\link{try}}. #' The function is not meant to be called directly, but only registered #' using \code{\link{knit_hooks}} (see details on this dedicated man page). #' #' \code{hook_try} simply defines a function \code{try} in \code{envir} that prints #' the error message if any, and is called instead of base \code{\link{try}}. #' #' @param before logical that indicates when the hook is being called: #' before or after the chunk is processed. #' @param options list of current knitr chunk options #' @param envir environment where the chunk is evaluated #' #' @rdname knit_ex #' @export #' @examples #' #' library(knitr) #' #' # standard error message is caught #' knit_ex("stop('ah ah')") #' #' # with try the error is output on stderr but not caughted by knitr #' knit_ex("try( stop('ah ah') )") #' #' # no message caught #' knit_ex(" #' ^^^{r, include = FALSE} #' knit_hooks$set(try = pkgmaker::hook_try) #' ^^^ #' #' ^^^{r, try=TRUE} #' try( stop('ah ah') ) #' ^^^") #' hook_try <- local({ .try_defined <- FALSE function(before, options, envir){ # remove hacked version of try if( !before ){ if( .try_defined && exists('try', envir = envir, inherits = FALSE) ){ remove(list = 'try', envir = envir) } .try_defined <<- FALSE return(invisible()) } if( !is.null(options$try) ){ # signal do.signal <- isFALSE(options$try) if( isManualVignette() && isTRUE(options$try) ){ do.signal <- TRUE } # define hacked version of try() .try <- try_message(do.signal) assign('try', .try, envir) .try_defined <<- TRUE } } }) chunkOutputHook <- function(name, hook, type = c('output', 'source', 'chunk')){ type <- match.arg(type) function(){ .hook_bkp <- NULL function(before, options, envir){ # do nothing if the option is not ON if( is.null(options[[name]]) ) return() # set/unset hook if( before ){ # store current hook function if( is.null(.hook_bkp) ) .hook_bkp <<- knit_hooks$get(type) # define hook wrapper hook_wrapper <- function(x, options){ res <- .hook_bkp(x, options) hook(res, options) } args <- list() args[[type]] <- hook_wrapper do.call(knit_hooks$set, args) }else{ args <- list() args[[type]] <- .hook_bkp do.call(knit_hooks$set, args) .hook_bkp <<- NULL } } } } #' Knitr Hook for Handling Backspace Character #' #' \code{hook_backspace} is a chunk hook that enables the use of backspace #' characters in the output (e.g., as used in progress bars), and still #' obtain a final output as in the console. #' #' @rdname knit_ex #' @export #' @examples #' #' # Correctly formatting backspaces in chunk outputs #' tmp <- tempfile(fileext = '.Rmd') #' cat(file = tmp, " #' ^^^{r, include = FALSE} #' library(knitr) #' knit_hooks$set(backspace = pkgmaker::hook_backspace()) #' ^^^ #' Default knitr does not handle backspace and adds a special character: #' ^^^{r} #' cat('abc\bd') #' ^^^ #' #' Using the hook backspace solves the issue: #' ^^^{r, backspace=TRUE} #' cat('abc\bd') #' ^^^ #' ") #' #' # knit #' out <- knitr::knit2html(tmp, fragment.only = TRUE) #' # look at output #' \dontrun{ #' browseURL(out) #' edit( file = out) #' } #' # cleanup #' unlink(c(tmp, out)) #' #' hook_backspace <- chunkOutputHook('backspace', function(x, options){ if( !isTRUE(options$backspace) ) x str_bs(x) } ) #' \code{str_bs} substitutes backspace characters (\\b) to produce #' a character string as it would be displayed in the console. #' #' @author #' Renaud Gaujoux #' #' \code{str_bs} was adapted from a proposal from Yihui Xie. #' #' @rdname str_out #' @export #' @examples #' #' # Backspace substitution #' str_bs("abc") #' str_bs("abc\b") #' str_bs("abc\b\b") #' str_bs("abc\bd") #' str_bs("abc\b\bde\b") #' #' # more complex example #' x <- "\bab\nc\bd\n\babc\b\bd" #' cat(x, "\n") #' y <- str_bs(x) #' y #' cat(y, "\n") #' str_bs <- function(x){ # remove leading backspaces x <- gsub("^\b+", "", x) # remove backspaces at beginning of line x <- gsub("\n\b+", '\n', x) while( length(grep('\b', x, fixed = TRUE)) ) x <- gsub('[^\n\b][\b]', '', x) x } md_toggleCode <- function(){ cat( " " ) } .js_include_jquery <- "\n" .js_toggle_fun <- " " .js_def_toggle_code <- "" #' \code{hook_toggle} is a chunk hook that adds clickable elements to toggle \emph{indvidual} #' code chunks in HTML documents generated from .Rmd files. #' #' @rdname knit_ex #' @export #' @examples #' #' knit_ex(" #' #' Declare chunk hook: #' ^^^{r, setup} #' library(knitr) #' knit_hooks$set(toggle = hook_toggle()) #' ^^^ #' #' The R code of this chunk can be toggled on/off, and starts visible: #' ^^^{r, toggle=TRUE} #' print(1:10) #' ^^^ #' The R code of this chunk can be toggled on/off, and starts hidden: #' ^^^{r, toggle=FALSE} #' print(1:10) #' ^^^ #' #' This is a plain chunk that cannot be toggled on/off: #' ^^^{r} #' print(1:10) #' ^^^ #' #' Now all chunks can be toggled and start visible: #' ^^^{r, toggle_all} #' opts_chunk$set(toggle = TRUE) #' ^^^ #' #' ^^^{r} #' sample(5) #' ^^^ #' #' To diable the toggle link, one can pass anything except TRUE/FALSE: #' ^^^{r, toggle = NA} #' sample(5) #' ^^^ #' #' ", open = TRUE) #' hook_toggle <- function(){ .init <- TRUE .last_label <- NULL fn <- chunkOutputHook('toggle', type = 'source', function(x, options){ opt <- options$toggle label <- options$label if( !isTRUE(opt) && !isFALSE(opt) ) return(x) # print(x) # x <- gsub("^\n", '', x) # add javascript define for toggle function if( .init ){ x <- paste0(.js_toggle_fun, x) .init <<- FALSE } disp <- if( opt ) 'Chunk_block' else 'Chunk_none' id <- paste0("Rcode_", label) subst <- paste0("```{", id, " \\1 ", disp, "}\n") if( !identical(label, .last_label) ){ .last_label <<- label subst <- paste0("Show/Hide R code\n", subst) } sub("```([^\n]*)\n", sprintf(subst, 'block'), x) }) fn() } pkgmaker/R/packages.R0000644000176000001440000004065512334651557014232 0ustar ripleyusers# Package related functions # # Author: Renaud Gaujoux # Creation: 29 Jun 2012 ############################################################################### path.protect <- function(...){ f <- file.path(...) if( .Platform$OS.type == 'windows' ){ f <- gsub("\\\\", "/", f) } paste('"', f, '"', sep='') } #' Quick Installation of a Source Package #' #' Builds and install a minimal version of a package from its #' source directory. #' #' @param path path to the package source directory #' @param destdir installation directory. #' If \code{NULL}, the package is installed in the default installation library. #' If \code{NA}, the package is installed in a temporary directory, whose path is returned #' as a value. #' @param vignettes logical that indicates if the vignettes should be #' rebuilt and installed. #' @param force logical that indicates if the package should be installed even if a previous #' installation exists in the installation library. #' @param ... extra arguments passed to \code{\link{R.CMD}} #' @param lib.loc library specification. #' If \code{TRUE} then the installation directory \code{destdir} is added to the default #' library paths. #' This can be usefull if dependencies are installed in this directory. #' If \code{NULL}, then the default library path is left unchanged. #' #' @return The path of the library where the package was installed. #' #' @export #' quickinstall <- function(path, destdir=NULL, vignettes=FALSE, force=TRUE, ..., lib.loc=if(!is.null(destdir)) TRUE){ npath <- normalizePath(path) pkg <- as.package(path) # define installation library nlib <- if( !is.null(destdir) ) destdir else if( is_NA(destdir) ) tempfile("pkglib_") # normalize path if( !is.null(nlib) ){ # create direcory if needed if( !is.dir(nlib) ) dir.create(nlib, recursive=TRUE) nlib <- normalizePath(nlib) if( !is.dir(nlib) ){ stop("Could not install package '", pkg$package, "': installation directory '", nlib, "' does not exist.") } # add destination directory to default libraries if( isTRUE(lib.loc) ) lib.loc <- unique(c(nlib, .libPaths())) } # setup result string res <- invisible(if( !is.null(destdir) ) nlib else .libPaths()[1L]) # early exit if the package already exists in the library (and not forcing install) message("# Check for previous package installation ... ", appendLF=FALSE) if( !is.null(destdir) && is.dir(file.path(nlib, pkg$package)) ){ if( !force ){ message("YES (skip)") return(res) } message("YES (replace)") }else message("NO") # add lib path ol <- set_libPaths(lib.loc) on.exit(set_libPaths(ol), add=TRUE) message("Using R Libraries: ", str_out(.libPaths(), Inf)) owd <- setwd(tempdir()) on.exit( setwd(owd), add=TRUE) # build message("# Building package `", pkg$package, "` in '", getwd(), "'") opts <- '--no-manual --no-resave-data ' if( !vignettes ){ vflag <- if( testRversion('>= 3.0') ) '--no-build-vignettes ' else '--no-vignettes ' opts <- str_c(opts, vflag) } R.CMD('build', opts, path.protect(npath), ...) spkg <- paste(pkg$package, '_', pkg$version, '.tar.gz', sep='') if( !file.exists(spkg) ) stop('Error in building package `', pkg$package,'`') # install message("# Installing package `", pkg$package, "`" , if( !is.null(destdir) ){ tmp <- if( is_NA(destdir) ) 'temporary ' str_c("in ", tmp, "'", nlib, "'") }) opts_inst <- ' --no-multiarch --no-demo --with-keep.source ' if( !vignettes ) opts_inst <- str_c(opts_inst, '--no-docs ') R.CMD('INSTALL', if( !is.null(destdir) ) paste('-l', path.protect(nlib)), opts_inst, path.protect(spkg), ...) # return installation library invisible(res) } #' Require a Package #' #' Require a package with a custom error message #' #' @param pkg package name as a character string #' @param ... extra arguments concatenated to for the header of the #' error message #' #' @export requirePackage <- function(pkg, ...){ if( !require(pkg, character.only=TRUE) ){ if( nargs() > 1L ) stop(..., " requires package(s) ", str_out(pkg)) else stop("Could not find required package(s) ", str_out(pkg)) } } parse_deps <- function (string) { if (is.null(string)) return() string <- gsub("\\s*\\(.*?\\)", "", string) pieces <- strsplit(string, ",")[[1]] pieces <- gsub("^\\s+|\\s+$", "", pieces) pieces[pieces != "R"] } #' List Package Dependencies #' #' @param x path to package source directory or file. #' @param all logical that indicates if all dependencies should be returned, #' or only the required ones. #' @param as.list logical that indicates if the result should be a list with one element #' per type of dependency. #' @param available a matrix of available packages (as returned by \code{\link{available.packages}}), #' from which the dependencies are retrieved. #' This means that there must be a row for the package \code{x}. #' #' @export #' packageDependencies <- function(x, all = TRUE, as.list = FALSE, available = NULL){ if( is.null(available) ) x <- as.package(x, extract = TRUE) else{ p <- available[, 'Package'] if( !x %in% p ) return(NA) x <- available[p == x, , drop = FALSE][1L, ] names(x) <- tolower(names(x)) } d <- lapply(x[c('depends', 'imports', 'linkingto', 'suggests')], parse_deps) d <- unlist(d) d <- d[!is.na(d)] if( !length(d) ) return() names(d) <- gsub("[0-9]+$", "", names(d)) # remove non-required if( !all ) d <- d[!names(d) %in% c('suggests')] if( as.list ) d <- split(unname(d), names(d)) d } .biocLite <- function(...){ # install BiocInstaller if necessary if( !require.quiet('BiocInstaller') ){ message("Installing biocLite") source('http://www.bioconductor.org/biocLite.R') } f <- get('biocLite', 'package:BiocInstaller') f(...) } #' Installing All Package Dependencies #' #' Install all dependencies from a package source directory or #' package source file. #' #' @param pkg package path or source file #' @param all logical that indicates if 'Suggests' packages #' should be installed. #' @param ... extra arguments passed to \code{\link{install.packages}}. #' @param dryrun logical that indicates if the packages should be #' effectively installed or only shown. #' #' @export #' @examples #' #' try( install.dependencies('Matrix', dryrun=TRUE) ) #' \dontrun{ #' install.dependencies("mypackage_1.0.tar.gz", dryrun=TRUE) #' } #' install.dependencies <- function (pkg = NULL, all=FALSE, ..., dryrun=FALSE) { pkg <- as.package(pkg, extract=TRUE) deps <- c(parse_deps(pkg$depends) , parse_deps(pkg$imports) , parse_deps(pkg$linkingto) , if( isTRUE(all) ) parse_deps(pkg$suggests) ) not.installed <- function(x) length(find.package(x, quiet = TRUE)) == 0 message("Package dependencies for ", pkg$package, ": ", str_out(deps, Inf)) deps <- Filter(not.installed, deps) if (length(deps) == 0){ message("Missing: none") return(invisible()) } message("Missing: ", str_out(deps, Inf)) message("Installing ", length(deps), " dependencies for ", pkg$package) if( !dryrun ){ .biocLite(deps, ...) } invisible(deps) } #' Setting Mirrors and Repositories #' #' \code{setBiocMirror} sets all Bioconductor repositories (software, data, #' annotation, etc.). #' so that they are directly available to \code{\link{install.packages}}. #' It differs from \code{\link{chooseBioCmirror}} in that it effectively enables #' the repositories. #' #' @param url or Bioconductor mirror url #' @param version version number #' @param unique logical that indicate if duplicated urls or names should be #' removed. #' #' @rdname mirrors #' @export setBiocMirror <- function(url='http://www.bioconductor.org', version=NULL, unique=TRUE){ #get all bioconductor repos biocRepos <- getBiocRepos(url, version) repos <- c(biocRepos, getOption('repos')) if( unique ){ nam <- names(repos) repos <- repos[!duplicated(repos) & (!duplicated(nam) | nam=='')] } options(repos=repos) } #' \code{getBiocMirror} is a shortcut for \code{getOption('BioC_mirror')}, which #' returns the current Bioconductor mirror as used by \code{biocLite}. #' #' @export #' @rdname mirrors getBiocMirror <- function(){ getOption('BioC_mirror') } #' \code{getBiocRepos} returns urls to all Bioconductor repositories on a #' given mirror. #' #' @export #' @rdname mirrors getBiocRepos <- function(url='http://www.bioconductor.org', version=NULL){ if( is.null(url) ){ url <- getBiocMirror() if( is.null(url) ) stop("No Bioconductor mirror was setup. Use `setBiocMirror`.") } ## BioConductor CRAN-style repositories. ## The software repo (bioc) _must_ be the first element. biocParts <- c( bioc='bioc' , biocData='data/annotation' , biocExp='data/experiment' , biocExtra='extra' ) # define version suffix for bioconductor repo if( is.null(version) ){ assoc <- list(`2`=c(7L, 2L)) Rv <- as.integer(sub("([0-9]+).*", "\\1", R.version$minor)) offset <- assoc[[R.version$major]] version <- paste(R.version$major, offset[2L] + Rv - offset[1L], sep='.') } #add version suffix for bioconductor repo setNames(paste(url, 'packages', version, biocParts, sep='/'), names(biocParts)) } #' \code{setCRANMirror} sets the preferred CRAN mirror. #' #' @rdname mirrors #' @export setCRANMirror <- function(url=CRAN, unique=TRUE){ repos <- c(CRAN=url, getOption('repos')) if( unique ){ nam <- names(repos) repos <- repos[!duplicated(repos) & (!duplicated(nam) | nam=='')] } options(repos=repos) } #' \code{CRAN} simply contains the url of CRAN main mirror #' (\url{http://cran.r-project.org}), and aims at simplifying its use, e.g., in #' calls to \code{\link{install.packages}}. #' #' @rdname mirrors #' @export #' #' @examples #' \dontrun{ #' install.packages('pkgmaker', repos=CRAN) #' } CRAN <- 'http://cran.r-project.org' #' Adding Package Libraries #' #' Prepend/append paths to the library path list, using \code{\link{.libPaths}}. #' #' This function is meant to be more convenient than \code{.libPaths}, which requires #' more writing if one wants to: #' \itemize{ #' \item sequentially add libraries; #' \item append and not prepend new path(s); #' \item keep the standard user library in the search path. #' } #' #' @param ... paths to add to .libPath #' @param append logical that indicates that the paths should be appended #' rather than prepended. #' #' @export #' #' @examples #' ol <- .libPaths() #' # called sequentially, .libPaths only add the last library #' show( .libPaths('.') ) #' show( .libPaths(tempdir()) ) #' # restore #' .libPaths(ol) #' #' # .libPaths does not keep the standard user library #' show( .libPaths() ) #' show( .libPaths('.') ) #' # restore #' .libPaths(ol) #' #' # with add_lib #' show( add_lib('.') ) #' show( add_lib(tempdir()) ) #' show( add_lib('..', append=TRUE) ) #' #' # restore #' .libPaths(ol) #' add_lib <- function(..., append=FALSE){ p <- if( append ) c(.libPaths(), ...) else c(..., .libPaths()) .libPaths(p) } #' Package Check Utils #' #' \code{isCRANcheck} \strong{tries} to identify if one is running CRAN-like checks. #' #' Currently \code{isCRANcheck} returns \code{TRUE} if the check is run with #' either environment variable \code{_R_CHECK_TIMINGS_} (as set by flag \code{'--timings'}) #' or \code{_R_CHECK_CRAN_INCOMINGS_} (as set by flag \code{'--as-cran'}). #' #' \strong{Warning:} the checks performed on CRAN check machines are on purpose not always #' run with such flags, so that users cannot effectively "trick" the checks. #' As a result, there is no guarantee this function effectively identifies such checks. #' If really needed for honest reasons, CRAN recommends users rely on custom dedicated environment #' variables to enable specific tests or examples. #' #' @param ... each argument specifies a set of tests to do using an AND operator. #' The final result tests if any of the test set is true. #' Possible values are: #' \describe{ #' \item{\code{'timing'}}{Check if the environment variable \code{_R_CHECK_TIMINGS_} is set, #' as with the flag \code{'--timing'} was set.} #' \item{\code{'cran'}}{Check if the environment variable \code{_R_CHECK_CRAN_INCOMING_} is set, #' as with the flag \code{'--as-cran'} was set.} #' } #' #' @references Adapted from the function \code{CRAN} #' in the \pkg{fda} package. #' #' @export isCRANcheck <- function(...){ tests <- list(...) if( !length(tests) ){ #default tests tests <- list('timing', 'cran') } test_sets <- c(timing="_R_CHECK_TIMINGS_", cran='_R_CHECK_CRAN_INCOMING_') tests <- sapply(tests, function(x){ # convert named tests if( length(i <- which(x %in% names(test_sets))) ){ y <- test_sets[x[i]] x <- x[-i] x <- c(x, y) } # get environment variables evar <- unlist(sapply(x, Sys.getenv)) all(nchar(as.character(evar)) > 0) }) any(tests) } #' \code{isCRAN_timing} tells if one is running CRAN check with flag \code{'--timing'}. #' #' @export #' @rdname isCRANcheck isCRAN_timing <- function() isCRANcheck('timing') #' \code{isCHECK} tries harder to test if running under \code{R CMD check}. #' It will definitely identifies check runs for: #' \itemize{ #' \item unit tests that use the unified unit test framework defined by \pkg{pkgmaker} (see \code{\link{utest}}); #' \item examples that are run with option \code{R_CHECK_RUNNING_EXAMPLES_ = TRUE}, #' which is automatically set for man pages generated with a fork of \pkg{roxygen2} (see \emph{References}). #' } #' #' Currently, \code{isCHECK} checks both CRAN expected flags, the value of environment variable #' \code{_R_CHECK_RUNNING_UTESTS_}, and the value of option \code{R_CHECK_RUNNING_EXAMPLES_}. #' It will return \code{TRUE} if any of these environment variables is set to #' anything not equivalent to \code{FALSE}, or if the option is \code{TRUE}. #' For example, the function \code{\link{utest}} sets it to the name of the package #' being checked (\code{_R_CHECK_RUNNING_UTESTS_=}), #' but unit tests run as part of unit tests vignettes are run with #' \code{_R_CHECK_RUNNING_UTESTS_=FALSE}, so that all tests are run and reported when #' generating them. #' #' @references \url{https://github.com/renozao/roxygen2} #' @rdname isCRANcheck #' @export #' #' @examples #' #' isCHECK() #' isCHECK <- function(){ isCRANcheck() || # known CRAN check flags !isFALSE(utestCheckMode()) || # unit test-specific flag isTRUE(getOption('R_CHECK_RUNNING_EXAMPLES_')) # roxygen generated example flag } #' System Environment Variables #' #' @param name variable name as a character string. #' @param raw logical that indicates if one should return the raw value or #' the convertion of any false value to \code{FALSE}. #' #' @return the value of the environment variable as a character string or #' \code{NA} is the variable is not defined \strong{at all}. #' #' @export #' @examples #' #' # undefined returns FALSE #' Sys.getenv_value('TOTO') #' # raw undefined returns NA #' Sys.getenv_value('TOTO', raw = TRUE) #' #' Sys.setenv(TOTO='bla') #' Sys.getenv_value('TOTO') #' #' # anything false-like returns FALSE #' Sys.setenv(TOTO='false'); Sys.getenv_value('TOTO') #' Sys.setenv(TOTO='0'); Sys.getenv_value('TOTO') #' #' # cleanup #' Sys.unsetenv('TOTO') #' Sys.getenv_value <- function(name, raw = FALSE){ val <- Sys.getenv(name, unset = NA, names = FALSE) if( raw ) return(val) # convert false values to FALSE if required if( is.na(val) || !nchar(val) || identical(tolower(val), 'false') || val == '0' ){ val <- FALSE } val } checkMode_function <- function(varname){ .varname <- varname function(value, raw = FALSE){ if( missing(value) ) Sys.getenv_value(.varname, raw = raw) else{ old <- Sys.getenv_value(.varname, raw = TRUE) if( is_NA(value) ) Sys.unsetenv(.varname) # unset else do.call(Sys.setenv, setNames(list(value), .varname)) # set value # return old value old } } } utestCheckMode <- checkMode_function('_R_CHECK_RUNNING_UTESTS_') pkgmaker/R/is.R0000644000176000001440000000560312330274520013044 0ustar ripleyusers# General test utility functions to check the type of objects # # Author: Renaud Gaujoux # Creation: 30 Apr 2012 ############################################################################### #' @include unitTests.R NULL #' Testing Object Type #' #' @name is_something #' @rdname is_something #' #' @return \code{TRUE} or \code{FALSE} NULL #' \code{is_NA} tests if a variable is exactly NA (logical, character, numeric or integer) #' #' @param x an R object #' @rdname is_something #' @export is_NA <- function(x){ identical(x, NA) || identical(x, as.character(NA)) || identical(x, as.numeric(NA)) || identical(x, as.integer(NA)) } #' \code{isFALSE} Tests if a variable is exactly FALSE. #' #' @rdname is_something #' @seealso \code{\link{isTRUE}} #' @export isFALSE <- function(x) identical(x, FALSE) #' \code{isNumber} tests if a variable is a single number #' #' @rdname is_something #' @export isNumber <- function(x){ is.numeric(x) && length(x) == 1 } #' \code{isReal} tests if a variable is a single real number #' #' @rdname is_something #' @export isReal <- function(x){ isNumber(x) && !is.integer(x) } #' \code{isInteger} tests if an object is a single integer #' @rdname is_something #' @export isInteger <- function(x){ is.integer(x) && length(x) == 1 } #' \code{isString} tests if an object is a character string. #' #' @param y character string to compare with. #' @param ignore.case logical that indicates if the comparison #' should be case sensistive. #' #' @rdname is_something #' @export isString <- function(x, y, ignore.case=FALSE){ if( res <- is.character(x) && length(x) == 1L ){ if( !missing(y) ){ if( !isString(y) ) stop("Invalid argument 'y': must be a string itself.") if( ignore.case ) { x <- toupper(x) y <- toupper(y) } res <- x == y } } res } #' \code{is.dir} tests if a filename is a directory. #' #' @rdname is_something #' @export is.dir <- function(x) file_test('-d', x) #' \code{is.file} tests if a filename is a file. #' #' @rdname is_something #' @export is.file <- function(x) file_test('-f', x) #' \code{hasNames} tests if an object has names. #' #' @param all logical that indicates if the object needs all names non empty #' @rdname is_something #' @export hasNames <- function(x, all=FALSE){ nm <- names(x) if( length(x) == 0L ) TRUE else !is.null(nm) && (!all || !is.element('', nm) ) } unit.test(hasNames, { add_names <- function(x) setNames(x, letters[1:length(x)]) # vector checkTrue(hasNames( add_names(1:10) )) checkTrue(hasNames( add_names(1:10) , all=TRUE)) checkTrue(hasNames( c(add_names(1:10),11) )) checkTrue(!hasNames( c(add_names(1:10),11) , all=TRUE)) # list checkTrue(hasNames( add_names(list(1,2,3)) )) checkTrue(hasNames( add_names(list(1,2,3)) , all=TRUE)) checkTrue(hasNames( c(add_names(list(1,2,3)),11) )) checkTrue(!hasNames( c(add_names(list(1,2,3)),11) , all=TRUE)) }) pkgmaker/R/rd.R0000644000176000001440000000465512330274520013044 0ustar ripleyusers# Rd utility functions # # Author: Renaud Gaujoux # Created: Mar 25, 2013 ############################################################################### #getRdFile <- function(topic, package=NULL){ # help_call <- substitute(help(topic, package = package, try.all.packages = TRUE), # list(topic = topic, package = package)) # # eval(help_call) #} # Borrowed from tools:::RdTags RdTags <- function (Rd) { res <- sapply(Rd, attr, "Rd_tag") if (!length(res)) res <- character() res } #' @importFrom tools Rd_db getRdTag <- function(topic, tag, package){ # extract topic #rd <- utils:::.getHelpFile(file=getRdFile(topic, package=package)) rd <- Rd_db(package=package) found <- FALSE i <- sapply(rd, function(x){ if( found ) return() tags <- RdTags(x) w <- which(tags == "\\alias") if( length(w <- which(sapply(x[w], function(a) a[[1]] == topic))) ){ found <<- TRUE rd }else NULL }) if( !found ) stop("Could not find topic '", topic, "' in package '", package, "'") w <- which(!sapply(i, is.null)) topic_rd <- rd[[w[1L]]] tags <- RdTags(topic_rd) if( !length(w <- which(tags == tag)) ) stop("Could not find tag '", tag, "' in help topic ", package, "::", topic) topic_rd[w] } #' Format Rd Sections into LatTeX #' #' This function extract sections from Rd files and convert them into #' LaTeX code. #' This can be useful to include Rd text into vignettes, hence keeping them #' up to date. #' #' @section Example section: This is a nice section, with a bullet list: #' \itemize{ #' \item tata #' \item toto #' } #' #' @param topic Rd topic #' @param package package in which to search the topic #' @param i index of the section to format #' @param notitle logical that indicates if the section's title should be removed #' #' @export #' @examples #' RdSection2latex('RdSection2latex', package = 'pkgmaker') #' RdSection2latex <- function(topic, package, i=1L, notitle=TRUE){ rdsec <- getRdTag(topic, tag="\\section", package = package) if( !length(rdsec) ) return() ltx <- capture.output(tools::Rd2latex(rdsec[i], fragment=TRUE)) if( notitle ){ parts <- stringr::str_match(ltx, "\\{Section\\}") w <- which(!is.na(parts[, 1])) ltx <- ltx[seq(w[1]+1, tail(w, 1)-1)] } ltx <- paste(ltx, collapse="\n") # remove link commands ltx <- gsub("\\\\LinkA\\{([^}]+)\\}\\{([^}]+)\\}", "\\2", ltx) cat(ltx) invisible() } pkgmaker/R/CLI.R0000644000176000001440000002371012330274520013037 0ustar ripleyusers# Command Line Interface utils # # Author: Renaud Gaujoux # Created: May 9, 2013 ############################################################################### .silenceF <- function(f, verbose=FALSE){ if( verbose ) f else{ function(...){ capture.output(suppressPackageStartupMessages(suppressMessages(res <- f(...)))); res } } } qlibrary <- .silenceF(library, verbose = FALSE) smessage <- function(..., indent = 0L, item = NULL, appendLF = FALSE){ if( is.null(item) ){ # choose item from indent .item <- c('*', '*', '-', '-', '>', '>') item <- .item[indent+1] } indent <- if( indent ) paste0(rep(' ', indent), collapse='') else '' if( nzchar(item) ) item <- paste0(item, ' ') message(indent, item, ..., appendLF = appendLF) } CLIfile <- function(full = FALSE){ pattern <- "--file=(.*)" if( !length(f <- grep(pattern, commandArgs(), value = TRUE)) ) '' else{ pf <- gsub(pattern, "\\1", f) if( full ) pf else basename(pf) } } #' Enhanced Command Line Argument Parser #' #' Extends the capabilities of package \pkg{argparse}, e.g., in defining sub commands. #' #' @param prog program name #' @param description program description #' @param ... extra arguments passed to \code{\link[argparse]{ArgumentParser}}. #' @param epilog epilog messages to display at the end of the man pages #' @param show.defaults logical that indicates if default arugment values should #' be displayed. #' #' @export CLIArgumentParser <- function(prog = CLIfile(), description = '', ..., epilog = '', show.defaults = TRUE){ # load argparse suppressMessages( library(argparse, quietly = TRUE) ) .flag_newlines <- function(x){ gsub("\n", "", x) } .special <- '__@@##@@__' epilog <- paste0(.special, epilog) p <- ArgumentParser(prog = prog, description = .flag_newlines(description), ..., epilog = .flag_newlines(epilog)) # change argument formatter if required if( show.defaults ){ i <- grep("argparse\\.ArgumentParser", p$python_code) inst <- p$python_code[i] p$python_code[i] <- paste0(substr(inst, 1, nchar(inst)-1), ', formatter_class=argparse.ArgumentDefaultsHelpFormatter)') } p <- proto(p) # add add_command function p$command_loc <- .special p$prog <- prog p$exec <- if( nchar(exec_path <- CLIfile(full = TRUE)) ) normalizePath(CLIfile(full = TRUE)) else '' p$command <- list() p$command_idefault <- 0L p$command_default <- function(.){ if( .$command_idefault ) names(.$command)[.$command_idefault] else '' } # add a (sub-)command p$add_command <- function(., command, help='', ..., default = FALSE){ # add command argument if necessary if( !length(.$command) ){ .$.super$add_argument('command', help = paste0(.$prog, ' command to run')) } # store command .$command[command] <- help # store command as default if( default ) .$command_idefault <- length(.$command) } # p$add_argument <- function(., ..., help = ''){ .flag_newlines <- function(x){ gsub("\n", "", x) } help <- .flag_newlines(help) .$.super$add_argument(..., help = help) } # overload print_usage p$print_usage <- function(.){ .$.super$print_usage() if( length(.$command) ){ cat("\n Use --help for listing all available commands\n") } } # # overload print_help to add command descriptions p$print_help <- function(.){ # get formatted help h <- paste(capture.output(.$.super$print_help()), collapse="\n") # # fix new lines if necessary # nl <- strsplit(h, "##NL##")[[1]] # if( length(nl) > 1L ){ # indent <- nchar(gsub("^([ ]+).*", "\\1", tail(strsplit(nl[1], "\n")[[1L]], 1L))) # i <- 2:length(nl) # print(sprintf(paste0("%", indent, 's'), '')) # nl[i] <- paste0(sprintf(paste0("%", indent, 's'), ''), nl[i]) # h <- paste0(nl, collapse="\n") # } cmds <- '' if( length(.$command) ){ # format command help lm <- max(nchar(names(.$command))) fmt <- paste0(" %-", lm, "s") cmds <- strwrap(.$command, indent = 4, exdent = 2 + lm + 4, width = 80, simplify = FALSE) cmds <- sapply(cmds, paste, collapse = "\n") cmds <- paste0(sprintf(fmt, names(.$command)), cmds) cmds <- paste0('Commands:\n', paste(cmds, collapse = "\n")) } h <- gsub(.$command_loc, cmds, h, fixed = TRUE) cat(h, sep="\n") } # # add function call_string p$call_string <- function(., args = commandArgs(TRUE)){ paste(.$prog, paste0(args, collapse = ' ')) } e <- parent.frame() p$locenvir <- parent.env(e) # commmand parer p$parse_cmd <- function(., ...){ # print(ls(.$locenvir)) pkgmaker::parseCMD(., ..., envir = .$locenvir) } p } # combine argument parsers .combineParser <- function(p1, p2){ if( length(i <- grep("^parser\\.add_argument", p2$python_code)) ){ p1$.that$python_code <- c(p1$python_code, p2$python_code[i]) } p1 } .hasArgument <- function(ARGS){ function(x) length(ARGS[[x]]) && nzchar(ARGS[[x]]) } logMessage <- function(..., appendLF = TRUE, extfile = NULL){ # output to external file as well if( !is.null(extfile) ){ cat(..., if( appendLF ) "\n", sep ='', file = extfile, append = TRUE) } message(..., appendLF = appendLF) } #' \code{parseCMD} parse command line arguments for sub-commands, #' and dispatch to the associated function. #' #' @param parser parser object as returned by \code{CLIArgumentParser}. #' @param ARGS command line argument to parse, as a named list or a character string. #' @param debug logical that indicate if debugging information should be printed. #' @param envir environment that contains where the sub-command functions are looked for. #' #' @export #' @rdname CLIArgumentParser parseCMD <- function(parser, ARGS = commandArgs(TRUE), debug = FALSE, envir = parent.frame()){ if( isString(ARGS) == 1L ){ # used in dev/debugging ARGS <- strsplit(ARGS, ' ')[[1]] } # fix quotes to avoid python JSON parsing error ARGS <- gsub("'", "\"", ARGS) library(pkgmaker, quietly = TRUE) # define command line arguments prog <- parser$prog # check validity of command # shows usage/help in trivial calls if( !length(ARGS) ){ parser$print_usage() return( invisible(parser) ) }else if( !grepl("^-", ARGS[1L]) ){ # first argument is the command command <- ARGS[1L] if( !command %in% names(parser$command) ){ stop("unknown ", prog," command '", command, "'\n" , " Available commands: ", paste0(names(parser$command), collapse = ', ') #, paste(capture.output(parser$print_usage()), collapse = "\n") ) } }else if( any(ARGS %in% c('-h', '--help')) ){ parser$print_help() return( invisible(parser) ) }else{ # default command if any if( nzchar(parser$command_default()) ) ARGS <- c(parser$command_default(), ARGS) else{ stop("Missing command:\n " , paste(capture.output(parser$print_usage()), collapse = "\n") , "\n Available command(s): ", str_out(names(parser$command), Inf, quote=FALSE) , call. = FALSE) } } # get command-specific parser command <- ARGS[1L] cmd_funame <- paste0('CLI_', command) if( !exists(cmd_funame, envir, inherits = TRUE) ){ # if( is.null(cmd_fun <- getFunction(cmd_funame, mustFind = FALSE)) ){ stop("Could not execute ", prog , " command ", command, ": did not find CLI entry point '", cmd_funame, "'") } cmd_fun <- get(cmd_funame, envir, inherits = TRUE) cmd_parser <- cmd_fun(ARGS=NULL) ARGS <- ARGS[-1L] if( !length(ARGS) ){ # show command line cmd_parser$print_usage() invisible(cmd_parser) }else if( any(ARGS %in% c('-h', '--help')) ){ cmd_parser$print_help() return( invisible(cmd_parser) ) }else{ # parse command arguments args <- cmd_parser$parse_args(ARGS) # log call and parsed arguments if( debug ){ message('Call: ', parser$call_string(ARGS)) message('Parsed arguments:') str(args) } # # call command handler cmd_fun(ARGS = args) } } #' Package Specific Command Line Interface #' #' @param package package name #' @param altfile alternative file that defines the main CLI entry point. #' That is a function named \code{CLI}, which takes the list of parsed command line #' arguments as its first argument. #' @param local logical that indicates if the main CLI function should be #' defined and evaluated in a local environment, or in the user's Global #' environment. #' @param ARGS list of parsed arguments passed to the main CLI function. #' @param ... extra arugments passed to the package's CLI function. #' #' @export packageCLI <- function(package, altfile = NULL, local = TRUE, ARGS = commandArgs(TRUE), ...){ master_cli <- if( !is.null(package) ) system.file('scripts', 'CLI.R', package = package) else if( is.null(altfile) ){ stop('Could not load CLI definition: argument `package` or `altfile` is required') } if( !length(master_cli) || !nzchar(master_cli) ){ master_cli <- altfile } # load CLI source(master_cli, keep.source = TRUE, chdir = TRUE, local = local) if( !exists('CLI', inherits = FALSE) ){ stop("Could not start command line interface for package '", package, "': main entry point function CLI() not found.") } CLI <- get('CLI', inherits = !local) # run CLI CLI(ARGS, ...) } pkgmaker/R/package.R0000644000176000001440000001334012330274520014021 0ustar ripleyusers# Package hooks # # Author: renaud # Creation: 26 Jun 2012 ############################################################################### #' @include utils.R #' @include devutils.R #' @import stats #' @import methods NULL #' Default Load/Unload Functions #' #' @inheritParams base::.onLoad #' @inheritParams base::library.dynam #' #' @export #' @rdname load #' #' @examples #' #' # in a package namespace: #' .onLoad <- function(libname=NULL, pkgname){ #' #' pkgmaker::onLoad(libname, pkgname) #' #' } onLoad <- function(libname=NULL, pkgname, chname=packageName()){ # load compiled library normally or in devmode if( !is.null(libname) ){ if( file.exists(packagePath('libs')) ){ sapply(chname, library.dynam, package=pkgname, lib.loc=libname) } }else{ compile_src() # compile source files and load } } #' @inheritParams base::.onUnload #' @export #' @rdname load #' #' @examples #' #' # in a package namespace: #' .onUnload <- function(libpath){ #' #' pkgmaker::onUnload(libpath) #' #' } onUnload <- function(libpath) { # unload compiled library normally or in devmode dlls <- base::getLoadedDLLs() pname <- packageName() if ( pname %in% names(dlls) ){ if( !missing(libpath) ) library.dynam.unload(pname, libpath) else dyn.unload(dlls[[pname]][['path']]) } } #' Postponing Actions #' #' This function implement a mechanism to postpone actions, which can be executed #' at a later stage. #' This is useful when developing packages, where actions that need to be run in the #' \code{link{.onLoad}} function but can be defined close to their context. #' #' @param expr expression that define the action to postpone. #' Currently only functions are supported. #' @param key identifier for this specific action. #' It should be unique across the postponed actions from the same group. #' @param group optional parent action group. #' This enables to define meaningful sets of actions that can be run all at once. #' @param envir environment in which the action should be executed. #' Currently not used. #' @param verbose logical that toggles verbose messages. #' #' @import digest #' @export #' #' @examples #' opt <- options(verbose=2) #' #' # define actions #' postponeAction(function(){print(10)}, "print") #' postponeAction(function(){print(1:10)}, "more") #' postponeAction() #' # execute actions #' runPostponedAction() #' runPostponedAction() #' #' # restore options #' options(opt) #' postponeAction <- function(expr, key=digest(tempfile()), group=NULL, envir=topns(strict=FALSE), verbose=getOption('verbose')){ # do not do anything if already running delayed actions if( isRunningPostponedAction() ) return() ns <- topns(strict=FALSE) taskObj <- simpleRegistry('.__delayedTasks__', envir=ns) if( !missing(expr) ){ if( missing(key) ){ stop("Missing required argument `key` for registering/cancelling delayed action.") } # add group prefix if( !is.null(group) ) key <- str_c(group, '::', key) #qe <- if( !is.language(expr) ) substitute(expr) else expr qe <- expr if( verbose ){ if( !is.null(qe) ) message("# Postponing action '", key, "'") else{ message("# Cancelling postponed action '", key, "'") } } taskObj$set(key, list(action=qe, envir=envir)) }else{ taskObj$names() } } #' @rdname postponeAction #' @export runPostponedAction <- function(group=NULL, verbose=getOption('verbose')){ ns <- topns(strict=FALSE) taskObj <- simpleRegistry('.__delayedTasks__', envir=ns) if( verbose ){ message("# Executing postponed " , if( !is.null(group) ) paste("'", group, "' ", sep='') , "action(s) in package '" , packageName(ns, .Global=TRUE), "' ... " , appendLF = FALSE) } # set up running flag isRunningPostponedAction(TRUE) on.exit(isRunningPostponedAction(FALSE)) # # execute actions t <- taskObj$names() if( !is.null(group) ) t <- grep(str_c("^", group), t, value=TRUE) if( verbose > 1 && length(t) ) message() sapply(t, function(x){ act <- taskObj$get(x) if( verbose > 1 ){ message("** Action '", x, "' [", packageName(act$envir, .Global=TRUE), ']') } act$action() taskObj$set(x, NULL) #eval(x$expr, x$envir) }) if( verbose ) message('OK [', length(t), ']') invisible(length(t)) } # Tells if one is executing deferred tasks via \code{onLoad} isRunningPostponedAction <- sVariable(FALSE) #' Simple Package Registry #' #' @param name name of the registry object, with which it will #' be assigned in \code{envir}. #' @param envir environment where to store the registry object. #' Defaults to the caller's top environment. #' @param verbose logical that toggle a verbose message when #' the object is first created. #' #' @export simpleRegistry <- function(name, envir=topenv(parent.frame()), verbose=FALSE){ # return stored instance if it exists if( exists(name, envir=envir) ){ return( invisible(get(name, envir=envir)) ) } if( verbose ) message("# Setup simple registry '", name, "' in ", packageName(envir, .Global=TRUE)) .name <- name .envir <- envir .data <- list() .get <- function(x){ if( .has(x) ){ .data[[x]] } } .set <- function(x, value){ if( is.null(value) ){ if( .has(x) ){ .data[[x]] <<- NULL } }else{ .data[[x]] <<- value } } .has <- function(x){ x %in% names(.data) } .cleanup <- function(){ rm(.name, envir=.envir) } .names <- function(){ names(.data) } .length <- function(){ length(.data) } .obj <- list(get=.get, set=.set, has=.has , cleanup=.cleanup, names=.names , length = .length) # assign container object assign(.name, .obj, envir=.envir) # invisible(.obj) } #' Defunct Functions in pkgmaker #' #' These functions have been defunct or superseded by other #' functions. #' #' @param ... extra arguments #' #' @rdname pkgmaker-defunct #' @name pkgmaker-defunct NULLpkgmaker/R/vignette.R0000644000176000001440000006362512330274520014266 0ustar ripleyusers# Vignette generation related functions # # Author: Renaud Gaujoux # Creation: 25 Apr 2012 ############################################################################### #' @include packages.R NULL rnw_message <- function(...) message("# ", ...) #' Identifying Sweave Run #' #' Tells if the current code is being executed within a Sweave document. #' #' @return \code{TRUE} or \code{FALSE} #' @export #' #' @examples #' #' # Not in a Sweave document #' inSweave() #' #' # Within a Sweave document #' inSweave <- function(){ # in.sweave <- FALSE if ((n.parents <- length(sys.parents())) >= 3) { for (i in seq_len(n.parents) - 1) { if ("chunkopts" %in% ls(envir = sys.frame(i))) { chunkopts = get("chunkopts", envir = sys.frame(i)) if (all(c("prefix.string", "label") %in% names(chunkopts))) { # in.sweave <- TRUE return(TRUE) break } } } } FALSE } #' Generate a Fake Vignette #' #' @param src original Sweave file #' @param out output file #' @param PACKAGE package name where to look the source vignette #' #' @export makeFakeVignette <- function(src, out, PACKAGE=NULL){ # interpret template within the package directory if( !is.null(PACKAGE) ){ src <- str_c(, src) } if( identical(normalizePath(dirname(src)), normalizePath(dirname(out))) ){ cat("# NOTE: skipped fake vignette [source in root directory]\n") return(invisible()) } # read in template file l <- readLines(src) # extract %\Vignette commands vign <- l[grep("^%\\s*\\\\Vignette", l)] # write output file cat(c("\\documentclass[10pt]{article}" , vign , "\\usepackage{url}\n\\usepackage[colorlinks]{hyperref}\n\n\\begin{document}\n\\end{document}") , file=out, sep="\n"); } #' LaTeX Utilities for Vignettes #' #' \code{latex_preamble} outputs/returns command definition LaTeX commands to #' be put in the preamble of vignettes. #' #' Argument \code{PACKAGE} is not required for \code{latex_preamble}, but must #' be correctly specified to ensure \code{biblatex=TRUE} generates the correct #' bibliography command. #' #' @param R logical that indicate if general R commands should be added #' (e.g. package names, inline R code format commands) #' @param CRAN logical that indicate if general CRAN commands should be added #' (e.g. CRAN package citations) #' @param Bioconductor logical that indicate if general Bioconductor commands #' should be added (e.g. Bioc package citations) #' @param GEO logical that indicate if general GEOmnibus commands should be added #' (e.g. urls to GEO datasets) #' @param ArrayExpress logical that indicate if general ArrayExpress commands #' should be added (e.g. urls to ArrayExpress datasets) #' @param biblatex logical that indicates if a \code{\\bibliography} command #' should be added to include references from the package's REFERENCES.bib file. #' #' @param only a logical that indicates if the only the commands whose #' dedicated argument is not missing should be considered. #' @param file connection where to print. If \code{NULL} the result is returned #' silently. #' #' @import stringr #' @export #' @rdname latex #' @examples #' #' latex_preamble() #' latex_preamble(R=TRUE, only=TRUE) #' latex_preamble(R=FALSE, CRAN=FALSE, GEO=FALSE) #' latex_preamble(GEO=TRUE, only=TRUE) #' latex_preamble <- function(PACKAGE, R=TRUE, CRAN=TRUE, Bioconductor=TRUE , GEO=TRUE, ArrayExpress=TRUE, biblatex=FALSE, only=FALSE, file=''){ cmd <- "%%%% PKGMAKER COMMANDS %%%%%% \\usepackage{xspace} " inc <- function(arg){ e <- parent.frame() (!only || eval(substitute(hasArg(arg), list(arg=substitute(arg))), e)) && arg } if( inc(R) ){ cmd <- c(cmd, "% R \\let\\proglang=\\textit \\let\\code=\\texttt \\newcommand{\\Rcode}{\\code} \\newcommand{\\pkgname}[1]{\\textit{#1}\\xspace} \\newcommand{\\Rpkg}[1]{\\pkgname{#1} package\\xspace} \\newcommand{\\citepkg}[1]{\\cite{#1}} ") } if( inc(CRAN) ){ cmd <- c(cmd, "% CRAN \\newcommand{\\CRANurl}[1]{\\url{http://cran.r-project.org/package=#1}} %% CRANpkg \\makeatletter \\def\\CRANpkg{\\@ifstar\\@CRANpkg\\@@CRANpkg} \\def\\@CRANpkg#1{\\href{http://cran.r-project.org/package=#1}{\\pkgname{#1}}\\footnote{\\CRANurl{#1}}} \\def\\@@CRANpkg#1{\\href{http://cran.r-project.org/package=#1}{\\pkgname{#1}} package\\footnote{\\CRANurl{#1}}} \\makeatother %% citeCRANpkg \\makeatletter \\def\\citeCRANpkg{\\@ifstar\\@citeCRANpkg\\@@citeCRANpkg} \\def\\@citeCRANpkg#1{\\CRANpkg{#1}\\cite*{Rpackage:#1}} \\def\\@@citeCRANpkg#1{\\CRANpkg{#1}~\\cite{Rpackage:#1}} \\makeatother \\newcommand{\\CRANnmf}{\\href{http://cran.r-project.org/package=NMF}{CRAN}} \\newcommand{\\CRANnmfURL}{\\url{http://cran.r-project.org/package=NMF}} ") } if( inc(Bioconductor) ){ cmd <- c(cmd, "% Bioconductor \\newcommand{\\BioCurl}[1]{\\url{http://www.bioconductor.org/packages/release/bioc/html/#1.html}} \\newcommand{\\BioCpkg}[1]{\\href{http://www.bioconductor.org/packages/release/bioc/html/#1.html}{\\pkgname{#1}} package\\footnote{\\BioCurl{#1}}} \\newcommand{\\citeBioCpkg}[1]{\\BioCpkg{#1}~\\cite{Rpackage:#1}} % Bioconductor annotation \\newcommand{\\BioCAnnurl}[1]{\\url{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}} \\newcommand{\\BioCAnnpkg}[1]{\\href{http://www.bioconductor.org/packages/release/data/annotation/html/#1.html}{\\Rcode{#1}} annotation package\\footnote{\\BioCAnnurl{#1}}} \\newcommand{\\citeBioCAnnpkg}[1]{\\BioCAnnpkg{#1}~\\cite{Rpackage:#1}} ") } if( inc(GEO) ){ cmd <- c(cmd, "% GEO \\newcommand{\\GEOurl}[1]{\\href{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}{#1}\\xspace} \\newcommand{\\GEOhref}[1]{\\GEOurl{#1}\\footnote{\\url{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=#1}}} ") } if( inc(ArrayExpress) ) cmd <- c(cmd, "% ArrayExpress \\newcommand{\\ArrayExpressurl}[1]{\\href{http://www.ebi.ac.uk/arrayexpress/experiments/#1}{#1}\\xspace} \\newcommand{\\ArrayExpresshref}[1]{\\ArrayExpressurl{#1}\\footnote{\\url{http://www.ebi.ac.uk/arrayexpress/experiments/#1}}} ") if( biblatex ){ if( missing(PACKAGE) ) stop("Argument `PACKAGE` is required when specifying `biblatex=TRUE`.") cmd <- c(cmd, latex_bibliography(PACKAGE, file=NULL)) } # output or return commands cmd <- c(cmd, "%%%% END: PKGMAKER COMMANDS %%%%%%\n") cmd <- str_c(cmd, collapse="\n") if( !is.null(file) ) cat(cmd, file, sep='') else cmd } #' \code{latex_bibliography} prints or return a LaTeX command that includes a #' package bibliography file if it exists. #' #' @param PACKAGE package name #' #' @export #' @rdname latex #' latex_bibliography <- function(PACKAGE, file=''){ rpkg.bib <- "%\\bibliography{Rpackages}\n" cmd <- rpkg.bib # get REFERENCES.bib file reffile <- packageReferenceFile(PACKAGE=PACKAGE) if( is.file(reffile) ){ cmd <- paste0(cmd, "\\bibliography{", gsub("\\.bib$", "", reffile), "}\n") } # add post-processing knit hook library(knitr) knit_hooks$set(document = function(x){ # write bibfile if necessary if( length(pkgs <- parsePackageCitation(x)) ){ # write bibfile write.pkgbib(gsub("^Rpackage:", '', pkgs), file='Rpackages.bib', prefix='Rpackage:') # uncomment inclusion line x <- gsub("%\\bibliography{Rpackages}", "\\bibliography{Rpackages}", x, fixed = TRUE) } x }) if( !is.null(file) ) cat(cmd, file=file) else cmd } is.rnw <- function(x){ is(x, 'rnw') } runVignette <- function(x, ...){ # flag the vignette as being locally made opts <- options(R_RUNNING_MANUAL_VIGNETTE=TRUE) on.exit( options(opts) ) # run UseMethod('runVignette') } # tells if a vignette is locally made #' Identifies Manually Run Vignettes #' #' \code{isManualVignette} tells if a vignette is being run through the function \code{runVignette} #' of \pkg{pkgmker}, allowing disabling behaviours not allowed in package vignettes that are #' checked vi \code{R CMD check}. #' #' @rdname vignette #' @export isManualVignette <- function(){ isTRUE(getOption('R_RUNNING_MANUAL_VIGNETTE')) } runVignette.default <- function(x, file=NULL, ...){ stop("Vignette compiler '", class(x), "' is not supported") } ## #' @param fig.path specification for the figure path (used in knitr vignettes only). ## #' If \code{TRUE} then the figure path is set to \code{'./figure//'}. ## #' @param cache.path specification for the cache path. ## #' If \code{TRUE} then the figure path is set to \code{'./cache//'}. #' @S3method runVignette rnw_knitr runVignette.rnw_knitr <- function(x, file=NULL, ..., fig.path=TRUE, cache.path=TRUE){ library(knitr) # expand path to cache to fix issue in knitr bname <- sub("\\..{3}$", '', basename(x$file)) # add suffix for windows if( .Platform$OS.type == 'windows' ){ bname <- paste(bname, '-win', sep='') } # cache.path if( !isFALSE(cache.path) ){ if( isTRUE(cache.path) ){ cache.path <- file.path(getwd(), 'cache', bname, '/') } opts_chunk$set(cache.path=cache.path) } # fig.path if( !isFALSE(fig.path) ){ if( isTRUE(fig.path) ){ fig.path <- file.path(getwd(), 'figure', str_c(bname,'-')) } opts_chunk$set(fig.path=fig.path) } # set other options opts_chunk$set(...) # run knitr e <- new.env(parent = .GlobalEnv) if( FALSE && (is.null(file) || file_extension(file) %in% c('tex', 'pdf')) ){ ofile <- if( file_extension(file) == 'pdf' ) file else NULL knit2pdf(x$file, ofile, envir=e) if( is.null(file) ){ # remove pdf file unlink(file.path(getwd(), basename(file_extension(x$file, 'pdf')))) } else if( file_extension(file) == 'tex' ){ # move tex file file.rename(file_extension(file, 'tex'), file) } }else knit(x$file, file, envir=e) } #' @S3method runVignette rnw_sweave runVignette.rnw_sweave <- function(x, file=NULL, ...){ res <- Sweave(x$file, driver=x$driver, ...) # move output file if( !is.null(file) ){ file.rename(res, file) } res } #' Utilities for Vignettes #' #' \code{rnw} provides a unified interface to run vignettes that detects #' the type of vignette (Sweave or \code{\link[knitr]{knitr}}), and which Sweave driver #' to use (either automatically or from an embedded command \code{\\VignetteDriver} #' command). #' #' @param x vignette source file specification as a path or a \code{rnw} object. #' @param file output file #' @param ... extra arguments passed to \code{as.rnw} that can be used to force #' certain building parameters. #' @param raw a logical that indicates if the raw result for the compilation #' should be returned, instead of the result file path. #' #' @rdname vignette #' @export rnw <- function(x, file=NULL, ..., raw=FALSE){ # library(methods) # load rnw file x <- as.rnw(x, ...) # setup restoration of options and graphical parameters opts <- options() gpar <- par(no.readonly=TRUE) on.exit( {options(opts); par(gpar)}) # copy package cleveref from pkgmaker installation if( 'cleveref' %in% x$latexPackages ){ clv <- packagePath('cleveref.sty', package='pkgmaker') message("# Copying package 'cleveref.sty' from ", dirname(clv)," ... ", appendLF=FALSE) wd <- if( !is.null(file) ) dirname(file) else getwd() file.copy(clv, wd) if( file.exists(file.path(wd, basename(clv))) ) message('OK') else message('ERROR') } # run vignette res <- runVignette(x, file=file, ...) # Package citations if( !is.null(keys <- x$cite) ){ message("# Writing package bibtex file [", length(keys)," key(s)] ... ", appendLF=FALSE) write.pkgbib(keys, file='Rpackages.bib', prefix='Rpackage:', verbose=FALSE) message('OK') } # # return raw result if required if( raw ) return(res) # check for a wrapper main file if( !is.null(x$wrapper) ){ res <- x$wrapper } invisible(res) } checkFile <- function(x, msg="file '%s' does not exist."){ if( !is.file(x) ) stop(sprintf(msg, x)) TRUE } checkRnwFile <- function(x){ if( is.rnw(x) ) x <- x$file checkFile(x, msg="Vignette file '%s' does not exist.") } #' \code{as.rnw} creates a S3 \code{rnw} object that contains information #' about a vignette, e.g., source filename, driver, fixed included files, etc.. #' #' @param load logical to indicate if all the object's properties should loaded, #' which is done by parsing the file and look up for specific tags. #' #' @rdname vignette #' @export as.rnw <- function(x, ..., load = TRUE){ if( is.rnw(x) ) return(x) checkRnwFile(x) # initialise 'rnw' object obj <- list() class(obj) <- 'rnw' # store source full path obj$file <- normalizePath(x) obj$line <- NA if( !load ) return(obj) # detect compiler obj$compiler <- rnwCompiler(obj) %||% 'Sweave' cl <- if( obj$compiler == 'knitr' ) 'knitr' else 'sweave' class(obj) <- c(paste('rnw_', cl, sep=''), class(obj)) # detect driver obj$driver <- rnwDriver(obj) %||% RweaveLatex() # detect wrapper obj$wrapper <- rnwWrapper(obj) # detect fixed included images obj$includes <- rnwIncludes(obj) # detect latex packages obj$latexPackages <- rnwLatexPackages(obj) # detect children vignettes obj$children <- rnwChildren(obj) # detect package citations obj$cite <- rnwCite(obj) # override with passed extra arguments if( nargs() > 1L ){ dots <- list(...) obj[names(dots)] <- dots } # return object obj } rnwObject <- function(...) as.rnw(..., load=FALSE) rnwParser <- function(tag, name=tolower(tag), trim=TRUE, commented=FALSE, options=FALSE, first=FALSE){ function(x, verbose=TRUE){ x <- rnwObject(x) # read all lines in l <- readLines(x$file) # identify driver dr <- str_match(l, str_c("^\\s*" , if( commented ) '%' ,"\\s*\\\\", tag , if( options ) "(\\[[^]]*\\])?" , "\\{([^}]*)\\}")) w <- which(!is.na(dr[,1L])) if( length(w) > 0L ){ if( first ) w <- w[1L] s <- dr[w, if( options ) 3L else 2L] # trim if necessary if( trim ) s <- str_trim(s) if( verbose ) rnw_message("Detected ", name, ": " ,paste("'", s, "'", sep='', collapse=', ')) s } } } rnwVignetteParser <- function(tag, ...){ rnwParser(str_c('Vignette',tag), name=tolower(tag), ..., commented=TRUE, first=TRUE) } rnwLatexPackages <- rnwParser('usepackage', name='LaTeX package(s)', options=TRUE) #' \code{rnwCompiler} tries to detect the vignette compiler to use on a vignette #' source file, e.g., \code{\link{Sweave}} or \code{\link[knitr]{knitr}}. #' #' @param verbose logical that toggles verbosity #' #' @rdname vignette #' @export rnwCompiler <- rnwVignetteParser('Compiler') #' \code{rnwWrapper} tries to detect the type of vignette and if it is meant #' to be wrapped into another main file. #' #' @rdname vignette #' @export rnwWrapper <- rnwVignetteParser('Wrapper') #' \code{rnwDriver} tries to detect Sweave driver to use on a vignette source #' file, e.g., \code{SweaveCache}, \code{highlight}, etc.. #' #' @rdname vignette #' @export rnwDriver <- function(x){ parse_driver <- rnwVignetteParser('Driver', trim=FALSE) if( !is.null(s <- parse_driver(x)) ){ # eval text eval(parse(text=s)) } } #' \code{rnwIncludes} detects fixed includes, e.g., image or pdf files, that are #' required to build the final document. #' #' @rdname vignette #' @export rnwIncludes <- function(x){ x <- rnwObject(x) # read all lines in l <- readLines(x$file) # identify driver dr <- suppressWarnings(str_match(l, "^\\s*\\\\((include)|(includegraphics)|(input))\\{([^}]*)\\}")) w <- which(!is.na(dr[,1L])) rnw_message("Detected includes: ", appendLF=FALSE) if( length(w) > 0L ){ inc <- str_trim(dr[w,6L]) message(str_out(inc)) inc }else message("NONE") } #' \code{rnwChildren} detects included vignette documents and return them as a #' list of vignette objects. #' #' @rdname vignette #' @export rnwChildren <- function(x){ x <- rnwObject(x) # read all lines in l <- readLines(x$file) # identify driver dr <- str_match(l, "^\\s*\\\\SweaveInput\\{([^}]*)\\}") w <- which(!is.na(dr[,1L])) if( length(w) > 0L ){ inc <- dr[w,2L] rnw_message("Detected children: ", str_out(inc, Inf)) owd <- setwd(dirname(x$file)) on.exit( setwd(owd) ) mapply(as.rnw, inc, line=w, SIMPLIFY=FALSE) } } #' Formatting Package Citations in Sweave/knitr Documents #' #' @param x output document, as a single string. #' @export parsePackageCitation <- function(x){ if( length(x) > 1L ) x <- paste(x, collapse = "\n") .parse <- function(x, pattern, idx){ dr <- str_match_all(x, pattern) dr <- dr[sapply(dr, length)>0L] unlist(lapply(dr, '[', , idx)) } # extract package citations: \citeCRANpkg - like x <- gsub(".*[^%]* *\\\\begin\\{document\\}(.*)", "\\1", x) cite <- .parse(x, "\\\\cite((CRAN)|(BioC)|(BioCAnn))?pkg[*]?\\{([^}]*)\\}", 6L) # \cite{Rpackage:pkgname, ...} - like cite2 <- .parse(x, "\\\\cite[^{ ]*\\{([^}]*)\\}", 2L) if( length(cite2) ){ cite2 <- .parse(cite2, '.*Rpackage:([^,}]+).*', 2L) cite <- c(cite, cite2) } # remove Rpackage prefix if( length(cite) ){ cite <- unlist(strsplit(cite, ",")) cite <- gsub('^Rpackage:', '', cite) } inc <- character() if( length(cite) > 0L ){ inc <- unique(str_trim(unlist(strsplit(cite, ",")))) } inc } #' \code{bibcite} provides an inline package citation functionnality. #' Technically it adds a given Bibtex key to a cache that is used at the end of the #' document processing to generate a .bib file with all citation keys. #' #' @param key citation Bibtex key(s) as a character vector #' @param cache specifies what to do with the previsouly chached keys. #' If \code{TRUE}, then \code{key} is added to the cache. #' If \code{NULL}, then all previously cached keys are deleted, before . #' If a character string, then it specifies the path to a Bibtex file that is loaded #' to initialise the cache. #' @param ... extra arguments passed to \code{\link[bibtex]{read.bib}}. #' @keywords internal cite_pkg <- local({ .keys <- character() function(key, cache = NA, ...){ # return whole cache if( !nargs() ) return(.keys) # reset cache if( is.null(cache) ) .keys <- character() else if( isString(cache) ) .keys <- read.bib(file = cache, ...) if( !missing(key) ){ cat(key) .keys <<- c(.keys, key) } } }) rnwCite <- function(x){ x <- rnwObject(x) # read all lines in l <- readLines(x$file) .parse <- function(x, pattern, idx){ dr <- str_match_all(x, pattern) dr <- dr[sapply(dr, length)>0L] unlist(lapply(dr, '[', , idx)) } # extract package citations: \citeCRANpkg - like cite <- .parse(l, "\\\\cite((CRAN)|(BioC)|(BioCAnn))?pkg[*]?\\{([^}]*)\\}", 6L) # \cite{Rpackage:pkgname, ...} - like cite2 <- .parse(l, "\\\\cite[^{ ]*\\{([^}]*)\\}", 2L) if( length(cite2) ){ cite2 <- .parse(cite2, '.*Rpackage:([^,}]+).*', 2L) cite <- c(cite, cite2) } # remove Rpackage prefix if( length(cite) ){ cite <- unlist(strsplit(cite, ",")) cite <- gsub('^Rpackage:', '', cite) } rnw_message("Detected package citation(s): ", appendLF=FALSE) if( length(cite) > 0L ){ inc <- unique(str_trim(unlist(strsplit(cite, ",")))) message(str_out(inc), ' [', length(inc), ']') inc }else message("NONE") } # substitute a makefile template variable subMakeVar <- function(mvar, value, text){ sub(str_c('#%', mvar, '%#'), value, text, fixed=TRUE) } # define a makefile template variable defMakeVar <- function(var, value, ..., mvar=var){ subMakeVar(mvar, str_c(var, '=', value), ...) } quick_install <- function(path, ..., lib.loc){ if( !is.dir(lib.loc) ){ stop("Installation directory '", lib.loc, "' does not exist.") } olib <- .libPaths() .libPaths(lib.loc) on.exit( .libPaths(olib) ) pkg <- devtools::install(path, ...) } vignetteCheckMode <- checkMode_function('_R_CHECK_BUILDING_VIGNETTES_') #' \code{vignetteMakefile} returns the path to a generic makefile used to make #' vignettes. #' #' @param package package name. #' If \code{NULL}, a DESRIPTION file is looked for one directory up: this #' meant to work when building a vignette directly from a package's #' \code{'vignettes'} sub-directory. #' @param skip Vignette files to skip (basename). #' @param print logical that specifies if the path should be printed or #' only returned. #' @param template template Makefile to use. #' The default is to use the file \dQuote{vignette.mk} shipped with the package #' \pkg{pkgmaker} and can be found in its install root directory. #' @param temp logical that indicates if the generated makefile should using a #' temporary filename (\code{TRUE}), or simply named \dQuote{vignette.mk} #' @param checkMode logical that indicates if the vignettes should be generated as in a #' CRAN check (\code{TRUE}) or in development mode, in which case \code{pdflatex}, \code{bibtex}, #' and, optionally, \code{qpdf} are required. #' @param user character vector containing usernames that enforce \code{checkMode=TRUE}, #' if the function is called from within their session. #' @param tests logical that enables the compilation of a vignette that gathers all unit #' test results. #' Note that this means that all unit tests are run before generating the vignette. #' However, unit tests are not (re)-run at this stage when the vignettes are built #' when checking the package with \code{R CMD check}. #' #' @rdname vignette #' @export vignetteMakefile <- function(package=NULL, skip=NULL, print=TRUE, template=NULL, temp=FALSE , checkMode = isCHECK() || vignetteCheckMode() , user = NULL, tests=TRUE){ # library(methods) ## create makefile from template # load template makefile if( is.null(template) ) template <- packagePath('vignette.mk', package='pkgmaker') l <- paste(readLines(template), collapse="\n") # R_BIN l <- subMakeVar('R_BIN', R.home('bin'), l) # if( checkMode ){ oldCM <- vignetteCheckMode(TRUE) on.exit( vignetteCheckMode(oldCM) ) } # Check user: LOCAL_MODE if in declared user localMode <- !checkMode cuser <- Sys.info()["user"] l <- subMakeVar('VIGNETTE_USER', cuser, l) maintainers <- '-' if( !is.null(user) ){ maintainers <- str_c(user, collapse=', ') if( cuser %in% user ){ localMode <- TRUE } } l <- subMakeVar('VIGNETTE_MAINTAINERS', maintainers, l) # define variable LOCAL_MODE if( localMode ){ l <- defMakeVar('LOCAL_MODE', cuser, l) } # Package name pkg_dir <- dirname(getwd()) loc_package <- if( is.file(df <- file.path(pkg_dir, 'DESCRIPTION')) ){ d <- try(read.dcf(df), silent=TRUE) d <- as.list(as.data.frame(d, stringsAsFactors=FALSE)) d$Package } if( !is.null(loc_package) && (is.null(package) || identical(loc_package, package)) ) package <- loc_package else if( !identical(loc_package, package) && length(pkg_dir <- find.package(package, quiet=TRUE)) ){ d <- packageDescription(package) }else{ stop("Could not load DESCRIPTION file for package '", package, "'.") } l <- defMakeVar('MAKE_R_PACKAGE', package, l) l <- subMakeVar('R_PACKAGE_DESCRIPTION', pkg_dir, l) # R_LIBS: add package's dev lib if necessary Rlibs <- NULL if( localMode && is.dir(devlib <- file.path(getwd(), '..', '..', 'lib')) ){ Rlibs <- devlib } Rlibs <- paste(c(Rlibs, "$(TMP_INSTALL_DIR)", "$(R_LIBS)"), collapse=.Platform$path.sep) l <- subMakeVar('R_LIBS_DEV', Rlibs, l) # TMP_INSTALL_DIR: temporary install directory l <- subMakeVar('TMP_INSTALL_DIR', file.path(dirname(tempdir()), basename(tempfile('Rpkglib_'))), l) # Vignettes files: # - look into src/ for real vignettes # - check presence of a test directory ../tests/ # - check current directory for non fake vignettes rnwFiles <- NULL # src if( is.dir('src') ) rnwFiles <- list.files('src', pattern="\\.Rnw$") # unit tests if( tests && is.dir('../tests') ) rnwFiles <- c(rnwFiles, str_c(package, '-unitTests.Rnw')) # non-fake vignettes rnwFiles <- c(rnwFiles, list.files('.', pattern="\\.Rnw$")) # substitute in makefile rnwFiles <- unique(rnwFiles) if( !is.null(skip) ) rnwFiles <- setdiff(rnwFiles, skip) l <- subMakeVar('RNW_SRCS', paste(rnwFiles, collapse=' '), l) # reset pdf objects in local mode to point to ../inst/doc noBuildVignettes <- if( !is.null(d$BuildVignettes) ) tolower(d$BuildVignettes)=='no' else FALSE if( localMode && noBuildVignettes ){ l <- defMakeVar('INST_TARGET', 1, l) l <- defMakeVar('PDF_OBJS' , paste(file.path('../inst/doc', sub("\\.Rnw$", ".pdf", rnwFiles)), collapse=' ') , l) } l <- defMakeVar('PDF_OBJS' , paste(file.path('../inst/doc', sub("\\.Rnw$", ".pdf", rnwFiles)), collapse=' ') , l) # create makefile mk <- if( temp ) tempfile('vignette_', tmpdir='.', fileext='.mk') else 'vignette.mk' cat(l, file=mk) if ( print ){ cat(mk) } invisible(l) } #' Compact PDF at Best #' #' Compact PDFs using either \code{gs_quality='none'} or \code{'ebook'}, #' depending on which compacts best (as per CRAN check criteria). #' #' @inheritParams tools::compactPDF #' #' @rdname vignette #' @export compactVignettes <- function(paths, ...){ td <- tempfile(basename(paths)) file.copy(paths, td) res <- tools::compactPDF(td, gs_quality = "none", ...) # use qpdf diff_none <- format(res, diff = 1e5) res <- tools::compactPDF(td, gs_quality = "ebook", ...) diff_ebook <- format(res, diff = 2.5e5) # 250 KB for now if( length(diff_ebook) ){ tools::compactPDF(paths, gs_quality = "ebook", ...) invisible('ebook') }else{ tools::compactPDF(paths, gs_quality = "none", ...) invisible('none') } } pkgmaker/vignettes/0000755000176000001440000000000012334654065014123 5ustar ripleyuserspkgmaker/vignettes/pkgmaker.Rnw0000644000176000001440000000356512330274520016413 0ustar ripleyusers%\VignetteIndexEntry{Overview of Utilities in the pkgmaker Package} %\VignetteDepends{knitr,bibtex} %\VignetteCompiler{knitr} %\VignetteEngine{knitr::knitr} \documentclass[a4paper]{article} \usepackage[colorlinks]{hyperref} % for hyperlinks \usepackage{a4wide} \usepackage{xspace} \usepackage[all]{hypcap} % for linking to the top of the figures or tables % add preamble from pkgmaker <>= library(pkgmaker) pkgmaker::latex_preamble() @ \title{Overview of Utilities in the pkgmaker Package\\ \small Version \Sexpr{utils::packageVersion('pkgmaker')}} \author{Renaud Gaujoux} \begin{document} \maketitle \section{Knitr hooks} \subsection{hook\_try: showing error message in try statements} This hooks aims at showing the error message generated by \code{try} blocks, which are otherwise not shown in the generated document. \subsubsection*{Hook registration} <>= library(knitr) knit_hooks$set(try = pkgmaker::hook_try) @ \subsubsection*{Usage} <>= try( stop('this error will not appear in the document')) @ Using chunk option \code{try = TRUE}, the error message is shown in the document: <>= txt <- 'this error will be shown' try( stop(txt) ) @ Note that by default, the error message is not highlighted by \code{knitr} as an error but only as a normal message. This is because highlighting apparently relies on an actual error signal condition being raised, which in turn makes the package building process \code{R CMD build} fail. However, it is still possible to hightlight the error when generating a document outside a package, by using the chunk option \code{try = FALSE}: <>= txt <- 'this error will be shown' try( stop(txt) ) @ \pagebreak \section{Session Info} <>= toLatex(sessionInfo()) @ \end{document} pkgmaker/vignettes/pkgmaker-unitTests.Rnw0000644000176000001440000000503412334653767020426 0ustar ripleyusers \documentclass[10pt]{article} %\VignetteDepends{knitr} %\VignetteIndexEntry{pkgmaker-unitTests} %\VignetteCompiler{knitr} %\VignetteEngine{knitr::knitr} \usepackage{vmargin} \setmargrb{0.75in}{0.75in}{0.75in}{0.75in} <>= pkg <- 'pkgmaker' require( pkg, character.only=TRUE ) prettyVersion <- packageDescription(pkg)$Version prettyDate <- format(Sys.Date(), '%B %e, %Y') authors <- packageDescription(pkg)$Author @ \usepackage[colorlinks]{hyperref} \author{\Sexpr{authors}} \title{\texttt{\Sexpr{pkg}}: Unit testing results\footnote{Vignette computed on Wed May 14 13:48:07 2014}} \date{\texttt{\Sexpr{pkg}} version \Sexpr{prettyVersion} as of \Sexpr{prettyDate}} \begin{document} \maketitle \section{Details} \begin{verbatim} RUNIT TEST PROTOCOL -- Wed May 14 13:48:07 2014 *********************************************** Number of test functions: 6 Number of errors: 0 Number of failures: 0 1 Test Suite : package:pkgmaker - 6 test functions, 0 errors, 0 failures Details *************************** Test Suite: package:pkgmaker Test function regexp: ^test. Test file regexp: ^runit.*.[rR]$ Involved directory: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests --------------------------- Test file: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests/runit.options.r test.option_link: (12 checks) ... OK (0.01 seconds) test.resetOptions: (9 checks) ... OK (0 seconds) --------------------------- Test file: /tmp/Rpkglib_74c07de1ec8/pkgmaker/tests/runit.utils.r test.errorCheck: (8 checks) ... OK (0 seconds) test.ExposeAttribute: (20 checks) ... OK (0.01 seconds) test.str_bs: (7 checks) ... OK (0 seconds) test.Sys.getenv_value: (6 checks) ... OK (0 seconds) Total execution time *************************** user system elapsed 0.187 0.000 0.187 \end{verbatim} \section*{Session Information} \begin{itemize}\raggedright \item R version 3.1.0 (2014-04-10), \verb|x86_64-pc-linux-gnu| \item Locale: \verb|LC_CTYPE=en_US.UTF-8|, \verb|LC_NUMERIC=C|, \verb|LC_TIME=en_US.UTF-8|, \verb|LC_COLLATE=en_US.UTF-8|, \verb|LC_MONETARY=en_US.UTF-8|, \verb|LC_MESSAGES=en_US.UTF-8|, \verb|LC_PAPER=en_US.UTF-8|, \verb|LC_NAME=C|, \verb|LC_ADDRESS=C|, \verb|LC_TELEPHONE=C|, \verb|LC_MEASUREMENT=en_US.UTF-8|, \verb|LC_IDENTIFICATION=C| \item Base packages: base, datasets, graphics, grDevices, methods, stats, utils \item Other packages: pkgmaker~0.22, registry~0.2, RUnit~0.4.26, stringr~0.6.2 \item Loaded via a namespace (and not attached): codetools~0.2-8, digest~0.6.4, tools~3.1.0, xtable~1.7-3 \end{itemize} \end{document} pkgmaker/MD50000644000176000001440000001364612334675514012437 0ustar ripleyusersb7093403786006719de52b127c6b4861 *DESCRIPTION c0b6b8187959868b50c8df6f4827c03c *NAMESPACE a7420f88b046c7a56e1053d3721baa7f *R/CLI.R f489e3edf9088ae67d2096638ce0a89e *R/bibtex.R 2cd4aabaf8810b9dacf0996b5c36b4fb *R/colors.R a087f0810dd626700e69fc9cc2c5c0e6 *R/data.R 6605378b85eea5ae833342f40935b634 *R/devutils.R d4ee6236afd30819c3c6d64d32ada527 *R/files.R 2d952bca9ca2ea7a3a6103eb9a83f24a *R/graphics.R 5f4cbb1ac7c3372241da23e09d803146 *R/is.R 4938b32a0ccca266fbaf6d1500b45676 *R/knitr.R 9846d4529c4ad6f1cac4afbb2538be63 *R/logging.R b667e17fe7cec1323c43128797c8b810 *R/namespace.R 2414f854fd1b732ceee603edc125ddd0 *R/options.R 6bd538c3193a34f8156e35f566f182e4 *R/package-extra.R 9a1bd53807f9a886da6f4143a189bc94 *R/package.R 37ef51f3bcb6ecc30cb3a56881d8d170 *R/packages.R 3a5e5e6d3b983f2f36fb10e3942723af *R/project.R 8eda8ad4ecb615c9c41b42fa24438184 *R/rd.R 61ee8d7f73493249e41a178902ea6aab *R/registry.R a15103015ac0e08dc1409dc11f88e948 *R/repositories.R 686b4de5f881093a32e08772fe8ba0f3 *R/unitTests.R 3343d32c7d7007de249d990aadf81757 *R/utils.R e2dc46427b3e5bb5b662592353fe14bd *R/vignette.R de929299104921dd1a12e6c54cf31c84 *build/vignette.rds 06c0d8412c1d103e52fab4766d1b4b73 *inst/cleveref.sty 376f22a54a73473ffbe5adb4ef4ec7ba *inst/doc/pkgmaker-unitTests.R dbfed2f1997c5e85df0b0dd42dcfd8f4 *inst/doc/pkgmaker-unitTests.Rnw b97f4ba7c86b816d723a6c910f98a5bb *inst/doc/pkgmaker-unitTests.pdf 5daacaea067dc3f45e7b2d2fd7fa20f5 *inst/doc/pkgmaker.R 2baf374ae2fe131c6952fadf3fd06d93 *inst/doc/pkgmaker.Rnw fad0b57623a4964928a88de2979c9309 *inst/doc/pkgmaker.pdf f2999d3b8677396bd05ac993d48ebb66 *inst/package.mk a465f35ad3f3bc8d6ff11563fd3cf7f3 *inst/tests/runit.options.r dd925085b2edc05dd1a15b6dc5bf0ab5 *inst/tests/runit.utils.r e00298ac428093faffff8208f5e0f0a1 *inst/vignette.mk 6b676b610622c3d35bf4d9af6521fb75 *man/CLIArgumentParser.Rd 4065a8006524e510eb740ab7eafce8cd *man/ExposeAttribute.Rd 4917062adea5af816e476a83e326a064 *man/R.exec.Rd 3b96921eba462f60e2df6d9b968c7423 *man/RdSection2latex.Rd 5b7c8a25fffad75e2cb9ed2219d99b2a *man/Rversion.Rd 15e0f98ec07e1fcd9f80d9c824d90365 *man/Sys.getenv_value.Rd 20ba2a60a0dd0868ce74570b2a51ec49 *man/addToLogger.Rd cee03c6638a7e4cc9954e730f019ecf9 *man/add_lib.Rd 81c2ef5fb88c2446c44e96911ba0db8e *man/addnames.Rd 48423788cf5f63b36b0e452a8d4a110c *man/alphacol.Rd f8bcf0d9280c386cd83d75e595cf5c84 *man/bibtex.Rd d47aa825b26a4d8e59fca8da727d8e10 *man/cgetAnywhere.Rd 7da14cef98e4d9bde3fb4b210b7bffc0 *man/checkPlot.Rd 78322908a8e934c34bc5552a6a475ed6 *man/cite_pkg.Rd 94dfdebec430dd1708fada021cee92b9 *man/citecmd.Rd 8096250981595d7dfd56b876e4c9f4a0 *man/compile_src.Rd 848d648448f488f1143a809d90725f76 *man/devutils.Rd e9cc001bd389d25c9aa0904326ab6a6d *man/dot-packageMetaRegistry.Rd 5b00a39cab5b91a74e3339eadf734997 *man/exitCheck.Rd 06c0f0fe79878bd32857d3dc10a7c491 *man/expand_list.Rd ca5a32625855675ce5ceb3ea7a17f09a *man/file_extension.Rd cbd3baf9a1ca8bbc1ae329d7938dbb53 *man/fix_registry.Rd 30eb254b14d5adfab6456e8ea512f48b *man/formals.Rd eaf649697780b3917856267a59173300 *man/graphics-utils.Rd 2d4ac8edf4fe1d5069f7303806bf4357 *man/hasArg2.Rd bf31f2c92baa715e6a51557f3ba4f739 *man/hasEnvar.Rd 38cafeb09b79a7b95e253a4883e4b5bd *man/inSweave.Rd 40961543c301221eaca87e9b0a372ec5 *man/install.dependencies.Rd 235eb941cef3857e9723bf7e488a8446 *man/isCRANcheck.Rd 23b81c677cc3b794c0728480be51304c *man/is_something.Rd 4021d05c2bd3740e198231087b4d7f4c *man/knit_ex.Rd d6b8f5d1d4e2e88d62dc85f44c163ed1 *man/latex.Rd e8c1bfacd65db531cc99e87a17ad8d11 *man/libutils.Rd c8bcddec87349880a448429ea0c04793 *man/load.Rd e73df0bc1c0697532e9d4b00f18b7474 *man/local-options.Rd 0f1e2675f1ca53831e48bf0e2bd07d96 *man/lverbose.Rd a54ca7b45344fad1acfabe063ce60814 *man/makeFakeVignette.Rd 35627e6369c7d9a2564172cd6310f3bd *man/makeUnitVignette.Rd 7cee93db9c48efd4446dc1d00d073b94 *man/mirrors.Rd 900c3af4a985c0b42db681013af7d7ed *man/namespace.Rd 362fa6e5b22debe0e1c2b29fd927fc66 *man/new2.Rd 3f0816fc0120b0499bd47164e59bb1c6 *man/oneoffVariable.Rd 131be407cae67357ec200b7902fee97f *man/options.Rd c5ed7f9fd1ab235ec2729b7a176081d6 *man/orderVersion.Rd 7c472f770a93cdac4babb4707d4554a5 *man/packageCLI.Rd f891dac6a99ce70d574de3c2e53a47d3 *man/packageData.Rd 4c611c71ac98290dd26e40eabecb1c3a *man/packageDependencies.Rd f75cf230a45eff45261439186733e527 *man/packageExtra.Rd 57cfb82655b38251918217607817ca6d *man/packageReference.Rd 2cc488774143f7032841ad62e8326bae *man/packageTestEnv.Rd 9b71c7ed290b7c64fd9a53a2e64a1b19 *man/parsePackageCitation.Rd 22ebbe609af996c5905c7384818c2ce6 *man/pkgmaker-defunct.Rd a4b800fc1f8aa658e78620ef1b73039d *man/postponeAction.Rd 4e057e39b22ecbd6e18ca488772478aa *man/quickinstall.Rd 07190453a48ce0ce741db706a3875d24 *man/regfetch.Rd db02eb83ea5ca98ef8f700db65ec82d5 *man/registry.Rd de303a0802d779446ec562feeceba3bf *man/require.quiet.Rd 1a0ba1a581610a94b9008140e161a5ac *man/requirePackage.Rd 811b3581496af6760dbf07798e39d90b *man/requireRUnit.Rd ed04e1f9d131deb4315d57a73aa5c1eb *man/sVariable.Rd 97709b80ed74f2e7a73a72dfcfb1356a *man/setClassRegistry.Rd 45d7982752a9260a384e1b2a01a4978e *man/setupPackageOptions.Rd 865746afcedc040e4f7240a786cf049c *man/simpleRegistry.Rd 33b42674cf80b20ad2c91a5a04ab74be *man/source_files.Rd 16ed146d28703fb17773a918fdbe5fd5 *man/str_diff.Rd 5a963d75d8dbc25e8ffc8f041b3b3dfa *man/str_out.Rd 2321c89fa1cf768cd78f277aed4b0254 *man/testRversion.Rd 8893994aec8601cf9c709674d1fa1b7e *man/uchecks.Rd edaba763f7b21d7f8db7d19e873c8277 *man/unit.test.Rd 602a5e0a9628ef1398e578f886f03ae6 *man/userIs.Rd 6a5dab818f33a116ec6cc8e915a1d333 *man/utest.Rd 14efb1d199e4ed4e7e8996e802dccac5 *man/utestFramework.Rd fa055a1719135a6e4659180cb3fa818c *man/utestPath.Rd 156fb012437f96428cf48f7cecda9e20 *man/vignette.Rd b212ea5898a55be6a2c102a02a68fda3 *man/write.pkgbib.Rd 02d46745a8fb4ef21cf4d0d1ceb63515 *man/writeUnitVignette.Rd 9d649d272297cb8f9011028e2c1b5702 *man/write_PACKAGES_index.Rd c04719a035b4d15f507a6c51e94d4e0b *tests/doRUnit.R dbfed2f1997c5e85df0b0dd42dcfd8f4 *vignettes/pkgmaker-unitTests.Rnw 2baf374ae2fe131c6952fadf3fd06d93 *vignettes/pkgmaker.Rnw pkgmaker/build/0000755000176000001440000000000012334654065013212 5ustar ripleyuserspkgmaker/build/vignette.rds0000644000176000001440000000040712334654065015552 0ustar ripleyusersPAn04I jT ĥ ^ *lH=3ݱ?#Ƙ|OGD%>.Nd&_񇬬Ԇk;_VA*^|i0G9Jn:G2IX->Шq={!#괴+\u~R@[1d0܅ ә=\JT"4TEaOdT>ts]"GF0"N bI4pkgmaker/DESCRIPTION0000644000176000001440000000276412334675514013634 0ustar ripleyusersPackage: pkgmaker Type: Package Title: Package development utilities Version: 0.22 Date: 2013-09-17 Author: Renaud Gaujoux Maintainer: Renaud Gaujoux Description: This package provides some low-level utilities to use for package development. It currently provides managers for multiple package specific options and registries, vignette, unit test and bibtex related utilities. It serves as a base package for packages like NMF, RcppOctave, doRNG, and as an incubator package for other general purposes utilities, that will eventually be packaged separately. It is still under heavy development and changes in the interface(s) are more than likely to happen. License: GPL (>= 2) URL: https://renozao.github.io/pkgmaker BugReports: http://github.com/renozao/pkgmaker/issues SCM: github:renozao, r-forge LazyLoad: yes Depends: R (>= 3.0.0), stats, registry Imports: methods, tools, codetools, digest, stringr, xtable, grDevices Suggests: devtools (>= 0.8), bibtex, RUnit, testthat, knitr, ReportingTools, hwriter, argparse Collate: 'utils.R' 'logging.R' 'unitTests.R' 'data.R' 'namespace.R' 'devutils.R' 'package.R' 'options.R' 'is.R' 'registry.R' 'bibtex.R' 'packages.R' 'vignette.R' 'files.R' 'package-extra.R' 'colors.R' 'graphics.R' 'rd.R' 'project.R' 'CLI.R' 'knitr.R' 'repositories.R' VignetteBuilder: knitr Packaged: 2014-05-14 11:49:09 UTC; renaud NeedsCompilation: no Repository: CRAN Date/Publication: 2014-05-14 16:18:51 pkgmaker/man/0000755000176000001440000000000012330274520012654 5ustar ripleyuserspkgmaker/man/checkPlot.Rd0000644000176000001440000000071212330274520015057 0ustar ripleyusers\name{checkPlot} \alias{checkPlot} \title{Plot in Unit Tests} \usage{ checkPlot(expr, msg = NULL, width = 1000, height = NULL) } \arguments{ \item{expr}{expression that generate th eplot} \item{width}{plot width} \item{height}{plot height (not used)} \item{msg}{plot msg explaining the plot . It will be used as the caption} } \description{ Saves a plot in a PNG file that will be included in unit test HTML reports. } \keyword{internal} pkgmaker/man/write_PACKAGES_index.Rd0000644000176000001440000000134312330274520016723 0ustar ripleyusers\name{write_PACKAGES_index} \alias{write_PACKAGES_index} \title{Generate CRAN-like Repository Index} \usage{ write_PACKAGES_index(path = ".", output = "index.html", pattern = NULL, title = "Packages", robots.file = TRUE) } \arguments{ \item{path}{path to the repository's root directory} \item{output}{output filename -- relative to the repository root \code{path}.} \item{pattern}{regular expression used to filter the names of the packages that will appear in the index.} \item{title}{title of the index page} \item{robots.file}{logical that indicates if a file \code{robots.txt} that hides the repository from search engine robots should be created.} } \description{ Generate CRAN-like Repository Index } pkgmaker/man/knit_ex.Rd0000644000176000001440000000672612330274520014617 0ustar ripleyusers\name{knit_ex} \alias{hook_backspace} \alias{hook_toggle} \alias{hook_try} \alias{knit_ex} \title{Knitr Extensions} \usage{ knit_ex(x, ..., quiet = TRUE, open = FALSE) hook_try(before, options, envir) hook_backspace() hook_toggle() } \arguments{ \item{x}{text to knit as a character vector} \item{...}{arguments passed to \code{\link[knitr]{knit2html}} or \code{\link[knitr]{knit}}} \item{quiet}{logical that indicates if knitting should be quiet (no progress bars etc..).} \item{open}{logical, only used when \code{x} is in .Rmd format, that indicates if the generated document result should be open in a browse, instead of being printed on screen. Not that a browser will not open in non-interactive sessions, and the result will be returned invisibly.} \item{before}{logical that indicates when the hook is being called: before or after the chunk is processed.} \item{options}{list of current knitr chunk options} \item{envir}{environment where the chunk is evaluated} } \value{ \code{knit_ex} returns the generated code, although invisibly when \code{open=TRUE}. } \description{ \code{knit_ex} is a utility function for running small knitr examples, e.g., to illustrate functionalities or issues. \code{hook_try} simply defines a function \code{try} in \code{envir} that prints the error message if any, and is called instead of base \code{\link{try}}. \code{hook_backspace} is a chunk hook that enables the use of backspace characters in the output (e.g., as used in progress bars), and still obtain a final output as in the console. \code{hook_toggle} is a chunk hook that adds clickable elements to toggle \emph{indvidual} code chunks in HTML documents generated from .Rmd files. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # knit_ex #---------- library(knitr) knit_ex("1 + 1") #---------- # hook_try #---------- library(knitr) # standard error message is caught knit_ex("stop('ah ah')") # with try the error is output on stderr but not caughted by knitr knit_ex("try( stop('ah ah') )") # no message caught knit_ex(" ^^^{r, include = FALSE} knit_hooks$set(try = pkgmaker::hook_try) ^^^ ^^^{r, try=TRUE} try( stop('ah ah') ) ^^^") #---------- # hook_backspace #---------- # Correctly formatting backspaces in chunk outputs tmp <- tempfile(fileext = '.Rmd') cat(file = tmp, " ^^^{r, include = FALSE} library(knitr) knit_hooks$set(backspace = pkgmaker::hook_backspace()) ^^^ Default knitr does not handle backspace and adds a special character: ^^^{r} cat('abc\\bd') ^^^ Using the hook backspace solves the issue: ^^^{r, backspace=TRUE} cat('abc\\bd') ^^^ ") # knit out <- knitr::knit2html(tmp, fragment.only = TRUE) # look at output \dontrun{ browseURL(out) edit( file = out) } # cleanup unlink(c(tmp, out)) #---------- # hook_toggle #---------- knit_ex(" Declare chunk hook: ^^^{r, setup} library(knitr) knit_hooks$set(toggle = hook_toggle()) ^^^ The R code of this chunk can be toggled on/off, and starts visible: ^^^{r, toggle=TRUE} print(1:10) ^^^ The R code of this chunk can be toggled on/off, and starts hidden: ^^^{r, toggle=FALSE} print(1:10) ^^^ This is a plain chunk that cannot be toggled on/off: ^^^{r} print(1:10) ^^^ Now all chunks can be toggled and start visible: ^^^{r, toggle_all} opts_chunk$set(toggle = TRUE) ^^^ ^^^{r} sample(5) ^^^ To diable the toggle link, one can pass anything except TRUE/FALSE: ^^^{r, toggle = NA} sample(5) ^^^ ", open = TRUE) } pkgmaker/man/userIs.Rd0000644000176000001440000000036212330274520014416 0ustar ripleyusers\name{userIs} \alias{userIs} \title{Checking R User} \usage{ userIs(user) } \arguments{ \item{user}{the usernames to check for, as a character vector.} } \description{ Tests if the current R user is amongst a given set of users. } pkgmaker/man/utestFramework.Rd0000644000176000001440000000066512330274520016174 0ustar ripleyusers\name{utestFramework} \alias{utestFramework} \title{Inferring Unit Test Framework} \usage{ utestFramework(x, eval = FALSE) } \arguments{ \item{x}{an filename, a function or the body of a function} \item{eval}{a logical that indicates if the value of \code{x} should be used.} } \value{ the name of the framework as a character string or NULL if it could not be detected. } \description{ Inferring Unit Test Framework } pkgmaker/man/devutils.Rd0000644000176000001440000001012412330274520015000 0ustar ripleyusers\name{packageEnv} \alias{as.package} \alias{isPackageInstalled} \alias{packageEnv} \alias{packageName} \alias{packagePath} \alias{str_ns} \alias{topns} \alias{topns_name} \title{Package Development Utilities} \usage{ packageEnv(pkg, skip = FALSE, verbose = FALSE) topns_name(n = 1L, strict = TRUE, unique = TRUE) topns(strict = TRUE) packageName(envir = packageEnv(), .Global = FALSE, rm.prefix = TRUE) str_ns(envir = packageEnv()) packagePath(..., package = NULL, lib.loc = NULL) isPackageInstalled(..., lib.loc = NULL) as.package(x, ..., quiet = FALSE, extract = FALSE) } \arguments{ \item{pkg}{package name. If missing the environment of the runtime caller package is returned.} \item{skip}{a logical that indicates if the calling namespace should be skipped.} \item{verbose}{logical that toggles verbosity} \item{n}{number of namespaces to return} \item{strict}{a logicical that indicates if the global environment should be considered as a valid namespace.} \item{unique}{logical that indicates if the result should be reduced to contain only one occurence of each namespace.} \item{envir}{environment where to start looking for a package name. The default is to use the \strong{runtime} calling package environment.} \item{.Global}{a logical that indicates if calls from the global environment should throw an error (\code{FALSE}: default) or the string \code{'R_GlobalEnv'}.} \item{rm.prefix}{logical that indicates if an eventual prefix 'package:' should be removed from the returned string.} \item{package}{optional name of an installed package} \item{lib.loc}{path to a library of R packages where to search the package} \item{...}{arguments passed to \code{\link{file.path}}.} \item{x}{package specified by its installation/development path or its name as \code{'package:*'}.} \item{quiet}{a logical that indicate if an error should be thrown if a package is not found. It is also passed to \code{\link{find.package}}.} \item{extract}{logical that indicates if DESCRIPTION of package source files should be extracted. In this case there will be no valid path.} } \value{ \code{packageEnv} returns an environment a character string a character string } \description{ \code{packageEnv} is a slight modification from \code{\link{topenv}}, which returns the top environment, which in the case of development packages is the environment into which the source files are loaded by \code{\link[devtools]{load_all}}. \code{topns_name}: the top namespace is is not necessarily the namespace where \code{topns_name} is effectively called. This is useful for packages that define functions that need to access the calling namespace, even from calls nested into calls to another function from the same package -- in which case \code{topenv} would not give the desired environment. \code{topns} returns the runtime top namespace, i.e. the namespace of the top calling package, possibly skipping the namespace where \code{topns} is effectively called. This is useful for packages that define functions that need to access the calling namespace, even from calls nested into calls to another function from the same package -- in which case \code{topenv} would not give the desired environment. \code{packageName} returns the current package's name. It was made internal from version 0.16, since the package \pkg{utils} exported its own \code{\link[utils]{packageName}} function in R-3.0.0. \code{str_ns} formats a package environment/namespace for log/info messages. \code{packagePath} returns the current package's root directory, which is its installation/loading directory in the case of an installed package, or its source directory served by devtools. \code{isPackageInstalled} checks if a package is installed. \code{as.package} is enhanced version of \code{\link[devtools]{as.package}}, that is not exported not to mask the original function. It could eventually be incorporated into \code{devtools} itself. Extra arguments in \code{...} are passed to \code{\link{find.package}}. } pkgmaker/man/requireRUnit.Rd0000644000176000001440000000057312330274520015606 0ustar ripleyusers\name{requireRUnit} \alias{requireRUnit} \title{Load RUnit Compatible Package} \usage{ requireRUnit(...) } \arguments{ \item{...}{arguments passed to \code{\link{requirePackage}}.} } \value{ nothing } \description{ Loads the package responsible for the implementation of the RUnit framework, choosing amongst \sQuote{RUnitX}, \sQuote{svUnit} and \sQuote{RUnit}. } pkgmaker/man/setupPackageOptions.Rd0000644000176000001440000000217512334643662017153 0ustar ripleyusers\name{setupPackageOptions} \alias{setupPackageOptions} \title{Package Specific Options} \usage{ setupPackageOptions(..., NAME = NULL, ENVIR = topenv(parent.frame()), RESET = isLoadingNamespace()) } \arguments{ \item{...}{a single named list or named arguments that provide the default options and their values.} \item{NAME}{name of the set of options. This is used as a prefix for the name of the associated global option: \code{package:}.} \item{ENVIR}{environment where the option wrapper functions will be defined. No function is defined if \code{ENVIR=NULL}} \item{RESET}{a logical that indicates whether the option set should overwrite one that already exists if necessary. The default is \code{FALSE} (i.e. no reset), except when loading a namespace, either from an installed package or a development package -- with devtools. If \code{FALSE}, an error is thrown if trying to setup options with the same name.} } \description{ The following functions to access/set the options from the set are assigned in \code{envir}: \describe{ \item{Options}{} \item{GetOption}{} } } pkgmaker/man/str_out.Rd0000644000176000001440000000422612330274520014646 0ustar ripleyusers\name{str_out} \alias{str_bs} \alias{str_desc} \alias{str_fun} \alias{str_out} \title{Formatting Utilities} \usage{ str_out(x, max = 3L, quote = is.character(x), use.names = FALSE, sep = ", ", total = FALSE) str_desc(object, exdent = 0L) str_fun(object) str_bs(x) } \arguments{ \item{x}{character vector} \item{max}{maximum number of values to appear in the list. If \code{x} has more elements than \code{max}, a \code{"..."} suffix is appended.} \item{quote}{a logical indicating whether the values should be quoted with single quotes (defaults) or not.} \item{use.names}{a logical indicating whether names should be added to the list as \code{NAME=VAL, ...} or not (default).} \item{sep}{separator character} \item{total}{logical that indicates if the total number of elements should be appended to the formatted string as \code{"'a', ..., 'z' ( total)"}.} \item{object}{an R object} \item{exdent}{extra indentation passed to str_wrap, and used if the output should spread over more than one lines.} } \value{ a single character string } \description{ \code{str_out} formats character vectors for use in show methods or error/warning messages. \code{str_desc} builds formatted string from a list of complex values. \code{str_fun} extracts and formats a function signature. It typically formats the output \code{capture.output(args(object))}. \code{str_bs} substitutes backspace characters (\\b) to produce a character string as it would be displayed in the console. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # str_out #---------- x <- letters[1:10] str_out(x) str_out(x, 8) str_out(x, Inf) str_out(x, quote=FALSE) str_out(x, total = TRUE) #---------- # str_fun #---------- str_fun(install.packages) #---------- # str_bs #---------- # Backspace substitution str_bs("abc") str_bs("abc\\b") str_bs("abc\\b\\b") str_bs("abc\\bd") str_bs("abc\\b\\bde\\b") # more complex example x <- "\\bab\\nc\\bd\\n\\babc\\b\\bd" cat(x, "\\n") y <- str_bs(x) y cat(y, "\\n") } \author{ Renaud Gaujoux \code{str_bs} was adapted from a proposal from Yihui Xie. } pkgmaker/man/vignette.Rd0000644000176000001440000001043112330274520014767 0ustar ripleyusers\name{isManualVignette} \alias{as.rnw} \alias{compactVignettes} \alias{isManualVignette} \alias{rnw} \alias{rnwChildren} \alias{rnwCompiler} \alias{rnwDriver} \alias{rnwIncludes} \alias{rnwWrapper} \alias{vignetteMakefile} \title{Identifies Manually Run Vignettes} \usage{ isManualVignette() rnw(x, file = NULL, ..., raw = FALSE) as.rnw(x, ..., load = TRUE) rnwCompiler(x, verbose = TRUE) rnwWrapper(x, verbose = TRUE) rnwDriver(x) rnwIncludes(x) rnwChildren(x) vignetteMakefile(package = NULL, skip = NULL, print = TRUE, template = NULL, temp = FALSE, checkMode = isCHECK() || vignetteCheckMode(), user = NULL, tests = TRUE) compactVignettes(paths, ...) } \arguments{ \item{x}{vignette source file specification as a path or a \code{rnw} object.} \item{file}{output file} \item{...}{extra arguments passed to \code{as.rnw} that can be used to force certain building parameters.} \item{raw}{a logical that indicates if the raw result for the compilation should be returned, instead of the result file path.} \item{load}{logical to indicate if all the object's properties should loaded, which is done by parsing the file and look up for specific tags.} \item{verbose}{logical that toggles verbosity} \item{package}{package name. If \code{NULL}, a DESRIPTION file is looked for one directory up: this meant to work when building a vignette directly from a package's \code{'vignettes'} sub-directory.} \item{skip}{Vignette files to skip (basename).} \item{print}{logical that specifies if the path should be printed or only returned.} \item{template}{template Makefile to use. The default is to use the file \dQuote{vignette.mk} shipped with the package \pkg{pkgmaker} and can be found in its install root directory.} \item{temp}{logical that indicates if the generated makefile should using a temporary filename (\code{TRUE}), or simply named \dQuote{vignette.mk}} \item{checkMode}{logical that indicates if the vignettes should be generated as in a CRAN check (\code{TRUE}) or in development mode, in which case \code{pdflatex}, \code{bibtex}, and, optionally, \code{qpdf} are required.} \item{user}{character vector containing usernames that enforce \code{checkMode=TRUE}, if the function is called from within their session.} \item{tests}{logical that enables the compilation of a vignette that gathers all unit test results. Note that this means that all unit tests are run before generating the vignette. However, unit tests are not (re)-run at this stage when the vignettes are built when checking the package with \code{R CMD check}.} \item{paths}{A character vector of paths to PDF files, or a length-one character vector naming a directory, when all \file{.pdf} files in that directory will be used.} } \description{ \code{isManualVignette} tells if a vignette is being run through the function \code{runVignette} of \pkg{pkgmker}, allowing disabling behaviours not allowed in package vignettes that are checked vi \code{R CMD check}. \code{rnw} provides a unified interface to run vignettes that detects the type of vignette (Sweave or \code{\link[knitr]{knitr}}), and which Sweave driver to use (either automatically or from an embedded command \code{\\VignetteDriver} command). \code{as.rnw} creates a S3 \code{rnw} object that contains information about a vignette, e.g., source filename, driver, fixed included files, etc.. \code{rnwCompiler} tries to detect the vignette compiler to use on a vignette source file, e.g., \code{\link{Sweave}} or \code{\link[knitr]{knitr}}. \code{rnwWrapper} tries to detect the type of vignette and if it is meant to be wrapped into another main file. \code{rnwDriver} tries to detect Sweave driver to use on a vignette source file, e.g., \code{SweaveCache}, \code{highlight}, etc.. \code{rnwIncludes} detects fixed includes, e.g., image or pdf files, that are required to build the final document. \code{rnwChildren} detects included vignette documents and return them as a list of vignette objects. \code{vignetteMakefile} returns the path to a generic makefile used to make vignettes. Compact PDFs using either \code{gs_quality='none'} or \code{'ebook'}, depending on which compacts best (as per CRAN check criteria). } pkgmaker/man/RdSection2latex.Rd0000644000176000001440000000147012330274520016157 0ustar ripleyusers\name{RdSection2latex} \alias{RdSection2latex} \title{Format Rd Sections into LatTeX} \usage{ RdSection2latex(topic, package, i = 1L, notitle = TRUE) } \arguments{ \item{topic}{Rd topic} \item{package}{package in which to search the topic} \item{i}{index of the section to format} \item{notitle}{logical that indicates if the section's title should be removed} } \description{ This function extract sections from Rd files and convert them into LaTeX code. This can be useful to include Rd text into vignettes, hence keeping them up to date. } \section{Example section}{ This is a nice section, with a bullet list: \itemize{ \item tata \item toto } } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } RdSection2latex('RdSection2latex', package = 'pkgmaker') } pkgmaker/man/compile_src.Rd0000644000176000001440000000064212330274520015444 0ustar ripleyusers\name{compile_src} \alias{compile_src} \title{Compile Source Files from a Development Package} \usage{ compile_src(pkg = NULL, load = TRUE) } \arguments{ \item{pkg}{the name of the package to compile} \item{load}{a logical indicating whether the compiled library should be loaded after the compilation (default) or not.} } \value{ None } \description{ Compile Source Files from a Development Package } pkgmaker/man/bibtex.Rd0000644000176000001440000000042412330274520014420 0ustar ripleyusers\name{packageReferenceFile} \alias{packageReferenceFile} \title{Bibtex Utilities} \usage{ packageReferenceFile(PACKAGE = NULL) } \arguments{ \item{PACKAGE}{package name} } \description{ \code{packageReferenceFile} returns the path to a package REFERENCES.bib file. } pkgmaker/man/local-options.Rd0000644000176000001440000000204312330274520015725 0ustar ripleyusers\name{mkoptions} \alias{mkoptions} \alias{.options} \title{Quick Option-like Feature} \usage{ mkoptions(...) .options(..., .DATA) } \arguments{ \item{...}{list of keys or key-value pairs. For \code{mkoptions} these define inital/default key-value pairs.} \item{.DATA}{a list or an environment with an element \code{.options}.} } \description{ \code{mkoptions} is a function that returns a function that behaves like \code{\link[base]{options}}, with an attached internal/local list of key-value pairs. \code{.options} is a low-level function that mimics the behaviour of the base function \code{\link[base]{options}}, given a set of key-value pairs. It is the workhorse function used in \code{mkoptions} and package-specific option sets (see \code{\link{setupPackageOptions}}) } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } f <- mkoptions(a=3, b=list(1,2,3)) str(f()) f('a') f('b') str(old <- f(a = 10)) str(f()) f(old) str(f()) } \seealso{ \code{\link{setupPackageOptions}} } pkgmaker/man/postponeAction.Rd0000644000176000001440000000266012330274520016154 0ustar ripleyusers\name{postponeAction} \alias{postponeAction} \alias{runPostponedAction} \title{Postponing Actions} \usage{ postponeAction(expr, key = digest(tempfile()), group = NULL, envir = topns(strict = FALSE), verbose = getOption("verbose")) runPostponedAction(group = NULL, verbose = getOption("verbose")) } \arguments{ \item{expr}{expression that define the action to postpone. Currently only functions are supported.} \item{key}{identifier for this specific action. It should be unique across the postponed actions from the same group.} \item{group}{optional parent action group. This enables to define meaningful sets of actions that can be run all at once.} \item{envir}{environment in which the action should be executed. Currently not used.} \item{verbose}{logical that toggles verbose messages.} } \description{ This function implement a mechanism to postpone actions, which can be executed at a later stage. This is useful when developing packages, where actions that need to be run in the \code{link{.onLoad}} function but can be defined close to their context. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } opt <- options(verbose=2) # define actions postponeAction(function(){print(10)}, "print") postponeAction(function(){print(1:10)}, "more") postponeAction() # execute actions runPostponedAction() runPostponedAction() # restore options options(opt) } pkgmaker/man/cite_pkg.Rd0000644000176000001440000000200012330274520014720 0ustar ripleyusers\name{cite_pkg} \alias{cite_pkg} \title{\code{bibcite} provides an inline package citation functionnality. Technically it adds a given Bibtex key to a cache that is used at the end of the document processing to generate a .bib file with all citation keys.} \usage{ cite_pkg(key, cache = NA, ...) } \arguments{ \item{key}{citation Bibtex key(s) as a character vector} \item{cache}{specifies what to do with the previsouly chached keys. If \code{TRUE}, then \code{key} is added to the cache. If \code{NULL}, then all previously cached keys are deleted, before . If a character string, then it specifies the path to a Bibtex file that is loaded to initialise the cache.} \item{...}{extra arguments passed to \code{\link[bibtex]{read.bib}}.} } \description{ \code{bibcite} provides an inline package citation functionnality. Technically it adds a given Bibtex key to a cache that is used at the end of the document processing to generate a .bib file with all citation keys. } \keyword{internal} pkgmaker/man/citecmd.Rd0000644000176000001440000000117412330274520014556 0ustar ripleyusers\name{citecmd} \alias{citecmd} \title{Citing Package References} \usage{ citecmd(key, ..., REFERENCES = NULL) } \arguments{ \item{key}{character vector of BibTex keys} \item{...}{extra arguments passed to \code{format.bibentry}.} \item{REFERENCES}{package or bibentry specification} } \value{ a character string containing the text formated BibTex entries } \description{ Create a citation command from package specific BibTex entries, suitable to be used in Rd files or Latex documents. The entries are looked in a file named REFERNCES.bib in the package's root directory (i.e. inst/ in development mode). } pkgmaker/man/fix_registry.Rd0000644000176000001440000000074212330274520015664 0ustar ripleyusers\name{fix_registry} \alias{fix_registry} \title{Fix Registry Access Functions} \usage{ fix_registry(regobj) } \arguments{ \item{regobj}{registry object} } \description{ Fixes some of the member functions for registry objects, as defined in the \pkg{registry} package. The main fixed issue is due to the fact that key filtering does not return the correct entry, when an entry key is a prefix of another entry key, even when passed the exact key. } \keyword{internal} pkgmaker/man/file_extension.Rd0000644000176000001440000000107112330274520016155 0ustar ripleyusers\name{file_extension} \alias{file_extension} \title{Extract File Extension} \usage{ file_extension(x, ext = NULL) } \arguments{ \item{x}{path as a character vector.} \item{ext}{extension to append instead of the original extension.} } \description{ Extract File Extension } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } file_extension('alpha.txt') file_extension(paste('aa.tt', 1:5, sep='')) # change extension file_extension(paste('aa.tt', 1:5, sep=''), 'pdf') file_extension(paste('aatt', 1:5, sep=''), 'pdf') } pkgmaker/man/testRversion.Rd0000644000176000001440000000156312330274520015657 0ustar ripleyusers\name{testRversion} \alias{testRversion} \title{Testing R Version} \usage{ testRversion(x, test = 1L) } \arguments{ \item{x}{target version to compare with.} \item{test}{numeric value that indicates the comparison to be carried out. The comparison is based on the result from \code{utils::compareVersion(R.version, x)}: \itemize{ \item 1: is R.version > \code{x}? \item 0: is R.version = \code{x}? \item -1: is R.version < \code{x}? }} } \value{ a logical } \description{ Compares current R version with a given target version, which may be useful for implementing version dependent code. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } testRversion("2.14") testRversion("2.15") testRversion("10") testRversion("10", test = -1) testRversion("< 10") testRversion(Rversion()) testRversion(paste0('=', Rversion())) } pkgmaker/man/new2.Rd0000644000176000001440000000216312330274520014020 0ustar ripleyusers\name{new2} \alias{new2} \title{Alternative S4 Constructor} \usage{ new2(class, ...) } \arguments{ \item{class}{Class name to instanciate} \item{...}{extra arguments from which slot values are extracted by exact matching of names.} } \description{ An alternative version of \code{\link{new}} to create objects based on a list of values. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } setClass('A', contain='character', representation(x='numeric', y='character')) # identical behaviour with standard calls identical(new('A'), new2('A')) identical(new('A', x=1), new2('A', x=1)) # but if passing that are names not slots identical(new('A'), new2('A', b=1)) identical(new('A', x=1), new2('A', x=1, b=3)) identical(new('A', x=1), new2('A', x=1, b=3)) # standard `new` would coerce first unnamed argument into parent of 'A' (i.e. 'character') new('A', list(x=1)) new('A', list(x=1, y='other')) # `new2` rather use it to initialise the slots it can find in the list identical(new('A', x=1), new2('A', list(x=1))) identical(new('A', x=1, y='other'), new2('A', list(x=1, y='other'))) } pkgmaker/man/hasArg2.Rd0000644000176000001440000000102512330274520014430 0ustar ripleyusers\name{hasArg2} \alias{hasArg2} \title{Checking for Missing Arguments} \usage{ hasArg2(name) } \arguments{ \item{name}{the name of an argument as a character string.} } \description{ This function is identical to \code{\link{hasArg}}, except that it accepts the argument name as a character string. This avoids to have a check NOTE about invisible binding variable. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } f <- function(...){ hasArg2('abc') } f(a=1) f(abc=1) f(b=1) } pkgmaker/man/requirePackage.Rd0000644000176000001440000000050112330274520016067 0ustar ripleyusers\name{requirePackage} \alias{requirePackage} \title{Require a Package} \usage{ requirePackage(pkg, ...) } \arguments{ \item{pkg}{package name as a character string} \item{...}{extra arguments concatenated to for the header of the error message} } \description{ Require a package with a custom error message } pkgmaker/man/addnames.Rd0000644000176000001440000000156512330274520014726 0ustar ripleyusers\name{addnames} \alias{addnames} \alias{addnames.array} \alias{addnames.default} \alias{addnames.matrix} \alias{addnames.vector} \title{Generating Names} \usage{ addnames(x, ...) \method{addnames}{default} (x, ...) \method{addnames}{vector} (x, prefix = "x", sep = "", ...) \method{addnames}{array} (x, prefix = letters[1:length(dim(x))], sep = "", ...) \method{addnames}{matrix} (x, prefix = c("row", "col"), ...) } \arguments{ \item{x}{object whose names are generated.} \item{prefix}{prefix string to use. A vector can be used to specify a prefix for each dimension of \code{x}. Names are build as \code{}.} \item{sep}{separator used between the prefix and the numeric index.} \item{...}{extra arguments to allow extension and passed to the next method.} } \description{ Generates names or dimnames for objects. } pkgmaker/man/namespace.Rd0000644000176000001440000000337512330274520015107 0ustar ripleyusers\name{getLoadingNamespace} \alias{addNamespaceExport} \alias{getLoadingNamespace} \alias{isDevNamespace} \alias{isLoadingNamespace} \alias{isNamespaceLoaded} \alias{ns_get} \title{Namespace Development Functions} \usage{ getLoadingNamespace(env = FALSE, info = FALSE, nodev = FALSE) isLoadingNamespace(ns, nodev = FALSE) isNamespaceLoaded(ns) isDevNamespace(ns) addNamespaceExport(x) ns_get(x, ns) } \arguments{ \item{env}{logical that indicates that the namespace's environment (i.e. the namespace itself) should be returned.} \item{info}{logical that indicates that the complete information list should be returned} \item{ns}{the name of a namespace or a namespace whose loading state is tested. If missing \code{isLoadingNamespace} test if any namespace is being loaded.} \item{nodev}{logical that indicates if loading devtools namespace should be discarded.} \item{x}{character vector containing the names of R objects to export in the loading namespace.} } \value{ the name of the loading namespace if \code{env} and \code{info} are \code{FALSE}, an environment if \code{env=TRUE}, a list with elements \code{pkgname} and \code{libname} if \code{info=TRUE}. } \description{ \code{getLoadingNamespace} returns information about the loading namespace. It is a wrapper to \code{\link{loadingNamespaceInfo}}, that does not throw an error. Tests if a namespace is being loaded. \code{isNamespaceLoaded} tests if a given namespace is loaded, without loading it, contrary to \code{\link{isNamespace}}. \code{isDevNamespace} tests the -- current -- namespace is a devtools namespace. Dynamically adds exported objects into the loading namespace. \code{ns_get} gets an object from a given namespace. } pkgmaker/man/utestPath.Rd0000644000176000001440000000074512330274520015132 0ustar ripleyusers\name{utestPath} \alias{utestPath} \title{Unit Tests Result Directory} \usage{ utestPath(...) } \arguments{ \item{...}{extra arguments passed to \code{\link{packagePath}}, e.g., \code{package}.} } \description{ Returns the path to the directory where the results of unit tests are stored. This path is used by \code{\link{utest}} to save unit test results, which are read by \code{\link{makeUnitVignette}} to update the unit test vignette when runnning R CMD check. } pkgmaker/man/writeUnitVignette.Rd0000644000176000001440000000122212330274520016640 0ustar ripleyusers\name{writeUnitVignette} \alias{writeUnitVignette} \title{Writes Unit Tests Vignette} \usage{ writeUnitVignette(pkg, file, results = NULL, check = FALSE) } \arguments{ \item{pkg}{Package name} \item{file}{Output Sweave (.Rnw) file} \item{results}{result file or output character vector} \item{check}{logical that indactes the cal was made from R CMD check, in which case the vignette is updated only if results of unit tests can be found in the unit test output directory, where they would have been generated by \code{\link{utest}}.} } \description{ Writes a vignette that contains the results from running unit test suites. } pkgmaker/man/Rversion.Rd0000644000176000001440000000037012330274520014752 0ustar ripleyusers\name{Rversion} \alias{Rversion} \title{Complete R version} \usage{ Rversion() } \description{ Returns the complete R version, e.g. 2.15.0 } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } Rversion() } pkgmaker/man/mirrors.Rd0000644000176000001440000000304112330274520014636 0ustar ripleyusers\docType{data} \name{setBiocMirror} \alias{CRAN} \alias{getBiocMirror} \alias{getBiocRepos} \alias{setBiocMirror} \alias{setCRANMirror} \title{Setting Mirrors and Repositories} \format{chr "http://cran.r-project.org"} \usage{ setBiocMirror(url = "http://www.bioconductor.org", version = NULL, unique = TRUE) getBiocMirror() getBiocRepos(url = "http://www.bioconductor.org", version = NULL) setCRANMirror(url = CRAN, unique = TRUE) CRAN } \arguments{ \item{url}{or Bioconductor mirror url} \item{version}{version number} \item{unique}{logical that indicate if duplicated urls or names should be removed.} } \description{ \code{setBiocMirror} sets all Bioconductor repositories (software, data, annotation, etc.). so that they are directly available to \code{\link{install.packages}}. It differs from \code{\link{chooseBioCmirror}} in that it effectively enables the repositories. \code{getBiocMirror} is a shortcut for \code{getOption('BioC_mirror')}, which returns the current Bioconductor mirror as used by \code{biocLite}. \code{getBiocRepos} returns urls to all Bioconductor repositories on a given mirror. \code{setCRANMirror} sets the preferred CRAN mirror. \code{CRAN} simply contains the url of CRAN main mirror (\url{http://cran.r-project.org}), and aims at simplifying its use, e.g., in calls to \code{\link{install.packages}}. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } \dontrun{ install.packages('pkgmaker', repos=CRAN) } } \keyword{datasets} pkgmaker/man/cgetAnywhere.Rd0000644000176000001440000000036212330274520015571 0ustar ripleyusers\name{cgetAnywhere} \alias{cgetAnywhere} \title{Get Anywhere} \usage{ cgetAnywhere(x) } \arguments{ \item{x}{a single character string} } \description{ Similar to \code{\link{getAnywhere}}, but looks for the value of its argument. } pkgmaker/man/packageReference.Rd0000644000176000001440000000117412330274520016360 0ustar ripleyusers\name{packageReference} \alias{packageReference} \title{Package References} \usage{ packageReference(key, short = FALSE) } \arguments{ \item{key}{character vector of BibTex keys} \item{short}{logical that indicates if the reference should be shorten as First Author et al. if it has more than one author.} } \value{ a character string containing the text formated BibTex entries } \description{ Create a citation string from package specific BibTex entries, suitable to be used in Rd files. The entries are looked in a file named REFERNCES.bib in the package's root directory (i.e. inst/ in development mode). } pkgmaker/man/graphics-utils.Rd0000644000176000001440000000100312330274520016073 0ustar ripleyusers\name{graphics-utils} \alias{graphics-utils} \alias{mfrow} \title{Utility Functions for Graphics} \usage{ mfrow(n) } \arguments{ \item{n}{number of plots to be arranged.} } \description{ Utility Functions for Graphics \code{mfrow} returns a 2-long numeric vector suitable to use in \code{\link{par}(mfrow=x)}, that will arrange \code{n} panels in a single plot. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } mfrow(1) mfrow(2) mfrow(3) mfrow(4) mfrow(10) } pkgmaker/man/formals.Rd0000644000176000001440000000122612330274520014607 0ustar ripleyusers\name{extractLocalFun} \alias{allFormals} \alias{extractLocalFun} \title{Extracting Local Function Definition} \usage{ extractLocalFun(f) allFormals(f) } \arguments{ \item{f}{definition of the wrapper function} } \value{ a function a paired list like the one returned by \code{\link{formals}}. } \description{ \code{extractLocalFun} Extracts local function from wrapper functions of the following type, typically used in S4 methods: \samp{ function(a, b, ...)\{ .local <- function(a, b, c, d, ...)\{\} .local(a, b, ...) \} } Works for methods that are created (setMethod) as a wrapper function to an internal function named .local. } pkgmaker/man/utest.Rd0000644000176000001440000000331712330274520014313 0ustar ripleyusers\docType{methods} \name{utest} \alias{utest} \alias{utest,character-method} \alias{utest,function-method} \alias{utest-methods} \alias{utest,RUnitTestSuite-method} \title{Running Unit Tests} \usage{ utest(x, ...) \S4method{utest}{function}(x, run = TRUE) \S4method{utest}{character}(x, filter = "^runit.+\\\\.[rR]$", fun = "^test\\\\.", ..., testdir = "tests", framework = c("RUnit", "testthat"), quiet = Sys.getenv("RCMDCHECK") != "FALSE", lib.loc = NULL) \S4method{utest}{RUnitTestSuite}(x, ..., quiet = FALSE, outdir = NULL) } \arguments{ \item{x}{object to which a unit test is attached} \item{...}{extra arguments to allow extensions and are passed to the unit framework running funcitons.} \item{run}{a logical that indicates if the unit test should be run} \item{filter}{pattern to match files that contain the definition of the unit tests functions to run.} \item{fun}{patter to match the test functions to run.} \item{testdir}{directory where to look for the test files} \item{framework}{unit test framework} \item{quiet}{a logical that indicates if the tests should be run silently} \item{lib.loc}{path to a library where installed packages are searched for. Used is of the form \code{x='package:*'}.} \item{outdir}{output directory} } \description{ Run unit tests in a variety of settings. This is still \strong{very} experimental. } \section{Methods}{ \describe{ \item{utest}{\code{signature(x = "function")}: Run the unit test assoicated to a function. } \item{utest}{\code{signature(x = "character")}: Run a package test suite } \item{utest}{\code{signature(x = "RUnitTestSuite")}: Runs a RUnit test suite } } } \keyword{methods} pkgmaker/man/unit.test.Rd0000644000176000001440000000160312330274520015100 0ustar ripleyusers\name{unit.test} \alias{unit.test} \title{Embedded Unit Tests} \usage{ unit.test(x, expr, framework = NULL, envir = parent.frame()) } \arguments{ \item{x}{single character string used as test identifier/label} \item{expr}{expression containing the actual test commands. It is not evaluated, but only stored in the package namespace.} \item{framework}{Unit test framework} \item{envir}{the definition environment of object \code{x}.} } \value{ a test function with no arguments that wrapping around \code{expr} } \description{ The function \code{unit.test} provides a way to write unit tests embedded within package source files. These tests are stored and organised in the package namespace, and can be run using the unified interface provided by the function \code{link{utest}}. Both Runit and testthat tests are supported -- and automatically detected. } pkgmaker/man/latex.Rd0000644000176000001440000000376612330274520014274 0ustar ripleyusers\name{latex_preamble} \alias{latex_bibliography} \alias{latex_preamble} \title{LaTeX Utilities for Vignettes} \usage{ latex_preamble(PACKAGE, R = TRUE, CRAN = TRUE, Bioconductor = TRUE, GEO = TRUE, ArrayExpress = TRUE, biblatex = FALSE, only = FALSE, file = "") latex_bibliography(PACKAGE, file = "") } \arguments{ \item{R}{logical that indicate if general R commands should be added (e.g. package names, inline R code format commands)} \item{CRAN}{logical that indicate if general CRAN commands should be added (e.g. CRAN package citations)} \item{Bioconductor}{logical that indicate if general Bioconductor commands should be added (e.g. Bioc package citations)} \item{GEO}{logical that indicate if general GEOmnibus commands should be added (e.g. urls to GEO datasets)} \item{ArrayExpress}{logical that indicate if general ArrayExpress commands should be added (e.g. urls to ArrayExpress datasets)} \item{biblatex}{logical that indicates if a \code{\\bibliography} command should be added to include references from the package's REFERENCES.bib file.} \item{only}{a logical that indicates if the only the commands whose dedicated argument is not missing should be considered.} \item{file}{connection where to print. If \code{NULL} the result is returned silently.} \item{PACKAGE}{package name} } \description{ \code{latex_preamble} outputs/returns command definition LaTeX commands to be put in the preamble of vignettes. \code{latex_bibliography} prints or return a LaTeX command that includes a package bibliography file if it exists. } \details{ Argument \code{PACKAGE} is not required for \code{latex_preamble}, but must be correctly specified to ensure \code{biblatex=TRUE} generates the correct bibliography command. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } latex_preamble() latex_preamble(R=TRUE, only=TRUE) latex_preamble(R=FALSE, CRAN=FALSE, GEO=FALSE) latex_preamble(GEO=TRUE, only=TRUE) } pkgmaker/man/require.quiet.Rd0000644000176000001440000000112212330274520015741 0ustar ripleyusers\name{require.quiet} \alias{require.quiet} \title{Silent Require} \usage{ require.quiet(package, character.only = FALSE, ...) } \arguments{ \item{...}{extra arguments passed to \code{\link{require}}.} \item{package}{the name of a package, given as a \link{name} or literal character string, or a character string, depending on whether \code{character.only} is \code{FALSE} (default) or \code{TRUE}).} \item{character.only}{a logical indicating whether \code{package} or \code{help} can be assumed to be character strings.} } \description{ Silently require a package. } pkgmaker/man/options.Rd0000644000176000001440000000362712330274520014646 0ustar ripleyusers\name{option_symlink} \alias{as.package_options} \alias{is_option_symlink} \alias{listPackageOptions} \alias{option_symlink} \alias{option_symlink_target} \alias{[[.package_options} \alias{packageOptions} \title{\code{option_symlink} creates a symbolic link to option \code{x}.} \usage{ option_symlink(x) is_option_symlink(x, opts) option_symlink_target(x, opts) as.package_options(..., defaults = NULL) \method{[[}{package_options} (x, ...) packageOptions(..., PACKAGE = packageName()) listPackageOptions() } \arguments{ \item{opts}{a list of options} \item{x}{a character string, a list or an object of class \code{package_options}.} \item{defaults}{\code{NULL} or a list of default options with their values.} \item{...}{arguments passed to \code{getOption} (only first one is used).} \item{PACKAGE}{a package name} } \value{ a character vector (possibly empty). } \description{ \code{option_symlink} creates a symbolic link to option \code{x}. \code{is_option_symlink} tests if \code{x} is a symbolic link option. \code{option_symlink_target} returns the end target option of a symbolic link option \code{x}. \code{as.package_options} creates an object such as the ones used to stores package specific options. The method \code{[[} is equivalent to \code{options()} or \code{getOption(...)}: e.g. \code{obj[[]]} returns the list of options defined in \code{obj}, and \code{obj[['abc']]} returns the value of option \code{'abc'}. \code{packageOptions} provides access to package specific options from a given package that were defined with \code{setupPackageOptions}, and behaves as the base function \code{\link[base]{options}}. \code{listPackageOptions} returns the names of all option currently defined with \code{setupPackageOptions}. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } listPackageOptions() } pkgmaker/man/orderVersion.Rd0000644000176000001440000000127212330274520015626 0ustar ripleyusers\name{orderVersion} \alias{orderVersion} \alias{sortVersion} \title{Ordering Version Numbers} \usage{ orderVersion(x, decreasing = FALSE) sortVersion(x, ...) } \arguments{ \item{x}{a character vector of version numbers} \item{decreasing}{a logical that indicates if the ordering should be decreasing} \item{...}{extra parameters passed to \code{orderVersion}} } \description{ Orders a vector of version numbers, in natural order. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # orderVersion #---------- v <- c('1.0', '1.03', '1.2') order(v) orderVersion(v) #---------- # sortVersion #---------- sort(v) sortVersion(v) } pkgmaker/man/libutils.Rd0000644000176000001440000000151212330274520014771 0ustar ripleyusers\name{list.libs} \alias{libname} \alias{list.libs} \title{Library Files Utilities} \usage{ list.libs(dir, ..., all.platforms = FALSE) libname(x) } \arguments{ \item{dir}{directory} \item{all.platforms}{a logical that indicates whether to list library files for the current platform only (default) or all platforms (Unix, Windows, Mac).} \item{...}{extra arguments passed to \code{\link{list.files}}.} \item{x}{a filename} } \value{ a character vector } \description{ Lists binary library files in a directory \code{libname} extracts library names from a path, removing the directory part of the path, as well as the platform specific library extension. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } libname('mylib.so') libname('/some/path/somewhere/mylib.dll') } pkgmaker/man/Sys.getenv_value.Rd0000644000176000001440000000165212330274520016410 0ustar ripleyusers\name{Sys.getenv_value} \alias{Sys.getenv_value} \title{System Environment Variables} \usage{ Sys.getenv_value(name, raw = FALSE) } \arguments{ \item{name}{variable name as a character string.} \item{raw}{logical that indicates if one should return the raw value or the convertion of any false value to \code{FALSE}.} } \value{ the value of the environment variable as a character string or \code{NA} is the variable is not defined \strong{at all}. } \description{ System Environment Variables } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # undefined returns FALSE Sys.getenv_value('TOTO') # raw undefined returns NA Sys.getenv_value('TOTO', raw = TRUE) Sys.setenv(TOTO='bla') Sys.getenv_value('TOTO') # anything false-like returns FALSE Sys.setenv(TOTO='false'); Sys.getenv_value('TOTO') Sys.setenv(TOTO='0'); Sys.getenv_value('TOTO') # cleanup Sys.unsetenv('TOTO') } pkgmaker/man/isCRANcheck.Rd0000644000176000001440000000436512334643662015243 0ustar ripleyusers\name{isCRANcheck} \alias{isCHECK} \alias{isCRANcheck} \alias{isCRAN_timing} \title{Package Check Utils} \usage{ isCRANcheck(...) isCRAN_timing() isCHECK() } \arguments{ \item{...}{each argument specifies a set of tests to do using an AND operator. The final result tests if any of the test set is true. Possible values are: \describe{ \item{\code{'timing'}}{Check if the environment variable \code{_R_CHECK_TIMINGS_} is set, as with the flag \code{'--timing'} was set.} \item{\code{'cran'}}{Check if the environment variable \code{_R_CHECK_CRAN_INCOMING_} is set, as with the flag \code{'--as-cran'} was set.} }} } \description{ \code{isCRANcheck} \strong{tries} to identify if one is running CRAN-like checks. \code{isCRAN_timing} tells if one is running CRAN check with flag \code{'--timing'}. Currently, \code{isCHECK} checks both CRAN expected flags, the value of environment variable \code{_R_CHECK_RUNNING_UTESTS_}, and the value of option \code{R_CHECK_RUNNING_EXAMPLES_}. It will return \code{TRUE} if any of these environment variables is set to anything not equivalent to \code{FALSE}, or if the option is \code{TRUE}. For example, the function \code{\link{utest}} sets it to the name of the package being checked (\code{_R_CHECK_RUNNING_UTESTS_=}), but unit tests run as part of unit tests vignettes are run with \code{_R_CHECK_RUNNING_UTESTS_=FALSE}, so that all tests are run and reported when generating them. } \details{ Currently \code{isCRANcheck} returns \code{TRUE} if the check is run with either environment variable \code{_R_CHECK_TIMINGS_} (as set by flag \code{'--timings'}) or \code{_R_CHECK_CRAN_INCOMINGS_} (as set by flag \code{'--as-cran'}). \strong{Important:} the checks performed on CRAN check machines are -- on purpose -- not always run with such flags, so there is no guarantee this function effectively identifies such runs. CRAN recommends users rely on custom dedicated environment variables to enable specific tests or examples. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } isCHECK() } \references{ Adapted from the function \code{CRAN} in the \pkg{fda} package. \url{https://github.com/renozao/roxygen2} } pkgmaker/man/packageExtra.Rd0000644000176000001440000000726212330274520015551 0ustar ripleyusers\name{setPackageExtraHandler} \alias{install.extrapackages} \alias{install.extras} \alias{packageExtra} \alias{packageExtraHandler} \alias{packageExtraRunner} \alias{setPackageExtra} \alias{setPackageExtraHandler} \title{Install/Run Extra Things After Standard Package Installation} \usage{ setPackageExtraHandler(handler, fun, ...) packageExtraHandler(handler = NULL, ...) setPackageExtra(handler, extra, ...) packageExtra(handler = NULL, extra = NULL, package = NULL, .wrap = FALSE) packageExtraRunner(handler) install.extras(package, extra = NULL, handler = NULL, ..., .verbose = getOption("verbose")) install.extrapackages(package, extra = NULL, handler = NULL, ..., .verbose = getOption("verbose")) } \arguments{ \item{handler}{name of a handler, e.g, \code{'install'}. It must be unique across all handlers registered by any other packages.} \item{fun}{handler function that will be called with the arguments registered with \code{packageExtra(name, ...)}} \item{package}{package name where to store/look for the internal registries. End users should not need to use this argument.} \item{...}{extra arguments passed to internal function calls. In \code{packageExtraHandler}, these are passed to \code{\link{pkgreg_fetch}}. In \code{setPackageExtra}, these define default arguments for the handler function. These are overwritten by arguments in the call to runner function if any.} \item{extra}{name of the extra action.} \item{.wrap}{logical that indicates if a function that runs the extra action should be returned or only the default arguments} \item{.verbose}{logical that indicates if verbose messages about the extra actions being run should be displayed.} } \value{ the runner function associated with the newly registered handler, as built by \code{packageExtraRunner}. } \description{ These functions define a framework to register actions for which default sets of arguments can be defined when (lazy-)loading a package, and run later on, e.g., after the package is installed using dedicated commands. \code{setPackageExtraHandler} defines main action handler functions, for which actions are defined as a set of arguments and registered using \code{setPackageExtra}. \code{packageExtraHandler} retrieves a given handler from the registry. For example, calling \code{setPackageExtra('install', pkgs='non_CRAN_pkg', repos='http://non-standard-repo')} in a source file of package 'myPkg' registers the call \code{install.packages('non_CRAN_pkg', repos='http://non-standard-repo', ...)} in a registry internal to the package. All calls to \code{setPackageExtra('install', ...)} can then be run by the user, as a post installation step via \code{install.extrapackages('myPkg', ..)}. \code{packageExtra} retrieve a given extra action, either as its registry entry, or as a function that would perform the given action. \code{packageExtraRunner} defines a function to run all or some of the actions registered for a given handler in a given package. For example, the function \code{install.extrapackages} is the runner defined for the extra handler \code{'install'} via \code{packageExtraRunner('install')}. \code{install.extrapackages} runs all extra actions registered for a given package. \code{install.extrapackages} is defined as the extra handler for the extra action handler \code{'install.packages'}. All arguments in \code{...} are passed to \code{\link{install.packages}}. By default, packages that are already installed are not re-installed. An extra argument \code{force} allows to force their installation. The packages are loaded if their installation is successful. } pkgmaker/man/quickinstall.Rd0000644000176000001440000000236712330274520015656 0ustar ripleyusers\name{quickinstall} \alias{quickinstall} \title{Quick Installation of a Source Package} \usage{ quickinstall(path, destdir = NULL, vignettes = FALSE, force = TRUE, ..., lib.loc = if (!is.null(destdir)) TRUE) } \arguments{ \item{path}{path to the package source directory} \item{destdir}{installation directory. If \code{NULL}, the package is installed in the default installation library. If \code{NA}, the package is installed in a temporary directory, whose path is returned as a value.} \item{vignettes}{logical that indicates if the vignettes should be rebuilt and installed.} \item{force}{logical that indicates if the package should be installed even if a previous installation exists in the installation library.} \item{...}{extra arguments passed to \code{\link{R.CMD}}} \item{lib.loc}{library specification. If \code{TRUE} then the installation directory \code{destdir} is added to the default library paths. This can be usefull if dependencies are installed in this directory. If \code{NULL}, then the default library path is left unchanged.} } \value{ The path of the library where the package was installed. } \description{ Builds and install a minimal version of a package from its source directory. } pkgmaker/man/sVariable.Rd0000644000176000001440000000075612330274520015063 0ustar ripleyusers\name{sVariable} \alias{sVariable} \title{Global Static Variable} \usage{ sVariable(default = NULL) } \arguments{ \item{default}{default value for the static variable.} } \description{ \code{sVariable} defines a function that acts as a global static variable. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # define variable x <- sVariable(1) # get value (default) x() # set new value: return old value old <- x(3) old # get new value x() } pkgmaker/man/simpleRegistry.Rd0000644000176000001440000000100412330274520016160 0ustar ripleyusers\name{simpleRegistry} \alias{simpleRegistry} \title{Simple Package Registry} \usage{ simpleRegistry(name, envir = topenv(parent.frame()), verbose = FALSE) } \arguments{ \item{name}{name of the registry object, with which it will be assigned in \code{envir}.} \item{envir}{environment where to store the registry object. Defaults to the caller's top environment.} \item{verbose}{logical that toggle a verbose message when the object is first created.} } \description{ Simple Package Registry } pkgmaker/man/dot-packageMetaRegistry.Rd0000644000176000001440000000054512330274520017666 0ustar ripleyusers\name{.packageMetaRegistry} \alias{.packageMetaRegistry} \title{Creates or Retrieves a Package Meta Registry} \usage{ .packageMetaRegistry(package, quiet = FALSE, create = FALSE) } \description{ This function is used in \code{\link{setPackageRegistry}} and \code{\link{packageRegistry}} to create or query meta registries. } \keyword{internal} pkgmaker/man/setClassRegistry.Rd0000644000176000001440000000056412330274520016462 0ustar ripleyusers\name{setClassRegistry} \alias{setClassRegistry} \title{Automatic S4 Class for Registry Entries} \usage{ setClassRegistry(registry, Class, ...) } \arguments{ \item{registry}{a registry object} \item{Class}{name of the class to generate} \item{...}{extra arguments passed to \code{\link{setClass}}.} } \description{ Automatic S4 Class for Registry Entries } pkgmaker/man/addToLogger.Rd0000644000176000001440000000154212330274520015340 0ustar ripleyusers\name{addToLogger} \alias{addToLogger} \title{Enhancing RUnit Logger} \usage{ addToLogger(name, value, logger = NULL) } \arguments{ \item{name}{name of the function or variable to add} \item{value}{object to append to the logger. If \code{value} is a function it is added to the list and is accessible via \code{.testLogger$name}. If \code{value} is a variable it is added to the local environment and is therefore accessible in all logging functions.} \item{logger}{an optional RUnit logger object. If missing or \code{NULL}, the object \code{.testLogger} is searched in \code{.GlobalEnv} -- and an error is thrown if it does not exist.} } \value{ the modified logger object. Note that the global object is also modified if \code{logger} is \code{NULL}. } \description{ Adds a function or a local variable to RUnit global logger. } pkgmaker/man/registry.Rd0000644000176000001440000001141112330274520015011 0ustar ripleyusers\name{packageRegistry} \alias{hasPackageRegistry} \alias{packageRegistries} \alias{packageRegistry} \alias{setPackageRegistry} \alias{setPackageRegistryEntry} \title{Package Registry} \usage{ packageRegistry(regname = NULL, quiet = FALSE, entry = FALSE, update = !entry, package = topenv(parent.frame())) packageRegistries(regname = NULL, package = NULL, primary = FALSE) hasPackageRegistry(regname = NULL, package) setPackageRegistry(regname, regobj, description = "", entrydesc = NA, ..., package = topenv(parent.frame()), overwrite = FALSE) setPackageRegistryEntry(regname, key, ..., overwrite = FALSE, verbose = FALSE, where = topenv(parent.frame()), msg = NULL) } \arguments{ \item{regname}{Name of a sub-registry, used as its identifier.} \item{quiet}{a logical that indicates that one should return the (meta-)registry if it exists, or \code{NULL} otherwise, without throwing any error.} \item{entry}{logical that indicates if the corresponding meta registry entry should be directly returned, without any other processing.} \item{update}{logical that indicates if the package registry should be updated, by adding/removing entries from other loaded/unloaded packages.} \item{package}{package where to store or look for the registry.} \item{primary}{logical that indicates if only primary registries should be listed.} \item{regobj}{a \code{\link[registry:regobj]{registry}} object or a single character string that indicates the class of the objects that are stored in the sub-registry. See details for the list of the sub-registry's fields in this latter case.} \item{description}{short description line about the registry. It is recommended to provide such description as it makes clearer the purpose of the registry. This description is shown when the registry object is printed/formated/listed.} \item{entrydesc}{human readable description that is used in log messages when registering/removing entries.} \item{...}{named values used to set extra information about the new registry, that are stored in the corresponding fields of the meta-registry. Currently not used, as no extra field other than \code{'description'} is defined.} \item{overwrite}{a logical that indicate if an existing registry with the same should be overwritten if it exists.} \item{key}{entry identifier.} \item{where}{package name or namespace that owns the registry.} \item{verbose}{a logical that indicates if verbosity should be toggle on.} \item{msg}{addon message to print at the end of the output log line, when \code{verbose=TRUE}.} } \value{ a \code{\link[registry:regobj]{registry}} object or \code{NULL} (see argument \code{quiet}). } \description{ \code{packageRegistry} provides ways to create query package specific registries. \code{packageRegistries} lists registries from loaded packages. \code{hasPackageRegistry} tells if a given package has a meta-registry or a given registry. Each package sub-registry has its own set of fields. Sub-registries defined by passing a character string in argument \code{regobj} of \code{setPackageRegistry} have the following fields: \code{'key'} and \code{'object'} \code{setPackageRegistryEntry} adds an entry in a package registry. } \details{ Package registries are organised in a meta-registry (a registry of registries) within a package's namespace. Each registry can be used to store sets of built-in or user-defined objects in an organised way, e.g. algorithms or datasets. A package meta-registry is a \code{\link[registry:regobj]{registry}} object, whose entries are \code{\link[registry:regobj]{registry}} objects themselves. A sub-registry entry is defined by the following fields: \describe{ \item{key}{The sub-registry's accession key/identifier (a character string).} \item{regobj}{The sub-registry itself (a \code{registry} object)} \item{description}{Human readable description of the purpose of the registry (a character string)} \item{description}{Short human readable description of the type of entries (a character string)} \item{package}{owner package, which is forced to be the package in which the meta registry is defined.} \item{parent}{The name of the package that holds the parent registry, which we call the primary package. This field is non empty for cross-package registries, i.e. registries that derive from primary package's own registry. Their entries are defined when (lazy-)loading the dependent package's namespace.} } Note that this function cannot be called from the global environment, but from a package namespace, e.g., when a package is lazy-loaded on installation or loaded via the function \code{\link[devtools]{load_all}} from the \pkg{devtools} package. } pkgmaker/man/install.dependencies.Rd0000644000176000001440000000146312330274520017242 0ustar ripleyusers\name{install.dependencies} \alias{install.dependencies} \title{Installing All Package Dependencies} \usage{ install.dependencies(pkg = NULL, all = FALSE, ..., dryrun = FALSE) } \arguments{ \item{pkg}{package path or source file} \item{all}{logical that indicates if 'Suggests' packages should be installed.} \item{...}{extra arguments passed to \code{\link{install.packages}}.} \item{dryrun}{logical that indicates if the packages should be effectively installed or only shown.} } \description{ Install all dependencies from a package source directory or package source file. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } try( install.dependencies('Matrix', dryrun=TRUE) ) \dontrun{ install.dependencies("mypackage_1.0.tar.gz", dryrun=TRUE) } } pkgmaker/man/lverbose.Rd0000644000176000001440000000241012330274520014761 0ustar ripleyusers\name{lverbose} \alias{is.verbose} \alias{lmessage} \alias{lsilent} \alias{lverbose} \alias{vmessage} \title{Internal verbosity option} \usage{ lverbose(val) lsilent() is.verbose() vmessage(...) lmessage(..., level = 1L, appendLF = TRUE) } \arguments{ \item{val}{logical that sets the verbosity level.} \item{...}{arguments passed to \code{...} \code{\link{cat}}} \item{appendLF}{logical indicating if an endline character should be appended at the end of the message. Passed to \code{\link{cat}}.} \item{level}{verbosity level threshold (numeric value) above which the message should be printed out. This threshold is compared with the current verbosity level as returned by \code{lverbose}.} \item{...}{arguments passed to \code{...} \code{\link{lmessage}} or \code{\link{cat}}} \item{appendLF}{logical indicating if an endline character should be appended at the end of the message. Passed to \code{\link{cat}}.} } \value{ the old verbose level } \description{ Internal verbosity option Tells if all verbose messages should be Tells if verbosity is on. Prints out a message (on sdtout) if verbose mode is on. Prints out a message (on sdtout) if the verbosity level is greater than a given value. } \keyword{internal} pkgmaker/man/parsePackageCitation.Rd0000644000176000001440000000044512330274520017227 0ustar ripleyusers\name{parsePackageCitation} \alias{parsePackageCitation} \title{Formatting Package Citations in Sweave/knitr Documents} \usage{ parsePackageCitation(x) } \arguments{ \item{x}{output document, as a single string.} } \description{ Formatting Package Citations in Sweave/knitr Documents } pkgmaker/man/pkgmaker-defunct.Rd0000644000176000001440000000041112330274520016366 0ustar ripleyusers\name{pkgmaker-defunct} \alias{pkgmaker-defunct} \alias{write.bib} \title{Defunct Functions in pkgmaker} \usage{ write.bib(...) } \arguments{ \item{...}{extra arguments} } \description{ These functions have been defunct or superseded by other functions. } pkgmaker/man/load.Rd0000644000176000001440000000173012330274520014063 0ustar ripleyusers\name{onLoad} \alias{onLoad} \alias{onUnload} \title{Default Load/Unload Functions} \usage{ onLoad(libname = NULL, pkgname, chname = packageName()) onUnload(libpath) } \arguments{ \item{libname}{a character string giving the library directory where the package defining the namespace was found.} \item{pkgname}{a character string giving the name of the package.} \item{libpath}{a character string giving the complete path to the package.} \item{chname}{a character string naming a DLL (also known as a dynamic shared object or library) to load.} } \description{ Default Load/Unload Functions } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # onLoad #---------- # in a package namespace: .onLoad <- function(libname=NULL, pkgname){ pkgmaker::onLoad(libname, pkgname) } #---------- # onUnload #---------- # in a package namespace: .onUnload <- function(libpath){ pkgmaker::onUnload(libpath) } } pkgmaker/man/packageData.Rd0000644000176000001440000000216712330274520015336 0ustar ripleyusers\name{packageData} \alias{ldata} \alias{packageData} \title{Loading Package Data} \usage{ packageData(list, envir = .GlobalEnv, ...) ldata(list, ...) } \arguments{ \item{list}{character vector containing the names of the data to load.} \item{...}{other arguments eventually passed to \code{\link[utils]{data}}.} \item{envir}{the \link{environment} where the data should be loaded.} } \value{ the loaded data. } \description{ Loads package data using \code{\link[utils]{data}}, but allows the user to avoid NOTEs for a \sQuote{non visible binding variable} to be thrown when checking a package. This is possible because this function returns the loaded data. \code{ldata} loads a package data in the parent frame. It is a shortcut for \code{packageData(list, ..., envir=parent.frame())}. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # packageData #---------- \dontrun{ mydata <- packageData('mydata') } #---------- # ldata #---------- \dontrun{ # in a package' source => won't issue a NOTE myfunction function(){ mydata <- ldata('mydata') } } } pkgmaker/man/is_something.Rd0000644000176000001440000000242212330274520015633 0ustar ripleyusers\name{is_something} \alias{hasNames} \alias{is.dir} \alias{isFALSE} \alias{is.file} \alias{isInteger} \alias{is_NA} \alias{isNumber} \alias{isReal} \alias{is_something} \alias{isString} \title{Testing Object Type} \usage{ is_NA(x) isFALSE(x) isNumber(x) isReal(x) isInteger(x) isString(x, y, ignore.case = FALSE) is.dir(x) is.file(x) hasNames(x, all = FALSE) } \arguments{ \item{x}{an R object} \item{y}{character string to compare with.} \item{ignore.case}{logical that indicates if the comparison should be case sensistive.} \item{all}{logical that indicates if the object needs all names non empty} } \value{ \code{TRUE} or \code{FALSE} } \description{ Testing Object Type \code{is_NA} tests if a variable is exactly NA (logical, character, numeric or integer) \code{isFALSE} Tests if a variable is exactly FALSE. \code{isNumber} tests if a variable is a single number \code{isReal} tests if a variable is a single real number \code{isInteger} tests if an object is a single integer \code{isString} tests if an object is a character string. \code{is.dir} tests if a filename is a directory. \code{is.file} tests if a filename is a file. \code{hasNames} tests if an object has names. } \seealso{ \code{\link{isTRUE}} } pkgmaker/man/source_files.Rd0000644000176000001440000000066412330274520015633 0ustar ripleyusers\name{source_files} \alias{source_files} \title{Source Multiple Files} \usage{ source_files(x, pattern = NULL, ...) } \arguments{ \item{x}{character vector containing filenames} \item{...}{extra arguments passed to \code{\link{source}}.} \item{pattern}{an optional \link{regular expression}. Only file names which match the regular expression will be returned.} } \description{ Vectorised version of \code{source}. } pkgmaker/man/CLIArgumentParser.Rd0000644000176000001440000000227212330274520016435 0ustar ripleyusers\name{CLIArgumentParser} \alias{CLIArgumentParser} \alias{parseCMD} \title{Enhanced Command Line Argument Parser} \usage{ CLIArgumentParser(prog = CLIfile(), description = "", ..., epilog = "", show.defaults = TRUE) parseCMD(parser, ARGS = commandArgs(TRUE), debug = FALSE, envir = parent.frame()) } \arguments{ \item{prog}{program name} \item{description}{program description} \item{...}{extra arguments passed to \code{\link[argparse]{ArgumentParser}}.} \item{epilog}{epilog messages to display at the end of the man pages} \item{show.defaults}{logical that indicates if default arugment values should be displayed.} \item{parser}{parser object as returned by \code{CLIArgumentParser}.} \item{ARGS}{command line argument to parse, as a named list or a character string.} \item{debug}{logical that indicate if debugging information should be printed.} \item{envir}{environment that contains where the sub-command functions are looked for.} } \description{ Extends the capabilities of package \pkg{argparse}, e.g., in defining sub commands. \code{parseCMD} parse command line arguments for sub-commands, and dispatch to the associated function. } pkgmaker/man/exitCheck.Rd0000644000176000001440000000176412330274520015062 0ustar ripleyusers\name{exitCheck} \alias{exitCheck} \title{Exit Error Checks} \usage{ exitCheck() } \description{ \code{exitCheck} provides a mechanism to distinguish the exit status in \code{\link{on.exit}} expressions. } \details{ It generates a function that is used wihtin a function's body to "flag" normal exits and in its \code{\link{on.exit}} expression to check the exit status of a function. Note that it will correctly detect errors only if all normal exit are wrapped into a call to it. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # define some function f <- function(err){ # initialise an error checker success <- exitCheck() # do something on exit that depends on the error status on.exit({ if(success()) cat("Exit with no error: do nothing\\n") else cat("Exit with error: cleaning up the mess ...\\n") }) # throw an error here if( err ) stop('There is an error') success(1+1) } # without error f(FALSE) # with error try( f(TRUE) ) } pkgmaker/man/uchecks.Rd0000644000176000001440000000161312330274520014571 0ustar ripleyusers\name{checkWarning} \alias{checkWarning} \title{Extra Check Functions for RUnit} \usage{ checkWarning(expr, expected = TRUE, msg = NULL) } \arguments{ \item{expr}{an R expression} \item{expected}{expected value as regular expression pattern. If a logical, then it specifies if a warning is expected or not. For backward compatibility, a \code{NULL} value is equivalent to \code{TRUE}.} \item{msg}{informative message to add to the error in case of failure} } \description{ \code{checkWarning} checks if a warning is generated by an expression, and optionally follows an expected regular expression pattern. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # check warnings checkWarning({ warning('ah ah'); 3}) checkWarning({ warning('ah oh ah'); 3}, 'oh') try( checkWarning(3) ) try( checkWarning({ warning('ah ah'); 3}, 'warn you') ) } pkgmaker/man/packageTestEnv.Rd0000644000176000001440000000051612330274520016051 0ustar ripleyusers\name{packageTestEnv} \alias{packageTestEnv} \title{Returns the package internal environment where unit tests are stored.} \usage{ packageTestEnv(pkg) } \arguments{ \item{pkg}{package name. If missing the caller's package is assumed.} } \description{ Returns the package internal environment where unit tests are stored. } pkgmaker/man/regfetch.Rd0000644000176000001440000000355612330274520014743 0ustar ripleyusers\name{regfetch} \alias{pkgreg_fetch} \alias{pkgreg_remove} \alias{regfetch} \title{Finds an entry in a registry.} \usage{ regfetch(regobj, ..., all = FALSE, error = TRUE, exact = FALSE, KEYS = NULL, verbose = FALSE, entry = FALSE, msg = NULL) pkgreg_fetch(regname, ..., msg = NULL, where = topenv(parent.frame())) pkgreg_remove(regname, ..., msg = NULL, where = topenv(parent.frame()), quiet = FALSE) } \arguments{ \item{regobj}{a registry object} \item{...}{key value(s) to look up. If multiple indexes are used, then the primary key should come first.} \item{all}{logical to indicate if hidden keys (starting with a '.') should be returned and output in message.} \item{error}{a logical that indicates if an error should be thrown if the key has no match or multiple matches} \item{exact}{a logical that indicates if matching should be exact or partial. Note that if exact matches exist then they are returned, independently of the value of \code{exact}.} \item{KEYS}{alternative way of passing the key value(s). If not missing, then arguments in \code{...} are discarded.} \item{verbose}{a logical that indicates if verbosity should be toggle on} \item{entry}{a logical that indicates if the} \item{msg}{a header to use in case of error.} \item{quiet}{a logical that indicates if the operation should be performed quietly, without throwing errors or warnings.} \item{regname}{Name of a sub-registry, used as its identifier.} \item{where}{package name or namespace that owns the registry.} } \description{ This function provides extra control on how entries are queried from a \code{\link[registry:regobj]{registry}} object. \code{pkgreg_fetch} loads the requested package registry and uses \code{regfetch} to retrieve data from it. \code{pkgreg_remove} removes an entry from a package registry. } pkgmaker/man/str_diff.Rd0000644000176000001440000000124212330274520014742 0ustar ripleyusers\name{str_diff} \alias{str_diff} \title{Finding Differences Between Strings} \usage{ str_diff(x, y) } \arguments{ \item{x}{a single string} \item{y}{a single string} } \value{ an integer vector containing the index of all mis-matched characters in the first string. } \description{ Computes which characters differ between two strings. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # strings to compare x <- "once upon a time" y <- "once upon a time there was" z <- "once upon two times" # diff: x - y d <- str_diff(x, y) d str(d) # other comparisons str_diff(y, x) str_diff(x, x) str_diff(x, z) str_diff(y, z) } pkgmaker/man/ExposeAttribute.Rd0000644000176000001440000000372512330274520016301 0ustar ripleyusers\name{ExposeAttribute} \alias{attr_mode} \alias{attr_mode<-} \alias{ExposeAttribute} \title{Exposing Object Attributes} \usage{ ExposeAttribute(object, ..., .MODE = "rw", .VALUE = FALSE) attr_mode(x) attr_mode(x)<-value } \arguments{ \item{object}{any R object whose attributes need to be exposed} \item{...}{attributes, and optionally their respective values or access permissions. See argument \code{value} of \code{attr_mode} for details on the way of specifying these.} \item{.MODE}{access mode: \describe{ \item{\dQuote{r}:}{ (read-only) only method \code{$} is defined} \item{\dQuote{w}:}{ (write-only) only method \code{$<-} is defined} \item{\dQuote{rw}:}{ (read-write) both methods \code{$} and \code{$<-} are defined} }} \item{.VALUE}{logical that indicates if the values of named arguments in \code{...} should be considered as attribute assignments, i.e. that the result object has these attributes set with the specified values. In this case all these attributes will have the access permission as defined by argument \code{.MODE}.} \item{x}{an \code{ExposeAttribute} object} \item{value}{replacement value for mode. It can be \code{NULL} to remove the ExposeAttribute wrapper, a single character string to define a permission for all atributes (e.g., \code{'rw'} or \code{'r'}), or a list specifying access permission for specific attributes or classes of attributes defined by regular expressions. For example, \code{list(a='r', b='w', `blabla.*`='rw')} set attribute \code{'a'} as read-only, attribute \code{'b'} as write-only, all attributes that start with \code{'blabla'} in read-write access.} } \description{ The function \code{ExposeAttribute} creates an S3 object that exposes all attributes of any R object, by making them accessible via methods \code{\link{$}} and/or \code{\link{$<-}}. \code{attr_mode} and \code{attr_mode<-} get and sets the access mode of \code{ExposeAttribute} objects. } pkgmaker/man/makeFakeVignette.Rd0000644000176000001440000000050512330274520016355 0ustar ripleyusers\name{makeFakeVignette} \alias{makeFakeVignette} \title{Generate a Fake Vignette} \usage{ makeFakeVignette(src, out, PACKAGE = NULL) } \arguments{ \item{src}{original Sweave file} \item{out}{output file} \item{PACKAGE}{package name where to look the source vignette} } \description{ Generate a Fake Vignette } pkgmaker/man/write.pkgbib.Rd0000644000176000001440000000444112330274520015535 0ustar ripleyusers\encoding{utf8} \name{write.pkgbib} \alias{write.pkgbib} \title{Generate a Bibtex File from Package Citations} \usage{ write.pkgbib(entry = NULL, file = "Rpackages.bib", prefix = "", append = FALSE, verbose = TRUE) } \arguments{ \item{entry}{a \code{\link{bibentry}} object or a character vector of package names. If \code{NULL}, then the list of all installed packages is used.} \item{file}{output Bibtex file. It can be specified as a filename (as a single character string), NULL for \code{stdout}, or a \code{link{connection}} object. If \code{file} is a character string, an extension '.bib' is appended if not already present.} \item{prefix}{character string to prepend to the generated packages' Bibtex key.} \item{append}{a logical that indicates that the Bibtex entries should be added to the file. If \code{FALSE} (default), the file is overwritten.} \item{verbose}{a logical to toggle verbosity. If \code{file=NULL}, verbosity is forced off.} } \value{ the list of Bibtex objects -- invisibly. } \description{ Generates a Bibtex file from a list of packages or all the installed packages. It is useful for adding relevant citations in Sweave documents. } \details{ Multiple citations are handled by adding a numeric suffix to the Bibtex key (other than the first/main citation) as \code{"\%i"} (e.g. pkg, pkg2, pkg3). This function has now been integrated by Romain François in the bibtex package. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } write.pkgbib(c('bibtex', 'utils', 'tools'), file='references') bibs <- bibtex::read.bib('references.bib') write.pkgbib(bibs, 'references2.bib') md5 <- tools::md5sum(c('references.bib', 'references2.bib')) md5[1] == md5[2] \dontshow{ stopifnot(md5[1] == md5[2]) } # write to stdout() write.pkgbib(c('bibtex', 'utils', 'tools'), file=NULL) # clean up unlink(c('references.bib', 'references2.bib')) } \author{ Renaud Gaujoux, based on the function \code{Rpackages.bib} from Achim Zeileis (see \emph{References}). } \references{ \emph{[R] Creating bibtex file of all installed packages?} Achim Zeileis. R-help mailing list. \url{https://stat.ethz.ch/pipermail/r-help/2009-December/222201.html} } \seealso{ \code{link{connection}}, \code{link{bibentry}} } pkgmaker/man/R.exec.Rd0000644000176000001440000000135312330274520014271 0ustar ripleyusers\name{R.exec} \alias{R.CMD} \alias{R.exec} \alias{R.SHLIB} \title{Executing R Commands} \usage{ R.exec(..., lib.loc = NULL) R.CMD(cmd, ...) R.SHLIB(libname, ...) } \arguments{ \item{...}{extra arguments that are concatenated and appended to the command.} \item{lib.loc}{logical that indicates if the current library locations should be used. If a character vector, then it is used as the library path specification.} \item{cmd}{command to run, e.g. \sQuote{check} or \sQuote{INSTALL}.} \item{libname}{name of the output compiled library} } \description{ \code{R.exec} executes a single R command via \code{\link{system2}}. \code{R.CMD} executes R CMD commands. \code{R.SHLIB} executes R CMD SHLIB commands. } pkgmaker/man/hasEnvar.Rd0000644000176000001440000000057312330274520014717 0ustar ripleyusers\name{hasEnvar} \alias{hasEnvar} \title{Check Environment Variables} \usage{ hasEnvar(x) } \arguments{ \item{x}{environment variable name, as a character vector.} } \description{ Tells if some environment variable(s) are defined. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } hasEnvar('_R_CHECK_TIMINGS_') hasEnvar('ABCD') } pkgmaker/man/packageDependencies.Rd0000644000176000001440000000132712330274520017050 0ustar ripleyusers\name{packageDependencies} \alias{packageDependencies} \title{List Package Dependencies} \usage{ packageDependencies(x, all = TRUE, as.list = FALSE, available = NULL) } \arguments{ \item{x}{path to package source directory or file.} \item{all}{logical that indicates if all dependencies should be returned, or only the required ones.} \item{as.list}{logical that indicates if the result should be a list with one element per type of dependency.} \item{available}{a matrix of available packages (as returned by \code{\link{available.packages}}), from which the dependencies are retrieved. This means that there must be a row for the package \code{x}.} } \description{ List Package Dependencies } pkgmaker/man/expand_list.Rd0000644000176000001440000000412212330274520015454 0ustar ripleyusers\name{expand_list} \alias{expand_dots} \alias{expand_list} \title{Expanding Lists} \usage{ expand_list(x, ..., .exact = TRUE, .names = !.exact) expand_dots(..., .exclude = NULL) } \arguments{ \item{x}{input list} \item{...}{extra named arguments defining the default items. A list of default values can also be passed as a a single unnamed argument.} \item{.exact}{logical that indicates if the names in \code{x} should be partially matched against the defaults.} \item{.names}{logical that only used when \code{.exact=FALSE} and indicates that the names of items in \code{x} that partially match some defaults should be expanded in the returned list.} \item{.exclude}{optional character vector of argument names to exclude from expansion.} } \value{ a list } \description{ \code{expand_list} expands a named list with a given set of default items, if these are not already in the list, partially matching their names. \code{expand_dots} expands the \code{...} arguments of the function in which it is called with default values, using \code{expand_list}. It can \strong{only} be called from inside a function. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } #---------- # expand_list #---------- expand_list(list(a=1, b=2), c=3) expand_list(list(a=1, b=2, c=4), c=3) # with a list expand_list(list(a=1, b=2), list(c=3, d=10)) # no partial match expand_list(list(a=1, b=2, c=5), cd=3) # partial match with names expanded expand_list(list(a=1, b=2, c=5), cd=3, .exact=FALSE) # partial match without expanding names expand_list(list(a=1, b=2, c=5), cd=3, .exact=FALSE, .names=FALSE) # works also inside a function to expand a call with default arguments f <- function(...){ cl <- match.call() expand_list(cl, list(a=3, b=4), .exact=FALSE) } f() f(c=1) f(a=2) f(c=1, a=2) #---------- # expand_dots #---------- # expanding dot arguments f <- function(...){ expand_dots(list(a=2, bcd='a', xxx=20), .exclude='xxx') } # add default value for all arguments f() # add default value for `bcd` only f(a=10) # expand names f(a=10, b=4) } pkgmaker/man/oneoffVariable.Rd0000644000176000001440000000166712330274520016077 0ustar ripleyusers\name{oneoffVariable} \alias{oneoffVariable} \title{One-off Global Variables} \usage{ oneoffVariable(default = NULL) } \arguments{ \item{default}{default value to which the global variable is reset after each access. Default is \code{NULL}.} } \value{ a function with one argument (\code{value}) that provides get/set access to a global variable. If called with a value, it assigns this value to the global variable. If called with no argument, it returns the current value of the global variable and reset it to its default value -- as defined at its creation. } \description{ Defines a function that allow to get/assign a global variable whose value is ensured to be reset after each access. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } x <- oneoffVariable(0) # returns default value x() # assign a value x(3) # get the value x() # second call returns default value again x() } pkgmaker/man/makeUnitVignette.Rd0000644000176000001440000000141612330274520016430 0ustar ripleyusers\name{makeUnitVignette} \alias{makeUnitVignette} \title{Make Vignette for Unit Tests} \usage{ makeUnitVignette(pkg, file = paste(pkg, "-unitTests.pdf", sep = ""), ..., check = FALSE) } \arguments{ \item{pkg}{Package name} \item{file}{Output file (.Rnw, .tex, or .pdf)} \item{...}{extra arguments passed to \code{\link{utest}}.} \item{check}{logical that indactes the cal was made from R CMD check, in which case the vignette is updated only if results of unit tests can be found in the unit test output directory, where they would have been generated by \code{\link{utest}}.} } \value{ Result of running unit test suite } \description{ Builds a vignette for unit tests in a package using the \code{\link{utest}} and a template vignette file. } pkgmaker/man/inSweave.Rd0000644000176000001440000000056712330274520014734 0ustar ripleyusers\name{inSweave} \alias{inSweave} \title{Identifying Sweave Run} \usage{ inSweave() } \value{ \code{TRUE} or \code{FALSE} } \description{ Tells if the current code is being executed within a Sweave document. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # Not in a Sweave document inSweave() # Within a Sweave document } pkgmaker/man/add_lib.Rd0000644000176000001440000000214512330274520014523 0ustar ripleyusers\name{add_lib} \alias{add_lib} \title{Adding Package Libraries} \usage{ add_lib(..., append = FALSE) } \arguments{ \item{...}{paths to add to .libPath} \item{append}{logical that indicates that the paths should be appended rather than prepended.} } \description{ Prepend/append paths to the library path list, using \code{\link{.libPaths}}. } \details{ This function is meant to be more convenient than \code{.libPaths}, which requires more writing if one wants to: \itemize{ \item sequentially add libraries; \item append and not prepend new path(s); \item keep the standard user library in the search path. } } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } ol <- .libPaths() # called sequentially, .libPaths only add the last library show( .libPaths('.') ) show( .libPaths(tempdir()) ) # restore .libPaths(ol) # .libPaths does not keep the standard user library show( .libPaths() ) show( .libPaths('.') ) # restore .libPaths(ol) # with add_lib show( add_lib('.') ) show( add_lib(tempdir()) ) show( add_lib('..', append=TRUE) ) # restore .libPaths(ol) } pkgmaker/man/packageCLI.Rd0000644000176000001440000000142612330274520015071 0ustar ripleyusers\name{packageCLI} \alias{packageCLI} \title{Package Specific Command Line Interface} \usage{ packageCLI(package, altfile = NULL, local = TRUE, ARGS = commandArgs(TRUE), ...) } \arguments{ \item{package}{package name} \item{altfile}{alternative file that defines the main CLI entry point. That is a function named \code{CLI}, which takes the list of parsed command line arguments as its first argument.} \item{local}{logical that indicates if the main CLI function should be defined and evaluated in a local environment, or in the user's Global environment.} \item{ARGS}{list of parsed arguments passed to the main CLI function.} \item{...}{extra arugments passed to the package's CLI function.} } \description{ Package Specific Command Line Interface } pkgmaker/man/alphacol.Rd0000644000176000001440000000152012330274520014724 0ustar ripleyusers\name{alphacol} \alias{alphacol} \title{Colour utilities} \usage{ alphacol(col, alpha = FALSE) } \arguments{ \item{col}{vector of any of the three kinds of \R color specifications, i.e., either a color name (as listed by \code{\link{colors}()}), a hexadecimal string of the form \code{"#rrggbb"} or \code{"#rrggbbaa"} (see \code{\link{rgb}}), or a positive integer \code{i} meaning \code{\link{palette}()[i]}.} \item{alpha}{logical value indicating whether the alpha channel (opacity) values should be returned.} } \description{ \code{alphacol} adds an alpha value to a colour specification and convert to a hexadecimal colour string. } \examples{ \dontshow{# roxygen generated flag options(R_CHECK_RUNNING_EXAMPLES_=TRUE) } # Alphas alphacol('red') # do nothing alphacol('red', 10) alphacol('#aabbcc', 5) alphacol(4, 5) }