SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Error in attaching data files [ Reply ]
By: Francisco Goerlich on 2024-11-21 22:01
[forum:50025]
Thanks a lot for the explanations and for the quick reply.
Best regards,

RE: Error in attaching data files [ Reply ]
By: Achim Zeileis on 2024-11-21 20:11
[forum:50024]
Why duplicates?

During the weaving step the supplementary files are indeed copied to different subdirectories. But the LaTeX code that has to be compiled has \includegraphics{...} or, in this case, \textattachfile{...} commands without subdirectories. This is why before compilation of the LaTeX code the files are copied into a common folder again. And for historical reasons we kept the local paths without subdirectories. Maybe I should have a look at some point whether I can switch to full paths instead. I think I avoided that because I was afraid that LaTeX might choke on paths with spaces etc.


What is the behavior in HTML/XML?

There the supplementary files are handled differently - by default embedding via Base64. But even without Base64 we keep the subdirectories there because there no issues (that I would know of) with Browsers having problems with full file paths.


What about the .tex file that was attached?

As you hadn't included the LaTeX template that loaded the {attachfile} package, I had to reconstruct that. Hence I wanted to repost that LaTeX template but forgot to mention it in the text.


Large question bank

I would nevertheless try to avoid duplicate file names. In particular, I never use names like "data.csv" etc. Instead I try to use a name that has some relationship to the topic. That reduces the risk of coming up with the same generic name several times.

RE: Error in attaching data files [ Reply ]
By: Francisco Goerlich on 2024-11-21 19:25
[forum:50023]
Hi Achim,
Many thanks for the quick reply and for the fix.
I don“t remember having this problem before, but for sure you are right.

Since all the metadata is organized in different folders for each exercise and replication it is difficult to understand from the outside how duplicated names can be a problem.

What is the behaviour in html or moddle (xml) files? I use this quite often.

What is the role of the "attachfile.text" included in your response (labels are in spanish, and my templates are not!)? Do I have to modify my Latex templates?

Thanks for the advice, I usually do that, but I have a question bank of more than 500 questions, many of them with data from the same data bank, and keeping record of different files names in every case is quite difficult.

Thanks a lot.
Best regards,

RE: Error in attaching data files [ Reply ]
By: Achim Zeileis on 2024-11-21 17:13
[forum:50022]

attachfile.tex (1) downloads
Francisco, thanks for this. I doubt that this ever worked gracefully. The current behavior was introduced 2.5 years ago and improved the handling of duplicated _graphics_ file names only - but not other attachments.

I have just committed a fix on R-Forge that also correctly handles duplicated textattachmentfile supplements.

Having said that, I strongly recommend to employ different file names in different exercises within the same PDF. At least when I think about my students, this would be a source of huge confusion for them :-)

RE: Error in attaching data files [ Reply ]
By: Francisco Goerlich on 2024-11-21 12:57
[forum:50021]

06_Data_files.zip (2) downloads
Sorry, I forgot to attach in the zip file the pdf with the generated questions.
Regards,

Error in attaching data files [ Reply ]
By: Francisco Goerlich on 2024-11-21 12:44
[forum:50020]

06_Data_files.zip (0) downloads
Hi,
I found an error when attaching data files to a pdf. In the attached pdf there are two data files, one for each problem, but the data for the second problem is incorrect, it simply replicates the data from the first file.

The origin of the problem is that the name of the data file is the same "data.csv", but this problem did not appear in previous versions.

In the folder where the supplementary data files are generated "exams1", it can be seen that the data file for the second problem is named "data-2.csv", so the pdf is not incorporated.

Since for each problem we have a different folder, using the same name for different data files should not be a problem, and in fact it has not been a problem in the past.

Regards

Thanks to:
Vienna University of Economics and Business Powered By FusionForge