I am currently writing my CV using a modified version of a LaTeX template from here: http://deesaster.org/blog/index.php?/archives/1789
When I list my programming experiences, I formatted the CSharp Symbol using a \newcommand to make it look nicer. The command works, but when used in a section it breaks the building process saying undefined control sequence.
When I remove this \Csh command it works again. Whats wrong with the \Csh so that it breaks the formatting of the section?
\newcommand{\Csh}{C{\lserif\#}}
The section in question:
\begin{AbschnittCV}{Something Something}
\EintragCV{Topic1}{
StuffA: bla bla \newline
StuffB: bla blubb blubb \newline
StuffC: blablabla
}
\EintragCV{Programming}{
\Csh : bla bla \newline
C/C++: bla bla bla \newline
Delphi/Java: bla bla bla
} % <-- This bracket is highlighted as error 'Undefined control sequence. }'
\end{AbschnittCV}
How can I resolve this problem/fix my command definition?
The full error log says:
! Undefined control sequence.
\Csh ->C{\lserif
\#}
l.223 }
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.
LaTeX Font Info: Try loading font information for T1+cmtt on input line 237.
(/usr/share/texmf-dist/tex/latex/base/t1cmtt.fd
File: t1cmtt.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
<signatur-bewerber.png, id=62, 108.405pt x 26.499pt>
File: signatur-bewerber.png Graphic file (type png)
<use signatur-bewerber.png>
Package pdftex.def Info: signatur-bewerber.png used on input line 246.
(pdftex.def) Requested size: 142.26378pt x 34.77982pt.
[3
\protect\Cshassuming you have defined\lserif(which is not a standard command) – David Carlisle May 14 '18 at 22:17\protecteddidn't resolve the problem. An example can be found by downloading the example and inserting the command. I am not sure if I am allowed to post the template here without permission that's why I linked to the original page. – Kyu96 May 14 '18 at 22:19\lserifthen you just need to define it, what do you want it to do? – David Carlisle May 14 '18 at 22:21!to?in a code section so line ends are preserved. The undefined command is the last command on the second line. – David Carlisle May 14 '18 at 22:25\protecteddidn't resolve the problem…”: note that @DavidCarlisle said “\protect\Csh”, not “\protected\Csh”. – GuM May 14 '18 at 22:28\lserifwhich is not a command that is defined by default so if you have not defined it, you will get an error.\newcomand\lserif{}would work, but perhaps you want it to be a font selection? – David Carlisle May 14 '18 at 22:32\lserifis defined (for xetex/luatex) with alternative definitions for pdftex – David Carlisle May 14 '18 at 22:38\newcommand{\Csh}{C{\newcommand{\lserif{}}\#}}fixed the problem as you said. This is sufficient in my case. – Kyu96 May 14 '18 at 22:41