### Install devtools Package in R Source: https://github.com/gahoccode/vnds/blob/master/README.md Installs the 'devtools' package from CRAN using the install.packages() function. This package is a prerequisite for installing packages from GitHub. No specific input is required beyond running the command. ```r install.packages("devtools") ``` -------------------------------- ### Install VNDS Package from GitHub in R Source: https://github.com/gahoccode/vnds/blob/master/README.md Installs the 'VNDS' package directly from a GitHub repository using the devtools package. This command requires the 'devtools' package to be installed and loaded first. It fetches the latest development version of the package. ```r library(devtools) devtools::install_github("phamdinhkhanh/VNDS") ``` -------------------------------- ### Integrate MathJax for Math Rendering Source: https://github.com/gahoccode/vnds/blob/master/LICENSE.nb.html This code dynamically creates and appends a script tag to the document's head to load the MathJax library. This integration enables the rendering of mathematical formulas and notations within the web page. It uses a standard configuration for TeX, AMS, and MathML. ```javascript (function () { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"; document.getElementsByTagName("head")[0].appendChild(script); })(); ``` -------------------------------- ### Style Pandoc Tables with Bootstrap using jQuery Source: https://github.com/gahoccode/vnds/blob/master/LICENSE.nb.html This function adds Bootstrap table classes to Pandoc-generated tables for improved styling. It targets tables with a specific header structure and applies 'table' and 'table-condensed' classes. It's automatically called when the document is ready. ```javascript function bootstrapStylePandocTables() { $('tr.header').parent('thead').parent('table').addClass('table table-condensed'); } $(document).ready(function () { bootstrapStylePandocTables(); }); ``` -------------------------------- ### Add Bootstrap Styles to Pandoc Tables (JavaScript) Source: https://github.com/gahoccode/vnds/blob/master/CONDUCT.nb.html This JavaScript function applies Bootstrap table classes to Pandoc-generated tables. It targets tables with the class 'table table-condensed' and assumes a specific structure for Pandoc tables. ```javascript function bootstrapStylePandocTables() { $('tr.header').parent('thead').parent('table').addClass('table table-condensed'); } $(document).ready(function () { bootstrapStylePandocTables(); }); ``` -------------------------------- ### Enhance Kable Tables with jQuery Source: https://github.com/gahoccode/vnds/blob/master/LICENSE.nb.html This snippet enhances Kable tables by adding the 'kable-table' class and repositioning the table caption. It moves the caption outside the table element and styles it to be displayed. This ensures better structure and presentation of Kable tables. ```javascript $(document).ready(function () { $('.knitsql-table').addClass('kable-table'); var container = $('.kable-table'); container.each(function() { var table = $(this).children('table'); var caption = table.children('caption').detach(); caption.insertBefore($(this)).css('display', 'inherit'); }); }); ``` -------------------------------- ### Customize kable Tables (JavaScript) Source: https://github.com/gahoccode/vnds/blob/master/CONDUCT.nb.html This script customizes 'kable-table' elements, commonly generated by the 'kable' function in R. It moves the table caption outside the table element for better display and applies the 'kable-table' class. ```javascript $(document).ready(function () { $('.knitsql-table').addClass('kable-table'); var container = $('.kable-table'); container.each(function() { // move the caption out of the table var table = $(this).children('table'); var caption = table.children('caption').detach(); caption.insertBefore($(this)).css('display', 'inherit'); }); }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.