{"action":"closed","issue":{"url":"https://api.github.com/repos/lervag/vimtex/issues/212","labels_url":"https://api.github.com/repos/lervag/vimtex/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/lervag/vimtex/issues/212/comments","events_url":"https://api.github.com/repos/lervag/vimtex/issues/212/events","html_url":"https://github.com/lervag/vimtex/issues/212","id":100182840,"number":212,"title":"Latexmk `internal` keyword (sh: 1: internal not found)","user":{"login":"camilstaps","id":1202754,"avatar_url":"https://avatars.githubusercontent.com/u/1202754?v=3","gravatar_id":"","url":"https://api.github.com/users/camilstaps","html_url":"https://github.com/camilstaps","followers_url":"https://api.github.com/users/camilstaps/followers","following_url":"https://api.github.com/users/camilstaps/following{/other_user}","gists_url":"https://api.github.com/users/camilstaps/gists{/gist_id}","starred_url":"https://api.github.com/users/camilstaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilstaps/subscriptions","organizations_url":"https://api.github.com/users/camilstaps/orgs","repos_url":"https://api.github.com/users/camilstaps/repos","events_url":"https://api.github.com/users/camilstaps/events{/privacy}","received_events_url":"https://api.github.com/users/camilstaps/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-10T22:27:57Z","updated_at":"2015-08-25T19:15:38Z","closed_at":"2015-08-25T19:15:38Z","body":"I have the following in my `.latexmkrc`:\r\n\r\n    pdflatex = 'internal musixlatex %R %O %S';\r\n    push @generated_exts,\"mx2\";\r\n    push @generated_exts,\"mx1\";\r\n \r\n    sub musixlatex {\r\n       my $root = shift;\r\n       # Define root filename for the mx1 and mx2 files\r\n       # Note that $aux_dir1 includes directory separator\r\n       #      and it equals $out_dir1 if only the out_dir is set.\r\n       my $mx = \"$aux_dir1$root\";\r\n       my @args = @_; \r\n       if ( $pass{$rule} <= 1 ) { \r\n          print \"======= FIRST PASS: Deleting '$mx.mx2' =======\\n\";\r\n          unlink \"$mx.mx2\"; \r\n          print \"====   Generating '$mx.mx1' then '$mx.mx2' ===\\n\";\r\n          my $ret = system( \"pdflatex @args\" );\r\n          if ($ret) { return $ret; }\r\n          $ret = system( \"musixflx $mx\" );\r\n          if ($ret) { return $ret; }\r\n       }\r\n       return system( \"pdflatex @args\" );\r\n    }\r\n\r\nRunning `latexmk -pdf ...` from the command line works perfectly. However, `VimtexCompile` gives me the following error:\r\n\r\n    Latexmk: Need to remake files.\r\n      File changes, etc:\r\n       Changed files, or newly in use since previous run(s):\r\n          'songbook.tex'\r\n    Rule 'pdflatex': File changes, etc:\r\n       Changed files, or newly in use since previous run(s):\r\n          'songbook.tex'\r\n    ------------\r\n    Run number 1 of rule 'pdflatex'\r\n    ------------\r\n    ------------\r\n    Running 'internal -file-line-error musixlatex \"songbook\"  -recorder  \"songbook.tex\"'\r\n    ------------\r\n    Latexmk: All targets (songbook.pdf) are up-to-date\r\n\r\n    === Watching for updated files. Use ctrl/C to stop ... \r\n    Latexmk: applying rule 'pdflatex'...\r\n    sh: 1: internal: not found\r\n    Latexmk: fls file doesn't appear to have been made\r\n    Latexmk: Log file says output to 'songbook.pdf'\r\n    Latexmk: Failure to make the files correctly\r\n        ==> You will need to change a source file before I do another run <== \r\n    Collected error summary (may duplicate other messages):\r\n      pdflatex: Command for 'pdflatex' gave return code 32512\r\n\r\nI didn't change any of VimTeX's default options. What could be causing Latexmk to fail when run by VimTeX?"}}