Skip to content
Snippets Groups Projects
Commit 02bedb79 authored by Gururaj Shetty's avatar Gururaj Shetty
Browse files

Update reStructuredText Basics.rst

parent 4f1c8896
No related branches found
No related tags found
No related merge requests found
Writing Instructions
####################
**What is reStructuredText?**
=============================
reStructuredText is an easy to read, what-you-see-is-what-you-get plainttext markup syntax and parser system.In other words reStructuredText is a lightweight markup language that is used in static
......@@ -15,6 +12,95 @@ reStructuredText is a lightweight markup language, so it’s easier to read in p
find text editors that render reStructuredText with syntax highlighting and live previews, without having to invest in complex tools. Compared to some other lightweight markup languages
like MarkDown, reStructuredText contains stronger semantic markup tools. Some writers also prefer reStructuredText because the markup standards are more well-defined compared to MarkDown.
**Project setup**
=================
1. **Install Python**
* Most Windows users do not have Python installed by default, so we begin with the installation of Python itself.
* To check if you already have Python installed, if not open the command prompt (Win-r and type cmd).
* Once the command prompt is open, type **python --version** and press Enter.
* To install python use this link `<https://www.python.org/downloads/release/python-390/>`_
* If Python is installed, you will see the version of Python printed to the screen.
.. figure:: /images/python.png
2. **Install pip**
Once Python is installed, check for pip which will be installed by default. Enter **pip --version** in command promt to check if the pip is installed in windows.
For python version later than 3.0, pip is already installed. Just make sure to upgrade pip using the command **python -m pip install --upgrade pip**.
.. figure:: /images/pip.png
3. **Check for sphinx installed**
once the pip is installed check for sphinx , open the command prompt (Win-r and type cmd) enter pip install sphinx.
.. figure:: /images/pipinstallsphinx.png
4. **Adding scripts to the the Envionment variable**
* Navigate to control panel>system and security>system
* **Click** advanced system settings>advanced>environment variables
* Select path and click **edit**
* Click **new** and add **c:/user/<username>/appdata/local/programs/python/python39/script**
* click **ok**
.. figure:: /images/Environment variable.png
.. figure:: /images/path.png
5. **Create the files**
* Open command promt then type **sphinx-quickstart**
* Select root path by entering y letter
* enter project name, author name, project release name
* Then select project language by entering y letter
* command will appear like see the command that finished an intial directory structure has been created.
* Now go to local file and check for source folder.
* Inside source folder rst file will be there.
.. figure:: /images/quickstart.png
5. **How to do authoring**
* Open rst file in note pad++
* Type the content or edit it then save it.
* Now to get the HTML format open command promt and enter make html
* Go to build file in local folder
* Search for html folder and then check for html file, open it in browser.
* If you want make any chages in the content then edit rst file and save it.
.. figure:: /images/source.png
**How to use reStructuredText**
===============================
......@@ -83,21 +169,20 @@ For example, this unordered list:
**Images**
==========
reST supports an image directive, first we need to enter colon (..) then single space and write figure then close it with two colons (::) and give single spacing enter (/) and write images close it with (/)
then enter image file name along with format.
reST supports an image directive, used like so: .. image:: gnu.png
*example*
.. figure:: /images/muti data.png
**DIRECTIVES**
**Directives**
==============
directive is a generic block of explicit markup.While Docutils provides a number of directives, Sphinx provides many more and uses directives as one of the primary extension mechanism.
First we need to give colon (..) then write toctree and close it with colon(:) again.
next step enter space 3 times then give colon and enter maxdepth close it with colon (:) again.
First we need to give colon (..) then write toctree and close it with colon again.
next step enter space 3 times then give colon and enter maxdepth close it wiht colon again.
last step is enter space 3 times again and write reference files
.. toctree::
......@@ -151,7 +236,7 @@ The data may be internal (an integral part of the document) or external (a separ
crunchy, now would it?"
"Gannet Ripple", 1.99, "On a stick!"
**ROLES**
**Roles**
=========
**Cross-referencing syntax**
......@@ -166,41 +251,13 @@ we know that, algebric formula
:math:`a^2 + b^2 + 2ab = (a+b)^2`
**Project setup**
=================
1. **Install python**
Most Windows users do not have Python installed by default, so we begin with the installation of Python itself. To check if you already have Python installed, open the Command Prompt (Win-r and type cmd).
Once the command prompt is open, type **python --version** and press Enter. If Python is installed, you will see the version of Python printed to the screen.
2. **Install pip**
Once Python is installed, you can install Sphinx using pip. Enter **pip --version** in commsmand promt to check if the pip is installed in windows.
For python version later than 3.0, pip is already installed. Just make sure to upgrade pip using the command **python -m pip install --upgrade pip**.
3. **Adding scripts to the the Envionment variable**
* Navigate to control panel/system and security/system
**Reference**
=============
`<https://www.sphinx-doc.org/en/master/usage/installation.html>`_
* Click advanced system settings/advanced/environment variables
`<https://www.sphinx-doc.org/en/master/contents.html>`_
* Select path and click edit
* Click new and add c:/user/<username>/appdata/local/programs/python/python39/script
* click ok
4. **Create the files**
* Open command promt then type sphinx-quickstart
* Select root path by entering y letter
* enter project name, author name, project release name
* Then select project language by entering y letter
You see the command that finished an intial directory structure has been created
Now you can edit the rst files
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment