[markdown&html]有趣的东西

〇、前言 ¶

一些有趣的东西,有可能写博客的时候要用到,但是可能不是经常用,只是拿来搞笑罢了

壹、html の 东西 ¶

1.1. 文字居中

Hey!!!
<center>Hey!!!</center>

1.2. 在文字上面打拼音

如果你想在文字上打拼音,可以参考这个:

guer
<center><ruby><rt>gu</rt><rt>er</rt></ruby></center>

1.3. 猫和老鼠

你想藏住一些东西?使用这个:

<details>

<summary>Who is the principal?</summary>

.....

</details>

效果是这样的:

Who is the principal?
To be frank, I don't know.
Please not, or you'll die!!!

TheprincipalisXY......

1.4. 你知道的太多了

你需要先在 css 中添加:

.mask {
    background-color: #252525;
    color: #252525;
    transition: color 0.5s;
}

.mask:hover {
    color: #ffffff;
}

然后你就可以使用 mask 了:

<span class="mask" title="你知道的太多了">被遮掩的文字</span>

效果是下面这种:

诶诶诶,你看我干嘛

贰、LaTeX の 东西

2.0. LaTeX 起手式

\color{red}{\textsf{小游者,真神人也,左马桶,右永神,会执利笔破邪炁,何人当之?}} \\
\begin{array}{|}
\hline
\color{pink}{\text{A small swimmer is a God.}} \\
\color{pink}{\text{The left toilet and the right eternal God}} \\
\color{pink}{\text{can break the evil energy with a sharp pen.}} \\
\color{pink}{\text{Who can resist him? }} \\
\hline
\end{array} \\
\begin{array}{|}
\hline
\color{green}{\text{小遊者は、神であり、左便器、右永神であり}} \\
\color{green}{\text{鋭いペンを持って真実を突き刺している。誰が彼に抵抗できるだろうか? }} \\
\hline
\end{array} \\
\begin{array}{|}
\hline
\color{lightblue}{\text{Petit voyageur, est Dieu aussi, toilettes gauche, Dieu éternel droit,}} \\
\color{lightblue}{\text{peut tenir un stylo tranchant pour briser le mal, qui devrait le faire?}} \\
\hline
\end{array} \\
\begin{array}{|}
\hline
\color{purple}{\text{Der Direktor ist wirklich ein Gott}} \\
\color{purple}{\text{mit einer Toilette links und Yongshen rechts}} \\
\color{purple}{\text{der einen spitzen Stift hält}} \\
\color{purple}{\text{um die Wahrheit zu durchdringen.}} \\
\color{purple}{\text{Wer kann ihm widerstehen? }} \\
\hline
\end{array} \\
\begin{array}{|}
\hline
\color{cyan}{\text{Ein kleiner Schwimmer ist ein Gott.}} \\
\color{cyan}{\text{Die linke Toilette und der rechte ewige Gott können }} \\
\color{cyan}{\text{die böse Energie mit einem scharfen Stift brechen.}} \\
\color{cyan}{\text{Wer sollte es sein?}} \\
\hline
\end{array} \\
\color{red}{\textsf{对曰:“无人,狗欲当之,还请赐教!”}} \\
\newcommand\brak[1]{\left({#1}\right)}
\newcommand\Brak[1]{\left\{{#1}\right\}}
\newcommand\d[0]{\text{d}}
\newcommand\string[2]{\genfrac{\{}{\}}{0pt}{}{#1}{#2}}
\newcommand\down[2]{{#1}^{\underline{#2}}}
\newcommand\ddiv[2]{\left\lfloor\frac{#1}{#2}\right\rfloor}
\newcommand\udiv[2]{\left\lceil\frac{#1}{#2}\right\rceil}
\newcommand\lcm[0]{\operatorname{lcm}}
\newcommand\set[1]{\left\{{#1}\right\}}
\newcommand\ceil[1]{\left\lceil{#1}\right\rceil}
\newcommand\floor[1]{\left\lfloor{#1}\right\rfloor}
\newcommand\rhs[1]{\;\text{Rhs}\;#1}
\newcommand\lhs[1]{\;\text{Lhs}\;#1}
\newcommand\Vec[1]{\vec{\mathbf{#1}}}
\newcommand\rank[0]{\text{rank}}
\newcommand\group[1]{\left\langle\right\rangle}
\newcommand\norm[1]{\left|{#1}\right|}
\newcommand\E[0]{\mathbb{E}}
\newcommand\Pro[0]{\mathbb{P}}

只会越变越多......

  1. 左右小括号匹配;
  2. 左右大括号匹配;
  3. 仅仅只是微积分的时候嘟一下;
  4. 斯特林数;
  5. 下降幂;
  6. 下取整;
  7. 上取整;
  8. 最大公倍数;
  9. 集合;
  10. 非分数上取整;
  11. 非分数下取整;
  12. 右移;
  13. 左移;
  14. 向量;
  15. 矩阵的秩;
  16. 群;
  17. 膜长;
  18. 期望;
  19. 概率;

下面是预览:

小游者,真神人也,左马桶,右永神,会执利笔破邪炁,何人当之?A small swimmer is a God.The left toilet and the right eternal Godcan break the evil energy with a sharp pen.Who can resist him? 小遊者は、神であり、左便器、右永神であり鋭いペンを持って真実を突き刺している。誰が彼に抵抗できるだろうか? Petit voyageur, est Dieu aussi, toilettes gauche, Dieu éternel droit,peut tenir un stylo tranchant pour briser le mal, qui devrait le faire?Der Direktor ist wirklich ein Gottmit einer Toilette links und Yongshen rechtsder einen spitzen Stift hältum die Wahrheit zu durchdringen.Wer kann ihm widerstehen? Ein kleiner Schwimmer ist ein Gott.Die linke Toilette und der rechte ewige Gott können die böse Energie mit einem scharfen Stift brechen.Wer sollte es sein?对曰:“无人,狗欲当之,还请赐教!”

2.1. 定义新命令 & 新分数

使用 \newcommand

具体参数如下:

\newcommand{<命令>}[<参数个数>]{<具体的定义>}

举个例子:如果我要使用斯特林数,就是大括号,那么我们可以使用如下定义:

\newcommand\string[2]{\genfrac{\{}{\}}{0pt}{}{#1}{#2}}
\string{n}{m}={1\over m!}\sum_{i=0}^m(-1)^i{m\choose i}(m-i)^n

{nm}=1m!i=0m(1)i(mi)(mi)n

这里使用了 \genfrac,参数如下:

\genfrac{<左边>}{<右边>}{<横线长度(x pt)>}{<分数大小>}{#1}{#2}

“左边” 和 “右边” 指这个分数左边和右边是否要放什么东西,横线宽度度注意格式,分数大小空着就是默认大小,数值越大就越小,后面的 #1#2 起占位符作用,举个例子:

\newcommand\myfrac[2]{\genfrac{\{}{]}{1pt}{2}{#1}{#2}}
\myfrac{n}{m}

{nm]

如果你要定义下降幂,那就用:

\newcommand\down[2]{{#1}^{\underline{#2}}}
\down{n}{k}

nk_

2.2. 特殊集合

整数集合?快使用:

\mathbb{Z} (or \mathbb Z)

Z

2.3. 删除线

你以为 LATEX 没有删除线?它还真的有:

没有人知道谁是校长

它的源码是:

\require{enclose}\enclose{horizontalstrike}{\text{没有人知道谁是校长}}

2.4. 矩阵的一些骚东西

各种内部定义 の 矩阵

smallmatrix(abcd)matrix1234pmatrix(1234)bmatrix[1234]Bmatrix{1234}vmatrix|1234|Vmatrix1234

矩阵删除线

我们使用 array 进行。举个栗子:

\begin{array}{c|c|cc}
1 & 2 & 3 & 4 & 5  \\
6 & 7 & 8 & 9 & 10 \\
11& 12& 13& 14& 15 \\
16& 17& 18& 19& 20 \\
\end{array}

1234567891011121314151617181920

array 后接上的 c|c|cc 就像占位符一样,加入 | 添加效果。

那么横线呢?就是在每一行的末尾(或者下一行的开头)加上 \hline 关键字。

\begin{array}{c|c|cc}
1 & 2 & 3 & 4 & 5  \\ \hline
6 & 7 & 8 & 9 & 10 \\
11& 12& 13& 14& 15 \\
16& 17& 18& 19& 20 \\
\end{array}

1234567891011121314151617181920

请注意添加的位置,不要加错了。

然后是虚线,竖着就是将 | 替换为 :,横着就是 \hdashline 关键字。接下来是一个比较综合的情形:

\left( \begin{array}{c|c:cc}
1 & 2 & 3 & 4 & 5  \\ \hline
6 & 7 & 8 & 9 & 10 \\ \hdashline
11& 12& 13& 14& 15 \\
16& 17& 18& 19& 20 \\
\end{array} \right)

(1234567891011121314151617181920)

2.5. 各种表

组合数学的东东

n\choose k(nk)n\brack k[nk]n\brace k{nk}

字体表

"normal"ABCDEFGHIJKLMNOPQRSTUVWXYZ"blackboard"\mathbbABCDEFGHIJKLMNOPQRSTUVWXYZ"boldface"\mathbfABCDEFGHIJKLMNOPQRSTUVWXYZ"typewriter"\mathttABCDEFGHIJKLMNOPQRSTUVWXYZ"roman"\mathrmABCDEFGHIJKLMNOPQRSTUVWXYZ"sans-serif"\mathsfABCDEFGHIJKLMNOPQRSTUVWXYZ"calligraphic"\mathcalABCDEFGHIJKLMNOPQRSTUVWXYZ"script"\mathscrABCDEFGHIJKLMNOPQRSTUVWXYZ"fraktur"\mathfrakABCDEFGHIJKLMNOPQRSTUVWXYZ

色彩表

\color{black}{黑色}\color{darkgray}{深灰}\color{gray}{灰色}\color{silver}{银色}\color{lightgray}{浅灰}\color{white}{白色}\color{brown}{棕色}\color{maroon}{栗色}\color{red}{红色}\color{fuchsia}{桃红}\color{magenta}{品红}\color{pink}{粉红}\color{orange}{橙色}\color{yellow}{黄色}\color{lime}{青柠}\color{olive}{橄榄}\color{green}{绿色}绿\color{aqua}{水绿}绿\color{cyan}{青色}\color{teal}{靛青}\color{blue}{蓝色}\color{navy}{海蓝}\color{violet}{罗兰}\color{purple}{紫色}

色彩表 Ex

#000text#005text#00Atext#00Ftext#500text#505text#50Atext#50Ftext#A00text#A05text#A0Atext#A0Ftext#F00text#F05text#F0Atext#F0Ftext#080text#085text#08Atext#08Ftext#580text#585text#58Atext#58Ftext#A80text#A85text#A8Atext#A8Ftext#F80text#F85text#F8Atext#F8Ftext#0F0text#0F5text#0FAtext#0FFtext#5F0text#5F5text#5FAtext#5FFtext#AF0text#AF5text#AFAtext#AFFtext#FF0text#FF5text#FFAtext#FFFtext

字符的装饰 - 1

\overlineAAA¯\underlineBBB_\widetildeCCC~\widehatDDD^\fboxEEE\vecx or AB\checkxˇ\acutex´\gravex`\barx¯\hatx^\tildex~\mathringx˚\dotx˙\ddotx¨\dddotx

cases 表

\begin{cases}
%线性方程组加\\[2ex],不然会挤在一起.
 a_1x+b_1y+c_1z=\frac{p_1}{q_1} \\[2ex] 
 a_2x+b_2y+c_2z=\frac{p_2}{q_2} \\[2ex] 
 a_3x+b_3y+c_3z=\frac{p_3}{q_3}
\end{cases}

{a1x+b1y+c1z=p1q1a2x+b2y+c2z=p2q2a3x+b3y+c3z=p3q3

各种删除线

你应该先 \require{cancel}\require{enclose}.

y+\cancel{x}y+xy+\bcancel{x}y+xy+\xcancel{x}y+xy+\cancelto{0}{x}y+x0\frac{1\cancel9}{\cancel95} = \frac151995=15\enclose{horizontalstrike}{x+y}x+y\enclose{verticalstrike}{\frac xy}xy\enclose{updiagonalstrike}{x+y}x+y\enclose{downdiagonalstrike}{x+y}x+y

字符的装饰 - 2

\hat{a}   \check{a} \tilde{a}   \acute{a}
\grave{a} \dot{a}   \ddot{a}    \breve{a}
\bar{a}   \vec{a}   \widehat{A} \widetilde{A}

a^aˇa~a´a`a˙a¨a˘a¯aA^A~

小写希腊字母

α \alpha θ \theta ω \omega υ \upsilon
β \beta ϑ \vartheta π \pi ϕ \phi
γ \gamma ι \iota ϖ \varpi χ \chi
δ \delta κ \kappa ρ \rho ψ \psi
ϵ \epsilon λ \lambda ϱ \varrho \
ε \varepsilon μ \mu σ \sigma \
ζ \zeta ν \nu ς \varsigma \
η \eta ξ \xi τ \tau \

大写希腊字母

Γ \Gamma Λ \Lambda Σ \Sigma Ψ \Psi
Δ \Delta Ξ \Xi Υ \Upsilon Ω \Omega
Θ \Theta Π \Pi Φ \Phi \

字符周围的括号

  使用 \overbrace\underbrace,如果要在上面或下面加上东西,就是上下标的形式,举个栗子:

aaaaaaaaunder?1433223times

\overbrace{aaaaa\cdots aaa}^{1433223\;times}_{under?}
posted @   Arextre  阅读(577)  评论(3编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示