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")

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.2.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.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wunlatex-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bca69c45ff53004d9d4b34e20898584679ca378facb7515690c274c50ba62c7d
MD5 8f80b69ac5ed683634b1fcd2ca1f012c
BLAKE2b-256 d2a7f0f1b631ca8f1c4598ff55e32c77cff7f645288ce2bf90742768e59af1fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wunlatex-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bae5346ff7e6563e8f37f81fc12d48efa1fed0a0536b2c91cee3dc4a9bc0e2c
MD5 7d79abbda9178d622df82e613be22d8d
BLAKE2b-256 c424893e965096045ca945b88c90e618519b579b352c97f0cb9593cf17786654

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