0

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
Kyu96
  • 277
  • you have not provided a usable example, put probably \protect\Csh assuming you have defined \lserif (which is not a standard command) – David Carlisle May 14 '18 at 22:17
  • @DavidCarlisle The \protected didn'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
  • no you should make a small complete example here, you should not expect people to follow links to unknown sites and the question is archived forever and is not understandable if that link breaks. The error message (which you have also not shown) will show which command is undefined, if that is \lserif then you just need to define it, what do you want it to do? – David Carlisle May 14 '18 at 22:21
  • I have shown the error message... It just says 'Line XXX - Undefined control sequence. }' whereas the line number points the the closing curly bracket. But alright - I will add an example in a minute. – Kyu96 May 14 '18 at 22:24
  • that is not the format of a tex error message, Show the full error message from the log file, from ! 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
  • @DavidCarlisle Oh I didn't know that. I attached the error log. – Kyu96 May 14 '18 at 22:28
  • “The \protected didn't resolve the problem…”: note that @DavidCarlisle said “\protect\Csh”, not “\protected\Csh”. – GuM May 14 '18 at 22:28
  • @GuM I meant that, and it didn't fix the issue. – Kyu96 May 14 '18 at 22:29
  • @Kyu96 so as I guessed it is \lserif which 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
  • I assume from https://tex.stackexchange.com/questions/44528/how-to-make-the-correct-hash-symbol-in-c-sharp-c where \lserif is defined (for xetex/luatex) with alternative definitions for pdftex – David Carlisle May 14 '18 at 22:38
  • Thanks. \newcommand{\Csh}{C{\newcommand{\lserif{}}\#}} fixed the problem as you said. This is sufficient in my case. – Kyu96 May 14 '18 at 22:41

0 Answers0