友情支持
如果您觉得这个笔记对您有所帮助,看在D瓜哥码这么多字的辛苦上,请友情支持一下,D瓜哥感激不尽,😜
有些打赏的朋友希望可以加个好友,欢迎关注D 瓜哥的微信公众号,这样就可以通过公众号的回复直接给我发信息。
公众号的微信号是: jikerizhi 。因为众所周知的原因,有时图片加载不出来。 如果图片加载不出来可以直接通过搜索微信号来查找我的公众号。 |
1. 示例 Sample
这是正文部分!
行内高亮: java
。
1.1. 代码高亮
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.diguage.yongle;
/**
* = AsciiDoclet 示例文档
*
* 这是示例文档
*
* TIP: 这是一个提示文档!D瓜哥注:经测试,这个图标因为没有相关 CSS,不生效!
*
* == 示例代码
*
* [source,java]
* ----
* // @author D瓜哥 · https://www.diguage.com
* public class HelloWorld {
* public static void main(String[] args) {
* System.out.println("Hello, D瓜哥 · https://www.diguage.com");
* }
* }
* ----
*
* == PlantUML diagram
*
* [plantuml,test]
* ----
* class BlockProcessor
* class DiagramBlock
* class DitaaBlock
* class PlantUmlBlock
*
* BlockProcessor <|-- DiagramBlock
* DiagramBlock <|-- DitaaBlock
* DiagramBlock <|-- PlantUmlBlock
* ----
*
* @author D瓜哥 · https://www.diguage.com
* @since 2022-07-21 20:50:45
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, D瓜哥 · https://www.diguage.com");
}
// tag::hi[]
public void hi() {
System.out.println("Hello, D瓜哥 · https://www.diguage.com");
}
// end::hi[]
}
引用代码片段:
1
2
3
public void hi() {
System.out.println("Hello, D瓜哥 · https://www.diguage.com");
}
1.2. Tab 页
-
Tab A
-
Tab B
-
Tab C
-
Tab D
Contents of Tab A.
Contents of Tab B.
Contents of Tab C.
Contains more than one block.
1
2
3
4
5
public class Test {
public static void main(String[] args) {
System.out.println("Hello");
}
}
1.3. 图片

Kroki! Examples — Kroki 支持的各种图。
1.3.13. TikZ
\documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{math} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{0.125pt} % % File name: directional-angles.tex % Description: % The directional angles of a vector are geometrically represented. % % Date of creation: July, 25th, 2021. % Date of last modification: October, 9th, 2022. % Author: Efra�n Soto Apolinar. % https://www.aprendematematicas.org.mx/author/efrain-soto-apolinar/instructing-courses/ % Source: page 11 of the % Glosario Ilustrado de Matematicas Escolares. % https://tinyurl.com/5udm2ufy % % Terms of use: % According to TikZ.net % https://creativecommons.org/licenses/by-nc-sa/4.0/ % Your commitment to the terms of use is greatly appreciated. % \begin{document} \tdplotsetmaincoords{80}{120} % \begin{tikzpicture}[tdplot_main_coords,scale=0.75] % Indicate the components of the vector in rectangular coordinates \pgfmathsetmacro{\ux}{4} \pgfmathsetmacro{\uy}{4} \pgfmathsetmacro{\uz}{3} % Length of each axis \pgfmathsetmacro{\ejex}{\ux+0.5} \pgfmathsetmacro{\ejey}{\uy+0.5} \pgfmathsetmacro{\ejez}{\uz+0.5} \pgfmathsetmacro{\umag}{sqrt(\ux*\ux+\uy*\uy+\uz*\uz)} % Magnitude of vector $\vec{u}$ % Compute the angle $\theta$ \pgfmathsetmacro{\angthetax}{pi*atan(\uy/\ux)/180} \pgfmathsetmacro{\angthetay}{pi*atan(\ux/\uz)/180} \pgfmathsetmacro{\angthetaz}{pi*atan(\uz/\uy)/180} % Compute the angle $\phi$ \pgfmathsetmacro{\angphix}{pi*acos(\ux/\umag)/180} \pgfmathsetmacro{\angphiy}{pi*acos(\uy/\umag)/180} \pgfmathsetmacro{\angphiz}{pi*acos(\uz/\umag)/180} % Compute rho sin(phi) to simplify computations \pgfmathsetmacro{\costz}{cos(\angthetax r)} \pgfmathsetmacro{\sintz}{sin(\angthetax r)} \pgfmathsetmacro{\costy}{cos(\angthetay r)} \pgfmathsetmacro{\sinty}{sin(\angthetay r)} \pgfmathsetmacro{\costx}{cos(\angthetaz r)} \pgfmathsetmacro{\sintx}{sin(\angthetaz r)} % Coordinate axis \draw[thick,->] (0,0,0) -- (\ejex,0,0) node[below left] {$x$}; \draw[thick,->] (0,0,0) -- (0,\ejey,0) node[right] {$y$}; \draw[thick,->] (0,0,0) -- (0,0,\ejez) node[above] {$z$}; % Projections of the components in the axis \draw[gray,very thin,opacity=0.5] (0,0,0) -- (\ux,0,0) -- (\ux,\uy,0) -- (0,\uy,0) -- (0,0,0); % face on the plane z = 0 \draw[gray,very thin,opacity=0.5] (0,0,\uz) -- (\ux,0,\uz) -- (\ux,\uy,\uz) -- (0,\uy,\uz) -- (0,0,\uz); % face on the plane z = \uz \draw[gray,very thin,opacity=0.5] (0,0,0) -- (0,0,\uz) -- (\ux,0,\uz) -- (\ux,0,0) -- (0,0,0); % face on the plane y = 0 \draw[gray,very thin,opacity=0.5] (0,\uy,0) -- (0,\uy,\uz) -- (\ux,\uy,\uz) -- (\ux,\uy,0) -- (0,\uy,0); % face on the plane y = \uy \draw[gray,very thin,opacity=0.5] (0,0,0) -- (0,\uy,0) -- (0,\uy,\uz) -- (0,0,\uz) -- (0,0,0); % face on the plane x = 0 \draw[gray,very thin,opacity=0.5] (\ux,0,0) -- (\ux,\uy,0) -- (\ux,\uy,\uz) -- (\ux,0,\uz) -- (\ux,0,0); % face on the plane x = \ux % Arc indicating the angle $\alpha$ % (angle formed by the vector $\vec{v}$ and the $x$ axis) \draw[red,thick] plot[domain=0:\angphix,smooth,variable=\t] ({cos(\t r)},{sin(\t r)*\costx},{sin(\t r)*\sintx}); % Arc indicating the angle $\beta$ % (angle formed by the vector $\vec{v}$ and the $y$ axis) \draw[red,thick] plot[domain=0:\angphiy,smooth,variable=\t] ({sin(\t r)*\sinty},{cos(\t r)},{sin(\t r)*\costy}); % Arc indicating the angle $\gamma$ % (angle formed by the vector $\vec{v}$ and the $z$ axis) \draw[red,thick] plot[domain=0:\angphiz,smooth,variable=\t] ({sin(\t r)*\costz},{sin(\t r)*\sintz},{cos(\t r)}); % Vector $\vec{u}$ \draw[blue,thick,->] (0,0,0) -- (\ux,\uy,\uz) node [below right] {$\vec{u}$}; % Nodes indicating the direction angles \pgfmathsetmacro{\xa}{1.85*cos(0.5*\angphix r)} \pgfmathsetmacro{\ya}{1.85*sin(0.5*\angphix r)*\costx} \pgfmathsetmacro{\za}{1.85*sin(0.5*\angphiz r)*\sintx} \node[red] at (\xa,\ya,\za) {\footnotesize$\alpha$}; % \pgfmathsetmacro{\xb}{1.5*sin(0.5*\angphiy r)*\sinty} \pgfmathsetmacro{\yb}{1.5*cos(0.5*\angphiy r)} \pgfmathsetmacro{\zb}{1.5*sin(0.5*\angphiy r)*\costy} \node[red] at (\xb,\yb,\zb) {\footnotesize$\beta$}; % \pgfmathsetmacro{\xc}{1.5*sin(0.5*\angphiz r)*\costz} \pgfmathsetmacro{\yc}{1.5*sin(0.5*\angphiz r)*\sintz} \pgfmathsetmacro{\zc}{1.5*cos(0.5*\angphiz r)} \node[red] at (\xc,\yc,\zc) {\footnotesize$\gamma$}; % \end{tikzpicture} % \end{document}