Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How to type special/accented letters in LaTeX?

Can sameone provide some suggestion how to introduce special signs to cls file? I had tried to avoid this problem by trying to define new variable : \def\@abc and typing my test with \abc{text} but it didn't work.

share|improve this question

marked as duplicate by Alan Munn, Martin Schröder, Marco Daniel, cgnieder, percusse Aug 22 '12 at 3:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
What exactly do you mean by "special signs"? Do you mean using reserved characters like @,#,$ etc. in text? If so, most of them can be used by escaping them with \. –  Alan Munn Jul 2 '12 at 16:24
    
By special signs I mean diacritic signs. –  qry Jul 2 '12 at 16:25
    
Make sure your source document is encoded in UTF-8 and if using pdfLaTeX use the inputenc package with the [utf8] option, and a font encoding that supports the characters. Or compile using XeLaTeX or LuaLaTeX with no inputenc. In both cases you just enter the characters directly into your source. –  Alan Munn Jul 2 '12 at 16:28
1  
@AlanMunn I don't have problem with compiling such signs in tex file. I have problem introducing such signs in class file. The problem arises when I want to compile tex file of such class. Text with diacritic sigh which is introduced in tex file source is fine but text which is introduced in cls file isn't. I hope that I presented my problem clearly enough - I'm don't have much practice working with LateX. –  qry Jul 2 '12 at 16:36
1  
Ok. Now the question is clearer (you might want to add your last comment to the question itself.) One simple solution would be to use \RequirePackage[utf8]{inputenc} (unless XeLaTeX or LuaLaTeX is used) in your class file. This would make the class file dependent on a particular encoding, though. If you don't want to do that, then you can use macros for the diacritics. (See the Comprehensive LaTeX Symbols List for those.) (texdoc symbols should probably find it.) –  Alan Munn Jul 2 '12 at 16:55
add comment

1 Answer 1

While it is possible to force the encoding of the class file, it is probably better not to, as not doing so makes it easier to use the class file with documents that are in different encodings.

There is usually relatively little fixed text in a class file, so it should not be too hard to write all such text in "classic" LaTeX markup, just using ASCII input.

So rather than use [[é]] use [[\'e]] This will then work whether the document using the class uses \usepackage[utf8]{inputenc} or \usepackage[latin1]{inputenc}

share|improve this answer
add comment

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