Outils pour utilisateurs

Outils du site


issue130:tutoriel1

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
issue130:tutoriel1 [2018/02/24 12:01] – créée auntieeissue130: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: http://docutils.sourceforge.net/rst.html +**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: http://docutils.sourceforge.net/rst.html 
  
-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.  So here is the basic layout for the markup and how to install Sphinx (by the way, Sphinx was written to create Python 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.  So here is the basic layout for the markup and how to install Sphinx (by the way, Sphinx was written to create Python documentation).**
  
-This was copied  from the Sphinx documentation page: http://www.sphinx-doc.org/en/stable/+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'utiliser il y a quelques années pour écrire un court livre sur le bois tourné (Wood Turning). La raison pour laquelle j'ai choisi Sphinx est sa capacité à créer différents styles en ne créant qu'un fichier config et en écrivant le texte dans reStructuredText. Voici la documentation : http://docutils.sourceforge.net/rst.html 
 + 
 +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'utilisez pas de traitement de texte. Voici la disposition de base pour markup et comment installer Sphinx (d'ailleurs, Sphinx a été écrit pour réaliser la documentation de Python). 
 + 
 +**This was copied  from the Sphinx documentation page: http://www.sphinx-doc.org/en/stable/
 • 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: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information • Extensive cross-references: semantic markup and automatic links for functions, classes, citations, glossary terms and similar pieces of information
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://www.sphinx-doc.org/en/stable/ 
 +• 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'information similaires. 
 +• Structure hiérarchique : définition facile de l'arborescence du document, avec des liens automatiques vers les frères, parents et enfants. 
 +• 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'entre elles installables depuis 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:
  
 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'abord un répertoire et changer pour ce répertoire, quickstart le fera pour vous : 
 + 
 +$ 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  html  latex  tex  xml doctrees  html  latex  tex  xml
  
-I hope this is of use to some people who like to try new ways of using Ubuntu/Linux.+I hope this is of use to some people who like to try new ways of using Ubuntu/Linux.** 
 + 
 +:maxdepth: 2 
 +  
 +   intro 
 +   tutorial 
 + 
 +Ajoutez simplement vos chapitres, etc., dans ce fichier comme montré dans l'exemple du bas de la page précédente. 
 + 
 +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/html. Si vous voulez faire d'autres types de fichiers, vous verrez les répertoires créés dans le dossier _build. Exemple : 
 + 
 +doctrees  html  latex  tex  xml 
 + 
 +J'espère que tout ceci sera utile aux personnes qui aiment essayer de nouvelles façons d'utiliser Ubuntu/Linux.
  
issue130/tutoriel1.1519470114.txt.gz · Dernière modification : 2018/02/24 12:01 de auntiee