-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreST.html
1277 lines (1178 loc) · 42.9 KB
/
reST.html
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>reStructuredText Manual — myhome 1.0.0 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '1.0.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="myhome 1.0.0 documentation" href="index.html" />
<link rel="next" title="software" href="software.html" />
<link rel="prev" title="python" href="python.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="software.html" title="software"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="python.html" title="python"
accesskey="P">previous</a> |</li>
<li><a href="index.html">myhome 1.0.0 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="restructuredtext-manual">
<h1>reStructuredText Manual<a class="headerlink" href="#restructuredtext-manual" title="Permalink to this headline">¶</a></h1>
<div class="highlight-python"><div class="highlight"><pre>.. toctree::
:maxdepth: 2
:numbered: 使各文档自动编号
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>文档主标题
===========
二级标题
------------
</pre></div>
</div>
<div class="section" id="id1">
<h2>文档主标题<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id2">
<h3>二级标题<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>.. note::
- 下划线长度应大于文字长度
- 标题级别和下划线一般无对应,文档中保持一致即可。
- 标题级别一般按以下次序:
* ``#`` with overline, for parts
* ``*`` with overline, for chapters
* ``=``, for sections
* ``-``, for subsections
* ``^``, for subsubsections
* ``"``, for paragraphs
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<ul class="last simple">
<li>下划线长度应大于文字长度</li>
<li>标题级别和下划线一般无对应,文档中保持一致即可。</li>
<li>标题级别一般按以下次序:<ul>
<li><tt class="docutils literal"><span class="pre">#</span></tt> with overline, for parts</li>
<li><tt class="docutils literal"><span class="pre">*</span></tt> with overline, for chapters</li>
<li><tt class="docutils literal"><span class="pre">=</span></tt>, for sections</li>
<li><tt class="docutils literal"><span class="pre">-</span></tt>, for subsections</li>
<li><tt class="docutils literal"><span class="pre">^</span></tt>, for subsubsections</li>
<li><tt class="docutils literal"><span class="pre">"</span></tt>, for paragraphs</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="section" id="sphinx">
<h2>Sphinx工程的目录结构<a class="headerlink" href="#sphinx" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>├── Makefile
├── make.bat
└── source
├── conf.py <-- 配置文件,按下面修改
├── _templates <-- 模板文件,不需要改动
├── _themes <-- 样式文件,不需要改动
├── index.rst <-- 文档入口,根据章节修改
├── *.rst <-- 文档章节,请删除
└── images <-- 静态资源,根据引用路径取目录名,请删除此目录
└── *.png
</pre></div>
</div>
<div class="section" id="id3">
<h3>模板修改<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
<p>(参见:<a class="reference external" href="http://sphinx-doc.org/theming.html">http://sphinx-doc.org/theming.html</a>)</p>
<p>修改文件 <cite>conf.py</cite> 中 <cite>html_theme = ‘default’</cite> 选项(builtin themes):</p>
<ul class="simple">
<li>default</li>
<li>sphinxdoc</li>
<li>nature</li>
<li>pyramid</li>
<li>haiku</li>
<li>traditional</li>
<li>scrolls</li>
<li>agogo</li>
</ul>
<p>固定边栏:
html_theme_options = {“stickysidebar”:”True”}</p>
</div>
</div>
<div class="section" id="id4">
<h2>段落<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id5">
<h3>空行分段<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>第一段内容
第二段内容和第一段之间有一空行
第一段内容
第二段内容和第一段之间有一空行
</pre></div>
</div>
</div>
<div class="section" id="id6">
<h3>自动续行<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>一个回车部分段,
本行续上行
</pre></div>
</div>
<p>一个回车部分段,
本行续上行</p>
</div>
<div class="section" id="id7">
<h3>不留白续行<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>行尾转移字符\
续行之间不留白。
</pre></div>
</div>
<p>行尾转移字符续行之间不留白。</p>
</div>
<div class="section" id="id8">
<h3>插入换行<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>| 保持现有格式
| 不换行(注意符号``|``之后有空格)
</pre></div>
</div>
<div class="line-block">
<div class="line">保持现有格式</div>
<div class="line">不换行(注意符号``|``之后有空格)</div>
</div>
<p><strong>下面的方法有点问题</strong></p>
<div class="highlight-python"><div class="highlight"><pre>.. role:: raw-html(raw)
:format: html
用新定义的role插入换行,
:raw-html:`<br />`
本行不续行
</pre></div>
</div>
<p>用新定义的role插入换行,
raw-html:<cite><br /></cite>
本行不续行</p>
</div>
<div class="section" id="id9">
<h3>段落缩进<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>邮件体段落缩进:
第一级段落缩进
第二级段落缩进
返回第一级段落缩进
</pre></div>
</div>
<p>邮件体段落缩进:</p>
<blockquote>
<div><p>第一级段落缩进</p>
<blockquote>
<div>第二级段落缩进</div></blockquote>
<p>返回第一级段落缩进</p>
</div></blockquote>
<p>即相同缩进量的段落对齐,同python段落缩进模式。</p>
<div class="highlight-python"><div class="highlight"><pre>| 这些行
| 在源文件里
| 被分隔的一模一样.
格言::
- 路漫漫其修远兮
- 吾将上下而求索
有空白 ::
路漫漫其修远兮
吾将上下而求索
</pre></div>
</div>
<div class="line-block">
<div class="line">这些行</div>
<div class="line">在源文件里</div>
<div class="line">被分隔的一模一样.</div>
</div>
<p>格言:</p>
<div class="highlight-python"><div class="highlight"><pre>- 路漫漫其修远兮
- 吾将上下而求索
</pre></div>
</div>
<p>有空白</p>
<div class="highlight-python"><div class="highlight"><pre>路漫漫其修远兮
吾将上下而求索
</pre></div>
</div>
</div>
</div>
<div class="section" id="id10">
<h2>代码块<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>双冒号后为缩进的代码块:
::
$ printf "Hello, World.\n"
声明语言类型实现语法高亮模式(如:C++)
.. code-block:: c++
:linenos:
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!"<<endl;
return 0;
}
</pre></div>
</div>
<p>双冒号后为缩进的代码块:</p>
<div class="highlight-python"><div class="highlight"><pre>$ printf "Hello, World.\n"
</pre></div>
</div>
<p>声明语言类型实现语法高亮模式(如:C++)</p>
<div class="highlight-c++"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8</pre></div></td><td class="code"><div class="highlight"><pre><span class="cp">#include <iostream></span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">std</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">cout</span><span class="o"><<</span><span class="s">"Hello World!"</span><span class="o"><<</span><span class="n">endl</span><span class="p">;</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</td></tr></table></div>
<p>外部包含:</p>
<div class="highlight-python"><div class="highlight"><pre>.. literalinclude:: cpptest.cpp
:language: c++
</pre></div>
</div>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#include <iostream></span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">std</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">cout</span><span class="o"><<</span><span class="s">"Hello World!"</span><span class="o"><<</span><span class="n">endl</span><span class="p">;</span>
<span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>注意上述代码中的空行,双冒号(或声明语言行后),空一行,代码块须向右缩进。</p>
<table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">linenos:</th><td class="field-body">表示显示行号</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id11">
<h2>列表<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id12">
<h3>无序列表<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>- 条目
- 条目
- 条目
- 条目
- 条目
- 条目
</pre></div>
</div>
<ul>
<li><p class="first">条目</p>
</li>
<li><p class="first">条目</p>
<ul>
<li><p class="first">条目</p>
</li>
<li><p class="first">条目</p>
<blockquote>
<div><ul class="simple">
<li>条目</li>
</ul>
</div></blockquote>
</li>
</ul>
</li>
<li><p class="first">条目</p>
</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>* 星号、减号、加号开始列表。
- 列表层级与缩进有关
× 和具体符号无关
* 返回到第一级列表
</pre></div>
</div>
<ul>
<li><p class="first">星号、减号、加号开始列表。</p>
<ul>
<li><p class="first">列表层级与缩进有关</p>
<p>× 和具体符号无关</p>
</li>
</ul>
</li>
<li><p class="first">返回到第一级列表</p>
</li>
</ul>
</div>
<div class="section" id="id13">
<h3>有序列表<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>1. 数字和点是一种标号方式。
A. 大写字母编号。
a. 小写字母编号。
2. 继续第一级标号。
(I) 大写字母编号。
i) 小写字母编号。
</pre></div>
</div>
<ol class="arabic simple">
<li>数字和点是一种标号方式。</li>
</ol>
<blockquote>
<div><ol class="upperalpha simple">
<li>大写字母编号。<ol class="loweralpha">
<li>小写字母编号。</li>
</ol>
</li>
</ol>
</div></blockquote>
<ol class="arabic simple" start="2">
<li>继续第一级标号。</li>
</ol>
<blockquote>
<div><ol class="upperroman simple">
<li>大写字母编号。</li>
</ol>
<blockquote>
<div><ol class="lowerroman simple">
<li>小写字母编号。</li>
</ol>
</div></blockquote>
</div></blockquote>
</div>
<div class="section" id="id14">
<h3>自动编号<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>3. 第三条
#. 第四条
7. 重新设定序号
#. 继续
</pre></div>
</div>
<ol class="arabic simple" start="3">
<li>第三条</li>
<li>第四条</li>
</ol>
<ol class="arabic simple" start="7">
<li>重新设定序号</li>
<li>继续</li>
</ol>
</div>
<div class="section" id="id15">
<h3>列表中的续行、段落和代码块<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>1. 列表项可以折行,
对齐则自动续行。
2. 列表中多个段落
空行开始新段落,
新段落要和列表项内容对齐。
3. 列表中代码块注意对齐:
::
$ printf "Hello World. \n"
</pre></div>
</div>
<ol class="arabic">
<li><p class="first">列表项可以折行,
对齐则自动续行。</p>
</li>
<li><p class="first">列表中多个段落</p>
<p>空行开始新段落,
新段落要和列表项内容对齐。</p>
</li>
<li><p class="first">列表中代码块注意对齐:</p>
<div class="highlight-python"><div class="highlight"><pre>$ printf "Hello World. \n"
</pre></div>
</div>
</li>
</ol>
</div>
</div>
<div class="section" id="id16">
<h2>定义<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>git
Simple and beautiful.
hg
Another DVCS.
subersion
VCS with many constrains.
Why not Git?
</pre></div>
</div>
<dl class="docutils">
<dt>git</dt>
<dd>Simple and beautiful.</dd>
<dt>hg</dt>
<dd>Another DVCS.</dd>
<dt>subersion</dt>
<dd><p class="first">VCS with many constrains.</p>
<p class="last">Why not Git?</p>
</dd>
</dl>
</div>
<div class="section" id="id17">
<h2>分割线<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h2>
<p>四条或以上短线显示为分割线</p>
<div class="highlight-python"><div class="highlight"><pre>----
</pre></div>
</div>
</div>
<hr class="docutils" />
<div class="section" id="id18">
<h2>字体<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>这是 **粗体** 符号前后均需用空格隔开
这是 *斜体*
这是 ``代码引用`` 可以输入 ``++ --`` ,而非代码引用效果为: ++ --
这是不留白的\ **粗体**\ 和\ *斜体*\的效果。
</pre></div>
</div>
<p>这是 <strong>粗体</strong> 符号前后均需用空格隔开</p>
<p>这是 <em>斜体</em></p>
<p>这是 <tt class="docutils literal"><span class="pre">代码引用</span></tt> 可以输入 <tt class="docutils literal"><span class="pre">++</span> <span class="pre">--</span></tt> ,而非代码引用效果为: ++ –</p>
<p>这是不留白的<strong>粗体</strong>和<em>斜体</em>的效果。</p>
<div class="highlight-python"><div class="highlight"><pre>.. role:: strike
:class: strike
:strike:`删除线` 效果
不留白的\ :strike:`删除线`\ 效果
.. role:: ul
:class: underline
:ul:`下划线` 效果
不留白的\ :ul:`下划线`\ 效果
</pre></div>
</div>
<p><span class="strike">删除线</span> 效果</p>
<p>不留白的<span class="strike">删除线</span>效果</p>
<p><span class="underline">下划线</span> 效果</p>
<p>不留白的<span class="underline">下划线</span>效果</p>
<div class="highlight-python"><div class="highlight"><pre>上标、下标
-----------
- Water: H\ :sub:`2`\ O
- E=mc\ :sup:`2`
等宽字体
-----------
两个连续反引号嵌入代码,如:``git status``。
引言
-------
`Got Github` by me
清除标记空白
------------
标记符号前后空白用\ **反斜线**\ 消除
</pre></div>
</div>
<div class="section" id="id19">
<h3>上标、下标<a class="headerlink" href="#id19" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>Water: H<sub>2</sub>O</li>
<li>E=mc<sup>2</sup></li>
</ul>
</div>
<div class="section" id="id20">
<h3>等宽字体<a class="headerlink" href="#id20" title="Permalink to this headline">¶</a></h3>
<p>两个连续反引号嵌入代码,如:<tt class="docutils literal"><span class="pre">git</span> <span class="pre">status</span></tt>。</p>
</div>
<div class="section" id="id21">
<h3>引言<a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h3>
<p><cite>Got Github</cite> by me</p>
</div>
<div class="section" id="id22">
<h3>清除标记空白<a class="headerlink" href="#id22" title="Permalink to this headline">¶</a></h3>
<p>标记符号前后空白用<strong>反斜线</strong>消除</p>
</div>
</div>
<div class="section" id="id23">
<h2>链接<a class="headerlink" href="#id23" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>URL自动连接
-----------
- 北京大学 http://www.pku.edu.cn
- 未名bbs http://bbs.pku.edu.cn
- 邮箱 [email protected]
文字连接
------------
- 访问 `北京大学 <http://www.pku.edu.cn>`_ 。
- 上面已经定义,直接引用 北京大学_ 链接。
- 链接地址在后面说明,如: 未名bbs_ 。
- 反引号括起多个单词链接,如: `pku homepage`_ 。
.. _未名bbs: http://bbs.pku.edu.cn
.. _pku homepage: http://www.pku.edu.cn
</pre></div>
</div>
<div class="section" id="url">
<h3>URL自动连接<a class="headerlink" href="#url" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>北京大学 <a class="reference external" href="http://www.pku.edu.cn">http://www.pku.edu.cn</a></li>
<li>未名bbs <a class="reference external" href="http://bbs.pku.edu.cn">http://bbs.pku.edu.cn</a></li>
</ul>
</div>
<div class="section" id="id24">
<h3>文字连接:<a class="headerlink" href="#id24" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>访问 <a class="reference external" href="http://www.pku.edu.cn">北京大学</a> 。</li>
<li>上面已经定义,直接引用 <a class="reference external" href="http://www.pku.edu.cn">北京大学</a> 链接。</li>
<li>链接地址在后面说明,如: <a class="reference external" href="http://bbs.pku.edu.cn">未名bbs</a> 。</li>
<li>反引号括起多个单词链接,如: <a class="reference external" href="http://www.pku.edu.cn">pku homepage</a> 。</li>
</ul>
</div>
<div class="section" id="id26">
<h3>内部跳转<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>.. _fig1:
.. figure:: _static/pic/more.png
内部跳转示例
- 通过 fig1_ 跳转
- 通过 `点击这里 <#fig1>`_ 跳转
- 参见 :ref:`fig1`\ 。
</pre></div>
</div>
<div class="figure" id="fig1">
<img alt="_images/more.png" src="_images/more.png" />
<p class="caption">内部跳转示例</p>
</div>
<ul class="simple">
<li>通过 <a class="reference internal" href="#fig1">fig1</a> 跳转</li>
<li>通过 <a class="reference external" href="#fig1">点击这里</a> 跳转</li>
<li>参见 <a class="reference internal" href="#fig1"><em>内部跳转示例</em></a>。</li>
</ul>
</div>
<div class="section" id="id28">
<h3>章节之间跳转<a class="headerlink" href="#id28" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>各个章节的首页一般是 index.rst
头一行,习惯性加个声明:
.. _chapter1index:
那么,在其它任意文本中可随时引用:
:ref:`首页 <homeindex>`指向首页的链接。
</pre></div>
</div>
<div class="line-block">
<div class="line">那么,在其它任意文本中可随时引用:</div>
<div class="line"><a class="reference internal" href="index.html#homeindex"><em>首页</em></a> 指向首页的链接。</div>
</div>
<p>对于中文标题有可能产生的锚点只是#id56形式,没有正式链接跳转。需要创建形如以下形式的锚点</p>
<div class="highlight-python"><div class="highlight"><pre>.. custum_id:
title
=============
</pre></div>
</div>
</div>
<div class="section" id="id29">
<h3>脚注<a class="headerlink" href="#id29" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>- 脚注即可以手动分配数字 [1]_ ,
也可以使用井号自动分配 [#]_ 。
- 自动分配脚注 [#label]_ 也可以用
添加标签形式 [#label]_ 多次引用。
- 还支持用星号嵌入符号式脚注 [#label]_ ,
如这个 [*]_ 和 这个 [*]_ 再加一个 [*]_
再加一个 [*]_ 再加一个 [*]_ 。
a [#f1]_ b [#f2]_。
- 使用单词做标识亦可 [CIT2012]_ 。
.. [1] 数字编号脚注。
.. [#] 井号自动编号。
.. [#label] 井号添加标签以便多次引用。
.. [*] 星号自动用符号做脚注标记。
.. [*] 星号自动用符号做脚注标记。
.. [*] 星号自动用符号做脚注标记。
.. [*] 星号自动用符号做脚注标记。
.. [*] 星号自动用符号做脚注标记。
.. [#f1] af
.. [#f2] bf
.. [CIT2012] 单词或其他规定格式。
</pre></div>
</div>
<ul class="simple">
<li>脚注即可以手动分配数字 <a class="footnote-reference" href="#id43" id="id30">[1]</a> ,
也可以使用井号自动分配 <a class="footnote-reference" href="#id44" id="id31">[2]</a> 。</li>
<li>自动分配脚注 <a class="footnote-reference" href="#label" id="id32">[3]</a> 也可以用
添加标签形式 <a class="footnote-reference" href="#label" id="id33">[3]</a> 多次引用。</li>
<li>还支持用星号嵌入符号式脚注 <a class="footnote-reference" href="#label" id="id34">[3]</a> ,
如这个 <a class="footnote-reference" href="#id45" id="id35">[*]</a> 和 这个 <a class="footnote-reference" href="#id46" id="id36">[†]</a> 再加一个 <a class="footnote-reference" href="#id47" id="id37">[‡]</a> 再加一个 <a class="footnote-reference" href="#id48" id="id38">[§]</a> 再加一个 <a class="footnote-reference" href="#id49" id="id39">[¶]</a> 。
a <a class="footnote-reference" href="#f1" id="id40">[4]</a> b <a class="footnote-reference" href="#f2" id="id41">[5]</a>。</li>
<li>使用单词做标识亦可 <a class="reference internal" href="#cit2012" id="id42">[CIT2012]</a> 。</li>
</ul>
<table class="docutils footnote" frame="void" id="id43" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id30">[1]</a></td><td>数字编号脚注。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id44" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id31">[2]</a></td><td>井号自动编号。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="label" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label">[3]</td><td><em>(<a class="fn-backref" href="#id32">1</a>, <a class="fn-backref" href="#id33">2</a>, <a class="fn-backref" href="#id34">3</a>)</em> 井号添加标签以便多次引用。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id45" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id35">[*]</a></td><td>星号自动用符号做脚注标记。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id46" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id36">[†]</a></td><td>星号自动用符号做脚注标记。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id47" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id37">[‡]</a></td><td>星号自动用符号做脚注标记。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id48" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id38">[§]</a></td><td>星号自动用符号做脚注标记。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id49" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id39">[¶]</a></td><td>星号自动用符号做脚注标记。</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="f1" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id40">[4]</a></td><td>af</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="f2" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id41">[5]</a></td><td>bf</td></tr>
</tbody>
</table>
<table class="docutils citation" frame="void" id="cit2012" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id42">[CIT2012]</a></td><td>单词或其他规定格式。</td></tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id50">
<h2>图片<a class="headerlink" href="#id50" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>.. figure:: _static/pic/logo.png
:width: 60
图:more
- GitHub Logo: |octocat|
- 带链接的图片:
|imglink|_
- 下图向右浮动。
.. image:: _static/pic/logo.png
:align: right
.. |octocat| image:: _static/pic/logo.png
.. |imglink| image:: _static/pic/logo.png
.. _imglink: https://github.com/
</pre></div>
</div>
<div class="figure">
<a class="reference internal image-reference" href="_images/logo.png"><img alt="_images/logo.png" src="_images/logo.png" style="width: 60px;" /></a>
<p class="caption">图:more</p>
</div>
<ul>
<li><p class="first">GitHub Logo: <img alt="octocat" src="_images/logo.png" /></p>
</li>
<li><p class="first">带链接的图片:
<a class="reference external" href="https://github.com/"><img alt="imglink" src="_images/logo.png" /></a></p>
</li>
<li><dl class="first docutils">
<dt>下图向右浮动。</dt>
<dd><img alt="_images/logo.png" class="first last align-right" src="_images/logo.png" />
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="id51">
<h2>表格<a class="headerlink" href="#id51" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id52">
<h3>简单表格<a class="headerlink" href="#id52" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>+------------+------------+-----------+
| Header 1 | Header 2 | Header 3 |
+============+============+===========+
| body row 1 | column 2 | column 3 |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+
| body row 3 | Cells may | - Cells |
+------------+ span rows. | |
| body row 4 | | |
+------------+------------+-----------+
.. table:: 示例表格
:class: classic
+---------+--------+--------+
| head1 | head2 | head3 |
+=========+========+========+
| | cell | cell |
| rowspan +--------+--------+
| | * colspan |
| | * another line |
+---------+-----------------+
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="34%" />
<col width="34%" />
<col width="31%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Header 1</th>
<th class="head">Header 2</th>
<th class="head">Header 3</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>body row 1</td>
<td>column 2</td>
<td>column 3</td>
</tr>
<tr class="row-odd"><td>body row 2</td>
<td colspan="2">Cells may span columns.</td>
</tr>
<tr class="row-even"><td>body row 3</td>
<td rowspan="2">Cells may
span rows.</td>
<td rowspan="2"><ul class="first last simple">
<li>Cells</li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>body row 4</td>
</tr>
</tbody>
</table>
<table border="1" class="classic docutils">
<caption>示例表格</caption>
<colgroup>
<col width="36%" />
<col width="32%" />
<col width="32%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">head1</th>
<th class="head">head2</th>
<th class="head">head3</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td rowspan="2">rowspan</td>
<td>cell</td>
<td>cell</td>
</tr>
<tr class="row-odd"><td colspan="2"><ul class="first last simple">
<li>colspan</li>
<li>another line</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="highlight-python"><div class="highlight"><pre>===== ===== ======
Inputs Output
------------ ------
A B A or B
===== ===== ======
False False False
True False True
False True True
True True True
===== ===== ======
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="31%" />
<col width="31%" />
<col width="38%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head" colspan="2">Inputs</th>
<th class="head">Output</th>
</tr>
<tr class="row-even"><th class="head">A</th>
<th class="head">B</th>
<th class="head">A or B</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-odd"><td>False</td>
<td>False</td>
<td>False</td>
</tr>
<tr class="row-even"><td>True</td>
<td>False</td>
<td>True</td>
</tr>
<tr class="row-odd"><td>False</td>
<td>True</td>
<td>True</td>
</tr>
<tr class="row-even"><td>True</td>
<td>True</td>
<td>True</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="csv">
<h3>CSV表格<a class="headerlink" href="#csv" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>.. csv-table:: Frozen Delights!
:header: "Treat", "Quantity", "Description"
:widths: 15, 10, 30
"Albatross", 2.99, "On a stick!"
"Crunchy Frog", 1.49, "If we took the bones out, it wouldn't be
crunchy, now would it?"
"Gannet Ripple", 1.99, "On a stick!"
</pre></div>
</div>
<table border="1" class="docutils">
<caption>Frozen Delights!</caption>
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><table class="first last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">header:</th><td class="field-body">“Treat”</td>
</tr>
</tbody>
</table>
</td>
<td>Quantity</td>
<td>Description</td>
</tr>
<tr class="row-even"><td><table class="first last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">widths:</th><td class="field-body">15</td>
</tr>
</tbody>
</table>
</td>
<td>10</td>
<td>30</td>
</tr>
<tr class="row-odd"><td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="row-even"><td>Albatross</td>
<td>2.99</td>
<td>On a stick!</td>
</tr>
<tr class="row-odd"><td>Crunchy Frog</td>
<td>1.49</td>
<td>If we took the bones out, it wouldn’t be
crunchy, now would it?</td>
</tr>
<tr class="row-even"><td>Gannet Ripple</td>
<td>1.99</td>
<td>On a stick!</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id53">
<h3>列表格<a class="headerlink" href="#id53" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python"><div class="highlight"><pre>.. list-table:: Frozen Delights!
:widths: 15 10 30
:header-rows: 1