1

I want to get rid of relative paths and defines a new command which point to the root folder of my project:

\providecommand{\myPath}{C:/Users/xxx/Google Drive/WS_1819/Bachelorarbeit/_new/}

However, when i try to use this absoulte path like so:

\input{"C:/Users/xxx/Google Drive/WS_1819/Bachelorarbeit/_new/_text/text.tex"}

I receive this error:

! Argument of \language@active@arg" has an extra }.

As my MWE worked with this my intention was that some packages I used in the project causes this. After trying around I found out that

\usepackage[ngerman]babel 

causes this. Maybe because of the underlines in the path? Anyone an easy solution how I can solve this without renaming the whole paths in my project?

MWE

\documentclass{scrbook}
\usepackage{import}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[space]{grffile}

\begin{document}
%\input{preamble/packages.tex}
\input{"C:/Users/Sebastian/Google Drive/pathtest/preamble/packages.tex"}
\end{document}

I really dont know how to solve this issue :/

  • it will be the double quote " which german uses as a shorthand, but you don't need them in the input, so you can just remove them. But normally it's best to avoid absolute paths, they just make the document non-portable (or as there is a space in google drive use \string" at each end rather than " – David Carlisle Aug 19 '18 at 16:27
  • thanks.yeah i knew absoulte paths are not great, but using subimports before did not work riether as I used them inn nested ways and the somehow get confused. so i decided to use a absoulte path just to the root to my project. – SRel Aug 19 '18 at 16:29
  • when deleting the " I receive the error: missing $ inserted – SRel Aug 19 '18 at 16:31
  • 1
    You really should avoid such absolute pathes. They indicate that something is wrong in your general project setup. – Ulrike Fischer Aug 19 '18 at 16:53
  • 2
    I meant \input{\string"C:/Users/Sebastian/Google Drive/pathtest/preamble/packages.tex\string"} but I would never use such a path in a document, why not just \input{packages} ??? – David Carlisle Aug 19 '18 at 18:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.