Hello Tim,
Yes, this is an issue I've also encountered :)
1) You can either use the mecanism that is designed for this: setup_tex
takes an option -a <file> to specify a dependency that should be copied
(i.e., an image, or a style file or anything else). [I've never used this.]
sdaps <project> setup_tex <questionnaire> -a <image1> -a <image2>
2) Or what I do currently is:
- create your own <project> folder, copy the images and whatever other
files in there
- comment out the "return 1" in the file sdaps/setuptex/__init__.py:
def setup(survey, questionnaire_tex, additionalqobjects=None,
extra_files=[]):
exists = False
if os.access(survey.path(), os.F_OK):
log.error(_('The survey directory already exists.'))
exists = True
#return 1 # <-- this line
- then call the setup_tex command like you would have before.
Currently SDAPS stops running if the survey directory already exists, which
is to prevent things from getting written over.
Best,
Jérémie.
On Sun, Jul 5, 2015 at 6:43 PM, Tim Schumacher <[email protected]>
wrote:
> Hey,
>
> I am running into the problem that setup_tex runs into an error caused by
> missing graphics:
>
> sdaps XXX setup_tex XXX.tex
>
> ------------------------------------------------------------------------------
> - SDAPS -- setup_tex
>
> ------------------------------------------------------------------------------
> Running pdflatex now twice to generate the questionnaire.
> This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
> restricted \write18 enabled.
> entering extended mode
> This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
> restricted \write18 enabled.
> entering extended mode
> Error running "pdflatex" to compile the LaTeX file.
> Error: An error occured in the setup routine. The survey directory still
> exists. You can for example check the questionnaire.log file for LaTeX
> compile errors.
> Traceback (most recent call last):
> File "/usr/local/bin/sdaps", line 23, in <module>
> sys.exit(sdaps.main())
> File "/usr/local/lib/python2.7/dist-packages/sdaps/__init__.py", line
> 64, in main
> return cmdline['_func'](cmdline)
> File "/usr/local/lib/python2.7/dist-packages/sdaps/cmdline/setuptex.py",
> line 47, in setup_tex
> return setuptex.setup(survey, cmdline['questionnaire.tex'],
> cmdline['additional_questions'], cmdline['add'])
> File "__init__.py", line 125, in setup
>
> The Questionnaire.log says:
>
> ** Code 128 ** input: 00004
> encoded: \startC ,00,00,100,20,73,\stop ,
> black-white: 21123221222221222211413122123114211223311120
> [4]
>
> LaTeX Warning: File `Stevia.jpg' not found on input line 294.
>
>
> ! Package pdftex.def Error: File `Stevia.jpg' not found.
>
> See the pdftex.def package documentation for explanation.
> Type H <return> for immediate help.
> ...
>
> l.294 \end{questionnaire}
>
> The .tex compiles just fine with the pictures outside of the setup_tex
> operation. As far as I understand - setup_tex copies all relevant files
> like sdaps.cls or code128.tex into the new project folder and then runs
> PdfLatex in the new folder and hence it is missing the included graphics.
>
> Is there any way to prevent this or copy the graphics as well? I would lie
> if I say I didnt try tinkering with some python files myself, but
> unsuccesfully...
>
> I am running a full texlive installation to prevent missing dependencies
> and 1.1.10. of sdaps.
>
> Thanks in advance for the reponse.
>
> Grüße
> Tim
>
>
>
>