nstanger / ouexam

University of Otago LaTeX exam template
0 stars 1 forks source link

Full page floats on the last page mess up the page count #2

Closed nstanger closed 11 years ago

nstanger commented 11 years ago

If the last page contains nothing but a full page float, the value of num.pages isn’t incremented correctly. The main side-effect of this is that the END that should appear on the last page instead appears on the second-last page.

As reported by Stephen Cranefield:

I don't know if this is an FAQ, but there is a long-standing issue about "END" appearing on the second last page if the last page is a full page float. I think the total page count gets screwed up too. One work-around is not to have the float at the end. Another is to use PDF editing to change the total page count shown on the front page, to change the "END" to a "TURN OVER", and to put an "END" on the real last page.

nstanger commented 11 years ago

Investigate \AfterLastShipOut (I think that’s what it’s called). See the lastpage package documentation for details.

nstanger commented 11 years ago

Is Stephen using the endfloat package?

nstanger commented 11 years ago

The current solution definitely fails if multiple float pages need to be generated. One possible solution might be to inspect the contents of \@deferlist inside \ps@plain. If not empty, then more float pages need to be generated, so output “TURN OVER”. Otherwise, output “END”.

It’s also unclear whether this will work with documents that specify twocolumn and have double-width floats that span both columns, given that there’s a separate \@dbldeferlist. However, one could argue that people shouldn’t be using twocolumn in an exam paper in the first place. (Disabling the option would probably make sense.)

nstanger commented 11 years ago

Turns out this is still broken in markingschedule mode; see the output of example2.pdf. However, this isn’t as pressing an issue as it was with the actual exam paper, and can probably wait. Opened as new issue #23.