R/zzz.R

Defines functions .onAttach .onLoad wenv_init

wenv <- new.env()

wenv_init <- function(){
    assign('tex'   , FALSE ,envir = wenv)
    assign('get'   , FALSE ,envir = wenv)
    assign('build' , FALSE ,envir = wenv)
}

.onLoad <- function(lib,pkg) {
  wenv_init()
  if(interactive()){
    check_base_req()
    rc.options(custom.completer = completeme)
    register_completion(thispkg = populate) 
  }
  register_eng_texpreview('texpreview', eng_texpreview)
}


.onAttach <- function(lib,pkg) {
  wenv_init()
  if(interactive()){
    check_base_req()
    rc.options(custom.completer = completeme)
    register_completion(thispkg = populate) 
  }
}
metrumresearchgroup/texPreview documentation built on Feb. 4, 2024, 6:33 p.m.