5. sphinx book theme 特殊内容块

这个主题的一些特别的指令语法。

5.1. epigraph 引文

没有署名的引用:

Here’s my quote, it’s pretty neat. I wonder how many lines I can create with a single stream-of-consciousness quote. I could try to add a list of ideas to talk about. I suppose I could just keep going on forever, but I’ll stop here.

> Here’s my quote, it’s pretty neat. I wonder how many lines I can create with a single stream-of-consciousness quote. I could try to add a list of ideas to talk about. I suppose I could just keep going on forever, but I’ll stop here.

有时候你会想让引用更引人注意。为此,使用 {epigraph} 指令。下面是一个引文,点击它右边的按钮,显示用于生成它的代码:

Here’s my quote, it’s pretty neat. I wonder how many lines I can create with a single stream-of-consciousness quote. I could try to add a list of ideas to talk about. I suppose I could just keep going on forever, but I’ll stop here.

```{epigraph}
Here's my quote, it's pretty neat.
I wonder how many lines I can create with
a single stream-of-consciousness quote.
I could try to add a list of ideas to talk about.
I suppose I could just keep going on forever,
but I'll stop here.
```

还可以通过添加空行,后跟以 -- 开头的行,向题词添加属性。这将被渲染成这样:

Here’s my quote, it’s pretty neat. I wonder how many lines I can create with a single stream-of-consciousness quote. I could try to add a list of ideas to talk about. I suppose I could just keep going on forever, but I’ll stop here.

—Jo the Jovyan, the jupyter book docs

```{epigraph}
Here's my quote, it's pretty neat.
I wonder how many lines I can create with
a single stream-of-consciousness quote.
I could try to add a list of ideas to talk about.
I suppose I could just keep going on forever,
but I'll stop here.

-- Jo the Jovyan, *[the jupyter book docs](https://beta.jupyterbook.org)*
```

5.3. 宽屏的内容

全宽度的内容延伸到右边,使它在你的书的其他内容中脱颖而出。要向页面添加全宽内容,请向文档中的任何元素添加类全宽内容。例如,你可以像这样给 note 指令或其他指令添加一个全宽类属性:

```{note}
:class: full-width
This content will be full-width
```

```{code-block} java
:class: full-width

public class main {
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}
```

这段代码的结果如下:

备注

This content will be full-width

public class main {
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}