autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

vscode 安装restructuredtext

已有 6690 次阅读 2018-3-1 11:13 |系统分类:科研笔记

https://github.com/vscode-restructuredtext/vscode-restructuredtext/blob/master/docs/sphinx.md


查找插件

ext:rst方式查找安装一个插件。

注意事项

必须生成

必须在命令行中"code ."启动vscode




What is Sphinx

Sphinx is a tool to generate HTML/PDF from reStructuredText documents.

This extension relies on specific sphinx setup documented below to lint code and show live preview.

Install Python, Sphinx, and Others (0.0.14 and above)

  1. Download python version 2.7.10 or higher (Version 3.4 is recommended).

  2. If you are installing on Windows, ensure both the Python install directory and the Python scripts directory have been added to your PATH environment variable. For example, if you install Python into the c:\python34 directory, you would add c:\python34;c:\python34\scripts to your PATH environment variable.

  3. Install Sphinx by opening a command prompt and running the following Python command. (Note that this operation might take a few minutes to complete.)

    pip install sphinx sphinx-autobuild

  4. Install restructuredtext-lint to enable linter support.

    pip install restructuredtext-lint

Note that latest steps on how to install Python and sphinx, please refer to this article.

Sample Project

Generate a sample project to test out this extension. The test project has the following contents, like makefile, conf.py, and build folder. Then you can better understand why the below settings are required.

mkdir sphinxtest
cd sphinxtest
sphinx-quickstart
code .

Now this project is opened in Visual Studio Code.

You can preview .rst files as conf.py is at the root folder, and the default HTML output folder is _build/html.




https://blog.sciencenet.cn/blog-950202-1101738.html

上一篇:skimage.morphology.label
下一篇:pymol transparency 不生效解决办法
收藏 IP: 202.127.19.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-11-14 15:24

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部