[tex4ht] [bug #636] tex4ht loses table boarders when adding color

Michal Hoftich michal.h21 at gmail.com
Wed Oct 2 12:39:07 CEST 2024


Hi Nasser,

When I compile the same file on this new TL I just installed,
> tex4ht now gives this error
>
> ! Undefined control sequence.
> \a:HBorder ...border-top:1px solid \#\hline:color
>                                                    ">
> l.16 A
>      &B&C \\ \hline
> ? X
> -----------------------------------------------
>

thanks for the report. It seems that the usepackate.4ht file in TL is too
old.

I've created a script that will print differences in .4ht files between
TeX4ht repository and TeX Live directory:

-------------------------
kpse.set_program_name "luatex"

local function get_files(dir)
  local files = {}
  for file in lfs.dir(dir) do
    if file:match("4ht$") then
      local path = dir .."/" .. file
      path = path:gsub("//", "/")
      files[file] = path
    end
  end
  return files
end

local function clean(result)
  local t = {}
  for line in result:gmatch("([^\n]+)") do
    if line:match("%s*%%") then
    elseif line:match("immediate") then
    elseif line:match("%d+.?%d+") then
    elseif line:match("%-%-%-") then
    elseif line:match("^[><]%s*$") then
    else
      t[#t+1] = line
    end
  end
  return table.concat(t, "\n")
end
local function diff(source, dest)
  local cmd = io.popen("diff " .. source .. " " .. dest, "r")
  local result = cmd:read("*a")
  cmd:close()
  -- remove unnecessary stuff
  return clean(result)
end




local source = get_files(arg[1])
local dest   = get_files(arg[2])

for name, path in pairs(source) do
  if not dest[name] then
    print("File not exists in dest: " , path)
  else
    local result = diff(path, dest[name])
    if result ~= "" then
      print(path)
      print(result)
    end
  end
end
-----

It can be used like this:

$ texlua diffs.lua /path/to/newsrc/trunk/lit/
 /usr/local/texlive/2024/texmf-dist/tex/generic/tex4ht/

I think it can be useful for me or Karl in the future.

Best regards,
Michal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex4ht/attachments/20241002/f92a3d76/attachment.htm>


More information about the tex4ht mailing list.