joseareia / ipleiria-thesis

A LaTeX template designed for theses and dissertations tailored to students at the Polytechnic University of Leiria.
https://www.overleaf.com/latex/templates/unofficial-polytechnic-university-of-leiria-estg-thesis-slash-report-template/tqgbrncfhwgt
11 stars 3 forks source link

Does not compile with latexmk due to fontspec and minted #3

Open miguel-negrao opened 6 hours ago

miguel-negrao commented 6 hours ago

This repository does not compile with the latexmk command since it requires xelatex or lualatex and minted requires --shell-escape.

I suggest adding the following .latexmkrc configuration file:

#!/bin/env perl

# PDF-generating modes are:
# 1: pdflatex, as specified by $pdflatex variable (still largely in use)
# 2: postscript conversion, as specified by the $ps2pdf variable (useless)
# 3: dvi conversion, as specified by the $dvipdf variable (useless)
# 4: lualatex, as specified by the $lualatex variable (best)
# 5: xelatex, as specified by the $xelatex variable (second best)
$pdf_mode = 5;

# --shell-escape option (execution of code outside of latex) is required for the
#'minted' package.
#
# SyncTeX allows to jump between source (code) and output (PDF) in IDEs with support
# (many have it). A value of `1` is enabled (gzipped), `-1` is enabled but uncompressed,
# `0` is off.
# Testing in VSCode w/ LaTeX Workshop only worked for the compressed version.
# Adjust this as needed. Of course, only relevant for local use, no effect on a remote
# CI pipeline (except for slower compilation, probably).
#
# %O and %S will forward Options and the Source file, respectively, given to latexmk.
#
# `set_tex_cmds` applies to all *latex commands (latex, xelatex, lualatex, ...), so
# no need to specify these each. This allows to simply change `$pdf_mode` to get a
# different engine. Check if this works with `latexmk --commands`.
set_tex_cmds("--shell-escape --synctex=1 %O %S");

$root_filename = 'IPleiriaMain.tex';

Currently due to #2 it still won't compile, but perhaps when that is fixed this will work.

joseareia commented 4 hours ago

Hello @miguel-negrao!

Thank you once again for reporting this issue. As mentioned in issue #2, I'll review it and aim to have a resolution in the coming days.