1

I want that if someone add modification to a .tex, it must have is .pdf version compiled.

I've been interested in using Pre-commit with hooks to request people to respect a certain workflow.

To be clear, I want that if someone add modification to a .tex, it must have his .pdf version compiled to ensure that everyone can look at the file at a glance. I've done some search about pre-commit and they are always talking about using python, docker, ... Should I write a simple python script to put in my pre-commit ?

Thank you for anyone that can help me explain those things. I wish you a good day or night wherever you are.

Inigo
  • 12,186
  • 5
  • 41
  • 70
Tfloow
  • 29
  • 5
  • It's unclear in your wording whether you are asking how to implement the logic of the hook, or whether you just wanted to know if you could/should do it in "simple python". Based on the answer you accepted, I'll assume the later and edit your question so it doesn't confuse people doing searches. – Inigo Jan 17 '23 at 00:56

1 Answers1

3

I've done some search about pre-commit and they are always talking about using python, docker

You can use any program/scripting language you want, as long as:

  • your repo/.git/hook/pre-commit file is an executable
  • you have a way to distribute/update that hook for every user of your repository
  • you understand a client-side hook can be bypassed
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250