issue130:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue130:tutoriel1 [2018/02/24 12:01] – créée auntiee | issue130:tutoriel1 [2018/03/01 16:20] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Sphinx is a very nice document processor; it can create html, latex, pdf’s, and more. I started using it a few years ago to write a short book about Wood Turning. The reason for choosing Sphinx is its ability to create the different styles by creating only a config file and writing the document in reStructuredText. Here is the documentation: | + | **Sphinx is a very nice document processor; it can create html, latex, pdf’s, and more. I started using it a few years ago to write a short book about Wood Turning. The reason for choosing Sphinx is its ability to create the different styles by creating only a config file and writing the document in reStructuredText. Here is the documentation: |
- | If you have not used markup, you are missing out. Try it out. All you need it an editor such as vim/gvim or ??? – your choice – do not use a word processor. | + | If you have not used markup, you are missing out. Try it out. All you need it an editor such as vim/gvim or ??? – your choice – do not use a word processor. |
- | This was copied | + | Sphinx est une excellente application de mise en page de document : il peut créer du html, du latex, des pdf et plus encore. J'ai commencé à l' |
+ | |||
+ | Si vous n'avez pas utilisé markup, vous manquez quelque chose. Essayez-le. Tout ce dont vous avez besoin est un éditeur tel que vim/gvim ou ??? - à votre choix - n' | ||
+ | |||
+ | **This was copied | ||
• Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text | • Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text | ||
• Extensive cross-references: | • Extensive cross-references: | ||
Ligne 10: | Ligne 14: | ||
• Code handling: automatic highlighting using the Pygments highlighter | • Code handling: automatic highlighting using the Pygments highlighter | ||
• Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and | • Extensions: automatic testing of code snippets, inclusion of docstrings from Python modules (API docs), and | ||
- | • Contributed extensions: more than 50 extensions contributed by users in a second repository; most of them installable from PyPI | + | • Contributed extensions: more than 50 extensions contributed by users in a second repository; most of them installable from PyPI** |
- | OK, let’s install Python and Sphinx; most distributions come with Python installed or at least in the package manager. You may still need to install PyPi to use pip: | + | Ceci a été traduit à partir de la page de documentation de Sphinx : http:// |
+ | • Formats de sortie : HTML ( y compris l'aide HTML de Windows), LaTeX (pour les versions imprimables en PDF), ePub, Texinfo, pages de manuel, texte brut. | ||
+ | • Références croisées étendues : markup sémantique et liens automatiques pour les fonctions, classes, citations, termes du glossaire et éléments d' | ||
+ | • Structure hiérarchique : définition facile de l' | ||
+ | • Indices automatiques : un index général tout comme des index pour les modules spécifiques à un langage. | ||
+ | • Gestion du code : surlignage automatique utilisant le surligneur Pygments. | ||
+ | • Extensions : test automatique de segments du code, inclusion de docstrings à partir de modules en Python (API docs) et | ||
+ | • Extensions de la communauté : plus de 50 extensions dues à la contribution des utilisateurs dans un second dépôt, la plupart d' | ||
+ | |||
+ | |||
+ | **OK, let’s install Python and Sphinx; most distributions come with Python installed or at least in the package manager. You may still need to install PyPi to use pip: | ||
sudo apt install python-pip | sudo apt install python-pip | ||
Ligne 30: | Ligne 44: | ||
$ sphinx-quickstart | $ sphinx-quickstart | ||
- | After this is finished, you will have a index.rst file that looks like this, and you will have a conf.py file created from the questions you answered in the quickstart. | + | After this is finished, you will have a index.rst file that looks like this, and you will have a conf.py file created from the questions you answered in the quickstart.** |
- | + | Bon ! Installons Python et Sphinx ; la plupart des distributions arrivent avec Python installé ou au moins dans le gestionnaire de paquets. Vous devrez peut-être installer PyPI pour pouvoir utiliser pip : | |
+ | |||
+ | sudo apt install python-pip | ||
+ | |||
+ | Installez Sphinx, soit depuis le paquet de la distribution soit par PyPi : | ||
+ | |||
+ | $ pip install Sphinx | ||
+ | |||
+ | ou | ||
+ | |||
+ | sudo apt install python-sphinx | ||
+ | |||
+ | Ceci fonctionne mieux pour Ubuntu 16.04.01. | ||
+ | |||
+ | Puis lancez et répondez à toutes les questions ; assurez-vous de dire « oui » aux extensions autodoc. Si vous voulez créer d' | ||
+ | |||
+ | $ sphinx-quickstart | ||
+ | |||
+ | Après avoir fini ceci, vous aurez un fichier index.rst qui ressemblera à ceci et vous aurez un fichier conf.py créé à partir des réponses aux questions de quickstart : | ||
+ | |||
+ | ** | ||
:maxdepth: 2 | :maxdepth: 2 | ||
Ligne 48: | Ligne 82: | ||
doctrees | doctrees | ||
- | I hope this is of use to some people who like to try new ways of using Ubuntu/ | + | I hope this is of use to some people who like to try new ways of using Ubuntu/ |
+ | |||
+ | :maxdepth: 2 | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | Ajoutez simplement vos chapitres, etc., dans ce fichier comme montré dans l' | ||
+ | |||
+ | Vous souhaiterez peut-être regarder dans le fichier conf.py pour voir si c'est ce que vous voulez ; si ce n'est pas le cas, faites les modifications. Puis tapez : | ||
+ | |||
+ | make html | ||
+ | |||
+ | Ceci construira au format html la documentation que vous venez de créer, dans le répertoire _build/ | ||
+ | |||
+ | doctrees | ||
+ | |||
+ | J' | ||
issue130/tutoriel1.1519470114.txt.gz · Dernière modification : 2018/02/24 12:01 de auntiee