QGIS Documentation will be built automatically on the server at 0, 8am, 4pm US/Pacific (Pacific 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.
Cada página da web da documentação corresponde a 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
^^^^^^^^^^
Você pode usar algumas etiquetas dentro do texto para enfatizar 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 arquivo ou diretório
:file:`README.rst`
Icon with popup text belonging to Icon
|icon| :sup:`popup_text`
(see image below).
Shorcut keyboard
:kbd:`ctrl B`
will show Ctrl B
Texto do usuário
``label``
References are used to place anchors inside the text. It then helps you create and call hyperlinks between sections or page.
O exemplo abaixo cria a âncora de uma seção (por exemplo, Rótulo/título de referência)
.. _my_anchor:
Label/reference
---------------
To call the reference in the same page, use
see my_anchor_ for more information.
o qual irá retornar:
veja my_anchor para mais informação.
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.
Um outro modo para pular para o mesmo lugar de qualquer lugar na documentação é usar a regra ”:ref:”.
see :ref:`my_anchor` for more information.
which will display the caption instead (in this case the title of this section!):
veja :ref:’my_anchor’ para mais informação.
So reference 1 (my_anchor) and reference 2 (Rótulo/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.
returning:
veja :ref: Rótulo e referência <my_anchor> para mais informação.
Para inserir uma imagem, use
.. image:: /static/common/qgislogo.png
:width: 10 em
o qual retorna
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
and call it in your paragraph:
my paragraph begins here with a nice logo |nice_logo|.
Here is how this example become:
my paragraph begins here with a nice logo .
Nota
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_logo:
.. figure:: /static/common/qgislogo.png
:width: 20 em
:align: center
A caption: A logo I like
O resultado se parece com isso:
To avoid possible conflict with another references, always begin figures anchor with _figure_ and prefer using terms that can easily refer to the figure caption. While only the centered alignment is mandatory for the image, feel free to use any other options for figure (such as width, height, scale...) if needed.
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_logo_).
It will show the anchor Figure_logo. You can use uppercase if you want. It can be used in the same .rst document but not in others. You can still use the :ref: role for reference from other files, but keep in mind that this returns the full caption of the image.
see :ref:`figure_logo`
returns:
Criar uma tabela simples
======= ======= =======
x y z
======= ======= =======
1 2 3
2 4
======= ======= =======
Use a \ followed by an empty space to leave an empty space.
Pode também usar tabelas mais complicadas desenhando-as usando as referências e muito mais
.. _my_drawn_table:
+---------------+--------------------+
| Windows | macOS |
+---------------+--------------------+
| |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_.
O resultado:
Windows | macOS |
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.
An index is a handy way to help the reader easily find an information in a doc. QGIS documentation provides some essential indices. There are few rules to follow in order to keep a set of indices that are really useful (coherent, consistent and really connected to each other):
Several index tags exist in RST. You can either use the inline :index: tag within the normal text.
QGIS allows to load several :index:`Vector formats` supported by GDAL/OGR ...
Or you can use the .. index:: block-level markup which links to the beginning of the next paragraph. Because of the rules mentioned above, it’s advised to use this latter tag as it’s easier to fulfill them.
.. index:: WMS, WFS, Loading layers
It’s also recommanded to use index parameters such as single, pair, see... in order to build a more structured and interconnected table of index. See http://www.sphinx-doc.org/en/stable/markup/misc.html#index-generating-markup for more information on index creation.
Sometimes, you may want to emphasize some points of the description, either to warn, remind or give some hints to the user. In QGIS Documentation, we use reST special directives such as .. warning::, .. note:: and .. tip:: generating particular frames that highlight your comments. See http://www.sphinx-doc.org/en/stable/markup/para.html#paragraph-level-markup for more information. A clear and appropriate title is required for both warnings and tips.
.. tip:: **Always use a meaningful title for tips**
Begin tips with a title that summarizes what it is about. This helps
users to quickly overview the message you want to give them, and
decide on its relevance.
You may also want to give examples and insert a code snippet. In this case, write the comment below a line with the :: directive inserted. However, for a better rendering, especially to apply color highlighting to code according to its language, use the code-block directive, e.g. .. code-block:: xml. By default, Python code snippets do not need this reST directive. More details at http://www.sphinx-doc.org/en/stable/markup/code.html.
Nota
While texts in note, tip and warning frames are translatable, be aware that code block frames do not allow translation. So avoid comments not related to code sample and keep this just as short as needed.
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]_
Que irá apontar para:
[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/
convert -units PixelsPerInch input.png -density 135 output.png
Use o seguinte comando para remover a função global do menu no Ubuntu para criar menores telas de aplicações junto a menus:
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/
Se você quer escrever uma documentação para processamento de algoritmos considere estas diretrizes: