[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!!!

\[\color{red}{\mathfrak{The\;principal\;is\;XY......}} \]

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. 概率;

下面是预览:

\[\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}} \]

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

\[\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 \]

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

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

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

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

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

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

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

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

2.2. 特殊集合

整数集合?快使用:

\mathbb{Z} (or \mathbb Z)

\[\mathbb Z \]

2.3. 删除线

你以为 \(\LaTeX\) 没有删除线?它还真的有:

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

它的源码是:

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

2.4. 矩阵的一些骚东西

各种内部定义 の 矩阵

\[\begin{array}{lc} \texttt{smallmatrix}&\bigl(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\bigr)\\ \texttt{matrix} &\begin{matrix} 1&2\\3&4\\ \end{matrix} \\ \texttt{pmatrix}&\begin{pmatrix}1&2\\3&4\\ \end{pmatrix}\\ \texttt{bmatrix}&\begin{bmatrix}1&2\\3&4\\ \end{bmatrix}\\ \texttt{Bmatrix}&\begin{Bmatrix}1&2\\3&4\\ \end{Bmatrix}\\ \texttt{vmatrix}&\begin{vmatrix}1&2\\3&4\\ \end{vmatrix}\\ \texttt{Vmatrix}&\begin{Vmatrix}1&2\\3&4\\ \end{Vmatrix}\\ \end{array} \]

矩阵删除线

我们使用 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}

\[\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} \]

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}

\[\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} \]

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

然后是虚线,竖着就是将 | 替换为 :,横着就是 \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)

\[\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) \]

2.5. 各种表

组合数学的东东

\[\begin{array}{l|l} \texttt{n\choose k} & {n\choose k} \\ \texttt{n\brack k} & {n\brack k} \\ \texttt{n\brace k} & {n\brace k} \end{array} \]

字体表

\[\begin{array}{ll|l} \texttt{"normal"} &\texttt{} & ABCDEFGHIJKLMNOPQRSTUVWXYZ\\ \texttt{"blackboard"} &\texttt{\mathbb} &\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"boldface"} &\texttt{\mathbf} &\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"typewriter"} &\texttt{\mathtt} &\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"roman"} &\texttt{\mathrm} &\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"sans-serif"} &\texttt{\mathsf} &\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"calligraphic"}&\texttt{\mathcal} &\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"script"} &\texttt{\mathscr} &\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \texttt{"fraktur"} &\texttt{\mathfrak}&\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ}\\ \end{array} \]

色彩表

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

色彩表 Ex

\[\begin{array}{|rrrrrrrr|} \hline \verb+#000+ & \color{#000}{text} & \verb+#005+ & \color{#005}{text} & \verb+#00A+ & \color{#00A}{text} & \verb+#00F+ & \color{#00F}{text} \\ \verb+#500+ & \color{#500}{text} & \verb+#505+ & \color{#505}{text} & \verb+#50A+ & \color{#50A}{text} & \verb+#50F+ & \color{#50F}{text} \\ \verb+#A00+ & \color{#A00}{text} & \verb+#A05+ & \color{#A05}{text} & \verb+#A0A+ & \color{#A0A}{text} & \verb+#A0F+ & \color{#A0F}{text} \\ \verb+#F00+ & \color{#F00}{text} & \verb+#F05+ & \color{#F05}{text} & \verb+#F0A+ & \color{#F0A}{text} & \verb+#F0F+ & \color{#F0F}{text} \\ \hline \verb+#080+ & \color{#080}{text} & \verb+#085+ & \color{#085}{text} & \verb+#08A+ & \color{#08A}{text} & \verb+#08F+ & \color{#08F}{text} \\ \verb+#580+ & \color{#580}{text} & \verb+#585+ & \color{#585}{text} & \verb+#58A+ & \color{#58A}{text} & \verb+#58F+ & \color{#58F}{text} \\ \verb+#A80+ & \color{#A80}{text} & \verb+#A85+ & \color{#A85}{text} & \verb+#A8A+ & \color{#A8A}{text} & \verb+#A8F+ & \color{#A8F}{text} \\ \verb+#F80+ & \color{#F80}{text} & \verb+#F85+ & \color{#F85}{text} & \verb+#F8A+ & \color{#F8A}{text} & \verb+#F8F+ & \color{#F8F}{text} \\ \hline \verb+#0F0+ & \color{#0F0}{text} & \verb+#0F5+ & \color{#0F5}{text} & \verb+#0FA+ & \color{#0FA}{text} & \verb+#0FF+ & \color{#0FF}{text} \\ \verb+#5F0+ & \color{#5F0}{text} & \verb+#5F5+ & \color{#5F5}{text} & \verb+#5FA+ & \color{#5FA}{text} & \verb+#5FF+ & \color{#5FF}{text} \\ \verb+#AF0+ & \color{#AF0}{text} & \verb+#AF5+ & \color{#AF5}{text} & \verb+#AFA+ & \color{#AFA}{text} & \verb+#AFF+ & \color{#AFF}{text} \\ \verb+#FF0+ & \color{#FF0}{text} & \verb+#FF5+ & \color{#FF5}{text} & \verb+#FFA+ & \color{#FFA}{text} & \verb+#FFF+ & \color{#FFF}{text} \\ \hline \end{array} \]

字符的装饰 - 1

\[\begin{array}{ll} \texttt{\overline}&\overline{AAA}\\ \texttt{\underline}&\underline{BBB}\\ \texttt{\widetilde}&\widetilde{CCC}\\ \texttt{\widehat}&\widehat{DDD}\\ \texttt{\fbox}&\fbox{EEE}\\ \hline \texttt{\vec}&\vec{x}\ \mathrm{or}\ \vec{AB}\\ \texttt{\check}&\check{x}\\ \texttt{\acute}&\acute{x}\\ \texttt{\grave}&\grave{x}\\ \texttt{\bar}&\bar{x}\\ \texttt{\hat}&\hat{x}\\ \texttt{\tilde}&\tilde{x}\\ \texttt{\mathring}&\mathring{x}\\ \texttt{\dot}&\dot{x}\\ \texttt{\ddot}&\ddot{x}\\ \texttt{\dddot}&\dddot{x}\\ \end{array} \]

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}

