Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-27 Thread Michal Hoftich
>>
>> I didn't follow (or understand) which path you need to
>> find but kpsewhich -expand-var=$TEXMFDIST gives the main
>> miktex root on my system.
>

Thanks Ulrike, $TEXMFDIST seems to work in Miktex. I've found that I
had broken Miktex installation on a test machine, so it reported wrong
path, but clean reinstall fixed that.

I've updated make4ht with the following mechanism:

1. try to locate tex4ht.jar in path based on $TEXMFROOT, $TEXMFDIST or
environmental variable $TEXMFROOT.
2. if the previous step fails, use kpse.find_file function to find
tex4ht.sty. The /tex/generic/tex4ht/tex4ht.sty part is removed from
the found path and the rest is used to locate tex4ht.jar.

I hope this should cover most cases. I've tested it on TL and Miktex
and it works, but user testing is welcome!

> I think that this is not cross-platform from the command
> line because of the various meanings of special characters,
> in particular, '$'.  In a GNU/Linux command line either the
> '$' needs to be escaped with '\' or the whole first argument
> of kpsewhich needs to be enclosed in ascii single quotes so
> that the '$' is not intercepted by the shell.

I use Lua functions from the Kpse library, so this shouldn't be issue.
The interface can be used in this way:

 texmfdist = kpse.var_value("TEXMFDIST")

Best regards,
Michal


Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-26 Thread William F Hammond
Ulrike Fischer  writes:

> . . .
>
> I didn't follow (or understand) which path you need to
> find but kpsewhich -expand-var=$TEXMFDIST gives the main
> miktex root on my system.

I think that this is not cross-platform from the command
line because of the various meanings of special characters,
in particular, '$'.  In a GNU/Linux command line either the
'$' needs to be escaped with '\' or the whole first argument
of kpsewhich needs to be enclosed in ascii single quotes so
that the '$' is not intercepted by the shell.

Perhaps:  kpsewhich -var-value=TEXMFDIST


-- Bill



Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-26 Thread Ulrike Fischer
Am Tue, 26 Jun 2018 14:35:12 +0200 schrieb Michal Hoftich:

> Thanks, that sounds nice. Bad news is that I've found that Miktex
> doesn't support any of these variables, so a different method to find
> the root directory must be used.

I didn't follow (or understand) which path you need to find but
kpsewhich -expand-var=$TEXMFDIST gives the main miktex root on my
system. 

If something else is missing I suggest to ask for it on the miktex
github tracker.

-- 
Ulrike Fischer 
https://www.troubleshooting-tex.de/



Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-26 Thread Reinhard Kotucha
On 2018-06-26 at 14:35:12 +0200, Michal Hoftich wrote:

 > On Tue, Jun 26, 2018 at 1:36 AM, Reinhard Kotucha
 >  wrote:
 > > On 2018-06-25 at 20:59:26 GMT, Karl Berry wrote:
 > >
 > >  > Follow-up Comment #4, bug #394 (project tex4ht):
 > >  >
 > >  > Using SELFAUTOPARENT at all will not work on Debian, as things
 > >  > stand. It's easiest to hardwire it to /usr/share/texlive.
 > >  > Maybe if that directory exists, use it, else use
 > >  > SELFAUTOPARENT.  Alternatively, if SELFAUTOPARENT expands to
 > >  > /, look for /usr/share/texlive or other alternatives.
 > >
 > > TEXMFROOT can be used instead of SELFAUTODIR or SELFAUTOPARENT.
 > > This should work in most cases, but if distributors don't set it
 > > up properly...
 > 
 > Thanks, that sounds nice. Bad news is that I've found that Miktex
 > doesn't support any of these variables, so a different method to
 > find the root directory must be used. I am thinking about using
 > kpse.find_file to locate some file in a known location, but what if
 > a user has a custom version of such file in his TEXMFHOME? It seems
 > that there is no cross-platform stable way to find the TeX distro
 > root?

It's not a platform related problem.  You have to find out first
whether you are on TeX Live or MiKTeX.  If none of the variables
mentioned exist in MiKTeX, you can use this fact in order to determine
whether you are on TL or MiKTeX.

I don't know much about MiKTeX but I suppose that its directory
structure is much more rigid than that of TeX Live.  Maybe it's
sufficient to know where the binaries are located.

Regards,
  Reinhard

-- 
--
Reinhard KotuchaPhone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannovermailto:reinhard.kotu...@web.de
--


Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-26 Thread Michal Hoftich
On Tue, Jun 26, 2018 at 1:36 AM, Reinhard Kotucha
 wrote:
> On 2018-06-25 at 20:59:26 GMT, Karl Berry wrote:
>
>  > Follow-up Comment #4, bug #394 (project tex4ht):
>  >
>  > Using SELFAUTOPARENT at all will not work on Debian, as things
>  > stand. It's easiest to hardwire it to /usr/share/texlive.  Maybe if
>  > that directory exists, use it, else use SELFAUTOPARENT.
>  > Alternatively, if SELFAUTOPARENT expands to /, look for
>  > /usr/share/texlive or other alternatives.
>
> TEXMFROOT can be used instead of SELFAUTODIR or SELFAUTOPARENT.  This
> should work in most cases, but if distributors don't set it up
> properly...

