anki-md-template/模板-支持数学公式/card-demo-test.html

125 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="cn" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="样式.css">
<title>Anki-Markdown 模板测试</title>
</head>
<style>
.markdown-body {
max-width: 980px;
padding: 45px;
}
</style>
<body class="markdown-body" id="qa">
<!-- prettier-ignore -->
<div class="md-content">
> Anki-Markdown 模板测试
# 一级标题
## 二级标题
### 三级标题
---
**加粗**
*斜体*
***加粗斜体***
***
> 引用
---
- 无序列表
---
1. 有序列表
---
[链接](https://www.baidu.com)
***
![图片](https://www.baidu.com/img/bd_logo1.png)
---
`行内代码`
***
```javascript
// 代码块
console.log('hello world')
```
```java
/**
* @param src 待拷贝的数组.
* @param srcPos 待拷贝数组开始位置.
* @param dest 目标数组.
* @param destPos 目标数组开始位置.
* @param length 拷贝长度.
*/
@HotSpotIntrinsicCandidate
public static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length);
```
</div>
<!-- prettier-ignore -->
<div class="md-content">
***
超长代码换行显示
```js
const example = "This is a very long string that will wrap automatically when exceeding screen
width.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbccccccccccccccccccccccccccccccccccccccddddddddddddddddddddd";
```
</div>
<div class="md-content">
行内公式:$E=mc^2$
***
块级公式:
$$\frac{d}{dx}(x^n) = nx^{n-1}$$
***
矩阵:
$$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$$
***
积分:
$$\int_{a}^{b} f(x) \, dx$$
</div>
<div class="md-content">
***
配置 config_showMathError 为 false 时忽略数学公式转换异常
$2^{层数-1}$ 有异常unicodeTextInMathMode
$E=mc^2%$ 有异常commentAtEnd %
$\left($ (转换失败)
***
</div>
<div class="md-content">
<ul>
<li>下面代码的 HTML 格式中 <code>&amp;gt;</code><code>&amp;lt;</code> 不能转义为 &gt;&lt;,否则会有异常的下划线</li>
<li>不转换 <code>&lt;code&gt;&lt;/code&gt;</code>包裹的内容</li>
</ul>
<pre><code class="hljs java language-java"><span class="hljs-keyword">public</span> <span
class="hljs-keyword">class</span> <span class="hljs-title class_">NumberPair</span>&lt;U <span
class="hljs-keyword">extends</span> <span class="hljs-title class_">Number</span>, V <span
class="hljs-keyword">extends</span> <span class="hljs-title class_">Number</span>&gt; <span
class="hljs-keyword">extends</span> <span class="hljs-title class_">Pair</span>&lt;U,V&gt; {
<span class="hljs-comment">//</span>
<span class="hljs-keyword">public</span> <span class="hljs-title function_">NumberPair</span><span
class="hljs-params">(U first, V second)</span> {
<span class="hljs-built_in">super</span>(first, second);
}
}
</code></pre>
</div>
<script src="https://gcore.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
<script type="text/javascript">
$.get("正面内容模版.html", function (data) {
$('#templateScriptDiv').html(data)
});
</script>
<div id="templateScriptDiv"></div>
</body>
</html>