axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] build-improvements and latex


From: Page, Bill
Subject: RE: [Axiom-developer] build-improvements and latex
Date: Wed, 8 Nov 2006 19:23:59 -0500

On Wednesday, November 08, 2006 6:27 PM Ralf Hemmecke wrote:
> 
> On 11/09/2006 12:17 AM, Gabriel Dos Reis wrote:
> > Ralf Hemmecke <address@hidden> writes:
> > 
> > [...]
> > 
> > | Since when you compile axiom.sty.tex also axiom.sty must be in
> > | the path \usepackage will always take axiom.sty.tex instead. 
> > | So the option of moving the files to another place does not
> > | help since they must be visible at the same time.
> > 
> > Sorry, I don't follow.
> 
> Can I quote a sentence of yours? "Be more specific." ;-)
> What was unclear in the TeX example I gave?
> 

Ralf,

I think what Gaby is suggesting is that aaa.tex would be extracted
to some directory other than the current directory, e.g.

  $ noweave axiom.sty.pamphlet > intermediate/axiom.sty.tex

then presumably calling

  $ tex intermediate/axiom.sty.tex

even though it contains

  \usepackage{axiom.sty)

will not look for axiom.sty in the intermediate directory -
only the current directory.

Your test did not test this case.

Try this:

$ mkdir intermediate

Create the file 'intermediate/axiom.sty.tex'

%%%BEGIN intermediate/axiom.sty.tex
\documentclass{book}
\usepackage{axiom}
\begin{document}
test
\end{document}
%%%END intermediate/axiom.sty.tex

Now create 'axiom.sty.tex' file in the current directory

%%%BEGIN axiom.sty.tex
\message{======= I am axiom.sty.tex =======}
%%%END axiom.sty.tex

Plus two 'axiom.sty' files - one in the current directory

%%%BEGIN axiom.sty
\message{======= I am just axiom.sty =======}
%%%END axiom.sty

and one in the intermediate directory

%%%BEGIN intermediate/axiom.sty
\message{======= I am intermediate/axiom.sty =======}
%%%END intermediate/axiom.sty

Remember also that we still have the axiom.sty file in the share
texmf directory tree and tex appropriately initialized to look
for it there. That makes three 'axiom.sty' files in all.

--------

Now from the current directory run

$ latex intermediate/axiom.sty.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./intermediate/axiom.sty.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch,
esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar,
norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish,
swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/book.cls
Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/bk10.clo))
(./axiom.sty.tex
======= I am axiom.sty.tex =======) (./axiom.sty.aux) [1]
(./axiom.sty.aux) )
Output written on axiom.sty.dvi (1 page, 216 bytes).
Transcript written on axiom.sty.log.

---------

So indeed, \usepackage{axiom} does cause latex to look in the
*current* directory for 'axiom.sty.tex'.

What happens if we rename 'axiom.sty.tex' and try again?

$ mv axiom.sty.tex axiom.sty.tex_old

$ latex intermediate/axiom.sty.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./intermediate/axiom.sty.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch,
esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar,
norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish,
swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/book.cls
Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/bk10.clo))
(./axiom.sty
======= I am just axiom.sty =======) (./axiom.sty.aux) [1]
(./axiom.sty.aux) )
Output written on axiom.sty.dvi (1 page, 216 bytes).
Transcript written on axiom.sty.log.

----------

Now the devil finds 'axiom.sty' in the current directory!

Finally, let's rename 'axiom.sty' and try a 3rd time.

$ mv axiom.sty axiom.sty_old

$ latex intermediate/axiom.sty.tex
This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4)
entering extended mode
(./intermediate/axiom.sty.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german,
ngerman, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch,
esperanto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar,
norsk, polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish,
swedish, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/book.cls
Document Class: book 2004/02/16 v1.4f Standard LaTeX document class
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/bk10.clo))
(/usr/local/teTeX/share/texmf-dist/tex/latex/base/axiom.sty)
(./axiom.sty.aux)
[1] (./axiom.sty.aux) )
Output written on axiom.sty.dvi (1 page, 216 bytes).
Transcript written on axiom.sty.log.

---------

Finally success. latex finds the copy of axiom.sty where it is
supposed to - in the share texmf tree (no messages).

Summary: One way to solve this stupid problem is to extract the
.tex file to an intermediate directory different from the current
directory when we run latex.

Regards,
Bill Page.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]