Layout detection with more than three groups of questions - error for more than 140 exam papers

Added by Vernon TAYLOR over 5 years ago

Hello

I thought I was getting the hang of AMC - I'm on my fourth of fifth exam paper for 1000+ students.

System info: Ubuntu 16.04/AMC 1.3/AMC-TXT

Exam info: six groups of questions, groups not shuffled, a selection of shuffled questions from each group. Three groups with ordered answers. Questions in two columns with a line separator between columns and groups of questions. Total of 40 questions from a bank of 2090+. Quite a lot of Latex format commands between square brackets.

Previous exams using more or less the same general format but with two groups for 1650 exam papers - no problems at all.

This exam : development phase - I generated 10 exam papers at a time to check layout, etc. No problems.

Above 140 exam papers (found by trial and error) I get a Layout detection error message saying that there is no exam to check the layout for. Below this number layout detection works OK.

I edited the exam to three groups, keeping all the questions - Layout detection works for 2000 exam papers.

Is this some kind of limit in AMC ?

Many thanks

Vernon

source.txt - source.txt file (54.3 kB)


Replies (33)

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

I tried your source file. Maybe my Arial font is not the same as yours, leading to a different layout.
I ran into a problem since 131 exam papers. The problem is that for a particular exam paper (number 131 in my case), a question exceeded the bottom of the page:
bottom of the page for exam paper 131
This kind of problem may be solved using the needspace group option to tell LaTeX not to begin a group too close to the bottom of the page.
See also Aucune mise en page n'a été fabriquée (in French) for a similar issue..

overflow.png - bottom of the page for exam paper 131 (24.4 kB)

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Good evening Alexis

Thank you for:

- your super quick response
- the time taken to check my source.txt
- and generally for the program

Your analysis and solution is working for a 200-copy test. I'll try the 2000 I need tomorrow.

Another question if I may - I had:

LaTeX-Preambule: \geometry{hmargin=2.5cm} (I'm not sure why or if I need this - it came with an example file and I don't see the difference with or without this line)

... and now:

LaTeX-Preambule: \geometry{hmargin=2.5cm}
LaTeX-Preambule: \usepackage{needspace}

Is there a way to pass these two commands in the same line ? I tried with a comma:

LaTeX-Preambule: \geometry{hmargin=2.5cm},\usepackage{needspace}

... but it doesn't work.

Many thanks again

Vernon

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

LaTeX-Preambule: \geometry{hmargin=2.5cm} (I'm not sure why or if I need this - it came with an example file and I don't see the difference with or without this line)

The default value for horizontal page margins is hmargin=3cm. With 2.5cm, you get a little more space to write on the page, but possibly a little more problems when scanning rotated or shifted papers.

LaTeX-Preambule: \geometry{hmargin=2.5cm},\usepackage{needspace}

You can join LaTeX commands, without the use of a comma.

LaTeX-Preambule: \geometry{hmargin=2.5cm}\usepackage{needspace}

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Hi again

With my Latex-Preambule in two seperate lines 200 paper generation worked OK. 2000 exam paper generation -> Layout detection error.

With a combined preambule Layout detection throws out an error for 200 papers.

I've now dropped hmargin=2.5cm -> 200 paper generation OK, currently trying 1650 exam paper generation.

My needspace is 4cm. With my two-line preambule I tried 5cm, 7.5cm and 10cm to generate 2000 papers - all with Layout detection errors.

I wouldn't mind the trial and error except that generating large numbers of exam papers takes 30 min-1 hour on my computer.

Thought: I haven't specified QuestionBlaocks because the default value prevents question cutting, but why doesn't this option prevent questions from also printing over the page area ? Maybe if I set this to 0 with a large enough needspace the questions wouldn't be cut and it would prevent page-overflow ?

Is my problem due because I have changed font ? Are calculations made with the default Libertine font ? (Which I can't use because the font is not embeded in the pdf exam papers).

Is there some rationale I can use to direct my trial and error tests ? I mean if 200 exam paper generation is OK, but 2000 paper not, then the page overflow must be somewhere in between now, i.e. needspace=4cm somehow delays the previous 131/140-pages before overflow.

Thanks for your time

Vernon

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

Remark: if the layout detection error comes from an overflow in the page height, look at the DOC-calage.xy. Then search for the string "{-", and you will find the page where the problem occurs. For example,

\tracepos{131/3:casequestion:INTERMEDIATEFindError114:72,4}{5233501sp}{-209757sp}{square}

says that the overflow occurs with question INTERMEDIATEFindError114 at page 3 from exam paper 131 (131/3 at the beginning).
I agree I have to make this diagnosis user-friendly.

Did you use needspace with all your groups?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Salut Alexis

Thanks - DOC-calage.xy was very useful in this case. There were about 10 cases of page overflow, and most of them on page 3 (a couple on page 4 but in addition to page 3). It appears DOC-calage.xy is generated during 'Update documents' so this can be checked before 'Layout detection'.

The bottom of page 3 corresponded to the end of a group and the beginning of another - I put a \clearpage between them. I have plenty of room.

Exam generation and layout detection worked fine for 1650 copies.

I did use needspace with all my groups (six of them). I might re-generate with needspace=10cm and without 'clearpage' to try to understand why there was still page-overflow.

Two further questions:

1. Which is better in this case - \clearpage or \newpage ?
2. Why does this page overflow occur and/or what factors are involved ? I would prefer to avoid the problem rather than spend time and bother you finding a solution.

Best regards

Vernon

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

  1. Maybe \clearpage, although there should not be any difference here (as far as I know, the main difference concerns the use of LaTeX floats, eg. figure environments).
  2. two column group beginning near the bottom of the page and boxed (using QuestionBlocks:1 global option, default) long questions. In this case the first box (that is the first question) is shown on the current page even if it does not fit on it.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Bonsoir Alexis

1. Read about that - didn't know what it meant by 'floats'. Still don't really, but that's good enough for now.
2. Understood and that'll be a great help for future exams

Many thanks again. We'll have used ACM for about three thousand students this year and it may become a regular evaluation tool with anything between five to eight thousand students a year.

So a very big thank you for the software, to you and the team, and another thank you for your excellent and knowledgeable help.

FYI Joël Brogniart got me started - through a contact in my department. I've since been asked to participate in a possible seminar on AMC.

Not sure what I can do for you or the project, but I owe you !

Vernon Taylor
Centre de Langues, Lyon 2 University, France.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

From revision hg:bf1a0851fc9b, this kind of overflow won't lead to a layout detection error, but will be reported as a defect with a more intelligible warning.

Not sure what I can do for you or the project

Maybe you can help to improve English in GUI and documentation? We can discuss the workflow if you are interested.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Salut Alexis

I generated my 2000 exams, checked Doc-calage.xy for "{-" (didn't find any) and thought everything was OK.

However a secretary with the job of printing found an error:

I checked Doc-calage.xy and found this for the question:

\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,2}{6165843sp}{7288485sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,2}{6871993sp}{6582335sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,3}{6165843sp}{5453477sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,3}{6871993sp}{4747327sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,1}{6165843sp}{3618469sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,1}{6871993sp}{2912319sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,4}{6165843sp}{1783461sp}{square}
\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,4}{6871993sp}{1077311sp}{square}

Some of the position numbers look pretty big compared to others; so I suppose as well as checking for "{-", I would need to check for position numbers that are bigger than a certain value. Perhaps here - the lines at the end of the page:

\tracepos{15/2:positionBG}{0sp}{3468302sp}{square}
\tracepos{15/2:positionBG}{4661700sp}{0sp}{square}
\tracepos{15/2:positionBG}{5332982sp}{0sp}{square}
\tracepos{15/2:positionBG}{0sp}{2797020sp}{square}
\tracepos{15/2:positionBD}{0sp}{3468302sp}{square}
\tracepos{15/2:positionBD}{33825294sp}{0sp}{square}
\tracepos{15/2:positionBD}{34496576sp}{0sp}{square}
\tracepos{15/2:positionBD}{0sp}{2797020sp}{square}

Would I be right in saying 5332982sp is that number ?

Bonne soirée

Vernon

P.S. Tell me more about helping and what "workflow" means ;-)

error.jpg (49.7 kB)

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

You have to check for small values for position y (the second number in braces). The "{-" was for looking at negative y, where y=0 is the bottom of the page.
Maybe AMC should check that the boxes don't go outside the limits given by the four solid circles…
What is the value of needspace for the group that contains this question?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

Workflow: I was wondering what is the best way for you to improve AMC.
  1. For the documentation: have a look at the source file, see if you can find an editor for this docbook format. Then maybe send me corrected versions, or use mercurial to submit pull-requests on bitbucket?
  2. For the GUI: maybe send me a spreadsheet with old/new strings?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

OK, so in the problem question:

\tracepos{15/2:casequestion:DIFFICULTTOEFL05:152,4}{6871993sp}{1077311sp}{square}

