wdbibtex.WdBibTeX.read_preamble#

WdBibTeX.read_preamble()[source]#

Read preamble contents if exists.

WdBibTeX detects special command of begin{preamble} and end{preamble} commands from target .docx file. Contents written in the two commands will be copied to the preamble of .tex file. If these commands did not be found, the following default preamble is used.

\documentclass[latex]{article}
\usepackage{cite}
Returns:
None or str

None if no preamble texts exists, str if preamble exists.

Raises:
ValueError

If only one of begin{preamble} or end{preamble} found in file. Or, if two or more begin{preamble} or end{preamble} found.