gpt4 book ai didi

javascript - reveal.js 幻灯片中 mathjax 中未经请求的字体大小更改

转载 作者:太空狗 更新时间:2023-10-29 13:47:02 24 4
gpt4 key购买 nike

尽管幻灯片的代码(这里是 sections)完全相同,但从第 3 张到第 4 张幻灯片,我发现字体大小发生了变化。我已尝试对此进行追踪,但没有找到原因。

有趣的是,如果我删除 title 幻灯片,这种变化会再次出现在第 3 和第 4 张幻灯片之间。

有什么想法吗?

这里有两个截图

normal sized math display smaller sized math display

这是 html 代码(应该独立运行)

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="author" content="Jan Heiland">
<title>H_\infty-control for DAEs</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="https://revealjs.com/css/reveal.css">
<style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="https://revealjs.com/css/theme/black.css" id="theme">
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full" type="text/javascript"></script>
</head>
<body>
<div class="reveal">
<div class="slides">

<!-- section>
<h1 class="title">Riccati-based <span class="math inline">\(H_\infty\)</span>-control for DAEs</h1>
<p class="author">Jan Heiland</p>
</section-->

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

</div>
</div>

<script src="https://revealjs.com/lib/js/head.min.js"></script>
<script src="https://revealjs.com/js/reveal.js"></script>

<script>

// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({

// Optional reveal.js plugins
dependencies: [
{ src: 'https://revealjs.com/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'https://revealjs.com/plugin/zoom-js/zoom.js', async: true },
{ src: 'https://revealjs.com/plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>

最佳答案

出于某种原因,从 mathjax 的第 4 次及以上渲染开始,它将以 font-size 50%
渲染我不知道为什么,也许您忽略了一些配置。无论如何,您可以通过添加自己的 css 来覆盖它:

.MathJax_CHTML {
font-size: 117% !important;
}

117% 是用于其他元素的值,所以我只使用该值。

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="generator" content="pandoc">
<meta name="author" content="Jan Heiland">
<title>H_\infty-control for DAEs</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="https://revealjs.com/css/reveal.css">
<style type="text/css">
code {
white-space: pre;
}

.MathJax_CHTML {
font-size: 117% !important;
}
</style>
<link rel="stylesheet" href="https://revealjs.com/css/theme/black.css" id="theme">
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_CHTML-full" type="text/javascript"></script>

</head>

<body>
<div class="reveal">
<div class="slides">

<section>
<h1 class="title">Riccati-based <span class="math inline">\(H_\infty\)</span>-control for DAEs</h1>
<p class="author">Lars on stackoverflow</p>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

<section>
<ul>
<li>Descriptor systems have an ODE part and an algebraic part
<span class="math display">\[\begin{align*}
\begin{bmatrix}
C^{\mathsf{d}} &amp; C^{\mathsf{a}}
\end{bmatrix}
\begin{bmatrix}
sI-A &amp; 0 \\ 0 &amp; sN-I
\end{bmatrix}^{-1}
\end{align*}\]</span></li>
</ul>
</section>

</div>
</div>

<script src="https://revealjs.com/lib/js/head.min.js"></script>
<script src="https://revealjs.com/js/reveal.js"></script>

<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({

// Optional reveal.js plugins
dependencies: [{
src: 'https://revealjs.com/lib/js/classList.js',
condition: function() {
return !document.body.classList;
}
},
{
src: 'https://revealjs.com/plugin/zoom-js/zoom.js',
async: true
},
{
src: 'https://revealjs.com/plugin/notes/notes.js',
async: true
}
]
});
</script>
</body>

</html>

关于javascript - reveal.js 幻灯片中 mathjax 中未经请求的字体大小更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55982284/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com