Skip to content
Snippets Groups Projects
if-loops-functions.html 81.4 KiB
Newer Older
  • Learn to ignore specific revisions
  • bpkleer's avatar
    bpkleer committed
    
    </div>
    
    <script>
    
    // add bootstrap table styles to pandoc tables
    function bootstrapStylePandocTables() {
      $('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
    }
    $(document).ready(function () {
      bootstrapStylePandocTables();
    });
    
    
    </script>
    
    <!-- tabsets -->
    
    <script>
    $(document).ready(function () {
      window.buildTabsets("TOC");
    });
    
    $(document).ready(function () {
      $('.tabset-dropdown > .nav-tabs > li').click(function () {
        $(this).parent().toggleClass('nav-tabs-open');
      });
    });
    </script>
    
    <!-- code folding -->
    
    <script>
    $(document).ready(function ()  {
    
        // temporarily add toc-ignore selector to headers for the consistency with Pandoc
        $('.unlisted.unnumbered').addClass('toc-ignore')
    
        // move toc-ignore selectors from section div to header
        $('div.section.toc-ignore')
            .removeClass('toc-ignore')
            .children('h1,h2,h3,h4,h5').addClass('toc-ignore');
    
        // establish options
        var options = {
          selectors: "h1,h2,h3",
          theme: "bootstrap3",
          context: '.toc-content',
          hashGenerator: function (text) {
            return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
          },
          ignoreSelector: ".toc-ignore",
          scrollTo: 0
        };
        options.showAndHide = true;
        options.smoothScroll = true;
    
        // tocify
        var toc = $("#TOC").tocify(options).data("toc-tocify");
    });
    </script>
    
    <!-- dynamically load mathjax for compatibility with self-contained -->
    <script>
      (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);
      })();
    </script>
    
    </body>
    </html>