wdbibtex.LaTeX#

class wdbibtex.LaTeX(bibtexcmd=None, bibtexopts=None, preamble=None, targetbasename='wdbib', texcmd=None, texopts=None, workdir='.tmp')[source]#

LaTeX related contents and commands.

Run LaTeX and BibTeX commands. Write .tex files. Read and parse .aux and .bbl files. Prepare conversion LaTeX keys in Word file into BibTeX processed texts.

Parameters:
bibtexcmdstr or None, default None

BibTeX command. If None, automatically selected accorting to system locale.

bibtexoptsstr or None, default None

BibTeX command options. If None, automatically selected according to system locale.

preamblestr or None, default None

Preamble of .tex file. If None, automatically selected.

targetbasenamestr, default ‘wdbib’

Base name of LaTeX related files.

texcmdstr or None, default None

LaTeX command. If None, automatically selected according to system locale.

texoptsstr or None, default None

LaTeX command options. If None, automatically selected accorgin to system locale.

workdirstr or path object, default ‘.tmp’

Temporal working directory to store LaTeX contents.

Attributes

bibliographystyle

Bibliographystyle string.

citation_labels

Key to number map of citations.

citeleft

Left delimiter of list.

citeright

Right delimiter of list.

documentclass

LaTeX documentclass string.

formatted_bibliographystyle

[Read only] Formatted bibliographystyle, e.g.

locale

Returns system locale

packages

Returns used LaTeX packages.

preamble

Returns latex preamble text.

thebibliography

Plain text to replace \thebibliography in word file.

Methods

add_package(package, *options)

Add a package to the package list

build()

Build LaTeX related files.

cite(s)

Do cite command formatting.

is_package_used(p)

Returns if the package is used.

read_aux()

Read .aux file.

read_bbl()

Read .bbl file.

set_bibliographystyle(bst)

Bibliographystyle setter.

set_documentclass(documentclass, *options)

Documentclass setter.

write(c[, bib])

Write .tex file.