rest-example.html 8.3 KB
Newer Older
Y
Yifan Wu 已提交
1 2 3


<!DOCTYPE html>
Y
Yifan Wu 已提交
4 5
<!--[if IE 8]><html class="no-js lt-ie9" lang="zh-CN" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="zh-CN" > <!--<![endif]-->
Y
Yifan Wu 已提交
6 7 8 9 10
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
Y
Yifan Wu 已提交
11
  <title>reStructuredText 基本语法 &mdash; rCore-Tutorial-Book-v3 0.1 文档</title>
Y
Yifan Wu 已提交
12 13 14 15 16 17 18 19
  

  
  
  
  

  
Y
Yifan Wu 已提交
20
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
Y
Yifan Wu 已提交
21 22 23 24 25 26 27
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
Y
Yifan Wu 已提交
28
        <script src="_static/translations.js"></script>
Y
Yifan Wu 已提交
29 30 31 32 33
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    
Y
Yifan Wu 已提交
34 35 36 37

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
Y
Yifan Wu 已提交
38 39 40
    <link rel="index" title="索引" href="genindex.html" />
    <link rel="search" title="搜索" href="search.html" />
    <link rel="next" title="项目协作" href="collaboration.html" />
Y
Yifan Wu 已提交
41
    <link rel="prev" title="第二章:系统调用" href="chapter2/index.html" /> 
Y
Yifan Wu 已提交
42 43 44 45 46 47 48 49 50 51 52 53 54
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
Y
Yifan Wu 已提交
55
            <a href="index.html" class="icon icon-home"> rCore-Tutorial-Book-v3
Y
Yifan Wu 已提交
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
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">正文</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">快速上手</a></li>
88
<li class="toctree-l1"><a class="reference internal" href="chapter1/index.html">第一章:构建运行 RV64 裸机程序</a></li>
Y
Yifan Wu 已提交
89
<li class="toctree-l1"><a class="reference internal" href="chapter2/index.html">第二章:系统调用</a></li>
Y
Yifan Wu 已提交
90 91 92
</ul>
<p class="caption"><span class="caption-text">开发注记</span></p>
<ul class="current">
Y
Yifan Wu 已提交
93 94 95 96
<li class="toctree-l1 current"><a class="current reference internal" href="#">reStructuredText 基本语法</a><ul class="simple">
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="collaboration.html">项目协作</a></li>
Y
Yifan Wu 已提交
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
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">rCore-Tutorial-Book-v3</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
Y
Yifan Wu 已提交
140
      <li><a href="index.html">Docs</a> &raquo;</li>
Y
Yifan Wu 已提交
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
        
      <li>reStructuredText 基本语法</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/rest-example.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="restructuredtext">
Y
Yifan Wu 已提交
162 163 164
<h1>reStructuredText 基本语法<a class="headerlink" href="#restructuredtext" title="永久链接至标题"></a></h1>
<div class="toctree-wrapper compound">
</div>
Y
Yifan Wu 已提交
165
<div class="admonition note">
Y
Yifan Wu 已提交
166
<p class="admonition-title">注解</p>
Y
Yifan Wu 已提交
167 168 169 170 171 172 173
<p>下面是一个注记。</p>
<p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks">这里</a> 给出了在 Sphinx 中
外部链接的引入方法。注意,链接的名字和用一对尖括号包裹起来的链接地址之间必须有一个空格。链接最后的下划线和片段的后续内容之间也需要
有一个空格。</p>
<p>接下来是一个文档内部引用的例子。比如,戳 <a class="reference internal" href="quickstart.html"><span class="doc">快速上手</span></a> 可以进入快速上手环节。</p>
</div>
<div class="admonition warning">
Y
Yifan Wu 已提交
174
<p class="admonition-title">警告</p>
Y
Yifan Wu 已提交
175 176
<p>下面是一个警告。</p>
<div class="literal-block-wrapper docutils container" id="id3">
Y
Yifan Wu 已提交
177
<div class="code-block-caption"><span class="caption-text">一段示例 Rust 代码</span><a class="headerlink" href="#id3" title="永久链接至代码"></a></div>
Y
Yifan Wu 已提交
178 179 180 181 182 183 184 185 186
<div class="highlight-rust notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="c1">// 我们甚至可以插入一段 Rust 代码!</span>
<span class="k">fn</span> <span class="nf">add</span><span class="p">(</span><span class="n">a</span>: <span class="kt">i32</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kt">i32</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">i32</span> <span class="p">{</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>
</td></tr></table></div>
</div>
<p>下面继续我们的警告。</p>
</div>
<div class="admonition error">
Y
Yifan Wu 已提交
187
<p class="admonition-title">错误</p>
Y
Yifan Wu 已提交
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
<p>下面是一个错误。</p>
</div>
<p>这里是一行数学公式 <span class="math notranslate nohighlight">\(\sin(\alpha+\beta)=\sin\alpha\cos\beta+\cos\alpha\sin\beta\)</span></p>
<p>基本的文本样式:这是 <em>斜体</em> ,这是 <strong>加粗</strong> ,接下来的则是行间公式 <code class="docutils literal notranslate"><span class="pre">a0</span></code> 。它们的前后都需要有一个空格隔开其他内容,这个让人挺不爽的…</p>
<p><a class="reference external" href="https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html#the-doc-role">这是</a> 一个全面展示
章节分布的例子,来自于 ReadTheDocs 的官方文档。事实上,现在我们也采用 ReadTheDocs 主题了,它非常美观大方。</p>
<p>下面是一个测试 gif。</p>
<img alt="_images/test.gif" src="_images/test.gif" />
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
Y
Yifan Wu 已提交
206 207
        <a href="collaboration.html" class="btn btn-neutral float-right" title="项目协作" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
Y
Yifan Wu 已提交
208
      
Y
Yifan Wu 已提交
209
        <a href="chapter2/index.html" class="btn btn-neutral float-left" title="第二章:系统调用" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
Y
Yifan Wu 已提交
210 211 212 213 214 215 216 217
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
Y
Yifan Wu 已提交
218
        &copy; Copyright 2020, Yifan Wu
Y
Yifan Wu 已提交
219 220 221

    </p>
  </div>
Y
Yifan Wu 已提交
222
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
Y
Yifan Wu 已提交
223 224 225 226 227 228 229 230 231 232 233

</footer>

        </div>
      </div>

    </section>

  </div>
  

Y
Yifan Wu 已提交
234

Y
Yifan Wu 已提交
235 236 237 238 239 240 241 242 243 244 245 246 247
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>