On Tue, Aug 14, 2001 at 06:04:31PM -0700, Arien Malec wrote:
> I'm using lyx (1.1.6fix3) as a front-end to build Linuxdoc SGML. I've had some
> problems with users either not using a version of Lyx that supports this, or
> who haven't configured Lyx with sgmltools support, so I thought I'd write an
> Autoconf macro to check whether Lyx support Linuxdoc.

  We do this at configure stage.

  Also do Edit->Reconfigure
  
  it has a line that says:

+checking for linuxdoc class linuxdoc...  yes

  That is enough.
  
  In reality we only search for sgml2lyx to be present in the system PATH,
assuming from there that the version 1 of sgml-tools is installed.

  We use it then to preview the document in dvi, ps or html.
  
> I thought to query Lyx itself and see, but couldn't find a command line
> argument to check (I could just run lyx -e linuxdoc empty.lyx, but I *think*
> that on older version of Lyx that'll run the full UI, which would not be
> desirable in a configure script).
> 
> I noted the textclass.lst file in the Lyx share directory, and thought that if
> it answered to:
> 
> grep "^\"linuxdoc" "$LYXLIBDIR/textclass.lst
> 
> Then I would be OK (I note, however, that textclass.lst in my environment
> mentions docbook, but Lyx doesn't support export to DocBook (?)).

  Yes it does. Notice that the sgmltools package version 2 or 3 support
docbook, and lyx autodetects that on the configuration step.

> The man page for Lyx says: 
> The system directory is determined by searching for the  file  "chkconfig.ltx".
>        Directories are searched in this order:
>        1) -sysdir command line parameter
>        2) LYX_DIR_11x environment variable
>        3) Maybe <path of binary>/TOP_SRCDIR/lib
>        4) <path of binary>/../share/<name of binary>/
>        5)    hardcoded    lyx_dir    (usually   /usr/local/share/lyx   on  
> UNIX   and
>        %X11ROOT%\XFree86\lib\X11\lyx on OS/2 with XFree)
> 
> Ack. What's this about TOP_SRCDIR??? Anyhow, my strategy is to search for
> chkconfig.ltx following the above search (but ignoring OS/2, alas), and then,
> in that dir, do the above mentioned grep to search for linuxdoc support.

  lyx -x reconfigure gives you that but leaves the window opened.
  
  Please tell me if you have further doubts...
  
-- 
Jos�

Reply via email to