[texworks] Still an un resolved problem

Jonathan Kew jfkthame at googlemail.com
Mon Jul 13 20:03:25 CEST 2009

On 13 Jul 2009, at 18:28, Jérome Laurens wrote:

> Le 13 juil. 09 à 11:14, Jonathan Kew a écrit :
>> [...]
>>> In short, when MikTeX adds a .tex file extension, it forgets to  
>>> tell TeX that he did so.
>>> Christian Schenk has fixed this in MiKTeX 2.8 Beta 4 (to be  
>>> released soon).
>> Does it also provide the full path? So if \input foo actually  
>> caused TeX to read c:/some/path/to/texmf/tex/macros/foo.tex, does  
>> the name_field get updated only to foo.tex, or to the full path?  
>> SyncTeX needs the full path, as it cannot reliably know the search  
>> paths that TeX may have been using.
> I don't know the complete rules used by MikTeX but it seems that  
> pdftex just provides a relative name, whereas the texify command  
> provides a full path.
> The synctex parser should be smart enough to deal with both  
> situations as long as it is fed with the full path when a full path  
> appears in the synctex output file. At least this is what seems to  
> happen with Sumatra PDF.

Sure. The problem is that I see bare filenames (no path, no extension)  
in MikTeX synctex output.

> Of course, hard coding a full path is not convenient when it comes  
> to copy or duplicate files.
> For example, suppose you gather all your tex, pdf and synctex files  
> in folder foo1, then make a copy in foo2 and work from foo2.
> If you synchronize from the pdf file inside foo2, you will be  
> directed to the tex source file inside foo1.
> I bet this is not what one would expect.

True; I didn't mean that it should write a full path in every case,  
but in the case where (pdf|Xe|Lua)TeX used a full path to locate the  
file -- either because it was written this way in the source, or  
because it was located in a texmf tree that is specified via an  
absolute path. (This mainly applies to macro/class/style files rather  
than actual document files, which are not usually important to  
synctex, but there could be cases where "real text" comes from such a  

With the TeX Live implementations of the engines, I think you get a  
relative path for \input of local .tex files that are specified by  
relative paths -- usually just a filename -- in the source document  
(which is fine), and an absolute path for files that are located in  
texmf-dist etc via kpathsea. MikTeX seems to give just the bare  
filename as specified to \input (I guess that *might* include a path  
and/or extension, but only if they were specified in the source  

More information about the texworks mailing list