bugtex4ht - Bugs: bug #610, How to use verbatimbox in tex4ht?...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #610: How to use verbatimbox in tex4ht? Compile error. OK in pdf

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Mon Oct 2 04:41:15 2023  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Oct 2 10:42:30 2023, comment #1:

Hi Nasser, thanks for the report.

I've posted the immediate solution on TeX.sx, and updated TeX4ht sources. It seems that the issue here was that Verbatimbox defines box using \sbox and the name of the box is saves in a command defined using \csname. This broke TeX4ht's redefinition of \sbox. It now works thanks to the fix.

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Mon Oct 2 04:41:15 2023, original submission:

reference and screen shots at

https://tex.stackexchange.com/questions/697413/how-to-use-verbatimbox-in-tex4ht-compile-error-ok-in-pdf

I found great solution in https://tex.stackexchange.com/questions/216366/how-do-i-put-verbatim-text-as-the-body-of-a-link/216380#216380 which allows one to use verbatim as second argument for href. It is the only solution I found after trying many, where I can use verbatim as second argument of href. (No, I do not want to use \url, I need to use href as I want to use specific shorter target names, as the URL can be very long to use)

It worked in pdf. When I tried it in tex4ht I get a compile error. Here is MWE

-----------------------
\documentclass[12pt,notitlepage]{article}
\usepackage{hyperref}
\usepackage{verbatimbox}

\begin{document}

\begin{myverbbox}{\myTarget}https://some_url_with_^many_%?_strange_characters/report.htm\end{myverbbox}

\href{https://some_url_with_^many_%?_strange_characters/report.htm}{\myTarget}

\end{document}
----------------------

This compiles in lualatex to pdf with no problem

enter image description here

But in tex4ht it gives error

make4ht -ulm default -a debug main.tex "mathjax,htm,nostyle"

...
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
(./main.aux) (/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2023/texmf-dist/tex/latex/lm/t1lmtt.fd)
! Missing \endcsname inserted.
<to be read again>
\hbox
l.59 ...strange_characters/report.htm\end{myverbbox}

Does tex4ht not support verbatimbox? How to make it work in tex4ht also?

TL 2023

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Oct 4 12:25:59 2023michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray