Files

Typeset TeX, rasterize PDF.

storylines.files.combine(filename, pdfs, columns=100, align=0.5, halign='left', pdf=False, png=False, dpi=300.0)[source]

Arrange multiple PDFs in single file.

Parameters:
filenamestr

Name of combined file.

pdfslist of str

Names of PDFs to be combined.

columnsint, default 100

Number of PDFs to be arranged side by side.

alignfloat, default 0.5

Vertical alignment of PDFs, where 0, 0.5, and 1 stand for the bottom, center, and top of the individual figures.

halignstr, default ‘left’

Horizontal alignment of PDFs. Possible values are 'left', 'center' and 'right'.

pdfbool, default False

Convert resulting TeX file to PDF? Automatically set to True if filename ends with .pdf.

pngbool, default False

Convert resulting PDF file to PNG? This implies pdf. Automatically set to True if filename ends with .png.

dpifloat, default 300.0

Image resolution in dots per inch.

storylines.files.goto(filename)[source]

Go to output directory for plot typesetting.

Parameters:
filenamestr

LaTeX file name including possible path.

Returns:
stemstr

File name without path and extension.

typstr

Desired file type (extension).

homefunction

Function to return to previous working directory.

storylines.files.rasterize(stem, dpi=300.0, width=0, height=0, rewrite=False)[source]

Run pdftoppm and remove -1 from name of resulting PNG file.

Parameters:
stemstr

File name without path and extension (in current working directory).

dpifloat, default 300.0

Image resolution in dots per inch.

width, heightint, default 0

Image dimensions in pixels. If either width or height is zero, it will be determined by the aspect ratio of the image. If both are zero, they will also be determined by dpi.

rewritebool, default False

Rewrite resulting PNG file using StoryLines? This will remove possible metadata and may reduce the file size but currently is quite slow.

storylines.files.typeset(stem, engine='pdflatex')[source]

Run typesetting engine and remove .aux and .log files.

Parameters:
stemstr

File name without path and extension (in current working directory).

enginestr, default ‘pdflatex’

TeX typesetting engine.