0

I have a problem when compiling my Latex file. The problem seems to be the

  • babel-package \usepackage[english,ngerman]{babel} (because the error goes away if I delete this line)
  • the xsim-package
  • and the tikz code (the line \pic[draw,thick,<-,angle radius=.7cm,"$\alpha$" opacity=1] {angle=p--o--px};)

I get the error like: Missing \endcsname inserted

Maybe there are more than just one error. Can you help me to get rid of the error?

Edit: I've tried to use use-files, as well as \AtBeginEnvironment{auf}{\shorthandoff{"}}. They did not work but \shorthandoff{"} and \shorthandon{"} worked in the end.

Interestingly I can compile the file with an older Mac (and an older version of TeXShop).

Here a MWE

\documentclass[11pt, a4paper, parskip=half]{scrartcl}
\usepackage[english,ngerman]{babel} 
\usepackage{amsmath, amsfonts, amssymb} 
\usepackage{tikz}
\usetikzlibrary{angles,quotes,babel,3d}

\usepackage{xsim} \usepackage{needspace} \DeclareExerciseType{auf}{ exercise-env= auf, solution-env= lsg, exercise-name=Aufgabe , solution-name= Losung, exercise-template= default , solution-template= default}

\begin{document} \begin{auf} \begin{tikzpicture}[scale=1,>=latex,font= \footnotesize] \newcommand\rr{1.2}; \newcommand\angl{-30}; \draw (0,0) coordinate(o) circle (\rr); \draw[->] (-\rr1.2,0) -- (\rr1.2,0) coordinate(px) coordinate (x axis) node[below] {$x$}; \draw (o) -- ({\angl}:\rr) coordinate(p) ++ (0:{\rrcos(\angl)}); \pic[draw,thick,<-,angle radius=.7cm,"$\alpha$" opacity=1] {angle=p--o--px}; \draw[domain=0:-360,thick,samples=50] plot ({cos(\x)(0.6-0.1\x/360)}, {sin(\x)(0.6-0.1\x/360)}); \draw[fill=white] (p) circle (2pt) node[above right] {$P$}; \draw[fill=black] (p) circle (0.3pt); \draw[->] (0,-\rr1.2) -- (0,\rr*1.2) coordinate (y axis) node[left] {$y$}; \end{tikzpicture} \end{auf} \end{document}

garondal
  • 455
  • 4
    the no ; in nullfont are from the semicolon after the new commands definition, which are wrong. – Rmano Dec 15 '23 at 07:15
  • Thanks, the semicolon are indeed the reason for the no ; in nullfont error. Nevertheless @WillieWong: Your source does not help, I have tried \AtBeginEnvironment{exercise}{\shorthandoff{"}} and use-files and both did not work. I will edit my question. – garondal Dec 15 '23 at 12:51

0 Answers0