Seite 1 von 1

Pfadangabe in einem Makro benutzen

Verfasst: So 10. Mai 2015, 22:41
von [BMC]Taz
Hallo,

ich möchte gern einen Teilpfad in einer Variablen speichern, bekomme das aber leider nicht alleine hin. Vielleicht kann mir jemand verraten wo mein Fehler zu finden ist.

das geht:
\begin{document}

\pdfbookmark[0]{Bewerbungsdeckblatt}{../Anlage/deck}
\includepdf{../Anlage/deck}

\end{document}
 


Warum funktioniert das nicht?
\newcommand{\Pfad}{../Anlage/}

\begin{document}

\pdfbookmark[0]{Bewerbungsdeckblatt}{\Pfad deck}
\includepdf{\Pfad deck}

\end{document}
 



nichteinmal das funktioniert :-(
\newcommand{\Pfad}{../Anlage/deck}

\begin{document}

\pdfbookmark[0]{Bewerbungsdeckblatt}{\Pfad}
\includepdf{\Pfad}

\end{document}
 
Die Fehlermeldung beim übersetzen der beiden letzten Beispiele :

! Package pdfpages Error: Cannot find file `../Anlage/deck'.
See the pdfpages package documentation for explanation.
Type H <return> for immediate help.
...
l.14 \includepdf{\Pfad}
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.
! Undefined control sequence.
\AM@checkpagenumber #1->\ifnum #1>\AM@pagecount
\relax \ifthenelse {\boolean...
l.14 \includepdf{\Pfad}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Missing number, treated as zero.
<to be read again>
\relax
l.14 \includepdf{\Pfad}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

        Verfasst: So 10. Mai 2015, 22:49
        von [BMC]Taz
        ich hatte n tippfehler.. sorry jetzt läuft es, mein pfad war ../Anlagen/deck und nicht ../Anlage/deck

        Verfasst: Di 12. Mai 2015, 09:50
        von Stefan Kottwitz
        Herzlich willkommen im Forum!

        Und vielen Dank für das Mitteilen der Lösung.

        Stefan