Help with separate nominative answersheets for post correction

Added by Roberto González over 8 years ago

I'm trying to produce a set of separate nominative answer sheet for post correction (AMC 1.2.1, openSUSE 12.2). The first time, I forgot to include \usepackage{csvsimple} and this was the output that I got (4 errors during compilation): [see attached tex1.log]

! Undefined control sequence.
l.77 \csvreader
               [head to column names]{ListaIIB.csv}{}{\subject}
! Undefined control sequence.

After that, I added \usepackage{csvsimple} and things went even worse (115 errors during compilation): [see attached tex2.log]

! Package pgfkeys Error: I do not know the key '/csv/head to column names' and 
I am going to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.78 ...to column names]{ListaIIB.csv}{}{\subject}

! Undefined control sequence.
<argument> ...width } Name: \par \Large \bf \name 
                                                  {} \surname {} \par \vspac...
l.78 ...to column names]{ListaIIB.csv}{}{\subject}

! Undefined control sequence.
<argument> ...: \par \Large \bf \name {} \surname 
                                                  {} \par \vspace *{1mm} \en...
l.78 ...to column names]{ListaIIB.csv}{}{\subject}

! Undefined control sequence.
<argument> ...association {\the \AMCid@etud }{\id 
                                                  }

1. What did I wrong?
2. How can I create a set of separate nominative answer sheets for postcorrection reutilizing the code that produced the attached answersheet?

Thanks in advance.

Roberto.

source.tex - The disastrous source file (1.4 kB)

DOC-sujet.pdf - What I'm trying to produce (without bubbles for student identification, checkboxes for questions only). (25.7 kB)

tex1.log (9.1 kB)

tex2.log (35 kB)


Replies (12)

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

The code for the successfully created answer sheet that I'm trying to adapt.

source.tex (8.4 kB)

RE: Help with separate nominative answersheets for post correction - Added by Alexis Bienvenüe over 8 years ago

Can you check your csvsimple version in one of the first lines of /usr/share/texmf/tex/latex/csvsimple/csvsimple.sty? This should be at least version 1.04 (2011/11/11) for head to column names to be available.

RE: Help with separate nominative answersheets for post correction - Added by Alexis Bienvenüe over 8 years ago

Maybe you will have to upgrade to OpenSUSE 12.3 (and install texlive-csvsimple package).

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

Alexis Bienvenüe wrote:

Maybe you will have to upgrade to OpenSUSE 12.3 (and install texlive-csvsimple package).

I have installed OpenSUSE 12.3 and then the required package. Now I get the following output:

! LaTeX Error: File `bophook.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name: 
! Emergency stop.
<read *> 

l.32 \RequirePackage
                    {xkeyval} % \setkeys^^M
No pages of output.
Transcript written on amc-compiled.log.
Output format: pdf

Package texlive-xkeyval is already installed (version 2012.67.2.6asvn15878-4.5.2).

:(

RE: Help with separate nominative answersheets for post correction - Added by Alexis Bienvenüe over 8 years ago

! LaTeX Error: File `bophook.sty' not found.

So you also need the texlive-bophook package. It seems that OpenSUSE 12.3 split each individual LaTeX style file in a package...

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

Alexis Bienvenüe wrote:

[...]
So you also need the texlive-bophook package. It seems that OpenSUSE 12.3 split each individual LaTeX style file in a package...

Done. This time the document update was running for a longer time, but I got a new list of errors:

No file amc-compiled.aux.
(/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
ABD: EveryShipout initializing macros
! Undefined control sequence.
<argument> ...width } Name: \par \Large \bf \name 
                                                  {} \surname {} \par \vspac...
l.78 ... to column names]{ListaIA.csv}{}{\subject}

! Undefined control sequence.
<argument> ...: \par \Large \bf \name {} \surname 
                                                  {} \par \vspace *{1mm} \en...
l.78 ... to column names]{ListaIA.csv}{}{\subject}

! Undefined control sequence.
<argument> ...association {\the \AMCid@etud }{\id 
                                                  }
l.78 ... to column names]{ListaIA.csv}{}{\subject}

[...]

[1] (./amc-compiled.aux) )
(see the transcript file for additional information)
Output written on amc-compiled.pdf (36 pages).
Transcript written on amc-compiled.log.
Output format: pdf
ERR: <i>108 errores durante compilación LaTeX (hoja de preguntas)</i>

A previous warning states:

* LaTeX warning: "xparse/redefine-command" 
* 
* Redefining document command \oldstylenums with arg. spec. 'm' on line 107.

I think this is another missed package, but this time I don't see a 'not found' message.

RE: Help with separate nominative answersheets for post correction - Added by Alexis Bienvenüe over 8 years ago

Are you sure you have columns named name, surname and id in your CSV file ListaIA.csv?
The head to column names option tells csvreader to define commands based on the column names of the CSV file, that will return the values found in each row. So to have \name defined while processing the \subject command, you must have a column named name (exactly) in your CSV file, and the same applies for surname and id. Otherwise, change the column names, or change the name of the commands used in the \subject (or delete these commands if you don't want to use them).

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

According to me, I have.

I attach here the file.

I don't understand what's wrong.

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

Alexis:

The files I wave been working with have been generated from a database stored in an Excel spreadsheet. I took that spreadsheet and opened it with LibreOffice on openSUSE. Then, I extracted the names, surnames and id's by applying, over the corresponding cells, the proper functions of LibreOffice for handling text. That enabled me to create a single column with names, surnames an id's, separated by a semicolon. Finally, I copied that column to a text file, which I saved under .csv format.

It seems that 'something' in the process is causing the list not being properly read (maybe, BOM insertion?), because I created a short (or small?) list by hand and the process completed successfully.

If you discover the reason, please tell me if there is some workaround.

(I have emailed you all the files I have mentioned above).

Cheers.

RE: Help with separate nominative answersheets for post correction - Added by Roberto González over 8 years ago

A workaround seems to be directly exporting the students list within the .xlsx file (opened with LibreOffice Calc) to .csv format.

RE: Help with separate nominative answersheets for post correction - Added by Alexis Bienvenüe over 8 years ago

In the CSV file you first used, the separator is <TAB>. csvsimple does not handle this separator. From csvsimple documentation, it seems that the default separator is the comma, so comma must be used to separate columns unless you tell csvreader to use another one, such as semicolon (with option separator=semicolon). When saving to CSV format with LibreOffice, you can choose the separator.

(1-12/12)