I have a class file which, among other things, generates a title page for my paper. The name of of my school, which appears at the top of the title page, is hard-coded into the class file.

I would like to be able to utilize \RequirePackage[serbian]{babel} along with "` "' within the .cls file to get German-style quotation marks („“) in my document, but when I try including the package it just doesn't work. Here's the code along with the output:

{\large \textsc{Gimnazija "`Branislav Petronijevi\'{c}"'}\par}
{\small Ub, Vuka Karad\v{z}i\'{c}a 15 \par}

Bad German quotation mark parsing

Yet, if I copy the code over to the .tex file that holds the document, it works just fine with the babel package. Is the class file for some reason not including the package? Are there any alternatives to what I'm trying to achieve?

If you would like to take a look at the class file, you can do so here: http://pastebin.com/KsXjERng It's something I got off the web and made edits to.


Package babel makes the shorthand active in \begin{document} to avoid troubling classes and packages with active characters. \shorthandon and \shorthandoff enables and disables shorthands:

{\large \textsc{Gimnazija "`Branislav Petronijevi\'{c}"'}\par}
{\small Ub, Vuka Karad\v{z}i\'{c}a 15 \par}

Or avoid the use of shorthands in the class file:

{\large \textsc{Gimnazija \quotedblbase Branislav Petronijevi\'{c}\textquotedblleft}\par}
{\small Ub, Vuka Karad\v{z}i\'{c}a 15 \par}

This way the text remains independent from package babel and its shorthands.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.