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