Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
index creation should work in pdf generation now ( fixes#27 )
  • Loading branch information
EsGeh authored and EsGeh committed Apr 17, 2019
1 parent 698aecf commit 387e952
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions eoatex2pdf.py
Expand Up @@ -28,30 +28,43 @@ def main(
output_dir = Path( output_dir )
fixed_file_path = output_dir / input_file.name
libeoaconvert.enable_preamble(
input_file,
fixed_file_path,
"pdf"
input_file = input_file,
output_file = fixed_file_path,
pdf_or_xml = "pdf"
)
copy_dir_overwrite(
input_file.resolve().parent / "texfiles",
input_dir / "texfiles",
output_dir / "texfiles"
)
copy_dir_overwrite(
input_dir / "preambel",
output_dir / "preambel"
)
if (input_dir / "images").exists():
copy_dir_overwrite(
input_dir / "images",
output_dir / "images"
)
if (input_dir / "facsim").exists():
copy_dir_overwrite(
input_dir / "facsim",
output_dir / "facsim"
)
output_dir = output_dir.resolve()
cwd = Path.cwd()
os.chdir( input_dir )
logging.info( "cd {}".format( input_dir ) )
os.chdir( output_dir )
logging.info( "cd {}".format( output_dir ) )
exec_command(
f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}",
f"xelatex --halt-on-error {input_file.name}",
)
exec_command(
"biber {}".format( input_file.stem ),
wd = output_dir
)
exec_command(
f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}",
f"xelatex --halt-on-error {input_file.name}",
)
exec_command(
f"xelatex --halt-on-error --output-directory={output_dir} {input_file.name}",
f"xelatex --halt-on-error {input_file.name}",
)
logging.info( "cd {}".format( cwd ) )
os.chdir( cwd )
Expand Down

0 comments on commit 387e952

Please sign in to comment.