The first line of the diff file is:
diff --git a/filter/tex/filter.php b/filter/tex/filter.php
If I understood correctly, if place the patch in the moodle directory and run the patch command from there, then I should use -p1 (one slash before the filter directory). Am I right?
Thanks