python - How to programmatically distinguish between a TeX and a LaTeX file -
I have a large collection of I have thought about making sure that Does anyone have an idea, how to filter all the pure TeX files from my collection? I think that there is no possibility of this being a completely implicit method, given that you want to be sensitive to those files Which can be input with It's probably best that you can, though of course, will be enough for the statistical analysis done by you. There is nothing to stop someone from writing such a tax file, which does not make any sense to define Just to move the next point home, there is one thing that is a tax format which is not .tex files (texts / latex), and I have a python Write a script that analyzes these files, I only want to analyze latex files, so I want to delete all the pure tax files.
\ start {document} is in every file, but it rejects a lot of my files, because many files are a book There are only chapters in long lists or a dissertation, in which there is no
\ start {document} command.
\ input or
\ include . Looking at a special file, however, you can probably classify it with low confidence, which will detect you first of the following.
\ Bye , and which is not usually defined in a latex file.
\ begin not likely to be defined in a general? ??? The tax file (though
\ end is defined in the
plain format).
\ begin , nor write some words To define
\ bye is a latex file problem, from your point of view, it is that any text is not manufactured which is a latex file (and vice versa ) Are actually restricted, even if
\ halign is rare in latex Actually, because latex is perfect. There is no difference between a elemental between a tex format.
plain but which is not latex though it is rare Although, though.
Comments
Post a Comment