File: index.rst

package info (click to toggle)
python-pylatex 1.4.2%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,044 kB
  • sloc: python: 3,810; sh: 209; makefile: 169; xml: 12
file content (102 lines) | stat: -rw-r--r-- 2,735 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.. PyLaTeX documentation master file, created by
   sphinx-quickstart on Thu Jun 18 15:35:21 2015.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

PyLaTeX
=======

PyLaTeX is a Python library for creating and compiling LaTeX files. The goal of
this library is to be an easy, but extensible interface between Python and
LaTeX.

PyLaTeX has two quite different usages: generating full pdfs and generating
LaTeX snippets. Generating full pdfs is mostly useful when all the text that
pdf should contain is generated by python, for instance exporting the data from
a database. Snippets are useful when some text still needs to be written by
hand, but some stuff can be automatically generated, for instance writing a
report with a couple of matplotlib plots.


Installation
------------
.. highlight:: bash

PyLaTeX works on Python 2.7 and 3.3+ and it is simply installed using pip:

::

    pip install pylatex


Some of the features require other libraries as well. This is mostly the case
when converting a datatype of that library to LaTeX. For instance, generating
LaTeX matrices requires Numpy. The dependencies for these extra features can
simply be installed like this:

::

    pip install pylatex[matrices]

The features that require additional libraries are:

- matrices
- matplotlib
- quantities


Code
----
To see the some code in action, please take a look at the :doc:`examples/full`,
which generates the pdf below. To understand how the code works, please look at
the :doc:`usage`.

.. image:: /_static/screenshot.png




Support
-------

This library is being developed in and for Python 3. Because of a conversion
script the current version also works in Python 2.7. For future versions, no
such promise will be made. Python 3 features that are useful but incompatible
with Python 2 will be used. If you find a bug for Python 2 and it is fixable
without ugly hacks feel free to send a pull request.

This library is developed for Linux. I have no intention to write fixes or test
for platform specific bugs with every update, especially since I have no other
operating systems to test it on. Pull requests that fix those issues are always
welcome though. Issues have been fixed for Windows and it seems that compiling
to pdf is currently working.

Contributing
------------
Read the :doc:`contributing` page for tips and rules when you want to
contribute. To just see the source code, you should go to the `Github
repository <https://github.com/JelteF/PyLaTeX/>`_.




.. toctree::
    :maxdepth: 1
    :glob:
    :hidden:

    usage
    examples
    api
    faq
    changelog
    contributing




Indices
-------

* :ref:`genindex`
* :ref:`modindex`