0

I'm wanting to include the git hash automatically into a document using verbatiminput. However I seem to be unable to use verbatiminput on a file name does that not end with an extention.

\verbatiminput{test2.txt} %Works great
\verbatiminput{test2}     %does not work

I don't seem to be getting any error messages it just does not add the data in the file.

I'm new to Latex so I could be missing something straight forward.

  • it is system dependent so you may need to show what system you are using but if you got no error it presumably input something, do you have a test2.tex in your unput path? the extensionless name also references files with extension .tex so that you can go \input{chapter2} as well as \input{chapter2.tex} the system dependence comes as it is possible that it looks for test2.tex before or after it looks for test2 – David Carlisle Mar 15 '18 at 7:45
  • I'm using latexmk from within vimtex on win10. No I do not have a "test2.tex" file just "test2" and "test2.txt". Is there some way to tell it to look for the file without an extention? – pev.hall Mar 15 '18 at 7:50
  • make a small complete document (\verbatiminput is not defined by default and more than one definition exists in different packages) and show the log file that you get from the test (which should show the path of the file that it includes) there is no way to refer to test2 without referring to test2.tex so you definitely rely on the path search order (simplest of course is to give the file a different extension, but it should work, given a bit of setup) – David Carlisle Mar 15 '18 at 7:54
  • Haven't tried it, but would test2. work with a period appended? – Steven B. Segletes Mar 15 '18 at 9:44
  • Appending the period worked great thanks Steven B (I would not have thought of it). Do you want to write an answer so I can accept it (if it lets me) – pev.hall Mar 15 '18 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.