pax_global_header 0000666 0000000 0000000 00000000064 14514252165 0014517 g ustar 00root root 0000000 0000000 52 comment=73765878cdfc33999d33633b10791fd7872d3203
PyLaTeX-1.4.2/ 0000775 0000000 0000000 00000000000 14514252165 0013011 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/.codecov.yml 0000664 0000000 0000000 00000000761 14514252165 0015240 0 ustar 00root root 0000000 0000000 coverage:
status:
project:
default:
target: auto
treshold: 1
base: auto
patch:
default:
target: 90
treshold: null
base: auto
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]
branches: null
PyLaTeX-1.4.2/.gitattributes 0000664 0000000 0000000 00000000041 14514252165 0015677 0 ustar 00root root 0000000 0000000 pylatex/_version.py export-subst
PyLaTeX-1.4.2/.github/ 0000775 0000000 0000000 00000000000 14514252165 0014351 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/.github/workflows/ 0000775 0000000 0000000 00000000000 14514252165 0016406 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/.github/workflows/ci.yml 0000664 0000000 0000000 00000002145 14514252165 0017526 0 ustar 00root root 0000000 0000000 name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Disable cache so that issues with new dependencies are found more easily
# cache: 'pip'
# cache-dependency-path: |
# dev_requirements.txt
# setup.py
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install texlive-latex-extra texlive-pictures texlive-science texlive-fonts-recommended lmodern ghostscript
python -m pip install --upgrade pip
pip install -r dev_requirements.txt --upgrade
sudo sed '/pattern=".*PDF.*"/d' -i /etc/ImageMagick*/policy.xml
- name: Run tests
run: |
./testall.sh
PyLaTeX-1.4.2/.gitignore 0000664 0000000 0000000 00000001114 14514252165 0014776 0 ustar 00root root 0000000 0000000 *.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__
MANIFEST
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Testfiles
*.pdf
*.tex
# Python 2 distribution files
python2_source
# Venv
venv*
.venv*
# Ignore generated doc files
docs/source/examples
docs/source/pylatex
docs/source/_static/examples
docs/gh-pages
coverage.xml
# Folders
.idea/
.virtualenv/
.coverage.*
PyLaTeX-1.4.2/.travis.yml 0000664 0000000 0000000 00000001657 14514252165 0015133 0 ustar 00root root 0000000 0000000 sudo: required
dist: xenial
cache: pip
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
- '3.7'
- '3.8'
# Travis doesn't support 3.9 yet
# - '3.9'
# allow failures
- 'nightly'
- 'pypy2.7-6.0'
- 'pypy3.5-6.0'
matrix:
fast_finish: true
allow_failures:
- python: 'nightly'
- python: 'pypy2.7-6.0'
- python: 'pypy3.5-6.0'
addons:
apt:
packages:
- texlive-latex-extra
- texlive-pictures
- texlive-science
- texlive-fonts-recommended
- lmodern
- ghostscript
- pgf
install:
- cat /etc/ImageMagick*/policy.xml
- sudo sed '/pattern=".*PDF.*"/d' -i /etc/ImageMagick*/policy.xml
- cat /etc/ImageMagick*/policy.xml
- pip install 3to2 future
- pip install codecov
- 'if [ "$TRAVIS_PYTHON_VERSION" == 3.4 ]; then pip install -e .[all] --upgrade; else pip install -r dev_requirements.txt --upgrade; fi'
script: ./testall.sh
after_script: codecov
PyLaTeX-1.4.2/CONTRIBUTING.md 0000664 0000000 0000000 00000000121 14514252165 0015234 0 ustar 00root root 0000000 0000000 See the documentation: https://jeltef.github.io/PyLaTeX/latest/contributing.html
PyLaTeX-1.4.2/LICENSE 0000664 0000000 0000000 00000002070 14514252165 0014015 0 ustar 00root root 0000000 0000000 The MIT License (MIT)
Copyright (c) 2014 Jelte Fennema
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
PyLaTeX-1.4.2/MANIFEST.in 0000664 0000000 0000000 00000000160 14514252165 0014544 0 ustar 00root root 0000000 0000000 include *.md
recursive-include pylatex *.py
recursive-include python2_source/pylatex *.py
include versioneer.py
PyLaTeX-1.4.2/README.rst 0000664 0000000 0000000 00000004202 14514252165 0014476 0 ustar 00root root 0000000 0000000 PyLaTeX |Actions| |License| |PyPi| |Stable Docs| |Latest Docs|
==============================================================
PyLaTeX is a Python library for creating and compiling LaTeX files or
snippets. The goal of this library is being an easy, but extensible
interface between Python and LaTeX.
Installation
------------
Simply install using ``pip``::
pip install pylatex
And then install a relevant LaTeX processor and other dependencies. Examples:
Ubuntu
~~~~~~~
sudo apt-get install texlive-pictures texlive-science \
texlive-latex-extra latexmk
Documentation
-------------
There are two versions of the documentation:
- The one generated for the `last stable release
`__.
- The one based on the `latest git version
`__.
Contributing
------------
Read the `How to
contribute `__
page for tips and rules when you want to contribute.
Examples
--------
The documentation contains a lot of examples that show the
functionality. To give an impression of what can be generated see this
picture:
.. figure:: https://raw.github.com/JelteF/PyLaTeX/master/docs/source/_static/screenshot.png
:alt: Generated PDF by PyLaTeX
Copyright and License
---------------------
Copyright 2014 Jelte Fennema, under `the MIT
license `__
.. |Actions| image:: https://github.com/JelteF/PyLaTeX/actions/workflows/ci.yml/badge.svg
:target: https://github.com/JelteF/PyLaTeX/actions/workflows/ci.yml
.. |License| image:: https://img.shields.io/github/license/jeltef/pylatex.svg
:target: https://github.com/JelteF/PyLaTeX/blob/master/LICENSE
.. |PyPi| image:: https://img.shields.io/pypi/v/pylatex.svg
:target: https://pypi.python.org/pypi/PyLaTeX
.. |Latest Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
:target: https://jeltef.github.io/PyLaTeX/latest/
.. |Stable Docs| image:: https://img.shields.io/badge/docs-stable-brightgreen.svg?style=flat
:target: https://jeltef.github.io/PyLaTeX/current/
PyLaTeX-1.4.2/Vagrantfile 0000664 0000000 0000000 00000006312 14514252165 0015200 0 ustar 00root root 0000000 0000000 # -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# If true, then any SSH connections made will enable agent forwarding.
# Default value: false
# config.ssh.forward_agent = true
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# # Use VBoxManage to customize the VM. For example to change memory:
# vb.customize ["modifyvm", :id, "--memory", "1024"]
# end
#
# View the documentation for the provider you're using for more
# information on available options.
# Provisioning
$script = <<-SCRIPT
echo Starting provisioning...
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y texlive
# texlive-science contains the SIunitx LaTeX package which is needed for quantities.py
sudo apt-get install -y texlive-science
sudo apt-get install -y imagemagick
sudo apt-get install -y python3-pip
sudo apt-get build-dep -y python-matplotlib
pip3 install -e /vagrant[all]
echo 'You can now cd into /vagrant and execute "./testall.sh -p python3" to run PyLaTeX tests.' | sudo tee --append /etc/update-motd.d/100-pylatex-info
echo Provisioning finished.
echo Running unit tests and generate docs...
cd /vagrant
./testall.sh -p python3 -c
echo Finished tests.
SCRIPT
config.vm.provision "shell", inline: $script
end
PyLaTeX-1.4.2/broken_examples/ 0000775 0000000 0000000 00000000000 14514252165 0016167 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/broken_examples/complex_report.py 0000664 0000000 0000000 00000011544 14514252165 0021610 0 ustar 00root root 0000000 0000000 #!/usr/bin/python
"""
This example shows the functionality of the PyLaTeX library.
It creates a sample report with 2 tables, one containing images and the other
containing data. It also creates a complex header with an image.
.. :copyright: (c) 2016 by Vladimir Gorovikov
:license: MIT, see License for more details.
"""
# begin-doc-include
import os
from pylatex import (
Document,
Foot,
Head,
LargeText,
LineBreak,
LongTabu,
MediumText,
MiniPage,
MultiColumn,
NewPage,
PageStyle,
StandAloneGraphic,
Tabu,
Tabularx,
TextColor,
simple_page_number,
)
from pylatex.utils import NoEscape, bold
def generate_unique():
geometry_options = {
"head": "40pt",
"margin": "0.5in",
"bottom": "0.6in",
"includeheadfoot": True,
}
doc = Document(geometry_options=geometry_options)
# Generating first page style
first_page = PageStyle("firstpage")
# Header image
with first_page.create(Head("L")) as header_left:
with header_left.create(
MiniPage(width=NoEscape(r"0.49\textwidth"), pos="c")
) as logo_wrapper:
logo_file = os.path.join(os.path.dirname(__file__), "sample-logo.png")
logo_wrapper.append(
StandAloneGraphic(image_options="width=120px", filename=logo_file)
)
# Add document title
with first_page.create(Head("R")) as right_header:
with right_header.create(
MiniPage(width=NoEscape(r"0.49\textwidth"), pos="c", align="r")
) as title_wrapper:
title_wrapper.append(LargeText(bold("Bank Account Statement")))
title_wrapper.append(LineBreak())
title_wrapper.append(MediumText(bold("Date")))
# Add footer
with first_page.create(Foot("C")) as footer:
message = "Important message please read"
with footer.create(
Tabularx("X X X X", width_argument=NoEscape(r"\textwidth"))
) as footer_table:
footer_table.add_row(
[MultiColumn(4, align="l", data=TextColor("blue", message))]
)
footer_table.add_hline(color="blue")
footer_table.add_empty_row()
branch_address = MiniPage(width=NoEscape(r"0.25\textwidth"), pos="t")
branch_address.append("960 - 22nd street east")
branch_address.append("\n")
branch_address.append("Saskatoon, SK")
document_details = MiniPage(
width=NoEscape(r"0.25\textwidth"), pos="t", align="r"
)
document_details.append("1000")
document_details.append(LineBreak())
document_details.append(simple_page_number())
footer_table.add_row(
[branch_address, branch_address, branch_address, document_details]
)
doc.preamble.append(first_page)
# End first page style
# Add customer information
with doc.create(Tabu("X[l] X[r]")) as first_page_table:
customer = MiniPage(width=NoEscape(r"0.49\textwidth"), pos="h")
customer.append("Verna Volcano")
customer.append("\n")
customer.append("For some Person")
customer.append("\n")
customer.append("Address1")
customer.append("\n")
customer.append("Address2")
customer.append("\n")
customer.append("Address3")
# Add branch information
branch = MiniPage(width=NoEscape(r"0.49\textwidth"), pos="t!", align="r")
branch.append("Branch no.")
branch.append(LineBreak())
branch.append(bold("1181..."))
branch.append(LineBreak())
branch.append(bold("TIB Cheque"))
first_page_table.add_row([customer, branch])
first_page_table.add_empty_row()
doc.change_document_style("firstpage")
doc.add_color(name="lightgray", model="gray", description="0.80")
# Add statement table
with doc.create(
LongTabu("X[l] X[2l] X[r] X[r] X[r]", row_height=1.5)
) as data_table:
data_table.add_row(
["date", "description", "debits($)", "credits($)", "balance($)"],
mapper=bold,
color="lightgray",
)
data_table.add_empty_row()
data_table.add_hline()
row = ["2016-JUN-01", "Test", "$100", "$1000", "-$900"]
for i in range(30):
if (i % 2) == 0:
data_table.add_row(row, color="lightgray")
else:
data_table.add_row(row)
doc.append(NewPage())
# Add cheque images
with doc.create(LongTabu("X[c] X[c]")) as cheque_table:
cheque_file = os.path.join(os.path.dirname(__file__), "chequeexample.png")
cheque = StandAloneGraphic(cheque_file, image_options="width=200px")
for i in range(0, 20):
cheque_table.add_row([cheque, cheque])
doc.generate_pdf("complex_report", clean_tex=False)
generate_unique()
PyLaTeX-1.4.2/broken_examples/longtabu.py 0000664 0000000 0000000 00000002476 14514252165 0020365 0 ustar 00root root 0000000 0000000 #!/usr/bin/python
"""
This example shows the functionality of the MiniPage element.
It creates a sample page filled with labels using the MiniPage element.
.. :copyright: (c) 2016 by Vladimir Gorovikov
:license: MIT, see License for more details.
"""
# begin-doc-include
from pylatex import Document, HFill, LongTabu
from pylatex.utils import bold
def genenerate_longtabu():
geometry_options = {
"landscape": True,
"margin": "0.5in",
"headheight": "20pt",
"headsep": "10pt",
"includeheadfoot": True,
}
doc = Document(page_numbers=True, geometry_options=geometry_options)
# Generate data table
with doc.create(LongTabu("X[r] X[r] X[r] X[r] X[r] X[r]")) as data_table:
header_row1 = ["Prov", "Num", "CurBal", "IntPay", "Total", "IntR"]
data_table.add_row(header_row1, mapper=[bold])
data_table.add_hline()
data_table.add_empty_row()
data_table.end_table_header()
data_table.add_row(["Prov", "Num", "CurBal", "IntPay", "Total", "IntR"])
row = ["PA", "9", "$100", "%10", "$1000", "Test"]
for i in range(50):
data_table.add_row(row)
doc.append(bold("Grand Total:"))
doc.append(HFill())
doc.append(bold("Total"))
doc.generate_pdf("longtabu", clean_tex=False)
genenerate_longtabu()
PyLaTeX-1.4.2/broken_examples/tabus.py 0000664 0000000 0000000 00000003757 14514252165 0017673 0 ustar 00root root 0000000 0000000 #!/usr/bin/python
"""
This example shows the functionality of the Tabu and LongTabu element.
.. :copyright: (c) 2016 by Vladimir Gorovikov and Scott Wallace
:license: MIT, see License for more details.
"""
# begin-doc-include
from random import randint
from pylatex import Center, Document, LongTabu, Tabu
from pylatex.utils import bold
def genenerate_tabus():
geometry_options = {
"landscape": True,
"margin": "1.5in",
"headheight": "20pt",
"headsep": "10pt",
"includeheadfoot": True,
}
doc = Document(page_numbers=True, geometry_options=geometry_options)
# Generate data table with 'tight' columns
fmt = "X[r] X[r] X[r] X[r] X[r] X[r]"
with doc.create(LongTabu(fmt, spread="0pt")) as data_table:
header_row1 = ["Prov", "Num", "CurBal", "IntPay", "Total", "IntR"]
data_table.add_row(header_row1, mapper=[bold])
data_table.add_hline()
data_table.add_empty_row()
data_table.end_table_header()
data_table.add_row(["Prov", "Num", "CurBal", "IntPay", "Total", "IntR"])
row = ["PA", "9", "$100", "%10", "$1000", "Test"]
for i in range(40):
data_table.add_row(row)
with doc.create(Center()) as centered:
with centered.create(Tabu("X[r] X[r]", spread="1in")) as data_table:
header_row1 = ["X", "Y"]
data_table.add_row(header_row1, mapper=[bold])
data_table.add_hline()
row = [randint(0, 1000), randint(0, 1000)]
for i in range(4):
data_table.add_row(row)
with doc.create(Center()) as centered:
with centered.create(Tabu("X[r] X[r]", to="4in")) as data_table:
header_row1 = ["X", "Y"]
data_table.add_row(header_row1, mapper=[bold])
data_table.add_hline()
row = [randint(0, 1000), randint(0, 1000)]
for i in range(4):
data_table.add_row(row)
doc.generate_pdf("tabus", clean_tex=False)
genenerate_tabus()
PyLaTeX-1.4.2/dev_requirements.txt 0000664 0000000 0000000 00000000256 14514252165 0017136 0 ustar 00root root 0000000 0000000 -e .[all]
-e git+https://github.com/JelteF/sphinx.git@better-autodoc-skip-member#egg=sphinx
-e git+https://github.com/JelteF/sphinx_rtd_theme.git@master#egg=sphinx-rtd-theme
PyLaTeX-1.4.2/docs/ 0000775 0000000 0000000 00000000000 14514252165 0013741 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/Makefile 0000664 0000000 0000000 00000016446 14514252165 0015414 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -n
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/doctrees
rm -rf $(BUILDDIR)/html/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html -n
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyLaTeX.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyLaTeX.qhc"
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/PyLaTeX"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyLaTeX"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
PyLaTeX-1.4.2/docs/build/ 0000775 0000000 0000000 00000000000 14514252165 0015040 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/build/.keep 0000664 0000000 0000000 00000000000 14514252165 0015753 0 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/create_doc_files.sh 0000775 0000000 0000000 00000004027 14514252165 0017555 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
# Optional named arguments:
# -p COMMAND: the python command that should be used, e.g. -p python3
set -e
# Default values
python="python"
# Check if a command line argument was provided as an input argument.
while getopts "p:" opt; do
case $opt in
p)
python=$OPTARG
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
ARGS='--separate --force --no-headings --no-toc'
echo Cleaning pylatex and examples
rm -rf source/pylatex/*
rm -rf source/examples/*
rm -rf source/_static/examples/*
sphinx-apidoc -o source/pylatex/ ../pylatex/ $ARGS
echo Removing file source/pylatex/pylatex.rst
rm source/pylatex/pylatex.rst
echo Removing file source/pylatex/pylatex.base_classes.rst
rm source/pylatex/pylatex.base_classes.rst
for f in ../examples/*.py; do
name=`echo $f | cut -d'/' -f3 | cut -d'.' -f1`
rst=source/examples/${name}.rst
$python gen_example_title.py "$name" > $rst
echo Creating file ${rst}
echo .. automodule:: examples.$name >> $rst
echo >> $rst
echo The code >> $rst
echo -------- >> $rst
echo ".. literalinclude:: /../$f" >> $rst
echo " :start-after: begin-doc-include" >> $rst
echo >> $rst
echo The generated files >> $rst
echo ------------------- >> $rst
# Compiling examples to png
cd source/_static/examples
$python ../../../$f > /dev/null
rst=../../../$rst
for pdf in ${name}*.pdf; do
convert "$pdf" -colorspace RGB "${pdf}.png"
echo ".. literalinclude:: /_static/examples/${pdf%.pdf}.tex" >> $rst
echo " :language: latex" >> $rst
echo " :linenos:" >> $rst
echo " :caption: ${pdf%.pdf}.tex" >> $rst
echo >> $rst
echo "$pdf" >> $rst
echo >> $rst
for figure in ${pdf}*.png; do
echo ".. figure:: /_static/examples/${figure}" >> $rst
done
done
rm -f *.pdf *.aux *.log *.fls *.fdb_latexmk
cd ../../..
done
PyLaTeX-1.4.2/docs/create_gh-pages_dir.sh 0000775 0000000 0000000 00000000267 14514252165 0020161 0 ustar 00root root 0000000 0000000 #!/bin/bash
git clone --branch=gh-pages `git config --get remote.origin.url` gh-pages
rm -rf build/html
ln -sf ../gh-pages/latest build/html
cd gh-pages/
git submodule update --init
PyLaTeX-1.4.2/docs/gen_example_title.py 0000664 0000000 0000000 00000000301 14514252165 0017772 0 ustar 00root root 0000000 0000000 import sys
title = sys.argv[1]
if title.endswith("_ex"):
title = title[:-3]
title = title.replace("_", " ")
title = title.capitalize() + " example"
print(title)
print(len(title) * "=")
PyLaTeX-1.4.2/docs/source/ 0000775 0000000 0000000 00000000000 14514252165 0015241 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/ 0000775 0000000 0000000 00000000000 14514252165 0016667 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/.keep 0000664 0000000 0000000 00000000000 14514252165 0017602 0 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/examples/ 0000775 0000000 0000000 00000000000 14514252165 0020505 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/examples/.keep 0000664 0000000 0000000 00000000000 14514252165 0021420 0 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/favicons/ 0000775 0000000 0000000 00000000000 14514252165 0020477 5 ustar 00root root 0000000 0000000 PyLaTeX-1.4.2/docs/source/_static/favicons/android-chrome-144x144.png 0000664 0000000 0000000 00000005073 14514252165 0025034 0 ustar 00root root 0000000 0000000 PNG
IHDR -d gAMA a cHRM z&