{1077311sp} is a small number? I looked through the file but couldn't identify anything that looked like the coordinates of the four solid circles.

Workflow: I can look through the source file for English corrections, but I don't know what 'mercurial' is. For the GUI you mean send original/corrected English ?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

sp is a scaled point, that is 1/65536 pt, where pt is 1/72.27 inch (see https://en.wikibooks.org/wiki/LaTeX/Lengths)
Thus 1 inch is 4736286sp.

I don't know what 'mercurial' is

Ok so you can send me corrected XML versions.

For the GUI you mean send original/corrected English ?

Yes.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Unless these lines correspond to the minimum 'y' values:

\tracepos{1/3:positionBG}{0sp}{3468302sp}{square}
\tracepos{1/3:positionBG}{4661700sp}{0sp}{square}
\tracepos{1/3:positionBG}{5332982sp}{0sp}{square}
\tracepos{1/3:positionBG}{0sp}{2797020sp}{square}
\tracepos{1/3:positionBD}{0sp}{3468302sp}{square}
\tracepos{1/3:positionBD}{33825294sp}{0sp}{square}
\tracepos{1/3:positionBD}{34496576sp}{0sp}{square}
\tracepos{1/3:positionBD}{0sp}{2797020sp}{square}

... so {2797020sp} would be the 'y' position of the botton solid circles?

Forgot to answer a question:

*([shuffle=true,numquestions=5,columns=2,needspace=4cm]

4cm, after measuring isn't enough, but I've just tried increasing needspace by 2cm each time up to 10 cm (a lot more than enough) - doesn't make any difference.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Alexis Bienvenüe wrote:

sp is a scaled point, that is 1/65536 pt, where pt is 1/72.27 inch (see https://en.wikibooks.org/wiki/LaTeX/Lengths)
Thus 1 inch is 4736286sp.

OK, the default solid circle position is about 2cm from the bottom. So I need to look for 'y' values less than about 373000pt.

Shame needspace doesn't work in this situation.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

Can you post (or send me) the exact source file used for the 2000 exams where you detected the error shown in error.jpg?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Hi Alexis

source.txt attached. Info to add:

- as I said I increased needspace by 2cm increments up to 10cm and there was absolutely no change/effect. Noticing that the second column of the previous group finished higher up the page than the first column, I increased needspace to 15cm for the DIFFICULTTOEFL group - again no change. I also deleted the horizontal lines between the groups on the problem page - no change except for the problem question being slightly higher up the page, but still well outside of the solid circle boundary..

For the above experiments I only generated 15 exams as I read, and it seems to be the case, that exam papers are not exactly random but follow a sequence defined by ... (and then I didn't continue reading/understanding as that's all I needed to know ;-).

Best regards

Vernon

source.txt (54.5 kB)

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

I had a look at you source file. Once again, the results can be different from yours if the Arial font I use is different.
What I tried:
  1. I created a new project from your source file.
  2. I built documents for 15 students. Page 15/2 resulted with two answers outside the circles (too low)
  3. I used the button Edit source file to edit line 798 and set needspace to 6cm instead of 4cm for this group (DIFFICULTTOEFL). Page 15/2 is now OK: the group DIFFICULTTOEFL now begins on page 3 for student 15.

Thus it seems that for me a greater value for needspace fixes the problem, and so unfortunately I can't reproduce your problem…
Can you check that you can find \needspace{6cm} somewhere in the file DOC-filtered.tex in your project directory after you have set needspace to 6cm for some group in your source file, and have prepared the documents again?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

I created a new project too, set needspace to 6cm for DIFFICULTTOEFL and still got the same error/layout. In addition the only needspace occurrence in my DOC-filtered.tex is the usepackage line.

With the default font or Times New Roman I don't have any overflow (but the layout is quite different) and still no needspace in DOC-filtered.tex.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Alexis Bienvenüe over 5 years ago

OK. I should have asked this first: the needspace group option is not yet implemented in this version. On Ubuntu, you need eg. the version from the test PPA.

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by Vernon TAYLOR over 5 years ago

Hmm. I read that one shouldn't install a new version when there are current projects, i.e. I have multiple exams that are in use.

Dangerous ?

RE: Layout detection with more than three groups of questions - error for more than 140 exam papers - Added by S. McKay over 5 years ago

I can verify that upgrading from 1.2.1 to 1.3 in the middle of a project is a bad idea. Multiple things break (though some work - I had to recreate some student exam pdfs on an old project after I upgraded and that worked).

1 2 Next » (1-25/33)