latex error when processing automultiplechoice.dtx (Bug #516)


Added by Hiroto Kagotani over 1 year ago. Updated about 1 year ago.


Status:Closed Start date:11/27/2017
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:-
Target version:-

Description

After changeset hg:f540cd2af512, pdflatex stops when processing automultiplechoice.dtx to produce the sty file.
The log is as follows.

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (Web2C 2015) (preloaded format=pdflatex 2016.10.11)  27 NOV 2017 23:20
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**automultiplechoice.dtx
(./automultiplechoice.dtx
LaTeX2e <2015/01/01> patch level 2
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/share/texmf-dist/tex/latex/base/docstrip.tex
...

...
LaTeX Warning: Reference `s:separate' on page 13 undefined on input line 807.

\openout9 = `pexa-src.tex'.

\openout13 = `pexa-sam.tex'.

(./pexa-src.tex)
\c@chapter=\count321
 (./pexa-sam.texpdfTeX warning (ext4): destination with the same identifier (na
me{AMCquestionaff.1}) has been already used, duplicate ignored
<to be read again> 
                   \relax 
l.1 \begin{question}{simplesum}
                                ( FP-EVAL ( FP-UPN ( FP-RANDOM ( FP-DIV ) )
( FP-MUL ) ( FP-ADD ) ( FP-TRUNC ) ) ) ( FP-EVAL ( FP-UPN ( FP-RANDOM ( FP-DIV
) ) ( FP-MUL ) ( FP-ADD ) ( FP-TRUNC ) ) ) ( FP-EVAL ( FP-UPN ( FP-ADD )
( FP-CLIP ) ) ) ( FP-EVAL ( FP-UPN ( FP-ADD ) ( FP-SUB ) ( FP-CLIP ) ) )
( FP-EVAL ( FP-UPN ( FP-MUL ) ( FP-CLIP ) ) ) ( FP-EVAL ( FP-UPN ( FP-SUB )
( FP-CLIP ) ) )) (./pexa-src.tex) [13]pdfTeX warning (ext4): destination with t
he same identifier (name{AMCquestionaff.1}) has been already used, duplicate ig
nored
<to be read again> 
                   \relax 
l.887 % }
         } ( FP-EVAL ( FP-UPN ( FP-RANDOM ( FP-DIV ) ) ( FP-MUL ) ( FP-ADD )
( FP-TRUNC ) ) ) ( FP-EVAL ( FP-UPN ( FP-RANDOM ( FP-DIV ) ) ( FP-MUL )
( FP-ADD ) ( FP-TRUNC ) ) ) ( FP-EVAL ( FP-UPN ( FP-ADD ) ( FP-DIV ) ) )pdfTeX 
warning (ext4): destination with the same identifier (name{AMCquestionaff.2}) h
as been already used, duplicate ignored
<to be read again> 
                   \relax 
l.923 % }
         } ( FP-EVAL ( FP-UPN ( FP-RANDOM ( FP-DIV ) ) ( FP-MUL ) ( FP-ADD )
( FP-TRUNC ) ) ) ( FP-EVAL ( FP-UPN ( FP-POW ) ) )
! Undefined control sequence.
<argument> \LaTeX3 error: 
                           round() expects between 1 and 2 arguments.
l.923 % }
         }
? x

I am using an older TeXLive (2015) distribution, which is the default version in FreeBSD.

Thanks.


round.diff - patch to use one-parameter round version from LaTeX3 fp. (1.3 kB) Alexis Bienvenüe, 11/27/2017 05:18 pm

catcode.diff (1.2 kB) Alexis Bienvenüe, 02/06/2018 09:14 pm

automultiplechoice.dtx (174.9 kB) Alexis Bienvenüe, 02/06/2018 09:14 pm

automultiplechoice.sty (74.1 kB) Alexis Bienvenüe, 02/06/2018 09:14 pm


History

Updated by Alexis Bienvenüe over 1 year ago

The 3-parameters variant of round must have been defined after your LaTeX version…
Can you try with the attached patch applied?

Updated by Hiroto Kagotani over 1 year ago

Thank you.

Using the patch, build and install processes finished successfully.
But, the following test fails:

.../tests/ # t/tex_arithm/test.pl 
[>] Installed in /tmp/JCTSp3ZY9Z
[E] latex error: ! Undefined control sequence.
.../tex_arithm/ # pdflatex arithm.tex
...
...
SECTION(Significant::base10)
! Undefined control sequence.
<argument> \char_generate:nn 
                             {`e}{12}
l.12 \test{1.2345}{2}{12}

? x

Updated by Alexis Bienvenüe over 1 year ago

Can you try replacing \char_generate:nn { `e } { 12 } with \catcode`e=12 e in automultiplechoice.dtx.in? Line 3416 becomes

  \tl_replace_once:Nxn \amc_ee_tl { \catcode`e=12 e } { e }

Updated by Hiroto Kagotani over 1 year ago

I get the following message by the replacement, although pdflatex itself finished successfully.

/tests # t/tex_arithm/test.pl 
[>] Installed in /tmp/lXxnYOd_4w
[E] Significant::base10 [2] : '0' should be '34'

Updated by Hiroto Kagotani over 1 year ago

The following is displayed by pdflatex.

SECTION(Significant::base10)

TEST(12,12)

TEST(0,34)

TEST(10789.5,11)

TEST(-256785.6,-257)

TEST(0,6)

TEST(-0,-6)

TEST(0,8)

TEST(-0,-8)

TEST(10,10)

TEST(-1,-1)

TEST(0,0)

Updated by Alexis Bienvenüe over 1 year ago

Can you give a try to the following patch, to be applied on hg:9592fa9f3258 for example?
Also attached is the resulting DTX and STY files.

Updated by Hiroto Kagotani about 1 year ago

Thank you very much. This patch completely works with hg:9592fa9f3258.

Now, when I try hg:7cf54b35be4c, I get another error:

! Undefined control sequence.
l.2147 \sys_if_engine_luatex:TF

Thanks a lot.

Updated by Hiroto Kagotani about 1 year ago

Sorry, I found the repository was moved to GitLab.com and \sys_if_engine_luatex:TF was removed.
I'll test it later.
Thanks.

Updated by Hiroto Kagotani about 1 year ago

The latest commit git:c96ff32 works completely. (I don't know how to refer to a gitlab commit)
Thank you very much!

Updated by Alexis Bienvenüe about 1 year ago

Good. Thanks for testing!

(I don't know how to refer to a gitlab commit)

just type git:c96ff32 and the link will appear.

Updated by Alexis Bienvenüe about 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF