QGIS Documentation will be built automatically on the server at 0, 8am, 4pm PDT (Pacific Daylight Time). The current status is available at http://docs.qgis.org.
QGIS Documentation is mainly written using the reStructuredText (reST) format syntax, coupled with some scripts from the Sphinx toolset to post-process the HTML output. See http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html or http://sphinx.pocoo.org/markup/inline.html.
In general, when creating rst documentation for the QGIS project, please follow the Python documentation style guidelines. Below are exposed some general guidelines to follow when using reST for the QGIS documentation writing.
If you are looking for general rules on contributing to QGIS project or managing repositories, you may find help at Get Involved in the QGIS Community.
Para cada página web da documentação corresponde um arquivo .rst.
Sections used to structure the text are identified through their title which is underlined (and overlined for the first level). Same level titles must use same character for underline adornment. In QGIS Documentation, you should use following styles for chapter, section, subsection and minisec.
********
Chapter
********
Section
=======
Subsection
----------
Minisec
.......
Subminisec
^^^^^^^^^^
Pode usar algumas etiquetas dentro do texto para destacar alguns itens.
Menu gui: to mark a complete sequence of menu selections, including selecting submenus and choosing a specific operation, or any subsequence of such a sequence.
:menuselection:`menu --> submenu`
Dialog and Tab title: Labels presented as part of an interactive user interface including window title, tab title and option labels.
:guilabel:`title`
Button labels
**[Apply]**
Nome do ficheiro ou diretoria
:file:`README.rst`
Icon with popup text belonging to Icon
|icon| :sup:`popup_text`
(veja a imagem abaixo).
Shorcut keyboard
:kbd:`ctrl B`
will show Ctrl B
User text
``label``
References are used to place anchors inside the text. It then helps you create and call hyperlinks between sections or page.
The example below creates the anchor of a section (e.g., Label/reference title)
.. _my_anchor:
Label/reference
---------------
To call the reference in the same page, use
see my_anchor_ for more information.
which will return:
see my_anchor for more information.
Notice how it will jump to the following line/thing following the ‘anchor’. Normally to declare this label you do not need to use apastroph’s but you do need to use empty lines before and after the anchor.
Another way to jump to the same place from anywhere in the documentation is to use the :ref: role.
see :ref:`my_anchor` for more information.
which will display the caption instead (in this case the title of this section!):
see Etiqueta/ referência for more information.
So reference 1 (my_anchor) and reference 2 (Etiqueta/ referência). Because the reference often displays a full caption, there is not really the need to use the word section. Note that you can also use a custom caption to describe the reference
see :ref:`Label and reference <my_anchor>` for more information.
regressar:
see Label and reference for more information.
Para inserir uma imagem, use
.. image:: /static/common/qgislogo.png
:width: 10 em
o que devolverá
You can put an image inside text or add an alias to use everywhere. To use an image inside a paragraph, just create an alias somewhere.
.. |nice_logo| image:: /static/common/qgislogo.png
:width: 2 em
e chame-o para o seu parágrafo
my paragraph begins here with a nice logo |nice_logo|.
Here is how this example become:
my paragraph begins here with a nice logo .
Note
Currently, to ensure consistency and help in the use of QGIS icons a list of alias is built and available in Substituições chapter.
.. _figure_readme_1:
.. only:: html
**Figure Readme 1:**
.. figure:: /static/common/qgislogo.png
:width: 20 em
:align: center
A caption: A logo I like
O resultado é parecido com isto:
Figure Readme 1:
Use .. only:: html to make the number to the figure (Figure Readme 1) visible only in the html files. The scripts will insert an automatical generated number before the caption of the figure in pdf.
To use a caption (see My caption) just insert indented text after a blank line in the figure block.
Referencing to the figure can be done using the reference label like this
(see Figure_Readme_1_).
It will show the anchor Figure_Readme_1. You can use uppercase if you want. It can be used in the same .rst document but not in other .rst documents.
You can not use the :ref: role for reference anymore, because in html the reference to the caption is lost (it now refers to the place before Figure Readme 1:)
see :ref:`figure_readme_1`, does not work due to the lost reference to
the caption of the figure, this is not a 'bug' but a choice we made!
Criar uma tabela simples
======= ======= =======
x y z
======= ======= =======
1 2 3
2 4
======= ======= =======
Use a \ followed by an empty space to leave an empty space.
You can also use more complicated tables by drawing them using references and all
.. _my_drawn_table_1:
+---------------+--------------------+
| Windows | Mac OSX |
+---------------+--------------------+
| |win| | |osx| |
+---------------+--------------------+
| and of course not to forget |nix| |
+------------------------------------+
My drawn table, mind you this is unfortunately not regarded a caption
You can reference to it like this my_drawn_table_1_.
O resultado:
Janelas |
Mac OSX |
and of course not to forget |
My drawn table, mind you this is unfortunately not regarded a caption
You can reference to it like this my_drawn_table_1.
Several index tag exists in RST. To be able to translate the index, it is necessary to integrate it into the normal text. In this case use this syntax:
QGIS allows to load several :index:`Vector formats` supported by GDAL/OGR ...
If the term does not have to be translated, please use this syntax:
.. index:: WMS, WFS, WCS, CAT, SFS, GML, ...
Please note: Footnotes are not recognized by any translation software and it is also not converted to pdf format properly. So, if possible don’t use footnotes within any documentation.
This is for creating a footnote
blabla [1]_
Which will point to:
[1] Updates of core plugins
Here are some hints to create new, nice looking screenshots. For the user guide they go into ./resources/en/user_manual/
cortar o fundo
convert -units PixelsPerInch input.png -density 135 output.png
guarda-los como png (sem artefactos jpeg)
a captura de ecrã deve mostrar o conteúdo de acordo com o que está descrito no texto
sudo apt-get autoremove appmenu-gtk appmenu-gtk3 appmenu-qt
Here are some hints to create screenshots for your translated user guide. They will go into ./resources/<your language>/user_manual/
o mesmo ambiente para todas as capturas de ecrã (o mesmo SO, a mesma decoração, e o mesmo tamanho de letra)
cortar o fundo
guarda-los como png (sem artefactos jpeg)
a captura de ecrã deve mostrar o conteúdo de acordo com o que está descrito no texto
If you want to write documentation for Processing algorithms consider these guidelines: