MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.230
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/texlive/texmf-dist/tex/latex/latexconfig/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/texlive/texmf-dist/tex/latex/latexconfig/lualatexquotejobname.lua
-- $Id: lualatexquotejobname.tex 22957 2011-06-13 20:49:26Z mpg $
-- Manuel Pegourie-Gonnard, originally written 2010. WTFPL v2.
--
-- Goal: see lualatexquotejobname.tex
--
-- Cache the results of previous calls, not so much for the speed gain which
-- probably doesn't matter, but to avoid repeated error messages.
local jobname_cache = {}
callback.register('process_jobname', function(jobname)
    -- use a cached version if available
    local cached = jobname_cache[jobname]
    if cached ~= nil then return cached end
    -- remove the quotes in jobname
    local clean, n_quotes = jobname:gsub([["]], [[]])
    -- complain if they wasn't an even number of quotes (aka unbalanced)
    if n_quotes % 2 ~= 0 then
        texio.write_nl('! Unbalanced quotes in jobname: ' .. jobname )
    end
    -- add quotes around the cleaned up jobname if necessary
    if jobname:find(' ') then
        clean = '"' .. clean .. '"'
    end
    -- remember the result before returning
    jobname_cache[jobname] = clean
    return clean
end)

MMCT - 2023