Skip to content

Commit 2399a2f

Browse files
author
aryan
committed
made MathJax resposive by adding hextra-scroll-bar and hide mathJax context menu
1 parent 46c3d2a commit 2399a2f

18 files changed

Lines changed: 136 additions & 66 deletions

File tree

assets/css/custom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,18 @@ nav .search-wrapper {
175175
overflow-y: hidden;
176176
}
177177

178+
.MathJax {
179+
overflow-x: auto;
180+
overflow-y: hidden;
181+
}
182+
183+
184+
185+
mjx-container {
186+
overflow-x: auto;
187+
overflow-y: hidden;
188+
}
189+
178190
a {
179191
code {
180192
color: var(--link-color);

content/exercises/graded-assignments/statistics-1/week-4-questions.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Week 4 Statistics Graded Assignment Questions
33
weight: 12
4+
math: true
45
tags:
56
- statistics
67
categories:
@@ -9,6 +10,9 @@ series:
910
- Statistics Graded Assignment
1011
---
1112

13+
14+
{{< qna/question >}}
15+
1216
### Questions (1)–(6): Based on Table 4.1.G
1317

1418
| Dealer's Location | OnePlus | BBK Electronics |
@@ -21,23 +25,12 @@ series:
2125
| Punjab | k | l |
2226
| Chennai | m | n |
2327

24-
#### 1. What is the population standard deviation of sales of OnePlus? (Enter the answer correct to 2 decimal accuracy)
2528

26-
{{< math/calc3 a=10 b=5 c=3 d=5 e=5 f=5 g=5 h=5 i=5 j=5 k=5 l=5 m=5 n=5 formula="a+b+c+d+e+f+g+h+i+j+k+l+m+n / 2" >}}
29+
#### 1. What is the population standard deviation of sales of OnePlus? (Enter the answer correct to 2 decimal accuracy)
2730

28-
{{< calc/calc-wrapper >}}
29-
{{< calc/input name="a" value="2" >}}
30-
{{< calc/input name="b" value="3" >}}
31-
{{< calc/formula value="a + b * 2" >}}
32-
{{< calc/answer >}}
33-
{{< /calc/calc-wrapper >}}
31+
{{< qna/input name="a" value="2" >}}
32+
{{< qna/input name="b" value="3" >}}
3433

35-
{{< calc/calc-wrapper >}}
36-
{{< calc/input name="a" value="2" >}}
37-
{{< calc/input name="b" value="3" >}}
38-
{{< calc/formula value="Math.pow(2,a)" >}}
39-
{{< calc/answer >}}
40-
{{< /calc/calc-wrapper >}}
4134

4235
**Solution:**
4336
Let $m_x$ and $\sigma_x$ be the mean and population standard deviation of sales of OnePlus respectively.
@@ -50,8 +43,13 @@ $$
5043
\sigma_x^2 = \frac{(a - m_x)^2 + (c - m_x)^2 + (e - m_x)^2 + (g - m_x)^2 + (i - m_x)^2 + (k - m_x)^2 + (m - m_x)^2}{7}
5144
$$
5245

46+
{{< qna/formula value="Math.pow(2,a)" >}}
47+
{{< qna/result >}}
5348
Therefore, Population standard deviation of sales of OnePlus = $\sqrt{\sigma_x^2}$
5449

50+
{{< /qna/question >}}
51+
52+
5553
<!-- {{< math/calc3 a=10 b=5 formula="a + b * 2" >}} -->
5654

5755
<!-- {{< math/calc3 x=2 y=3 z=4 formula="x * y + z" >}} -->

content/notes/iit-madras/data-science-and-application/foundational-level/english-2/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: English II 📖
33
description: This course aims at achieving fluency and confidence in spoken and written English. This course will use insights from theories of learning and dominant methods of teaching language.
44
date: 2025-05-08
5-
type: cards
5+
type: chapters
66
tags:
77
- Notes
88
- SSC Exam

content/notes/iit-madras/data-science-and-application/foundational-level/mathematics/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ tags:
77
excludeSearch: false
88
weight: 1
99
cascade:
10-
image: "/images/orange.jpg"
10+
image: "/images/svg/circle-gradient.svg"
1111
series: ["Foundational-Level"]
1212
math: true
13-
emoji: 🧮
13+
emoji: 🧠
1414

1515
---
1616

content/notes/iit-madras/data-science-and-application/foundational-level/python/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Programming in Python 🐍
3-
type: cards
3+
type: chapters
44
date: 2025-05-08
55
tags:
66
- Notes

layouts/exercises/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<article
1111
class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]"
1212
>
13-
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-pt-4 md:hx-px-12">
13+
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-pt-4 md:hx-px-6">
1414
{{/* {{partial "tag-bar.html" . }} */}}
1515
<br class="hx-mt-1.5 hx-text-sm" />
1616
{{/* {{ if .Title }}

layouts/exercises/single.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{{- end -}}
4444
{{- end -}}
4545
</div>
46-
<div class="content mona-sans">
46+
<div class="content mona-sans hextra-scrollbar">
4747
{{ .Content }}
4848
</div>
4949
{{- partial "components/last-updated.html" . -}}

layouts/partials/chapters/chapters.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<span class="chapter-emoji">{{ .Params.emoji }}</span>
4444
{{ end -}}
4545

46-
<h2 class="chapter-title">
46+
<h2 class="chapter-title mona-sans">
4747
<span class="gradient-text"
4848
>{{ if lt (add $num 1) 10 }}0{{ end }}{{ add $num 1 }}</span
4949
>

layouts/partials/custom/head-end.html

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,4 @@
3434
{{/* KaTeX */}}
3535
<!-- https://katex.org/ -->
3636

37-
{{/*
38-
<link
39-
rel="stylesheet"
40-
href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css"
41-
/>
42-
<script
43-
defer
44-
src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js"
45-
></script>
46-
<script
47-
defer
48-
src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js"
49-
></script>
5037

51-
<script>
52-
document.addEventListener("DOMContentLoaded", function () {
53-
renderMathInElement(document.body, {
54-
delimiters: [
55-
{ left: "$$", right: "$$", display: true }, // For block math
56-
{ left: "$", right: "$", display: false }, // For inline math
57-
],
58-
});
59-
});
60-
</script>
61-
*/}}

layouts/partials/hugo-category-bar.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="hugo-tags-bar-container">
1+
<div class="hugo-tags-bar-container hextra-scrollbar">
22
<div class="hugo-tags-bar">
33
{{/* <span class="hugo-tag active">All</span> */}}
44
{{/* <a href="/exercises/" class="hugo-tag active">All</a> */}}
@@ -134,7 +134,8 @@
134134
}
135135

136136
.hugo-tags-bar-container::-webkit-scrollbar {
137-
display: none; /* Hide scrollbar for Chrome, Safari and Opera */
137+
/* Hide scrollbar for Chrome, Safari and Opera */
138+
138139
}
139140
</style>
140141

0 commit comments

Comments
 (0)