bugtex4ht - Bugs: bug #123, support fontspec

 
 
Show feedback again

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

bug #123: support fontspec

Submitted by:  Karl Berry <karl>
Submitted on:  Tue Jan 12 23:29:20 2010  
 
Category: NonePriority: 1 - Later
Severity: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Michal Hoftich <michal_h21>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sat Dec 10 23:43:13 2016, comment #17:

committed to tl, r42672.

yes, regression testing is desperately needed.

Karl Berry <karl>
Project Administrator
Sat Dec 10 21:22:36 2016, comment #16:

I've found some issues when I tried to compile my older document which uses minted for syntax highlighting - calc package failed to load correctly. It uses \@for\sometempvar:=...\do{} command, and as I've found, the : had wrong catcode, so it was seen as part of the command name, instead of delimiter.

After some research I've found that tex4ht saves catcodes before the usepackage.4ht is included, and restores them afterwards. Expl3 is used in fontspec patch and it somewhat messed this catcode business.

It should be fixed by newest commit.

Regarding upgrading, I think it would be great to have some regression testing. To test if testing documents compile without compilation errors and that the resulting files contain correct XML. Both could be done with Lua, in order to be portable.

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Fri Dec 9 23:53:58 2016, comment #15:

it was my mistake. you did mention it in the first changelog entry, but i failed to check that. sorry. committed to tl, along with the new html4.4ht (42665, 42666)

another excellent medium-term project would be to go through the diffs between tl and current tex4ht and ensure it is ok (or make it ok) to update. i think most are due to generic changes long ago (perhaps made by eitan).

Karl Berry <karl>
Project Administrator
Fri Dec 9 23:39:34 2016, comment #14:

Karl, I just updated TL and figured out that I didn't mention usepackage.4ht as a modified file in the changelog, so it wasn't updated - it patches Fontspec upon loading, it doesn't work without it. That was my mistake, sorry.

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Fri Dec 9 23:17:14 2016, comment #13:

that's what i thought too, but doing a grep, i see that info4ht.4ht (tex4ht-info.tex) shows \input mktex4ht.4ht being used in an example template (nowhere else). should actually read that file sometime :).

Karl Berry <karl>
Project Administrator
Fri Dec 9 08:22:24 2016, comment #12:

Thanks Karl. mktex4ht.4ht is used for generating seeding .4ht files from the literate sources, so it probably doesn't need to be in TL. On the other hand, it already is in TL, some prehistoric version obviously, so it is probably good to make an update.

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Fri Dec 9 01:01:36 2016, comment #11:

make clean got me going again. whew.

committed fontspec files
fontspec-4ht.lua fontspec-luatex.4ht fontspec-xetex.4ht fontspec.4ht
to tl, r42654. also committed mktex4ht.4ht, which i never had before. maybe that was a mistake? or maybe it doesn't matter?

Karl Berry <karl>
Project Administrator
Thu Dec 8 11:02:08 2016, comment #10:

No problems on my computer in work

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Thu Dec 8 00:11:22 2016, comment #9:

It compiles without problems on my machine, maybe a issue with some temp files? I will try it tomorrow on a different computer.

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Wed Dec 7 23:59:08 2016, comment #8:

sorry about the double inclusion. i didn't think i had changed anything but the word transposition in the filename. oh well.

anyway, with current repo (rev 210), i get:

! Undefined control sequence.
\at:startdoc ...f }\HtmlEnv \a:Preamble \a:PROLOG
(followed by many more errors)

when processing tex4ht-4ht.tex. help?

Karl Berry <karl>
Project Administrator
Sun Dec 4 11:30:37 2016, comment #7:

It was included twice after the change. I fixed that, also I've found that configuration hooks were included only for xetex. it should be fixed as well now. Finally, I moved luatex definitions to fontspec-luatex.4ht.

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Sat Dec 3 23:53:05 2016, comment #6:

i felt the need to rename xetex-fontspec.4ht to fontspec-xetex.4ht (committed in r209 along with administrivia). michal, can you check that all is still working as intended before i commit to tl, please?

