# XeTeX can't find file with long name on Windows10

I compile files from my current working project on Windows10. Files with short name are being compiled from .tex to .pdf successfully, but files with long name don't compile. I get this error:

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 2.9.7400 64-bit)
entering extended mode
! I can't find file identify_conic_sections_written_in_rectangular_coordinates
_by_eccentricity_and_write_the_equation_of_the_conic_sol_1.tex'.
<*> ...d_write_the_equation_of_the_conic_sol_1.tex

Please type another input file name:


If I input name again, error repeats again. I have standard TeX code with TikZ library and I need to generate only pdf-picture (graphs of formulas) from my code.

        \documentclass[tikz, border={8pt 14pt 0pt 0pt}]{standalone}
\usepackage{xcolor}
…
\begin{document}
\begin{tikzpicture}
\begin{axis}[standard] \path(axis cs:0,0) node[anchor=north east] {0};
\addplot[name path=A, color=black, samples=100, ultra thick, domain=1:13] { 2*sqrt(1 - (x - 7)^2/36) + 5 };
…
\addplot[solid, color=red, samples=41, ultra thick] coordinates { (7, 5.10000000000000) (4*sqrt(2) + 7, 5.10000000000000) } node[above, pos=.5, fill=white, font=\large] { c${}=4 \sqrt{2}$ };
\end{axis}
\end{tikzpicture}
\end{document}


Unfortunately, I can't make name of file and name of directory shorter because of this is GitHub-project with 20 different developers and our company can't make names shorter. Other developers mostly use MacOS, but I use Windows10. I can take MacOS, but this is a bit difficult. Also, it looks so stupid to change OS just because of XeTeX doesn't work with long names.

Do somebody have any idea, how to get XeTeX work with long names? I'd be very grateful for answer.

Note: I use Windows 10 latest version (1909). I already set up my Windows10 for long names in both PATH and Policies setting. Other utilities work now with long name. Git is set up for long names too. Just XeTeX (and other ***TeX) don't work with long names. I already tested different other ways to solve problem:

• I updated all packets in MiKTeX
• I tried to check XeTeX with my scripts with short names (XeTeX works perfectly)
• I tried LaTeX, XeLaTeX, TeX - all these commands don't work with long names
• I used PyCharm terminal and standard Windows terminal to run ***TeX commands
• I even repeated everything on two different Windows10 computers. This awful problem repeated!
• I already googled and searched over tex.stachexchange.com this problem and I didn't find any information
• I just tried to input such a file (with \input{...} in a small example and it worked fine. Your description is missing something. Perhaps something is adding a line break. Apr 22 '20 at 15:40
• please post an example people can test, presumably the tikz isn't required to show the problem and you can show it with \documentclass{article} \begin{document} \input{a_very_long_name} \end{document} where a_very_long_name.tex is an empty file in the same directory? Post an example that we can reproduce the error. Apr 22 '20 at 15:47
• oh no looking at your error (if that is the whole log) it is not an \input file but the filename on the commandline? Apr 22 '20 at 15:49
• @DavidCarlisle I guess you could reproduce if you create the whole path mentioned - it exceeds in length the MAX_PATH value of 260 and so no longer work. Apr 22 '20 at 16:10
• texworks is not compiling anything it is just calling tex in the background so whatever it is doing to call xetex you can do the same from the commandline Apr 22 '20 at 16:41

This may not be correct. But try to save files with names

xetex.exe.manifest


and/or

xelatex.exe.manifest


in the same directory as xetex.exe, xelatex.exe with the following contents:

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>

• Thank you for idea. I checked, this does not work. I tried from different terminals. Also, I found that if I run xetex.exe, this terminal cuts all symbols after 260-th symbol authomatically (even before I press "Enter"). It's impossible to insert more than 260 symbols in window of "xetex.exe" Apr 23 '20 at 15:53
• Sorry, _MAX_PATH is alive. Of course TeX Live for Windows also have the limitation. Apr 23 '20 at 20:59
• The manifest file approach should work provided that the executable hasn't an embedded manifest. But I think the manifest must be valid, i.e., the application section must be inside an assembly` section. For example: github.com/MiKTeX/miktex/blob/… Apr 25 '20 at 10:05
• @Christian Schenk: Many thanks. I did not know manifest files and learned that the above was wrong and incomplete by seeing your complete example. Apr 25 '20 at 13:13