fix: Run makeglossaries whenever relevant input files change
This commit is contained in:
1 parent
2d30049c4e
commit
8af93058df
3 files changed
+28
-1
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
# Normalize text files to LF in the repo and working tree (matches Overleaf).
|
||||||
|
* text=auto eol=lf
|
||||||
|
|
||||||
|
# Binary assets: never convert.
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.pdf binary
|
||||||
+3
-1
@@ -21,4 +21,6 @@
|
|||||||
*.lof
|
*.lof
|
||||||
*.lot
|
*.lot
|
||||||
*.lol
|
*.lol
|
||||||
*.pdf
|
*.pdf
|
||||||
|
*.data.minted
|
||||||
|
_minted*/
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Allow minted to call its external highlighter (Overleaf enables this by default).
|
||||||
|
$pdflatex = 'pdflatex -shell-escape %O %S';
|
||||||
|
|
||||||
|
# Run makeglossaries whenever the glossary/acronym input files change.
|
||||||
|
# Overleaf does this automatically; local latexmk (e.g. VS Code LaTeX Workshop) does not.
|
||||||
|
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
|
||||||
|
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
|
||||||
|
|
||||||
|
sub run_makeglossaries {
|
||||||
|
my ($base_name, $path) = fileparse($_[0]);
|
||||||
|
my @args = ('-d', $path, $base_name);
|
||||||
|
unshift @args, '-q' if $silent;
|
||||||
|
return system('makeglossaries', @args);
|
||||||
|
}
|
||||||
|
|
||||||
|
push @generated_exts, 'glo', 'gls', 'glg', 'acn', 'acr', 'alg';
|
||||||
|
$clean_ext .= ' %R.ist %R.xdy';
|
||||||
Reference in new issue
Block a user