Skip to main content

Write LaTeX documents

Project description

wunlatex

Library for LaTeX document writing

from pathlib import Path

import wunlatex
import pandas as pd
from matplotlib import pyplot as plt


doc = wunlatex.Document("Test")

df = pd.DataFrame([(1, 2, 3 , 4)], columns=["One", "JJJ", "LKAS", "ONENEE"])
tbl = wunlatex.components.Table("Random Numbers", df)
doc.add_component(tbl)

# Sections within other sections are subsections, then subsubsections etc.
doc.add_component(
    wunlatex.components.Section("First", components=[
        wunlatex.components.Section("Subsection 1", components=[tbl]),
        wunlatex.components.Section("Subsection 2", components=[
            wunlatex.components.Section("SubSubSection 3")
        ])
    ])
)

fig, ax = plt.subplots()
ax.plot([1, 1], [0, 1])
figname = Path(__file__).parent / "testfig.png"
plt.savefig(figname)
f = wunlatex.components.Figure("Test Fig", path=figname)
doc.add_component(f)

doc.compile(Path(__file__).parent, filename="Testpdf.pdf")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wunlatex-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wunlatex-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file wunlatex-0.1.0.tar.gz.

File metadata

  • Download URL: wunlatex-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.5 Darwin/21.6.0

File hashes

Hashes for wunlatex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8ed6eb11e45769243d24bb16450a447ff47ea56b7d184df1f0f21d3fc03a69f4
MD5 c4bcbaaa8eb36fe5a140b0e3552f35e0
BLAKE2b-256 72cc0becc47879156160209140d79ab46a61e5e12847e49090b0a9e242320bd1

See more details on using hashes here.

File details

Details for the file wunlatex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wunlatex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.11.5 Darwin/21.6.0

File hashes

Hashes for wunlatex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b792e5521462e69919d8b3d52cdc18af249f5e2bd5e2821bec5e8063c5062336
MD5 c14b564cf6f066597bc055f36bca5f01
BLAKE2b-256 ca4d1bbf4668bdd0e6013e13e3d3d4aaba3b0036b2194ce049e04fe14da391ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page