0

When using the xsimverb package, I can easily write something to a file. Problem: if I use xelatex to compile, I get tabs replaced with ^^I in the file, while lualatex and pdflatex preserve the tabs as expected (this is truly written in the file, this is not an artifact of \verbatiminput):

enter image description here

Any idea how to solve this?

MWE

\documentclass[]{article}

\usepackage{xsimverb} \usepackage{verbatim}

\begin{document}

\NewDocumentEnvironment{TestEnv}{sm}{% \XSIMfilewritestart{\jobname-robExt-tmp-file-you-can-remove.tmp}% }{% \XSIMfilewritestop% \verbatiminput{\jobname-robExt-tmp-file-you-can-remove.tmp}% }%

\begin{TestEnv}{test} This is a test with 2 tabs precisely here >> <<. \end{TestEnv}

\end{document}

EDIT

Seems like xelatex -8bit foo.tex solves this error… but not sure if there is a cleaner solution. Also, some of my users seem to still have issues even with -8bit.

tobiasBora
  • 8,684
  • 1
    The strategy is very simple: never use TAB when dealing with TeX. Reserve the TAB key to trigger autocompletion and your life will be happier. – egreg Dec 19 '23 at 08:29
  • @egreg Ahah, I do use spaces myself, but seems like TexStudio actually use Tabs, and my users then report bugs thinking that it was because of my library ^^ – tobiasBora Dec 19 '23 at 09:58

0 Answers0