Any comments which is better or is there another way to import.
I discovered not all .tex files can be imported giving me a rather unhelpful error msg of $Failed
How can I test if a .tex file will work? What formatting is always needed to be able to import?
I have gotten the impression WL has an uneasy time with .tex files.
I would think by now, WL would have a robost ‘it just works’ support for .tex files.
NotebookWrite[notebook,data] writes data into a notebook at the current selection, setting the current selection to be just after the data written.
and
NotebookPut[expr] creates a notebook corresponding to expr and makes it the currently selected notebook in the front end.
So, “better” depends on whether you want to generate a new notebook or whether you want to augment an existing notebook.
As for limitations around importing TeX data, I really don’t know, but I would be wary of dependencies on custom packages. There are different derivatives of TeX (LaTeX being probably the most common), so I wouldn’t be surprised if Mathematica stumbles for some particular dialects.
If a message was generated along with the $Failed output, that might give you a clue. You might include TeX files that failed to import, and maybe someone here has enough expertise in both TeX and Mathematica to help, but that might also be stretching the purview of this community.
Here are attached various .tex files some import others fail.
Disappointed, yet again, the doc center is incomplete what .tex files will or will not work.
Supporting .tex well, I think, would be a high concern; or at least give better guidance.