diff --git a/.Rbuildignore b/.Rbuildignore index ce3666d..0a9c305 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,4 @@ ^docs$ ^.*\.Rproj$ ^\.Rproj\.user$ +^inst/doc/mathjax diff --git a/inst/doc/.gitignore b/inst/doc/.gitignore new file mode 100644 index 0000000..37aaaac --- /dev/null +++ b/inst/doc/.gitignore @@ -0,0 +1 @@ +mathjax diff --git a/src/install.libs.R b/src/install.libs.R index 816808e..16b0e92 100644 --- a/src/install.libs.R +++ b/src/install.libs.R @@ -1,15 +1,25 @@ -message(getwd()) - -mjdir <- "../inst/doc/mathjax" - -jsfiles <- list.files(mjdir, pattern = "[.]js$", recursive = TRUE) - +srcdir <- "../src" +destdir <- "../inst/doc" +jsfiles <- list.files(srcdir, pattern = "[.]js$", + recursive = TRUE) +fontfiles <- list.files(srcdir, pattern = "[.]woff$", + recursive = TRUE) minify <- requireNamespace("js", quietly = TRUE) - -if (minify) { - for (f in jsfiles) { - dir <- file.path(mjdir, dirname(f)) - mini <- js::uglify_files(file.path(mjdir, f), unused = FALSE) - writeLines(mini, file.path(dir, basename(f))) - } +for (f in jsfiles) { + dir <- file.path(destdir, dirname(f)) + if (!dir.exists(dir)) + dir.create(dir, recursive = TRUE) + if (minify) { + mini <- js::uglify_files(file.path(srcdir, f), unused = FALSE) + writeLines(mini, file.path(dir, basename(f))) + } else + file.copy(file.path(srcdir, f), + file.path(destdir, f)) } +for (f in fontfiles) { + dir <- file.path(destdir, dirname(f)) + if (!dir.exists(dir)) + dir.create(dir, recursive = TRUE) + file.copy(file.path(srcdir, f), + file.path(destdir, f)) +} \ No newline at end of file diff --git a/inst/doc/mathjax/LICENSE b/src/mathjax/LICENSE similarity index 100% rename from inst/doc/mathjax/LICENSE rename to src/mathjax/LICENSE diff --git a/inst/doc/mathjax/README.md b/src/mathjax/README.md similarity index 100% rename from inst/doc/mathjax/README.md rename to src/mathjax/README.md diff --git a/inst/doc/mathjax/es5/a11y/assistive-mml.js b/src/mathjax/es5/a11y/assistive-mml.js similarity index 100% rename from inst/doc/mathjax/es5/a11y/assistive-mml.js rename to src/mathjax/es5/a11y/assistive-mml.js diff --git a/inst/doc/mathjax/es5/a11y/complexity.js b/src/mathjax/es5/a11y/complexity.js similarity index 100% rename from inst/doc/mathjax/es5/a11y/complexity.js rename to src/mathjax/es5/a11y/complexity.js diff --git a/inst/doc/mathjax/es5/a11y/explorer.js b/src/mathjax/es5/a11y/explorer.js similarity index 100% rename from inst/doc/mathjax/es5/a11y/explorer.js rename to src/mathjax/es5/a11y/explorer.js diff --git a/inst/doc/mathjax/es5/a11y/semantic-enrich.js b/src/mathjax/es5/a11y/semantic-enrich.js similarity index 100% rename from inst/doc/mathjax/es5/a11y/semantic-enrich.js rename to src/mathjax/es5/a11y/semantic-enrich.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/action.js b/src/mathjax/es5/input/tex/extensions/action.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/action.js rename to src/mathjax/es5/input/tex/extensions/action.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/all-packages.js b/src/mathjax/es5/input/tex/extensions/all-packages.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/all-packages.js rename to src/mathjax/es5/input/tex/extensions/all-packages.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/ams.js b/src/mathjax/es5/input/tex/extensions/ams.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/ams.js rename to src/mathjax/es5/input/tex/extensions/ams.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/amscd.js b/src/mathjax/es5/input/tex/extensions/amscd.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/amscd.js rename to src/mathjax/es5/input/tex/extensions/amscd.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/autoload.js b/src/mathjax/es5/input/tex/extensions/autoload.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/autoload.js rename to src/mathjax/es5/input/tex/extensions/autoload.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/bbox.js b/src/mathjax/es5/input/tex/extensions/bbox.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/bbox.js rename to src/mathjax/es5/input/tex/extensions/bbox.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/boldsymbol.js b/src/mathjax/es5/input/tex/extensions/boldsymbol.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/boldsymbol.js rename to src/mathjax/es5/input/tex/extensions/boldsymbol.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/braket.js b/src/mathjax/es5/input/tex/extensions/braket.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/braket.js rename to src/mathjax/es5/input/tex/extensions/braket.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/bussproofs.js b/src/mathjax/es5/input/tex/extensions/bussproofs.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/bussproofs.js rename to src/mathjax/es5/input/tex/extensions/bussproofs.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/cancel.js b/src/mathjax/es5/input/tex/extensions/cancel.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/cancel.js rename to src/mathjax/es5/input/tex/extensions/cancel.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/color.js b/src/mathjax/es5/input/tex/extensions/color.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/color.js rename to src/mathjax/es5/input/tex/extensions/color.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/colorv2.js b/src/mathjax/es5/input/tex/extensions/colorv2.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/colorv2.js rename to src/mathjax/es5/input/tex/extensions/colorv2.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/configmacros.js b/src/mathjax/es5/input/tex/extensions/configmacros.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/configmacros.js rename to src/mathjax/es5/input/tex/extensions/configmacros.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/enclose.js b/src/mathjax/es5/input/tex/extensions/enclose.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/enclose.js rename to src/mathjax/es5/input/tex/extensions/enclose.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/extpfeil.js b/src/mathjax/es5/input/tex/extensions/extpfeil.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/extpfeil.js rename to src/mathjax/es5/input/tex/extensions/extpfeil.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/html.js b/src/mathjax/es5/input/tex/extensions/html.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/html.js rename to src/mathjax/es5/input/tex/extensions/html.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/mhchem.js b/src/mathjax/es5/input/tex/extensions/mhchem.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/mhchem.js rename to src/mathjax/es5/input/tex/extensions/mhchem.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/newcommand.js b/src/mathjax/es5/input/tex/extensions/newcommand.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/newcommand.js rename to src/mathjax/es5/input/tex/extensions/newcommand.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/noerrors.js b/src/mathjax/es5/input/tex/extensions/noerrors.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/noerrors.js rename to src/mathjax/es5/input/tex/extensions/noerrors.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/noundefined.js b/src/mathjax/es5/input/tex/extensions/noundefined.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/noundefined.js rename to src/mathjax/es5/input/tex/extensions/noundefined.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/physics.js b/src/mathjax/es5/input/tex/extensions/physics.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/physics.js rename to src/mathjax/es5/input/tex/extensions/physics.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/require.js b/src/mathjax/es5/input/tex/extensions/require.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/require.js rename to src/mathjax/es5/input/tex/extensions/require.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/tagformat.js b/src/mathjax/es5/input/tex/extensions/tagformat.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/tagformat.js rename to src/mathjax/es5/input/tex/extensions/tagformat.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/textmacros.js b/src/mathjax/es5/input/tex/extensions/textmacros.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/textmacros.js rename to src/mathjax/es5/input/tex/extensions/textmacros.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/unicode.js b/src/mathjax/es5/input/tex/extensions/unicode.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/unicode.js rename to src/mathjax/es5/input/tex/extensions/unicode.js diff --git a/inst/doc/mathjax/es5/input/tex/extensions/verb.js b/src/mathjax/es5/input/tex/extensions/verb.js similarity index 100% rename from inst/doc/mathjax/es5/input/tex/extensions/verb.js rename to src/mathjax/es5/input/tex/extensions/verb.js diff --git a/inst/doc/mathjax/es5/output/chtml.js b/src/mathjax/es5/output/chtml.js similarity index 100% rename from inst/doc/mathjax/es5/output/chtml.js rename to src/mathjax/es5/output/chtml.js diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/tex.js b/src/mathjax/es5/output/chtml/fonts/tex.js similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/tex.js rename to src/mathjax/es5/output/chtml/fonts/tex.js diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff diff --git a/inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff b/src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff similarity index 100% rename from inst/doc/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff rename to src/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff diff --git a/inst/doc/mathjax/es5/output/svg.js b/src/mathjax/es5/output/svg.js similarity index 100% rename from inst/doc/mathjax/es5/output/svg.js rename to src/mathjax/es5/output/svg.js diff --git a/inst/doc/mathjax/es5/tex-chtml-full.js b/src/mathjax/es5/tex-chtml-full.js similarity index 100% rename from inst/doc/mathjax/es5/tex-chtml-full.js rename to src/mathjax/es5/tex-chtml-full.js