Karl Berry <karl>
Project Administrator
Sat Nov 26 23:56:38 2016, comment #5:

I've just pushed code to the repo. It works for both LuaTeX and XeTeX now. I've tried it with Latin, Greek, Cyrilics and Devanagari scripts, sample file is attached.

I have an issue with the change to tex4ht-html4.tex, the configurations aren't saved to html4.4ht. I guess that it is related to removal of mktex4ht.4ht generation from tex4ht-4ht.tex. When I add command \lit{fontspec} to mktex4ht.4ht manually, then the configurations are saved. But they aren't executed anyway.

(file #269)

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Sun Oct 30 17:34:49 2016, comment #4:

michal -- just thought i'd check in about updating ... ? tx.

Karl Berry <karl>
Project Administrator
Sun Oct 16 13:34:54 2016, comment #3:

No, this is just a proof of concept at the moment. I was busy last week, I will try to make some more testing in the near future and then update the sources if everything works nicely.

Thanks to Deimi I was able to pass "new-accents" option directly from Fontspec configuration, modified usepackage.4ht is attached.

(file #266)

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Fri Oct 7 21:52:40 2016, comment #2:

michal, do you want me to install anything in tl at this point?

Karl Berry <karl>
Project Administrator
Fri Oct 7 13:43:53 2016, comment #1:

As we recently found the way how to alter the package loading (using usepackage.4ht), I've created small configuration for the Fontspec package. Basically, what is needed is to prevent Fontspec from loading the EU1 or EU2 font encodings and to prevent loading of OpenType fonts. It works only with LuaLaTeX at the moment, XeLaTeX still tries to load the fonts.

The example file can be called using

make4ht -ulm draft luaotfloadpok.tex new-accents

The `new-accents` option is important, you would get bunch of errors otherwise. It should be possible to put

\edef\Preamble{\Preamble,new-accents}

somewhere, but when I do that in usepackage.4ht, then compilation fails with stack overflow, and in fontspec.4ht it doesn't have any effect.

One thing that doesn't work are font styles from the .htf files, resp. it doesn't work when you load a font with \setmainfont. So I put basic configuration for \textit and similar commands to fontspec.4ht, which isn't really clean, but this is just sample, so I hope it is OK.

Any comments are highly welcome.

(file #262, file #263, file #264, file #265)

Michal Hoftich <michal_h21>
Project MemberIn charge of this item.
Tue Jan 12 23:29:20 2010, original submission:

We need to write fontspec.4ht for use with xelatex. This is a big job!

Karl Berry <karl>
Project Administrator

 

Attached Files
file #269:  luaotfloadpok.tex added by michal_h21 (2kB - application/x-tex)
file #266:  usepackage.4ht added by michal_h21 (3kB - application/octet-stream)
file #262:  luaotfloadpok.tex added by michal_h21 (2kB - application/x-tex)
file #263:  usepackage.4ht added by michal_h21 (3kB - application/octet-stream)
file #264:  fontspec.4ht added by michal_h21 (549B - application/octet-stream)
file #265:  fontspec-4ht.lua added by michal_h21 (2kB - text/x-lua)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Updated the item)
  • -unavailable- added by cvr (Updated the item)
  • -unavailable- added by karl (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):

     

     

    11 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Dec 9 01:01:36 2016karlStatusIn Progress=>Fixed
      Assigned tocvr=>michal_h21
      Open/ClosedOpen=>Closed
    Sat Nov 26 23:56:38 2016michal_h21Attached File-=>Added luaotfloadpok.tex, #269
    Sun Oct 16 13:34:54 2016michal_h21Attached File-=>Added usepackage.4ht, #266
    Fri Oct 7 13:43:53 2016michal_h21Attached File-=>Added luaotfloadpok.tex, #262
      Attached File-=>Added usepackage.4ht, #263
      Attached File-=>Added fontspec.4ht, #264
      Attached File-=>Added fontspec-4ht.lua, #265
    Thu Apr 1 06:57:57 2010cvrStatusNone=>In Progress
      Assigned toNone=>cvr
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray