From 537ff4d551a2a2df1a26f16486a49fe3b0b8c5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Kr=C3=BCger?= Date: Sun, 19 Jul 2020 19:29:54 +0200 Subject: [PATCH] Fix luametalatex.lua for Windows --- luametalatex.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luametalatex.lua b/luametalatex.lua index 33ee5a8..bb20c55 100644 --- a/luametalatex.lua +++ b/luametalatex.lua @@ -14,9 +14,9 @@ local arg_pattern, late_arg_pattern do -- LuaMetaTeX needs -- to introduce parameters, -- but fmtutil uses just -. Let's rewrite this on the fly: local maybe_option = ('-' * ('-' + l.Cc'-') * #(early_args^-1))^-1 - local quote = l.Cc(WINDOWS and '"' or "'") + local quote = l.Cc(os.type == 'windows' and '"' or "'") local escape - if WINDOWS then + if os.type == 'windows' then -- Windows: " -> "^"" The ^ is for cmd escaping, the """ is for command line splitting escaping, -- backslashes still have to be escaped, but only in front of " or \ -- WARNING: This works with luametatex's argument splitting, but don't generally rely