qpic_input_to_diagram#

Invoke qpic script to generate output diagram of type qpic/tex/pdf/png.

Outputs one of the following files, based on output_type:

  • qpic_file.with_suffix(‘.qpic’) - Copies the input qpic_file to output_file.

  • qpic_file.with_suffix(‘.tex’) - Obtained via qpic -f base_file_path.qpic

  • qpic_file.with_suffix(‘.pdf’) - Uses pdflatex tool to convert tex to pdf. See https://tug.org/applications/pdftex/ for more details on how to install pdflatex.

  • qpic_file.with_suffix(‘.png’) - Uses convert tool to convert pdf to png. See https://imagemagick.org/ for more details on how to install convert.

qpic_file

Path to file containing input that should be passed to the qpic script.

output_file

Optional path to the output where generated diagram should be saved. Defaults to qpic_file.with_suffix(f”.{output_type}”)

output_type

Format of the diagram generated using qpic. Supported output types are one of [‘qpic’, ‘tex’, ‘pdf’, ‘png’]