Thanks, that sounds nice. Bad news is that I've found that Miktex
doesn't support any of these variables, so a different method to find
the root directory must be used. I am thinking about using
kpse.find_file to locate some file in a  known location, but what if a
user has a custom version of such file in his TEXMFHOME? It seems that
there is no cross-platform stable way to find the TeX distro root?

Maybe it will be easier to replace code in Xtpipes by Lua filters, I
wanted to do that sometimes anyway.

Best regards,
Michal


Re: [tex4ht] [bug #394] Support for oolatex on Debian

2018-06-25 Thread Reinhard Kotucha
On 2018-06-25 at 20:59:26 GMT, Karl Berry wrote:

 > Follow-up Comment #4, bug #394 (project tex4ht):
 > 
 > Using SELFAUTOPARENT at all will not work on Debian, as things
 > stand. It's easiest to hardwire it to /usr/share/texlive.  Maybe if
 > that directory exists, use it, else use SELFAUTOPARENT.
 > Alternatively, if SELFAUTOPARENT expands to /, look for
 > /usr/share/texlive or other alternatives.

TEXMFROOT can be used instead of SELFAUTODIR or SELFAUTOPARENT.  This
should work in most cases, but if distributors don't set it up
properly...

 > [...] leave it for the distributors.

The purpose of TEXMFROOT is to allow distributors to change only one
variable in order to adapt the system to their needs.  

TeX Live from tug.org is a multi-platform distribution and thus sets

  TEXMFROOT = $SELFAUTOPARENT
  
Linux distributions support only one platform and should set

  TEXMFROOT = $SELFAUTODIR

Regards,
  Reinhard

-- 
--
Reinhard KotuchaPhone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannovermailto:reinhard.kotu...@web.de
--


[tex4ht] [bug #394] Support for oolatex on Debian

2018-06-25 Thread Karl Berry
Update of bug #394 (project tex4ht):

 Open/Closed:Open => Closed 

___

Follow-up Comment #5:

meanwhile, it seems there is nothing more to do here, so closing.

___

Reply to this item at:

  

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



[tex4ht] [bug #394] Support for oolatex on Debian

2018-06-25 Thread Karl Berry
Follow-up Comment #4, bug #394 (project tex4ht):

Using SELFAUTOPARENT at all will not work on Debian, as things stand. It's
easiest to hardwire it to /usr/share/texlive.
Maybe if that directory exists, use it, else use SELFAUTOPARENT. 
Alternatively, if SELFAUTOPARENT expands to /, look for /usr/share/texlive or
other alternatives. 

Or, leave it for the distributors.

Norbert has already fixed the Debian t4ht.c source for his next update.

___

Reply to this item at:

  

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



[tex4ht] [bug #394] Support for oolatex on Debian

2018-06-25 Thread Michal Hoftich
Follow-up Comment #3, bug #394 (project tex4ht):

OK, it was quite easy, so the development version of make4ht now completely
bypass t4ht for the ODT output. It can be requested using

make4ht -f odt filename.tex

It also fixes  other things, like translation of character XML entities to
Unicode.

___

Reply to this item at:

  

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



[tex4ht] [bug #394] Support for oolatex on Debian

2018-06-25 Thread Michal Hoftich
Follow-up Comment #2, bug #394 (project tex4ht):

Thanks Karl. I am working on a new ODT support in make4ht, I've already
replaced the code for packing the ODT file. I can also find a correct path
using kpse.var_value("SELFAUTOPARENT") from Lua and call xtpipes directly,
without need to involve t4ht at all. But that doesn't mean that it shouldn't
be fixed, of course.

___

Reply to this item at:

  

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



[tex4ht] [bug #394] Support for oolatex on Debian

2018-06-24 Thread Karl Berry
Follow-up Comment #1, bug #394 (project tex4ht):

Michal - Dirk's post indicates that the crazy %%~/ evaluated to // for him (so
clearly nothing is going to work).

When I try "mk4ht oolatex hello.tex" on a hello,world latex document and TL
18, it works, and the java -classpath call included
/usr/local/texlive/2018/texmf-dist/tex4ht/bin/tex4ht.jar as expected.

Looking at the comments in tex4ht.env, I see that %%~ is supposed to expand to
SELFAUTOPARENT, which would explain a result of "/" on Debian, if they did not
hack t4ht.c to suit their setup, which does not involve SELFAUTOPARENT.

I guess I will write Norbert.

___

Reply to this item at:

  

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



[tex4ht] [bug #394] Support for oolatex on Debian

2018-05-29 Thread Michal Hoftich
URL:
  

 Summary: Support for oolatex on Debian
 Project: tex4ht
Submitted by: michal_h21
Submitted on: Mon 28 May 2018 02:40:33 PM EEST
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

There seem to be an issue with oolatex on Debian 9, see this blog post for
details:

http://dirkmittler.homeip.net/blog/archives/5404#comment-11510

It seems that there are similar issues with Xtpipes as were in Miktex. Can
anybody with Debian confirm this issue?




___

Reply to this item at:

  

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