\[\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} \]

各种删除线

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

\[%约去符,删除线 \require{cancel} \require{enclose} \begin{array}{ll} \verb|y+\cancel{x}| & y+\cancel{x}\\ \verb|y+\bcancel{x}| & y+\bcancel{x}\\ \verb|y+\xcancel{x}| & y+\xcancel{x}\\ \verb|y+\cancelto{0}{x}| & y+\cancelto{0}{x}\\ \verb+\frac{1\cancel9}{\cancel95} = \frac15+& \frac{1\cancel9}{\cancel95} = \frac15 \\ \verb|\enclose{horizontalstrike}{x+y}| & \enclose{horizontalstrike}{x+y}\\ \verb|\enclose{verticalstrike}{\frac xy}| & \enclose{verticalstrike}{\frac xy}\\ \verb|\enclose{updiagonalstrike}{x+y}| & \enclose{updiagonalstrike}{x+y}\\ \verb|\enclose{downdiagonalstrike}{x+y}| & \enclose{downdiagonalstrike}{x+y}\\ \end{array} \]

字符的装饰 - 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}

\[\begin{array}{} &\hat{a} &\check{a} &\tilde{a} &\acute{a} \\ &\grave{a} &\dot{a} &\ddot{a} &\breve{a} \\ &\bar{a} &\vec{a} &\widehat{A} &\widetilde{A} \\ \end{array} \]

小写希腊字母

\(\alpha\) \alpha \(\theta\) \theta \(\omega\) \omega \(\upsilon\) \upsilon
\(\beta\) \beta \(\vartheta\) \vartheta \(\pi\) \pi \(\phi\) \phi
\(\gamma\) \gamma \(\iota\) \iota \(\varpi\) \varpi \(\chi\) \chi
\(\delta\) \delta \(\kappa\) \kappa \(\rho\) \rho \(\psi\) \psi
\(\epsilon\) \epsilon \(\lambda\) \lambda \(\varrho\) \varrho \
\(\varepsilon\) \varepsilon \(\mu\) \mu \(\sigma\) \sigma \
\(\zeta\) \zeta \(\nu\) \nu \(\varsigma\) \varsigma \
\(\eta\) \eta \(\xi\) \xi \(\tau\) \tau \

大写希腊字母

\(\Gamma\) \Gamma \(\Lambda\) \Lambda \(\Sigma\) \Sigma \(\Psi\) \Psi
\(\Delta\) \Delta \(\Xi\) \Xi \(\Upsilon\) \Upsilon \(\Omega\) \Omega
\(\Theta\) \Theta \(\Pi\) \Pi \(\Phi\) \Phi \

字符周围的括号

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

\[\overbrace{aaaaa\cdots aaa}^{1433223\;times}_{under?} \]

\overbrace{aaaaa\cdots aaa}^{1433223\;times}_{under?}
posted @ 2021-05-03 21:38  Arextre  阅读(493)  评论(3编辑  收藏  举报