Skip to content

Commit

Permalink
Override bootstrap defaults for section headings
Browse files Browse the repository at this point in the history
  • Loading branch information
jbullock35 committed Oct 3, 2023
1 parent 64c8ac1 commit 87bbceb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Bullock_Mathjax_v3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<script>
// Created by the MathJax v2 to v3 converter at
// https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html.
// [2021 04 09]

// This script works, more or less. But I am sticking with MathJax v2 and
// Bullock_MathJax_v2.js for now because using MathJax v3 has a few
// quirks and no obvious advantages. In particular, there still doesn't
// seem to be a good way to scale inline and display equations at
// different rates: there still seems to be only a single "scale"
// parameter. (See https://stackoverflow.com/questions/8544333/ for a
// hacky workaround from 2011.) [2021 04 09]

// To insert this script into an R Markdown file, put it in a
// <script type="text/x-mathjax-config"> container. [2020 02 17]

// On defining TeX macros, see http://docs.mathjax.org/en/latest/input/tex/macros.html.
// I've had some trouble getting \ensuremath{} to work, though Stack
// Overflow posts suggest that it does. [2021 01 24]

window.MathJax = {
chtml: {
scale: 0.85,
displayAlign: "center"
},
tex: {
macros: {
backtwo: "\\mspace{-2mu}",
cov: ["\\textrm{cov}\\backtwo\\left(#1\\right)", 1],
E: ["E\\backtwo\\left[#1\\right]", 1],
independent: "\\perp\\!\\!\\!\\!\\!\\!\\perp",
matwo: ["\\left[\\begin{array}{#1} #2 & #3\\\\#4 & #5\\end{array}\\right]", 5, "cc"],
sd: ["\\textrm{sd}\\backtwo\\left(#1\\right)", 1],
var: ["\\textrm{var}\\backtwo\\left(#1\\right)", 1],
vtwo: ["\\left[\\begin{array}{#1} #2\\\\#3\\end{array}\\right]", 3, "c"]
},
packages: {'[+]': ['noerrors', 'cancel', 'color', 'enclose']}
},
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['input/asciimath', '[tex]/noerrors', '[tex]/cancel', '[tex]/color', '[tex]/enclose']
}
};

</script>
2 changes: 2 additions & 0 deletions Bullock_R_markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,12 @@ h4 {
}

h1, h2, h3, h4 {
border-bottom: 0;
break-after: avoid;
page-break-after: avoid;
line-height: 1.4em;
margin-bottom: 0.4ex;
padding-bottom: 0;
}


Expand Down
18 changes: 18 additions & 0 deletions Bullock_xaringan.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,23 @@
let myLists7 = document.querySelectorAll(".listStart7 ol");
myLists7.forEach(function (x) { x.setAttribute("start", 7) } );


/* Slide numbering when I have appendix slides. The idea is that I may have
30 slides but want the numbers in the lower right-hand corner to say
2/20, 2/20, 3/20, etc. -- to prevent the audience from thinking that I
need to get through 30 slides.
This function works, in the sense that I can call it in the console.
But I haven't found a way to work it into the display of slide numbers
in the lower right-hand side of the screen. */
function numLastMainSlide() {
return slideshow.getSlideByName("lastMainSlide").getSlideNumber();
}



//}
</script>




0 comments on commit 87bbceb

Please sign in to comment.