Re: [tex4ht] BUG: xcolor tex4ht

2019-04-10 Thread Deimantas Galcius

  
  
On 4/10/19 10:08 PM, Michal Hoftich
  wrote:


  
Does it help if you set:
1. 'dvilualatex' compiler instead of 'latex' (probably you'll need \usepackage[T1]{fontenc} for TL2019)
2. \usepackage{luatex85} (for compatibility: pgfsys-dvips.def driver uses \pdfsavepos macro, while in luatex it's \savepos)?

  
  
Thanks for the suggestion. The result seems to be same with all three
major engines. I am sure we will see more of such errors with TikZ
manual, as there is over 1000 figures.


Hi Michal, 

I didn't try with TikZ manual, but with the shifted circles
  problem in 
https://tex.stackexchange.com/a/482913/2891
My output is: 




best, -- deimi





  



Re: [tex4ht] BUG: xcolor tex4ht

2019-04-10 Thread Deimantas Galcius

On 4/9/19 4:41 PM, Michal Hoftich wrote:

what could cause the issue with circles moved
slightly to the right in this answer?:

https://tex.stackexchange.com/a/482913/2891


Hi Michal,

Does it help if you set:
1. 'dvilualatex' compiler instead of 'latex' (probably you'll need 
\usepackage[T1]{fontenc} for TL2019)
2. \usepackage{luatex85} (for compatibility: pgfsys-dvips.def driver uses 
\pdfsavepos macro, while in luatex it's \savepos)?

best regards, -- deimi



Re: [tex4ht] [bug #378] Wrong MathML output for numbers

2018-02-02 Thread Deimantas Galcius
There is a section "Digits  into Numbers"
in tex4ht-xhtmml-xtpipes.tex  file. 
If I read it correctly, the code deals with 
 merging "mn" nodes. Apparently Eitan's approach
was   to  postprocess  html file with xtpipes (and not to fix c-code).
 


On Feb 2, 2018, at 1:19 AM, Karl Berry wrote:

> Follow-up Comment #1, bug #378 (project tex4ht):
> 
> I'm sorry, I don't understand yet. Do you know where the "" string
> actually gets emitted? Because "mn" only occurs as a word in a few places
> anywhere in the *.tex files (and not in tex4ht-c.tex), none of which looks
> especially relevant to the creation of the 1 to me.
> 
> Anyway, in tex4ht-mathltx.tex, there are some \Configure commands for some,
> but not all, of the numerals, starting around line 2245. Only 0..6 are
> configured there, and only 4..5 with the "mathltx-" option (whatever that is).
> What happens with 7..9? Does any of this make sense to you?
> 
> I wonder if Eitan provided an option for determining the behavior of the
> numerals in math mode. So wish he were still here ...
> 
> 
>___
> 
> Reply to this item at:
> 
>  
> 
> ___
>  Message sent via/by Puszcza
>  http://puszcza.gnu.org.ua/
> 




Re: [tex4ht] dependencies, new and incomplete

2017-05-05 Thread Deimantas Galcius

  
  
Hi Karl, 



  1) I'm afraid I don't really understand tex4ht file derivation, despite
Deimi's best efforts to explain.



Frankly speaking I cannot say that I understand it completely too :)



  3) It sure would be nice to have complete auto-generated dependencies,
as we were discussing some time ago. Maybe someday ...



My attempt to have generated dependencies is on a github repo:
https://github.com/dgalcius/tex4ht-dev. 

What I tried to achieve: 

-1-  separate generation of code (4ht,htf, etc,)  and of
documentation. 


4ht $(tex4ht-4ht_derived): tex4ht-4ht.tex
$(tex4ht-4ht_deps)
    tex $(tex_opts) $<

4ht-doc $(tex4ht-4ht_doc): $(tex4ht-4ht_deps)
    $(HTTEX) $<

This is a rough template that I follow: for each seeded source
  tex file (foo.tex)
I put two phony targets  "foo" and "foo-doc". In general it is
  much faster to generated
code related files (4ht,htf,etc) than documentation and in most
  cases I want to generate code files only.


-2- For each source tex file to have a .d  (dependency) file which
is generated programmatically. 
e.g. 
tex4ht-c.tex  <=> tex4ht-c.d;  tex4ht-html4.tex <=>
tex4ht-html.d, etc.

tex4ht-c.d: 
define tex4ht-c_derived
   tex4ht.c\
  endef

  # deps files list from tex4ht-c.fls.
  define tex4ht-c_deps
   tex4ht-c.tex\
   common.tex\
   tex4ht.sty\
   tex4ht.4ht\
   html4.4ht\
   html4-math.4ht\
   plain.4ht\
   dratex.4ht\
   th4.4ht\
   ProTex.sty\
   AlProTex.sty\
   tex4ht-cpright.tex\
  endef

  # set main html file
  define tex4ht-c_doc
   html.dir/tex4ht-c/tex4ht-c.html
  
  endef

.d file defines 3 variables: foo_derived (derived files list),
foo_deps (dependency files list), and foo_doc (main html file).

To remake all .d files I run: $ make d;
To remake one .d file I run: $ make foo.dd;
Note double "d" in case of one file. (Should I explain why not
  foo.d?)

-3-  Different rules apply for .d file generation (code vs htf vs
jar), so I set some awk scripts in extra_bin/ folder:
  - fls2d  - processing fls. This is used for .4ht files
  - flslg2d - processing fls and lg files. This is used for .htf 
files
  - jar2d - processing jar file

  .fls file is the one obtained by specifying -recorder option
  latex/tex run.
  
  *
  I went through every target that generate code removing circular
  dependencies in particular 
   and I consider this part more or less finished.  What I did not
  look into is an
update target. 
  
  I do not know if this approach of generating .d files is good and
  robust(!) enough. 
  
  Beware!! my github repo is out of sync with svn repo for at least
  six month. 
  
  
  Any suggestions, comments are welcome!
  
  best regards, 
   -- deimi 
  
  
  
  
  
  
  


  




Re: [tex4ht] [bug #217] Errors using mdframed and framed packages with tex4ht

2017-05-04 Thread Deimantas Galcius
Hi Michal, 

If I recall it right:

1. when you introduce a new entry to mktex4ht-cnf.tex file, you need to process 
it
in order to get '\lit{}' record in 
mktex4ht.4ht file. 

2.  you need to process tex4ht-html4.tex file twice if auxiliary files are 
deleted
(.xref, .aux, etc). This is  (probably)  also the case when dependency files 
are changed.


I'll try to answer to Karl's message on the same on a mailing list a bit later 
(and hopefully in a bit more detail).

best regards, -- deimi 




On Apr 28, 2017, at 8:25 PM, Michal Hoftich wrote:

> BTW, I've also found that tex4ht-html4.tex needs to be compiled twice after
> new package is added to mktex4ht-cnf.tex. This means that when we run `make`,
> it sometimes produces `html4.4ht` which doesn't contain configurations for
> that new package, even if they are present in `tex4ht-html4.tex`. I didn't
> investigated what's the cause yet. 
> 
>___
> 
> Reply to this item at:
> 
>  
> 
> ___
>  Message sent via/by Puszcza
>  http://puszcza.gnu.org.ua/
> 




Re: [tex4ht] [bug #345] regression testing is needed

2016-12-16 Thread Deimantas Galcius
Hi Michal, 

Very good.  I've removed  l3build files from the repo.  
Starting from the scratch  :)

regards, -- deimi 


On Dec 16, 2016, at 4:51 PM, Michal Hoftich wrote:

> Hi all
> 
>> 
>> tex4ht testing needs to deal not with log files, but output files which may
>> be
>> text files (html, xml, multiply html) and/or binary files (e.g. images).
>> I am not sure if it would be good idea to extend l3build to support these
>> features.
>> Rather I think about a different script:
>> build.lua -> (run.lua)
>> l3build.lua -> test4ht.lua (?)
>> regression-test.tex -> regression-test-4ht.tex (?)
>> 
>> Does it sound reasonable?
>> Alternatively, we can always start from scratch.
>> 
>> 
> 
> It indeed sounds reasonable, we have a little bit different needs than
> LaTeX 3, where  they test only the log file, but with all three main
> engines. We need to test several files for each tested file (at least
> the XML and CSS), we also need to be able to pass different options
> for particular tests. I haven't read l3build documentation and source
> code yet, so I have no idea how difficult it will be to get that to
> work. But I am sure that it can't be harder than to start from
> scratch.
> 
> Best regards,
> Michal




Re: [tex4ht] [bug #345] regression testing is needed

2016-12-16 Thread Deimantas Galcius

Hi Karl,

I took l3build.lua from latex3 repo on github [1].
l3build script has extra features that are irrelevant for tex4ht
- dtx processing, creating doc pdf, preparing release packages for CTAN.
What we are interested in is testing and l3build provides a good infrastructure 
for  testing.
I think about l3build.lua as a starting point building testing system for 
tex4ht:
dropping irrelevant features and adding what is needed.

l3build.lua testing focus on log file and its normalized output.
The supporting file regression-test.tex provides with macros
such as \START.. \STOP,  \OMIT ..\TIMO, that helps to get normalized output.

tex4ht testing needs to deal not with log files, but output files which may be
text files (html, xml, multiply html) and/or binary files (e.g. images).
I am not sure if it would be good idea to extend l3build to support these 
features.
Rather I think about a different script:
build.lua -> (run.lua)
l3build.lua -> test4ht.lua (?)
regression-test.tex -> regression-test-4ht.tex (?)

Does it sound reasonable?
Alternatively, we can always start from scratch.


[1] https://github.com/latex3/latex3/blob/master/l3build/l3build.lua


best regards, -- deimi



On 12/16/2016 01:55 AM, Karl Berry wrote:

 build.lua is a driver file with settings for the main l3build.lua script.

I know.  My question was whether l3build.lua is a fork (modified by you)
or a copy of the original l3build.lua file from the l3build
package. Which you answered below -- you made changes. Ok.

 Probably it would be better to give  it a different name,

build.lua -> l3test4ht.lua comes to mind.

As for l3build.lua, it would be much better not to have it committed in
our repository at all, but to use their installed version. We don't want
to continually be merging new versions, and sticking with an old version
"forever" doesn't sound good either.

 just simple fix in l3build.lua:
os_diffexe  = os.getenv("diffexe") or "diff -c --strip-trailing-cr 
--ignore-matching-lines='

--
--
Deimantas



Re: [tex4ht] [bug #345] regression testing is needed

2016-12-15 Thread Deimantas Galcius


On 12/15/2016 02:46 AM, Karl Berry wrote:

But we don't really want/need a copy of build.lua in the repo, do we?
Did you have to modify it? I can't tell if the differences from the
distributed version are just different versions, or something you needed
to do.

build.lua is a driver file with settings for the main l3build.lua script.
Probably it would be better to give  it a different name, as
we will want to amend it.


I see it somehow avoids testing the date line?

just simple fix in l3build.lua:

  os_diffexe  = os.getenv("diffexe") or "diff -c --strip-trailing-cr 
--ignore-matching-lines='

Re: [tex4ht] [bug #345] regression testing is needed

2016-12-14 Thread Deimantas Galcius

Hi Karl, Michal,

I've committed quick and dirty showcase of testing using
l3build system, which l3team has developed and is using for their
testing needs. If you find it suitable, we can adapt it for tex4ht.

Sample files are
testfiles:
  t-suits.lvt  - tex file
  t-suits.tlg - html file (pre-saved)

To run a test (in tests/ folder):
$ make check

This runs "htlatex" on tex file (lvt) and makes diff  of generated html file 
against pre-saved html (tlg).


My idea is to adapt l3build system for tex4ht needs.
But I'm sure you have better ideas.


-- regards, deimi




On 12/14/2016 02:04 AM, Karl Berry wrote:

Follow-up Comment #1, bug #345 (project tex4ht):

I added a top-level tests/ directory with the assorted files I've collected
over the last few years -- hello,world stuff plus some bug examples.

Unfortunately I have done nothing to actually run/regress them, but it's what
I've got. Michal or Deimi, maybe one of you would be able to make a start on
it? Just hoping.

Also, there's a subdirectory tests/biblatex/ with the biblatex tests as I last
received them from CVR. There's been a new biblatex release a few days ago, so
they probably need to be updated.

 ___

Reply to this item at:

   

___
   Message sent via/by Puszcza
   http://puszcza.gnu.org.ua/



--
--
Deimantas



Re: [tex4ht] [bug #341] html5 support

2016-11-25 Thread Deimantas Galcius
perfect, -   I am impressed how quick you are! Thank you.

regards, -- deimi


On Nov 25, 2016, at 7:53 PM, Michal Hoftich wrote:

> Hi Deimi,
> 
>> This is  great! 
>> Please can you commit tex4ht-html5.tex file to svn repo?
>> 
> 
> I've just committed the tex4ht-html5.tex to the svn repo. I've also
> cleaned the macro for character encoding handling, so it was actually
> useful to look at it again :)
> 
> Best,
> Michal



Re: [tex4ht] [bug #341] html5 support

2016-11-25 Thread Deimantas Galcius
Hi Michal, 

This is  great! 
Please can you commit tex4ht-html5.tex file to svn repo?

best regards, -- deimi 

On Nov 25, 2016, at 2:54 PM, Michal Hoftich wrote:

> URL:
>  
> 
> Summary: html5 support
> Project: tex4ht
>Submitted by: michal_h21
>Submitted on: Fri 25 Nov 2016 02:54:25 PM EET
>Category: None
>Priority: 5 - Normal
>Severity: 5 - Normal
>  Status: None
> Privacy: Public
> Assigned to: None
>Originator Email: 
> Open/Closed: Open
> Discussion Lock: Any
> 
>___
> 
> Details:
> 
> I've created basic html5 template, named tex4ht-html5.tex, and added it to the
> source repository. At the moment, it alters just the html header, we should
> add much more in the future, starting with semantic elements and wai-aria
> attributes.
> 
> If you want to try it before it is added to TL, you can try the attached
> files. You can execute it using either
> 
>   htlatex filename "xhtml,html5"
> 
> or 
> 
>   make4ht -u filename html5
> 
> 
> 
>___
> 
> File Attachments:
> 
> 
> ---
> Date: Fri 25 Nov 2016 02:54:25 PM EET  Name: tex4ht.usr  Size: 322B   By:
> michal_h21
> 
> 
> ---
> Date: Fri 25 Nov 2016 02:54:25 PM EET  Name: html5.4ht  Size: 2kB   By:
> michal_h21
> 
> 
> 
>___
> 
> Reply to this item at:
> 
>  
> 
> ___
>  Message sent via/by Puszcza
>  http://puszcza.gnu.org.ua/
> 




Re: [tex4ht] [bug #339] remove/rewrite braille code

2016-10-31 Thread Deimantas Galcius

Karl - i don't believe we have braille lit sources in svn repo.

It is interesting to know, what kind of system/code/workflow Antonis refers to 
as
"Braille support in tex4ht"

 "SuBrl: A LaTeX to braille converter"
http://www.dotlessbraille.org/gurari.htm
Does anybody know about source files?

-- deimi

On 10/30/2016 06:59 PM, Karl Berry wrote:

Antonis Tsolomitis tells me that the Braille support in tex4ht depends on
liblouis to convert tex4ht's XML output to Braille. and liblouis does not work
with our xml, and won't (they said their target is Office). Ditto for
LaTeXML's XML output.

Therefore it seems we should remove or completely rewrite our Braille stuff,
instead of having code that does nothing useful.

Antonis and others have written latex2nemeth
(http://ctan.org/pkg/latex2nemeth) as another tex parser that outputs braille
directly, since they had a blind student they needed to support right away.





[tex4ht] debugging tex4ht bootstrap

2016-09-30 Thread Deimantas Galcius

Hi Karl, Michal

I've updated svn repo with a fix.

This fixes latex compilation error(s)
on first pass (when there are no *.xref files).

The mutual dependency problem
wrt tex4ht-options.tex and tex4ht-cond4ht.tex
should be fixed too.


kind regards,
-- deimi


Re: [tex4ht] debugging tex4ht bootstrap

2016-07-29 Thread Deimantas Galcius

Hi Karl,

Unfortunately the patch I send you, introduces changes in few html files (links 
are lost).
So please, disregard the patch.

I'll try to fix this in a couple of days.

Regards, -- deimi






Title: index
 
  
  
 

   infoht42up-8859-6-CJK-IEEEtran- JHEP-Preamble-ProTex-SIunits- TextBook-aa-abidir-accents-
acm-proc-article-sp-afterpage-alatex-algorithm- algorithmic-algorithmicx-alltt-alphanum-
amsart*amsbook-amsbsy-amscd-
amsdtx-amsfonts-amsldoc-amsmath- amsopn-amsppt-amsproc-amssymb-
amstex-amstex1-amstext-amsthm- aoutput-apa-apa-a-apacite-
aps-arabicore-array-article*
austrian-babel-beamer-beamerbasefont- beamerbasetoc-beton-biblatex-bibtopic-
bm-book*booktabs-boxedminipage-
byname-caption-catalan-cgloss4e- chapterbib-chicago-color-colortbl-
combine-context-covington-cp1250- cp1252-cp1256-cp437-cp437de- cp850-cp852-cp862-cp865-
croatian-curve-czech-danish- dcolumn-debug-diagram-diagrams- doc-dratex-dsfont-dutch-
dvipdf-dvips-dvipsnam-dvipsone- elsart-emulateapj-endfloat-endnotes-
english-enumerate-enumitem-epigraph- eplain-epsf-epsfig-errata-
esperant-esperanto-estonian-etex4ht- eucal-euler-europecv-eurosym-
everyshi-exam-exerquiz-extarticle- extbook-extletter-extproc-extreport-
fancybox-fancyvrb-fig4tex-finnish- fleqn-float-floatflt-foils- fontmath-footmisc-footnote-dw-francais-
french-frenchb-g-brief-galician- gauss-geometry-german-germanb-
gloss-glossaries-glossary-go- graphics-graphicx-greek-harvard-
hebrew-hebtex-hewrite-holtxdoc- hypcap-hyperref-ifthen-index- inputenc-italian-jeep-jurabib-
koi8-r-latex*latex209-latex2man-
latin1-latin2-lb-letter- lettrine-lfeenc-lineno-linguex- listings-llncs-llncs-a-lncse-
lncse-a-longdiv-longtable-ltugboat- ltugboat-a-ltugproc-ltugproc-a-ltxguide-
makeidx-manju-manmac-mathtools- mdwlist-mdwtab-memoir-mempatch-
mex-mfpic-microtype-minitoc- mktex4ht-mla-mls-moreverb- multicol-multind-multirow-mwart-
mwbk-mwrep-nameref-natbib- ngerman-ngermanb-nicefrac-nomencl-
norsk-ntheorem-osudeG-ot4enc- overcite-overpic-paralist-path-
pb-diagram-pctable-pctex32-pd1enc- pgf-picins-pictex-pifont- plain-polish-polski-portuges-
powerdot-powerdot-a-prosper-prosper-a- psfig-pst-all-pst-jtree-pstricks-
quoting-reading-report*res- res-a-resume-revsymb-revtex4-
rlbabel-romanian-rotating-russianb- scottish-scrartcl-scrbook-scrreprt-
seminar-seminar-a-seslideb-sig-alternate- sistyle-slides-slidesec-slovak-
slovene-soul-spanish-splitidx- srcltx-subeqnarray-subfigure-subscript-
supertabular-sverb-svgnam-swedish- syntax-t2benc-tabularx-tabulary-
tabulary-a-tcilatex-tex4ht*tex4ht2-
texinfo-texpower-textures-th4- theorem-titlesec-tocloft-tugboat- turkish-ucs-ukraineb-ulem-
url-ushort-usorbian-utf8- utf8x-vanilla-varioref-verbatim- verbatimfiles-verse-vowel-web-
welsh-wrapfig-writer-xcolor- xr-xr-hyper-xy- 
[exit index]


 
Title: index
 
  
  
 

   infoht42up-8859-6-CJK-IEEEtran- JHEP-Preamble-ProTex-SIunits- TextBook-aa-abidir-accents-
acm-proc-article-sp-afterpage-alatex-algorithm- algorithmic-algorithmicx-alltt-alphanum-
amsart*amsbook-amsbsy-amscd-
amsdtx-amsfonts-amsldoc-amsmath- amsopn-amsppt-amsproc-amssymb-
amstex-amstex1-amstext-amsthm- aoutput-apa-apa-a-apacite-
aps-arabicore-array-article*
austrian-babel-beamer-beamerbasefont- beamerbasetoc-beton-biblatex-bibtopic-
bm-book*booktabs-boxedminipage-
byname-caption-catalan-cgloss4e- chapterbib-chicago-color-colortbl-
combine-context-covington-cp1250- cp1252-cp1256-cp437-cp437de- cp850-cp852-cp862-cp865-
croatian-curve-czech-danish- dcolumn-debug-diagram-diagrams- doc-dratex-dsfont-dutch-
dvipdf-dvips-dvipsnam-dvipsone- elsart-emulateapj-endfloat-endnotes-
english-enumerate-enumitem-epigraph- eplain-epsf-epsfig-errata-
esperant-esperanto-estonian-etex4ht- eucal-euler-europecv-eurosym-
everyshi-exam-exerquiz-extarticle- extbook-extletter-extproc-extreport-
fancybox-fancyvrb-fig4tex-finnish- fleqn-float-floatflt-foils- fontmath-footmisc-footnote-dw-francais-
french-frenchb-g-brief-galician- gauss-geometry-german-germanb-
gloss-glossaries-glossary-go- graphics-graphicx-greek-harvard-
hebrew-hebtex-hewrite-holtxdoc- hypcap-hyperref-ifthen-index- inputenc-italian-jeep-jurabib-
koi8-r-latex*latex209-latex2man-
latin1-latin2-lb-letter- lettrine-lfeenc-lineno-linguex- listings-llncs-llncs-a-lncse-
lncse-a-longdiv-longtable-ltugboat- ltugboat-a-ltugproc-ltugproc-a-ltxguide-
makeidx-manju-manmac-mathtools- mdwlist-mdwtab-memoir-mempatch-
mex-mfpic-microtype-minitoc- mktex4ht-mla-mls-moreverb- multicol-multind-multirow-mwart-
mwbk-mwrep-nameref-natbib- ngerman-ngermanb-nicefrac-nomencl-
norsk-ntheorem-osudeG-ot4enc- overcite-overpic-paralist-path-
pb-diagram-pctable-pctex32-pd1enc- pgf-picins-pictex-pifont- plain-polish-polski-portuges-
powerdot-powerdot-a-prosper-prosper-a- psfig-pst-all-pst-jtree-pstricks-
quoting-reading-report*res- res-a-resume-revsymb-revtex4-
rlbabel-romanian-rotating-russianb- scottish-scrartcl-scrbook-scrreprt-

Re: [tex4ht] debugging tex4ht bootstrap

2016-07-22 Thread Deimantas Galcius

Hi Karl,

(1)
Here is a patch. Hopefully it fixes
compilation failure on first run.
Literate sources are quite complex; not so easy to grasp.
Your lengthy note on \CleanComment in common-info.tex
was really useful, - thanks.

I tested:
$> make info4ht.4ht
$> make infomml.4ht
$> xhlatex tex4ht-info.tex "html,3,sections+"
$> htlatex tex4ht-info-mml.tex "html,sections+"
and
$> make clean
$> make all

It seems that problems with tex4ht-options.tex
are gone too.
$> make tex4ht.ht
$> mk4ht xhlatex tex4ht-options.tex xhlatex tex4ht-info.tex
will fail. It supposed to be
$> xhlatex tex4ht-info.tex "html,3,sections+"
as is in Makefile.
Option "html" is important here, I think.

How do I test if there are no side effects in the generated output files?


(2)
 
	For debugging, I found that making xhlatex (and htlatex) be

#!/bin/sh -e was helpful, since then it stopped after the first 
(failed) run.

This is very useful. I wonder if it is not a case to put it in a mainstream, 
not just for debugging.
Consider $> xhlatex foo  (foo.tex is non-existent);
I have to type 'x' 3 times to exit latex and then still tex4ht and t4ht is run.
With "-e" xhlatex exists nicely upon first 'x'.

(3)

There also seems to be a mutual dependency problem wrt tex4ht-4ht.tex
and tex4ht-cond4ht.tex. The former creates mktex4ht.cnf and then
\input's cond4ht.4ht. But to make cond4ht.4ht, mktex4ht.cnf needs to
already exist.

yes, it is. tex4ht-4ht has over 130 derived files.
Setting properly tex4ht_4ht_derived files, Makefile issues that "mktex4ht.cnf 
(and/or some other)"
has two different recipes.
One option I can thing of is combining recipes. (though i am not quite sure if 
it is right thing to do):
That would be something like this in Makefile:

$(tex4ht_4ht_derived) $(tex4ht_cond4ht_derived): tex4ht-4ht.tex 
tex4ht-cond4ht.tex $(common)
tex $(tex_opts) $<
tex $(tex_opts) tex4ht-cond4ht
tex $(tex_opts) cond4ht.4ht
tex $(tex_opts) $<
tex $(tex_opts) $<


(4) From Makefile:

tex4ht_4ht_derived = \
  algorithmic.4ht biblatex.4ht book.4ht frenchb.4ht \
  geometry.4ht graphicx.4ht hyperref.4ht latex.4ht lettrine.4ht 
listings.4ht \
  memoir.4ht multicol.4ht quoting.4ht reading.4ht \
  scrartcl.4ht scrbook.4ht scrreprt.4ht spanish.4ht subscript.4ht \
  titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht
# xx and many, many more.

There are a lot of derived files from tex4ht-4ht.tex.
Probably I would set them programatically rather than manually.
Something like this (in Makefile):

tex4ht_4ht_derived := $(shell cat tex4ht-4ht.derived)
tex4ht-4ht.derived: tex4ht-4ht.fls
grep -v $* $< | awk '/OUTPUT/ {print $$2}'  > $@

The idea is to filter FLS file for line with "OUTPUT" rejecting tex4ht-4ht.*
Fls file is created with " -recorder"  for latex.
tex_opts = --interaction=nonstopmode -recorder #--file-line-error

(5)

Having a reproducible environment would
be so great.  (E.g., be able to do a checkout and type "make" and it
just works ...)

I understand. Fixing (xh)latex compilation failures is an important step,
but not the only one, i believe. What would be a TODO list for having a
reproducible environment?:

- fix (ht)latex compilation errors (hopefully the patch fixes this)
- fix  mutual dependency problem tex4ht-4ht.tex and tex4ht-cond4ht.tex
- ...

Perhaps you have some other TODO items or things that do not work...



(6)

In common-info.tex file I read:

If you modify this program, changing the
version identification would be appreciated.

I cannot find the version identification in this file.
What I supposed to do?





Kind regards, and sorry for a lengthy message
 -- deimi

Index: common-info.tex
===
--- common-info.tex	(revision 190)
+++ common-info.tex	(working copy)
@@ -22,7 +22,13 @@
 % version identification would be appreciated.
 
 \expandafter\ifx \csname YES\HTML\endcsname\relax
-\def\CleanComment{[0]}
+% begin comment. 21/07/2016 (dg)
+%   on first run \infoIVht expects \ConfigureHinput
+%   ( \def\infoIVht#1\ConfigureHinput{..} )
+%   so we feed it with "\ConfigureHinput" (no expansion here, merely a delimiter)
+%   the rest is slurped until the "//".
+% end  
+\def\CleanComment{[0]\ConfigureHinput\id:gobble}
 \else
 \let\saveCd=\<
 \def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
Index: tex4ht-info.tex
===
--- tex4ht-info.tex	(revision 190)
+++ tex4ht-info.tex	(working copy)
@@ -38,47 +38,10 @@
 \fi
 
 
-%% definitions %
+\input{common-info}
+\input{common}
 
-\expandafter\ifx \csname YES\HTML\endcsname\relax
-\def\CleanComment{[0]}
-\else
-\let\saveCd=\<
-\def\<{\edef\FIRST{\the\inputlineno}\let\<\saveCd \saveCd}
-

Re: [tex4ht] [bug #307] make4ht removes spaces in \href in LUA mode when using mathdesign package

2016-06-09 Thread Deimantas Galcius





third: it is not surprising that pdf(la)tex and lua(la)tex would find
different fonts.  i've never understood lualatex font lookup, and can't
help there.  furthermore, the actions taken by the two engines after a
font is found are different.


it appears that latex and dvilualatex take different actions on virtual fonts.
latex compiler does not read vf files (virtual fonts management is left to dvi 
driver),
while dvilualatex compiler reads vf files and expands them.


kpsepath debug log from latex run:

kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdbch/mdbchr8t.tfm,
 rb) => 0x299cbb0

kpsepath debug log dvilualatex run:

kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdbch/mdbchr8t.tfm,
 rb) => 0x436ab60
kdebug:fclose(0x436ab60) => 0
kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/vf/public/mathdesign/mdbch/mdbchr8t.vf,
 rb) => 0x4379e10
kdebug:fclose(0x4379e10) => 0
kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8y.tfm,
 rb) => 0x437a370
kdebug:fclose(0x437a370) => 0
kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8t.tfm,
 rb) => 0x436be80


kpsepath debug log from dvips run on file produced by latex:

kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/vf/public/mathdesign/mdbch/mdbchr8t.vf,
 rb) => 0x210ea00
kdebug:fopen(/usr/local/texlive/2015/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8y.tfm,
 rb) => 0x211fb70

mdbchr8t.vf maps to md-chr8y.tfm and md-chr8t.tfm:
(MAPFONT D 0
   (FONTNAME md-chr8y)
   (FONTCHECKSUM O 11370565725)
   (FONTAT R 1.0)
   (FONTDSIZE R 10.0)
   )
(MAPFONT D 1
   (FONTNAME md-chr8t)
   (FONTCHECKSUM O 12501363516)
   (FONTAT R 1.0)
   (FONTDSIZE R 9.962616)
   )




Re: [tex4ht] [bug #309] tex4ht does not work with package savetrees

2016-06-09 Thread Deimantas Galcius



On 06/08/2016 12:58 PM, Michal Hoftich wrote:

Another possibility I've just found is to block the loading of the package
from tex4ht.
What do you think? Is that change safe?


I love the idea. IMHO it's a proper way of doing.
It' far better that  "\ifdefined\HCode"  conditional in tex file.

-- deimi






Re: [tex4ht] issue with tex4ht and minted package, extra space added

2016-06-05 Thread Deimantas Galcius

minted environment is a wrapper for Verbatim from fancyrb, which does have a 
tex4ht configuration.
The fifth parameter of "\Configure{fancyvrb}" is set to two spaces. You can 
change it of course.

The config file:

\Preamble{}
\catcode`\:=11\relax
\Configure{fancyvrb}
   {\IgnorePar \EndP \gHAdvance\fancyvrbNo by 1
\gHAssign\fancyvrb:cnt0
\HCode{}}
   {\EndP\HCode{}}
   {\gHAdvance\fancyvrb:cnt by 1
\ifnum \fancyvrb:cnt>1
\HCode{}\fi} {}
   %{\ \ } % the culprit - explicit two spaces
   {}
   {}
\catcode`\:=12\relax
\begin{document}
\EndPreamble


regards,

-- deimi

On 06/01/2016 10:53 AM, Michal Hoftich wrote:

If you get rid of the spaces after the }'s in that temp file, do the
"extra" spaces in the tex4ht output go away?  -k

The spaces at beginning of the line remains. We can get somewhat
interesting result with a following .cfg file:

\Preamble{xhtml}
\ConfigureEnv{Verbatim}{\NoFonts}{\EndNoFonts}{}{}
\Css{div.fancyvrb{font-family:monospace;}}
\begin{document}
\EndPreamble

and without conversion to Unicode:

clearall;closeall;

Michal






Re: [tex4ht] erorr code 256, possible perl error code, come up with using --lua option with make4ht, error --- Improper dvi file

2015-12-04 Thread Deimantas Galcius

  
  
Starting from page 379 (or maybe a page earlier??)
something went wrong with previous bop address calculation. 
Below is a diff of  DTL files (wrong dvi and corrected one)
kernel.dt is an output of  $dv2dt KERNEL.dvi
kernel-fixed.dt is an output of  $ dt2dv kernel.dt kernel-fixed.dvi
&& dv2dt kernel-fixed.dvi

$ diff kernel.dt kernel-fixed.dt
873325c873325
< bop 379 0 0 0 0 0 0 0 0 0 4182051
---
> bop 379 0 0 0 0 0 0 0 0 0 4198435
876538c876538
< bop 380 0 0 0 0 0 0 0 0 0 4182184
---
> bop 380 0 0 0 0 0 0 0 0 0 4198568
879692c879692



933416c933416
< post 4465452 2540 473628672 1000 46531928 36343762 19 402
---
> post 4481836 2540 473628672 1000 46531928 36343762 19 402
933445c933445
< post_post 4466941 2 223 223 223
223 223 223
---
> post_post 4483325 2 223 223 223
223 223 223


Would
  any one know what
  
  
   Bad DVI file: byte 4466941 is not post!
  
  
  mean? May be this can give a clue.
  

DVITYPE reads dvi file from the end, locates post_post operator,
reads argument - 4466941, that should say
where to locate post operator. Correct post operator address is 
4483325.

regards, 
Deimantas
  




Re: [tex4ht] [bug #261] add full support for kpfonts when compiling in SVG mode for math

2015-08-05 Thread Deimantas Galcius

Hi, Michal,



I can confirm that mathml output seems nice as well, only thing I've
spot is that not all characters in \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ}
are converted to their unicode counterparts, but it is only minor
problem.

please can you post a command line you use for matml output?


I have posted source code for kpfonts (unicode) on 
https://github.com/dgalcius/kpfonts.
'lit' folder contains literate source file. Run 'make' to generate htf files.
Folder 'charpos' is for making font proof sheets. Copy generate htf file to 
charpos folder and
run 'make fonts'.  it will generate html files (e.g. jkpex/jkpex.htm)

This is really nice. Could you post some notes about the method you used
for math font conversion? Had you used any automation?

I did not use any automation. It would be difficult to make it. Although I 
think about automation for chinese fonts.
My approach is to use proofsheets for a  (math) font, so I can quickly identify 
problems.
proofsheet  is  an html table where I put
char number;  picture of a char; and unicode value (or whaterver comes from a 
htf);

How do to produce a missing htf font? For example, jkpex.htf.
My method is as follow:
- /guess the best possible match for another font/ (that has htf counterpart)
E.g. for jkpex font I thought that it would be using same encoding as cmex10.
I made jkpex.htf  file with an alias for 'cmex' and run proofsheets so  I can 
validate my guess.
Another option I use to compare fonts (and encodings) is generate tables with 
nfssfont (`pdflatex nfssfont`) and compare  PDFs.
After comparison it was clear that jkpex font is an extended version of cmex10.
So, for literate code I took cmex font from tex4ht-font-noncjk.tex as a basis 
and added some extra characters.
Probably it would be better to make a patch for a tex4ht-font-noncjk.tex file.





I did not test svg output. Do I have to run 'make4ht' for it?

It is better, as you can easily configure the method used for dvi to svg
conversion. See Nasser's page for efficient method for conversion files
with huge number of equations:

http://12000.org/my_notes/faq/LATEX/layout/#x1-40002

Best regards,
Michal


perfect!

best regards,
-- deimi



Re: [tex4ht] [bug #261] add full support for kpfonts when compiling in SVG mode for math

2015-08-04 Thread Deimantas Galcius

Hi Nasser,


I have posted source code for kpfonts (unicode) on 
https://github.com/dgalcius/kpfonts.
'lit' folder contains literate source file. Run 'make' to generate htf files.
Folder 'charpos' is for making font proof sheets. Copy generate htf file to 
charpos folder and
run 'make fonts'.  it will generate html files (e.g. jkpex/jkpex.htm)

I did not test svg output. Do I have to run 'make4ht' for it?


best regards,

-- deimi

On 07/30/2015 06:13 PM, Nasser M. Abbasi wrote:

URL:
   http://puszcza.gnu.org.ua/bugs/?261

  Summary: add full support for kpfonts when compiling in SVG
mode for math
  Project: tex4ht
 Submitted by: nma123
 Submitted on: Thu 30 Jul 2015 06:13:48 PM EEST
 Category: None
 Priority: 5 - Normal
 Severity: 3 - Minor
   Status: None
  Privacy: Public
  Assigned to: None
 Originator Email:
  Open/Closed: Open
  Discussion Lock: Any

 ___

Details:

First reported at tex4ht mailing list: reference link:
http://tug.org/pipermail/tex4ht/2015q3/001240.html


When compiling the following MWE and asking tex4ht to use SVG for math, it
reports missing fonts

---
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{ntheorem}
\newtheorem{theorem}{Theorem}
\usepackage{amsmath}
\DeclareMathOperator{\Res}{Res}
\usepackage{kpfonts}

\begin{document}
\ifdefined\HCode
\Configure{Picture}{.svg}
\fi

\begin{theorem}[Residue Theorem]
Let $f$ be analytic in the region $G$ except for the isolated
singularities $a_1,a_2,\dots,a_m$. If $\gamma$ is a closed
rectifiable curve in $G$ which does not pass through any of the
points $a_k$ and if $\gamma\approx 0$ in $G$, then
\[
   \frac{1}{2\pi i}\int_\gamma\! f = \sum_{k=1}^m
   n(\gamma;a_k)\Res(f;a_k)\,.
\]
\end{theorem}
\end{document}
\end{document}
--

compile using  htlatex foo.tex gives

warning --- Couldn't find font `jkpsy.htf' (char codes: 0--128)
warning --- Couldn't find font `jkpmi.htf' (char codes: 0--239)
warning --- Couldn't find font `jkpmi.htf' (char codes: 0--239)
warning --- Couldn't find font `jkpmn7t.htf' (char codes: 0--170)
warning --- Couldn't find font `jkpmn7t.htf' (char codes: 0--170)
warning --- Couldn't find font `jkpbn8t.htf' (char codes: 0--255)
warning --- Couldn't find font `jkpmit8t.htf' (char codes: 0--255)
warning --- Couldn't find font `jkpmn8t.htf' (char codes: 0--255)

Compiling to png works ok, i.e. when replacing the line
 \Configure{Picture}{.svg}
with
 \Configure{$}{\PicMath}{\EndPicMath}{}

But math looks better in SVG.
Tl 2015.







 ___

Reply to this item at:

   http://puszcza.gnu.org.ua/bugs/?261

___
   Message sent via/by Puszcza
   http://puszcza.gnu.org.ua/







Re: [tex4ht] [bug #261] add full support for kpfonts when compiling in SVG mode for math

2015-08-04 Thread Deimantas Galcius

Thank you, Nasser.

svg output is ok at my side.

best regards,

-- deimi

On 08/04/2015 03:47 PM, Nasser M. Abbasi wrote:

On 8/4/2015 7:40 AM, Deimantas Galcius wrote:

Hi Nasser,


I have posted source code for kpfonts (unicode) on 
https://github.com/dgalcius/kpfonts.
'lit' folder contains literate source file. Run 'make' to generate htf files.
Folder 'charpos' is for making font proof sheets. Copy generate htf file to 
charpos folder and
run 'make fonts'.  it will generate html files (e.g. jkpex/jkpex.htm)

I did not test svg output. Do I have to run 'make4ht' for it?


best regards,

-- deimi


Hello Deimi;

If you want to test your setup with svg for math instead of png in
the HTML, then this is what I do:

make4ht -u -c ./nma.cfg -e ./main.mk4 foo.tex

The files nma.cfg and main.mk4 above are set up to
tell make4ht to generate svg in foo.htm

These 2 files are in this folder if you want to try the above
command:

http://12000.org/tmp/080315/

regards,
--Nasser