-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ifplatform: filename escaping issue? #12
Comments
When the input filename has spaces, like
will2e/ifplatform/ifplatform.dtx Line 246 in a6c00f5
will2e/ifplatform/ifplatform.dtx Line 376 in a6c00f5
You can use If \documentclass{article}
\ExplSyntaxOn
% pretend ifplatform is loaded
\tl_const:cn {ver@ifplatform.sty} {0000-00-00}
\newif\ifwindows
\sys_if_platform_windows:TF {\windowstrue} {\windowsfalse}
\ExplSyntaxOff
\usepackage{minted}
\begin{document}
\begin{minted}{tex}
$a + b = c^2$
\end{minted}
content |
Thank you @muzimuzhi I had the same error and your workaround fixed it! |
@wspr Consider fixing this issue? On Linux, this patch fixes it for me: --- ifplatform.sty 2024-03-04 04:45:05.830042206 +0700
+++ /usr/share/texmf-dist/tex/latex/ifplatform/ifplatform.sty 2024-03-04 04:46:58.536711651 +0700
@@ -51,17 +51,17 @@
\else
\IfFileExists{nul:}{\@ip@nix@false}{\@ip@nix@true}
\IfFileExists{/dev/null}{\windowsfalse}{\windowstrue}
- \edef\ip@windows@echo@test{echo \string# > "\ip@file"}
+ \edef\ip@windows@echo@test{echo \string# > \ip@file}
\def\ip@backupplan{%
\IfFileExists{\ip@file}{%
\PackageWarningNoLine{ifplatform}{^^J \space\space\space
- Please delete the file "\ip@file" and try again%
+ Please delete the file \ip@file and try again%
}%
\ip@cantdecide
}{%
\ShellEscape{\ip@windows@echo@test}%
\IfFileExists{\ip@file}{%
- \ShellEscape{del "\ip@file"}%
+ \ShellEscape{del \ip@file}%
\windowstrue
}{%
\@ip@nix@true
@@ -88,9 +88,9 @@
\def\ip@only@six#1#2#3#4#5#6#7\@nil{#1#2#3#4#5#6}
\if@ip@nix@\ifshellescape
\ifwindows\else
- \ShellEscape{uname -s > "\ip@file"}
+ \ShellEscape{uname -s > \ip@file}
\CatchFileDef\@tempa{\ip@file}{}
- \ShellEscape{rm -- "\ip@file"}
+ \ShellEscape{rm -- \ip@file}
\edef\@tempa{\expandafter\zap@space\@tempa\@empty}
\def\@tempb{Linux}
\ifx\@tempa\@tempb Assume |
Unfortunately I can't share reproduction steps, but thought I'd note there seems to be some kind of argument escaping issue:
The "REDACTED" filename has spaces in it which probably has something to do with it. I never experienced this issue till I added "
-shell-escape
" arg tolatexmk
in our build process.The text was updated successfully, but these errors were encountered: