ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* funny behaviou - texexec & file not in current directory
@ 2000-09-25 19:18 Hans Fredrik Nordhaug
  2000-09-25 22:00 ` Hans Hagen
  2000-09-25 22:02 ` funny behaviou - texexec ... [small correction] Hans Fredrik Nordhaug
  0 siblings, 2 replies; 6+ messages in thread
From: Hans Fredrik Nordhaug @ 2000-09-25 19:18 UTC (permalink / raw)


Hi!

[I have the newest (beta) context, texexec, texutil and pdfetex/pdftex.]

I have this minimal file called 'test.tex'

% output=pdftex
\starttext
Hello!
\stoptext

I copy it to a another (sub)directory called 'tdir'. Then I run

 texexec test.tex      - and get pdf output

 texexec tdir/test.tex - and get dvi output

Also if I move the format file to 'tdir' [for some reason, testing,
what ever] and go into 'tdir', and then run:

 texexec --format=context test.tex     - and get pdf output  (*)

 texexec --format=../context test.tex  - and get dvi output

(*) Using the same format file but now from default place .../web2c/.

Why this behaviour?  I have also tested with the '--pdf' switch but it
doesn't make any difference (as expected since % output=pdftex should
have the same effect).

Regards, Hans Fredrik

PS! An easy fix (I found out after half an hour) is to resign and add 
    '\pdfoutput=1' in the file. But shouldn't '% output=pdftex' have
    the same effect (when running texexec)?

--------------------------------------------------------------------------
   Hans Fredrik Nordhaug       | web:    www.mi.uib.no/~hansfn   
    Ph.D. student at           | phone:    (+47) 55 58 48 79       
    Department of Mathematics, | fax:      (+47) 55 58 96 72       
    University of Bergen       | e-mail:    hanfn@mi.uib.no      
--------------------------------------------------------------------------
   Fall 2000: Visiting at the Department of Civil Engineering,
                        Princeton University.
--------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: funny behaviou - texexec & file not in current directory
  2000-09-25 19:18 funny behaviou - texexec & file not in current directory Hans Fredrik Nordhaug
@ 2000-09-25 22:00 ` Hans Hagen
  2000-09-25 23:24   ` Hans Fredrik Nordhaug
  2000-09-25 22:02 ` funny behaviou - texexec ... [small correction] Hans Fredrik Nordhaug
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2000-09-25 22:00 UTC (permalink / raw)
  Cc: ConTeXt

At 03:18 PM 9/25/00 -0400, Hans Fredrik Nordhaug wrote:

>Also if I move the format file to 'tdir' [for some reason, testing,
>what ever] and go into 'tdir', and then run:

yuour format file should be in the web2c path, which you can test with 

  kpsewhich cont-en.efmt

either 

  texexec --make --alone 

or 

  fmtutil --all

or 

  texexec --make 

should do the job for you.  

> texexec --format=context test.tex     - and get pdf output  (*)

wrong. There is no context, only cont-en, cont-de, cont-en

> texexec --format=../context test.tex  - and get dvi output
>
>(*) Using the same format file but now from default place .../web2c/.

that's the place. Don't specify the format. I only do that for plain -)
texexec will find the right interface for you, or you can say 

% interface=en output=pdftex  

>PS! An easy fix (I found out after half an hour) is to resign and add 
>    '\pdfoutput=1' in the file. But shouldn't '% output=pdftex' have
>    the same effect (when running texexec)?

no, since then context does not know that it should use the pdftex driver. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* funny behaviou - texexec ... [small correction]
  2000-09-25 19:18 funny behaviou - texexec & file not in current directory Hans Fredrik Nordhaug
  2000-09-25 22:00 ` Hans Hagen
@ 2000-09-25 22:02 ` Hans Fredrik Nordhaug
  2000-09-25 22:07   ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Fredrik Nordhaug @ 2000-09-25 22:02 UTC (permalink / raw)


On Mon, 25 Sep 2000, Hans Fredrik Nordhaug wrote:
[cut]
> Also if I move the format file to 'tdir' [for some reason, testing,
                                    ^^^^^^  
That should of course be 'the current directory' which might be clear
from the context ....

> what ever] and go into 'tdir', and then run:
> 
>  texexec --format=context test.tex     - and get pdf output  (*)
> 
>  texexec --format=../context test.tex  - and get dvi output
> 
> (*) Using the same format file but now from default place .../web2c/.
> 
[cut]

Hans Fredrik


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: funny behaviou - texexec ... [small correction]
  2000-09-25 22:02 ` funny behaviou - texexec ... [small correction] Hans Fredrik Nordhaug
@ 2000-09-25 22:07   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-09-25 22:07 UTC (permalink / raw)
  Cc: ConTeXt

At 06:02 PM 9/25/00 -0400, Hans Fredrik Nordhaug wrote:
>On Mon, 25 Sep 2000, Hans Fredrik Nordhaug wrote:
>[cut]
>> Also if I move the format file to 'tdir' [for some reason, testing,
>                                    ^^^^^^  
>That should of course be 'the current directory' which might be clear
>from the context ....
>
>> what ever] and go into 'tdir', and then run:
>> 
>>  texexec --format=context test.tex     - and get pdf output  (*)
>> 
>>  texexec --format=../context test.tex  - and get dvi output
>> 
>> (*) Using the same format file but now from default place .../web2c/.
>> 
>[cut]

if you run texexec --verbose, you can see where texexec tries to find its
files, 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: funny behaviou - texexec & file not in current directory
  2000-09-25 22:00 ` Hans Hagen
@ 2000-09-25 23:24   ` Hans Fredrik Nordhaug
  2000-09-26  8:23     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Fredrik Nordhaug @ 2000-09-25 23:24 UTC (permalink / raw)
  Cc: ConTeXt

On Tue, 26 Sep 2000, Hans Hagen wrote:

It is very clear that you didn't get my point so I try again - this
time with a slightly changed scenario:

Ok, in the current dir I make a subdir called 'sub'. In 
both directories I put a copy of a format file - let it be cont-en.efmt.
In addition my minimal test file (see bootom of e-mail) is still in the
subdirectory. Then I in the current dir do

   texexec --format=cont-en sub/test.tex     - and get dvi output

Then I go into the sub directory ('sub') and do

   texexec --format=cont-en test.tex         - and get pdf output  (*)

So my question (again) is why this behaviour ? Running texexec on
the same file with the same format - getting different output...

The format file is found by kpsewhich AND used by texexec - and I know
because 'cont-en.efmt' doesn't exists in '.../web2c' because
our sysadmin hasn't set it up (yet). 

I don't think this has anything to do with where the formats are found,
current dir or web2c, but I agree completely - if possible (not in my
case) the format file should go to '.../web2c'.

Best regards, Hans Fredrik

NB! I would love to attached the output from a verbose run of the two
    examples above, but I think I have used enough bandwith for today.
    The output confirms that the formats are found and that the same ini
    file (for texexec) is used. Those interested can contact me :-)

PS! Do you (or anybody else) mind trying this - just to check whether my 
    system is wrong or texexec is kind of strange behaving. 

--------------------------------------------------------------------------

Two digression (and nothing more):

1) I think texexec at least should search for format files in the current
dir (which it seems to be doing [good] even though it is not part of
the default web2c/fmt path that kpsewhich uses) and maybe also
TEXINPUTS. The reason for this is that a lot of users (on multi-users
systems) have to make there own formats because their sysadmin has other
things to do than fix the default settings for teTeX (as an example). OR 
texexec could accept this

   texexec --format=some_path/cont-en file.tex

2)

> > texexec --format=context test.tex     - and get pdf output  (*)
> 
> wrong. There is no context, only cont-en, cont-de, cont-en

Yes, I'm sorry about that. I happened to rename the cont-en format
to context because I found that more natural (since I wasn't planing
on using nl,de or uk). It won't happen again,
or I will at least keep it for myself :-)

-----------------------------------------------------------------
Test file 'test.tex'

% interface=en output=pdftex

\starttext
Hello!
\stoptext


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: funny behaviou - texexec & file not in current directory
  2000-09-25 23:24   ` Hans Fredrik Nordhaug
@ 2000-09-26  8:23     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-09-26  8:23 UTC (permalink / raw)
  Cc: ConTeXt

Hi, 

>It is very clear that you didn't get my point so I try again - this
>time with a slightly changed scenario:
>
>Ok, in the current dir I make a subdir called 'sub'. In 
>both directories I put a copy of a format file - let it be cont-en.efmt.
>In addition my minimal test file (see bootom of e-mail) is still in the
>subdirectory. Then I in the current dir do
>
>   texexec --format=cont-en sub/test.tex     - and get dvi output
>
>Then I go into the sub directory ('sub') and do
>
>   texexec --format=cont-en test.tex         - and get pdf output  (*)
>
>So my question (again) is why this behaviour ? Running texexec on
>the same file with the same format - getting different output...

I see. This is unrelated to format files. The switches and % toplines are
parsed and texexec sets up an option file. This file is created in the
current path. If you look at the log, you will notice that the tuo files
are also read from ./ since thereis where tex runs. The only way this could
work without problems is to cd to the subpath first, since there is not
much control over filenames in tex. Context already tries to limit / direct
the search as good as possible. I have no problems in adding a --path
switch if needed.  Your current case is similar to running a file in the
current path and getting figures from another path: tex stays on the
current path.    

>PS! Do you (or anybody else) mind trying this - just to check whether my 
>    system is wrong or texexec is kind of strange behaving. 

>1) I think texexec at least should search for format files in the current
>dir (which it seems to be doing [good] even though it is not part of
>the default web2c/fmt path that kpsewhich uses) and maybe also
>TEXINPUTS. The reason for this is that a lot of users (on multi-users
>systems) have to make there own formats because their sysadmin has other
>things to do than fix the default settings for teTeX (as an example). OR 
>texexec could accept this

There is a better way out of this: 

TEXMFCNF=C:/LOCAL/CONTEXT/TEXMF/WEB2C
TEXMFMAIN=C:/LOCAL/TEX/TEXMF
TEXMFLOCAL=C:/LOCAL/TEX/TEXMF-LOCAL
VARTEXMF=C:/LOCAL/TEX/TEXMF-VAR
HOMETEXMF=C:/LOCAL/CONTEXT/TEXMF

So, you sysadm used main and probably local, but you can use home, as well
as set texmfcnf to point to your own cnf file. We use this mechanism here
to run on machines or the server or test machine. Just switching env vars.
You can even set  

TEXFORMATS=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C
MFBASES=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C
MPMEMS=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C
TEXPOOL=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C
MFPOOL=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C
MPPOOL=C:/LOCAL/TEX/TEXMF-MSWIN/WEB2C

And run windows and linux from the same machines / trees. 

Alternatively, you can adapt texexec.ini (see texexex.rme) and tell it
where the fmt path is located. 

Hans

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-09-26  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-25 19:18 funny behaviou - texexec & file not in current directory Hans Fredrik Nordhaug
2000-09-25 22:00 ` Hans Hagen
2000-09-25 23:24   ` Hans Fredrik Nordhaug
2000-09-26  8:23     ` Hans Hagen
2000-09-25 22:02 ` funny behaviou - texexec ... [small correction] Hans Fredrik Nordhaug
2000-09-25 22:07   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).