shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
186 stars 30 forks source link

Specificly Named Indices not being built... #49

Open shiblon opened 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 36

What steps will reproduce the problem?
1. In the LaTeX document, have a specifically named Index (e.g.
\printindex[BorisHelfstein]) with flagged notes: \index[BorisHelfstein]{a flag}
2. Run the make.

What is the expected output? What do you see instead?

I expect to see a complete PDF at the end, which I get with my make file:
makeindex -s macro.ist BorisHelfstein.idx

What I got:

make: *** No rule to make target `BorisHelfstein.ind', needed by
`Document.d'.  Stop.

What version of the product are you using? On what operating system?

Ubuntu 8.10, latex-makefile-2.1.26

Please provide any additional information below.

Reported by dausha on 2009-05-22 01:11:06

shiblon commented 8 years ago
Just so you know this isn't a black hole, I'll look into this.  It may not be
immediate, but I'll get to it :)

Things are always faster with patches, but I don't expect that; I only encourage it
when people feel like they can manage to navigate this labyrinthine file.

Reported by shiblon on 2009-05-26 03:31:26

shiblon commented 8 years ago
That's very strange behavior, given that there is a rule to build %.ind files from %.idx

and %.tex files.  I think what happened is this: in order to build a %.ind file, the
tex and 
idx files have to have the same name.

...that's sort of an interesting issue to have, isn't it?  I would benefit from a very
small 
example of files that cause this issue being attached to this bug.  I believe we can
get it 
fixed, but I don't have time to muddle through making a test case.

Reported by shiblon on 2009-06-19 14:36:17

shiblon commented 8 years ago
This is probably an edge case in terms of functionality. The issue is I have a work
that was authored by several people. I want to index the contributions of each
author. My understanding is the LaTeX Way of doing this is to create a separate index
of each author. The code example I provide demonstrates creating one of the separate
indices.

I gather you would have to scan *tex files for \printindex[{index name}], to build
the list of non-standard index names.

Reported by dausha on 2009-06-19 15:29:39

shiblon commented 8 years ago
I can almost certainly pull it out of LaTeX's error log, which is what I do now to create

index rules.

If you can come up with a very small test case (complete files that I can just attempt
to 
build, that give the appropriate error), then I'll work on this.  Just attach them
to the 
bug.

Reported by shiblon on 2009-06-19 17:16:41

shiblon commented 8 years ago
By the way, I'm still happy to look into this - I could just use some help with it.
 In 
particular, if you could download the latest version of the makefile, run it on your
test 
case, and attach a tarball with all of the .log files, I'd be grateful.

Reported by shiblon on 2009-11-19 18:48:21

shiblon commented 8 years ago
Issue 71 has been merged into this issue.

Reported by shiblon on 2009-12-01 03:45:55

shiblon commented 8 years ago
Sorry, I got distracted. I can touch on this this week and give you a test...

Reported by dausha on 2009-12-01 04:15:21

shiblon commented 8 years ago
No problem.  I believe I have this fixed in r7f3173f3607e.  Please download and have
a 
go with it.  If it works, I'll upload a new tarball.

Ironically, the hardest part was making sure that make "clean" worked properly, 
refusing to delete indices that are hand-generated.  I think I got it, though (although

sometimes it just won't work, if the .fls file goes away after a build, for example).

Reported by shiblon on 2009-12-01 17:31:49

shiblon commented 8 years ago
The issue isn't fixed yet. 
The line-numbers are to low. 
Invocing makeindex manually after "make" is run delivers the right line-numbers.
Probably "makeindex" and "Latex" both have to be called once more after the layout
has settled.
I'm working on an example, but this may take some time.

Reported by peter.troester@t-online.de on 2009-12-03 19:10:27

shiblon commented 8 years ago
Please elaborate on what you mean by "line numbers are too low."  Which line numbers,

and where is the output wrong?  Does it affect the document, or the informational 
output of make?

Reported by shiblon@google.com on 2009-12-03 19:12:11

shiblon commented 8 years ago

Reported by shiblon on 2009-12-03 19:13:21

shiblon commented 8 years ago
Sorry for beeing inaccurate. 
I didn't mean linenumers, I meant the pagereferences delivered by the index (in the
dvi).
The "latex" command apparendly produces one or more idx-files every-time it is run.
The structure (wraps etc.) of the dvi-document may still change after the first run.
"makeindex" is probably run after the first run of "latex", but the pagenumbers still
change after that and so the pagereferences point to an "old" page.

Reported by peter.troester@t-online.de on 2009-12-03 20:25:17

shiblon commented 8 years ago
Okay, I get it.  That just means that latex needs to be run more than once, not that

makeindex needs to be run again, doesn't it?  I don't see anything in the makeindex

output that would cause this, but I can see how running LaTeX again would be 
necessary in these cases.

Reported by shiblon on 2009-12-04 13:42:36

shiblon commented 8 years ago
If you could do me a favor, I'd really appreciate it.  Build your output file using
the 
makefile (complete with incorrect references), then tar up and attach all files ending
in 
.fls or .log to this issue.  Then I can find out whether there is a way to detect this

condition and run latex again.

Reported by shiblon on 2009-12-04 13:46:33

shiblon commented 8 years ago
I really need this information to proceed.  Meanwhile, I'm planning on releasing a new

version number.  The .log files from your build (and actually the .aux files, too)
will 
really help me debug this.

Reported by shiblon on 2009-12-10 02:46:42

shiblon commented 8 years ago
Downloaded the latest version. The file it carps about is in the same directory as
the Makefile... 

[bwilson@bwilson-laptop]~/Books/MacropediaTerradoma$ make all
NOTE: You may ignore warnings about the following files:

     MacropediaTerradoma.d

Makefile:1809: MacropediaTerradoma.d: No such file or directory
= MacropediaTerradoma.tex --> MacropediaTerradoma.d MacropediaTerradoma.dvi (1) =
Missing argument. Try `kpsewhich --help' for more information.
make: *** No rule to make target `BorisHelfstein.ind', needed by
`MacropediaTerradoma.d'.  Stop.

Reported by dausha on 2009-12-10 11:13:30


shiblon commented 8 years ago
Aha!  Which latex distribution are you using?  It looks like the problem is with my

invocation of kpsewhich.

I'm looking at your log files, now.  Thanks for sending them.

Were there other files ending in .log in your directory?  For example, files ending
in 
.1.log, .2.log, etc.?

Reported by shiblon on 2009-12-10 15:58:05

shiblon commented 8 years ago
OK.  The log you sent me has a "Rerun to get cross references right" warning in it.

The Makefile should have noticed this and run again.

But, it might not have done so because it caps the number of times it will run by 
about 5.  Are you, by any chance, bumping up against this limit?  I can increase it

easily enough.

In fact, so can you, just to test.  There is a line in the file that says "for i in
2 3 4 5; 
do"  If you add more numbers on the end, like "for i in 2 3 4 5 6 7; do" you can get
it 
to run LaTeX a few more times if it finds it necessary.

If that fixes your incorrect page number issues, I'd love to know about it.

Meanwhile, if you could also include the output of kpsewhich --help in this issue 
report, I can tackle your other problem.

Reported by shiblon on 2009-12-10 16:03:28

shiblon commented 8 years ago
I am pretty sure that kpsewhich is a red herring here.  Please try increasing the number

of invocations of latex as described above and ping me with the results.

Reported by shiblon on 2010-03-09 20:49:05