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.

I use Linux and have available to me the "compose" key, and thus can type characters like '°', 'ß', 'ï', 'į', 'ḯ', etc.

Is it inherently "bad" to use the compose key to insert the characters, should I use LaTeX commands such as \ss instead of 'ß'? Does it even matter in the long run?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Depends. If you only compile documents on your local machine do as you seem fit.

If you collaborate you might want to use LaTeX commands for collaboration.

In general case though LuaTeX and XeLaTeX use UTF-8 encoding by default and thus favor glyph characters.

With package definition as below in the comment UTF-8 can be done in plain latex as well.

I don't usually require special glyphs, I get them as a bonus author name spellings in citations hence I usually enable utx8 and friends just to make sure my document doesn't choke when it hits an accidental glyph here or there.

share|improve this answer
3  
It can be also done with \usepackage[utf8]{inputenc}. –  mbq Jul 28 '10 at 17:58
add comment

I’m a firm believer that anything but Unicode is evil anyway. So inserting correct characters directly instead of relying on macros is highly recommended in my book. If nothing else, it improves the readability of the source code substantially.

And we all know that readability is the most important metric of any source code.

share|improve this answer
    
Agreed, as long as you really stick with unicode (utf8) for your source files, have a decent editor that allows you to do so, and make sure all your potential collaborators do the same thing. Otherwise messing with encodings is a sure recipe for disaster. –  Juan A. Navarro Jul 28 '10 at 15:51
    
@Konrad Rudolph "in my book" do you mean in your latex documents, or do you mean an advice you give in some kind of TeX book of yours? –  Dima Jul 28 '10 at 15:59
1  
@Dima: “In my book” = “in my opinion.” –  Konrad Rudolph Jul 28 '10 at 16:04
    
The point about collaborators is very important: I've had issues before as I use UTF-8 by default, but not everyone does! –  Joseph Wright Jul 28 '10 at 19:57
2  
Konrad, how do your beliefs stack up with the TeX axioms? Surely, the philosophy of TeX is that an implementation can define an input character set mapping. So, whether or not to use UTF-8, or Unicode would depend on the TeX environment. On the contrary, TeX macros avoid introducing such a dependency on input encoding. –  Heath Hunnicutt Jul 28 '10 at 21:23
show 1 more comment

Disclaimer: This is not really an answer, but a bit long for a comment.

What would worry me about using unicode characters directly is that the command might expand to more than just the character. This is particularly the case in maths mode. As an example, ∘ is, as a unicode character, simply a letter. However, mathematically it's an operator. Is the unicode support smart enough to know that in maths mode, f∘g should have a little extra space in it?

(I want to add that I don't think that it should be that smart. For the same reason that we have \langle for <, then ∘ should be simply the character with the default spacing and \circ should be the operator. Borrowing from MathML, ∘ should expand to <mi>&#x02218;<mi> whereas \circ to <mo>&#x02218;<mo>. So the behaviour that I would like is that é can be used for \'e if they are syntactically the same.)

share|improve this answer
1  
I don't know a lot about unicode, but according to my systems character map, U+2218 is called "RING OPERATOR" or "composite function". So I'd guess it is always an operator. Note that there is also U+25E6 WHITE BULLET, U+00B0 DEGREE SIGN and U+0970 DEVANAGARI ABBREVIATION SIGN. –  Caramdir Jul 29 '10 at 12:05
    
@Caramdir: okay, maybe a bad choice of symbol; but I hope that the general point is clear. –  Loop Space Jul 29 '10 at 12:27
1  
the point about Unicode is that in general, symbols are grouped by meaning rather than shape (but there are exceptions). So I think that in general, your point doesn’t apply … the system can just make that symbol an active character and apply the appropriate spacing. –  Konrad Rudolph Jul 30 '10 at 14:59
1  
in my experience (from representing the stix project in adding numerous math symbols to unicode) a unicode character represents a combination of meaning and shape; two characters with identical or very similar shape but different meanings (often distinguished in composed math only by a spacing difference) should have different unicodes. compare 22A5 = up tack (base, bottom) and 27C2 = perpendicular. the latter was added to accommodate the requirement to distinguish between the two meanings in a search. there is still some inconsistency in old material, but the policy is now well defined. –  barbara beeton Nov 3 '10 at 20:35
    
@barbara: That's interesting. There's a lot about the whole unicode thing that I don't yet understand - but unfortunately I don't understand it even enough to ask a sensible question about it! –  Loop Space Nov 4 '10 at 7:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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