mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Improve choice of lexers for highlighting in Installing Sphinx (docs)
cf http://pygments.org/docs/lexers/#lexers-for-various-shells The difference with prior situation shows more in PDF output (but for Windows example visible already in html) than in HTML with used theme. I am not sure why ``select`` is highlighted but not ``sudo`` but this was case already before.
This commit is contained in:
parent
39ce9d9ab9
commit
9a20927593
@ -7,6 +7,8 @@ Installing Sphinx
|
|||||||
:local:
|
:local:
|
||||||
:backlinks: none
|
:backlinks: none
|
||||||
|
|
||||||
|
.. highlight:: console
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ Debian/Ubuntu
|
|||||||
Install either ``python3-sphinx`` (Python 3) or ``python-sphinx`` (Python 2)
|
Install either ``python3-sphinx`` (Python 3) or ``python-sphinx`` (Python 2)
|
||||||
using :command:`apt-get`:
|
using :command:`apt-get`:
|
||||||
|
|
||||||
.. code-block:: bash
|
::
|
||||||
|
|
||||||
$ apt-get install python3-sphinx
|
$ apt-get install python3-sphinx
|
||||||
|
|
||||||
@ -36,7 +38,7 @@ RHEL, CentOS
|
|||||||
|
|
||||||
Install ``python-sphinx`` using :command:`yum`:
|
Install ``python-sphinx`` using :command:`yum`:
|
||||||
|
|
||||||
.. code-block:: bash
|
::
|
||||||
|
|
||||||
$ yum install python-sphinx
|
$ yum install python-sphinx
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ __ https://www.anaconda.com/download/#macos
|
|||||||
Homebrew
|
Homebrew
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
.. code-block:: bash
|
::
|
||||||
|
|
||||||
$ brew install sphinx-doc
|
$ brew install sphinx-doc
|
||||||
|
|
||||||
@ -79,13 +81,13 @@ MacPorts
|
|||||||
Install either ``python36-sphinx`` (Python 3) or ``python27-sphinx`` (Python 2)
|
Install either ``python36-sphinx`` (Python 3) or ``python27-sphinx`` (Python 2)
|
||||||
using :command:`port`:
|
using :command:`port`:
|
||||||
|
|
||||||
.. code-block:: bash
|
::
|
||||||
|
|
||||||
$ sudo port install py36-sphinx
|
$ sudo port install py36-sphinx
|
||||||
|
|
||||||
To set up the executable paths, use the ``port select`` command:
|
To set up the executable paths, use the ``port select`` command:
|
||||||
|
|
||||||
.. code-block:: bash
|
::
|
||||||
|
|
||||||
$ sudo port select --set python python36
|
$ sudo port select --set python python36
|
||||||
$ sudo port select --set sphinx py36-sphinx
|
$ sudo port select --set sphinx py36-sphinx
|
||||||
@ -97,7 +99,7 @@ __ https://www.macports.org/ports.php?by=library&substr=py36-sphinx
|
|||||||
Anaconda
|
Anaconda
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
.. code-block:: console
|
::
|
||||||
|
|
||||||
$ conda install sphinx
|
$ conda install sphinx
|
||||||
|
|
||||||
@ -136,14 +138,14 @@ versions of Python.
|
|||||||
|
|
||||||
On Linux or MacOS, you should open your terminal and run the following command.
|
On Linux or MacOS, you should open your terminal and run the following command.
|
||||||
|
|
||||||
.. code-block:: shell
|
::
|
||||||
|
|
||||||
$ pip install -U sphinx
|
$ pip install -U sphinx
|
||||||
|
|
||||||
On Windows, you should open *Command Prompt* (:kbd:`⊞Win-r` and type
|
On Windows, you should open *Command Prompt* (:kbd:`⊞Win-r` and type
|
||||||
:command:`cmd`) and run the same command.
|
:command:`cmd`) and run the same command.
|
||||||
|
|
||||||
.. code-block:: bat
|
.. code-block:: doscon
|
||||||
|
|
||||||
C:\> pip install -U sphinx
|
C:\> pip install -U sphinx
|
||||||
|
|
||||||
@ -156,7 +158,7 @@ release. You will not generally need (or want) to do this, but it can be
|
|||||||
useful if you see a possible bug in the latest stable release. To do this, use
|
useful if you see a possible bug in the latest stable release. To do this, use
|
||||||
the ``--pre`` flag.
|
the ``--pre`` flag.
|
||||||
|
|
||||||
.. code-block:: shell
|
::
|
||||||
|
|
||||||
$ pip install -U --pre sphinx
|
$ pip install -U --pre sphinx
|
||||||
|
|
||||||
@ -168,13 +170,13 @@ You can install Sphinx directly from a clone of the `Git repository`__. This
|
|||||||
can be done either by cloning the repo and installing from the local clone, on
|
can be done either by cloning the repo and installing from the local clone, on
|
||||||
simply installing directly via :command:`git`.
|
simply installing directly via :command:`git`.
|
||||||
|
|
||||||
.. code-block:: shell
|
::
|
||||||
|
|
||||||
$ git clone https://github.com/sphinx-doc/sphinx
|
$ git clone https://github.com/sphinx-doc/sphinx
|
||||||
$ cd sphinx
|
$ cd sphinx
|
||||||
$ pip install .
|
$ pip install .
|
||||||
|
|
||||||
.. code-block:: shell
|
::
|
||||||
|
|
||||||
$ pip install git+https://github.com/sphinx-doc/sphinx
|
$ pip install git+https://github.com/sphinx-doc/sphinx
|
||||||
|
|
||||||
@ -182,6 +184,8 @@ You can also download a snapshot of the Git repo in either `tar.gz`__ or
|
|||||||
`zip`__ format. Once downloaded and extracted, these can be installed with
|
`zip`__ format. Once downloaded and extracted, these can be installed with
|
||||||
:command:`pip` as above.
|
:command:`pip` as above.
|
||||||
|
|
||||||
|
.. highlight:: default
|
||||||
|
|
||||||
__ https://github.com/sphinx-doc/sphinx
|
__ https://github.com/sphinx-doc/sphinx
|
||||||
__ https://github.com/sphinx-doc/sphinx/archive/master.tar.gz
|
__ https://github.com/sphinx-doc/sphinx/archive/master.tar.gz
|
||||||
__ https://github.com/sphinx-doc/sphinx/archive/master.zip
|
__ https://github.com/sphinx-doc/sphinx/archive/master.zip
|
||||||
|
Loading…
Reference in New Issue
Block a user