Jean-Pierre Chrétien wrote:

> Georg Baum <[EMAIL PROTECTED]> writes:
> 
>> No. All included documents are converted if they can be found.
> 
> Sorry, I modified slightly my example to \include the first chapter
> and I can't make it work.
> 
> I don't understand how it could work anyway, as the tex2lyx command
> sends the result to standard output. To have it working on multipart
> documents, it should create lyx equivalents for each .tex file
> (replacing old files if the -f switch is given).

This is exactly what it is supposed to do. And ist does so with the attached
example. Writing the main file to stdout and the other files directly to
disk is maybe a bit inconsistent, but it works.

The fact that included files are also converted is not documented yet at
all. Keep in mind that tex2lyx is not released yet.

> In fact I find the on line help:
> /usr/local/LyX//bin/tex2lyx --help
> Usage: tex2lyx [ command line switches ] <infile.tex>
> Command line switches (case sensitive):
> -help              summarize tex2lyx usage
> -f                 Force creation of .lyx files even if they exist already
> -userdir dir       try to set user directory to dir
> -sysdir dir        try to set system directory to dir
> -c textclass       declare the textclass
> -s syntaxfile      read additional syntax file
> 
> inconsistent with the usage description in the wiki.

What is inconsistent? Feel free to update the wiki information.

> I use tex2lyx compiled on Solaris (with some warnings about the automake
> variables) on march 8th, uploaded in the wiki page.

This should work. This functionality has been implemented for a long time.

> I keep the executable in the devel-compiled tree /usr/local/LyX/,
> I did not copy it to the current 1.3.5 installation /usr/local/share/lyx.
> Should have I ?

No. If you copy it somewhere else you need to copy the layout files, lyx2lyx
etc, too. I would never copy it into the 1.3 directory, since the new
layout files are not compatible to tyhe old ones.

> What else could be wrong on my side ?

How do you include the files? tex2lyx recognizes \input, \include and
\verbatiminput. Of course it needs to find the included file, so it either
needs to be an absolute path or a relative path from the current directory.
Of course the latter is a bug: relative paths should be interpreted
relative to the master file as TeX does it. Note also that tex2lyx does
know nothing about TeX magic (TEXINPUTS etc).


Georg
included file 
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\begin{document}

main file

\input{include-simple-included.tex}

main file

\end{document}

Reply via email to