Re: External Inset and LaTeX questions

2003-09-04 Thread Angus Leeming
Johnathan Burchill wrote: > The "missing file" message could be added to the LaTeX .log file by > putting \typeout{xfiginput: Could not find file \tempfilename!} after the > \fbox command. > > Just a thought. Nice! Applied in my tree. -- Angus

Re: External Inset and LaTeX questions

2003-09-04 Thread Johnathan Burchill
On September 4, 2003 05:26 am, Angus Leeming wrote: > Johnathan Burchill wrote: > > This works, it's based on \includegraphics[draft] from > > graphics/graphics.sty: > > > > > > > > \def\stripprefix#1>{} > > \newcommand*{\xfiginput}[1]{% > > \edef\tempfilename{#1}% > > \InputIfFile

Re: External Inset and LaTeX questions

2003-09-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: > It is not the syntax you showed earlier, is it? I saw > > Preamble > $$XFigPreamble > EndPreamble You did see, but I decided to use the machinery of the output format rather than invent a new machinery of my own. Preamble XFigInset will dump a macro defini

Re: External Inset and LaTeX questions

2003-09-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> There is a third strategy that you forgot, which is to hardcode >> what happens when conversion failed (like what is done in >> insetgraphics). Why would you need to define your code for _all_ >> the templates? Angus> I don't. Each For

Re: External Inset and LaTeX questions

2003-09-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus, I see that you have commited the change to xfig template, but > I'll chime in anyway: Good! > There is a third strategy that you forgot, which is to hardcode what > happens when conversion failed

Re: External Inset and LaTeX questions

2003-09-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus, I see that you have commited the change to xfig template, but I'll chime in anyway: Angus> It seems to me that there are two possible solution strategies. Angus> 1. Output some clever latex in the 'Product' line. Something Angus>

Re: External Inset and LaTeX questions

2003-09-04 Thread Angus Leeming
Johnathan Burchill wrote: > This works, it's based on \includegraphics[draft] from > graphics/graphics.sty: > > > > \def\stripprefix#1>{} > \newcommand*{\xfiginput}[1]{% > \edef\tempfilename{#1}% > \InputIfFileExists{#1}{}{% > \fbox{Could not find file > \ttfamily\expanda

Re: External Inset and LaTeX questions

2003-09-04 Thread Johnathan Burchill
On September 3, 2003 05:09 pm, Angus Leeming wrote: > Johnathan Burchill wrote: > > It seems LaTeX has a problem with doesn't like filenames with "_" in > > them when you pass the filename through the newcommand. Latex wants to > > put $ $ around the _ because that is the "subscript" command in mat

Re: External Inset and LaTeX questions

2003-09-03 Thread Angus Leeming
Johnathan Burchill wrote: > It seems LaTeX has a problem with doesn't like filenames with "_" in them > when you pass the filename through the newcommand. Latex wants to put $ $ > around the _ because that is the "subscript" command in math mode. > So you could get around this with code like: [det

Re: External Inset and LaTeX questions

2003-09-03 Thread Johnathan Burchill
On September 3, 2003 03:59 pm, Angus Leeming wrote: > On Wednesday 03 September 2003 8:23 pm, Johnathan Burchill wrote: > > \IfFileExists{file_name}{true}{false} > > executes "true" if the file exists, otherwise it executes false. > > More specific to your task is > > \InputIfFileExists{file_name}{

Re: External Inset and LaTeX questions

2003-09-03 Thread Angus Leeming
On Wednesday 03 September 2003 8:23 pm, Johnathan Burchill wrote: > \IfFileExists{file_name}{true}{false} > executes "true" if the file exists, otherwise it executes false. > More specific to your task is > \InputIfFileExists{file_name}{true}{false} > which inputs the file if it exists, then execut

Re: External Inset and LaTeX questions

2003-09-03 Thread Johnathan Burchill
On September 3, 2003 02:23 pm, Johnathan Burchill wrote: > On September 3, 2003 03:00 pm, Angus Leeming wrote: > > Martin Vermeer wrote: > > > On Wed, Sep 03, 2003 at 07:58:32PM +, Angus Leeming spake thusly: > > >> It seems to me that there are two possible solution strategies. > > >> 1. Outpu

Re: External Inset and LaTeX questions

2003-09-03 Thread Johnathan Burchill
On September 3, 2003 03:00 pm, Angus Leeming wrote: > Martin Vermeer wrote: > > On Wed, Sep 03, 2003 at 07:58:32PM +, Angus Leeming spake thusly: > >> It seems to me that there are two possible solution strategies. > >> 1. Output some clever latex in the 'Product' line. Something along > >> the

Re: External Inset and LaTeX questions

2003-09-03 Thread Angus Leeming
Martin Vermeer wrote: > On Wed, Sep 03, 2003 at 07:58:32PM +, Angus Leeming spake thusly: > >> It seems to me that there are two possible solution strategies. >> 1. Output some clever latex in the 'Product' line. Something along the >> lines of (psuedo code) >> if (exists($$Basename.

Re: External Inset and LaTeX questions

2003-09-03 Thread Martin Vermeer
On Wed, Sep 03, 2003 at 07:58:32PM +, Angus Leeming spake thusly: > It seems to me that there are two possible solution strategies. > 1. Output some clever latex in the 'Product' line. Something along the lines > of (psuedo code) > if (exists($$Basename.pstex_t)) > \\