A couple of questions of a similar nature:  We all know that -- prints an endash, while --- prints an emdash. But - is not an active character, right? So how does TeX process -- and --- and make them different from three ordinary dashes? `` prints a “. But ` is not an active character, right? So similarly to above, how is this processed? ' is an active character, so I guess no issue there. The character ` plus some character token prints the character number (or whatever the right term is) for that token, as seen e.g. in catcode assignments. What kind of construction is this? Can I change this to some other character? Is there a way to print ` on TeX.SX? Typing ``` doesn’t work.
121928
How does LaTeX implement the differences between the dashes?  -, --, and --- all print different dashes, but - is not an active character: it has catcode 12, the same as digits like 2.
114295
What are the valid characters to use in labels? I thought that only alphabetic characters were valid, but I tested ' and ! and they work. What are the restrictions to these names?
102347
I am curious as to whether there is an equivalent to the Alt-. command on Mac. On my computer it inserts the following character: ≥, instead of showing the .
108815
If I know that a certain key has been pressed (eg Key.D3), and that the Shift key is also down (Keyboard.IsKeyDown(Key.LeftShift) || Keyboard.IsKeyDown(Key.RightShift)), how can I find out what character that refers to (eg, # on US keyboard, UK pound sign on UK keyboard, etc)?  Put another way, how can I find out, programatically, that Shift + 3 produces # (it wouldn't on a non-US keyboard).
23985
I just don't seem to get it. So I come from the german speaking part of Switzerland and naturally I need ä ü ö a lot when I write german texts. So in LaTeX I have the option to go via  "a "u "o  which isn't really comfortable, or I can use an additional package. So now the confusion starts. I can use either  \usepackage[T1]{fontenc}  or  \usepackage[latin1]{inputenc}  So now if I create a new document and save it as a latin-1 encoded .tex file it seems it doesn't matter which option I chose they both work. Now why should I pick one over the other or use both? Which problems could occur (Do they occur if I use the same .tex file on another OS depending on which option I have chosen?)?  If I save the .tex encoded as lets say the mac os latin then the first option compiles but shows the wrong characters for the ä ü ö's. Is it then like latex maps the ä according to the latin1 to a character and since the document is encoded as something different than latin1 then gets encoded to something different again?  So if the last 2 paragraphs have been confusing (mainly because I'm confused) the main question is: What does fontenc what inputenc doesn't do and vice versa?
7380
I'd like to know the equivalent of   cat inputfile | sed 's/\(.\)/\1\n/g' | sort | uniq -c   presented in  for production of character usage statistics in text files for binary files counting simple bytes instead of characters, i.e. output should be in the form of   18383 57 12543 44 11555 127  8393 0   It doesn't matter if the command takes as long as the referenced one for characters.  If I apply the command for characters to binary files the output contains statistics for arbitrary long sequences of unprintable characters (I don't seek explanation for that).
18302
I have a list of Unicode codepoints, but I don't know of a "simple" way to convert these hex values into the actual characters they represent...    I've heard that zsh has echo -e '\u0965', but I use bash 4.1.  Is there something as simple as the zsh method, for bash?
28880
I often need to look up a catcode table, and quick searches on the web are rarely satisfying.   So I thought, it must be (in the long term) easier to use a Latex function of sorts, to loop through all 8-bit sequences (that is, ASCII characters), and print out:   [ASCII code] - [ASCII character] - [catcode] - [catcode meaning]   A "reverse indexing" would be nice as well - where catcodes are output, and then which ASCII chars belong to them, e.g:  [catcode] - [catcode meaning]:      [ASCII code1] - [ASCII character1]     [ASCII code2] - [ASCII character2]     ....   Just wanted to note - I'd like such a table to be \typeouted to the terminal (not typeset in a PDF).   In , a \printcatcode exercise is mentioned, that answers the mapping from ASCII character to a verbose catcode meaning...   So I guess, one would just have to make a loop from 0 to 255 (maybe something similar to approaches in ), and apply all such relevant transformations - unfortunately, I'm not mastering tex core on a level where I can come up with that code off the top of my head. But maybe a function for something like this already exists?   Any suggestions for code that I could use in this context?
103438
I use to run  $s =~ s/[^[:print:]]//g;   on Perl to get rid of non printable characters.   In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not.   What would you do?   EDIT: It has to support Unicode characters as well. The string.printable way will happily strip them out of the output.  curses.ascii.isprint will return false for any unicode character.
80942
When I try to use one of the more "hacky" methods of getting a literal "special character" (such as backslash or a brace) then I get a different character: backslash seems to be an open quote, left brace a dash, and right brace a close quote.  What happened to my special characters?  \documentclass{minimal}  \begin{document}  \char`\\ \char`\{ \char`\}  \end{document}   produces: "-" (only the two "s are different).
15901
How to insert pipe symbol | in TeX (LaTeX)?  I have tried this sample with pdflatex tmp.tex  \documentclass{extarticle} \begin{document} \textpipe \end{document}   And it give undefined control sequence error  This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) restricted \write18 enabled. entering extended mode (./tmp.tex LaTeX2e &lt;2009/09/24&gt; Babel &lt;v3.8l&gt; and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, loaded. (/usr/share/texmf-texlive/tex/latex/extsizes/extarticle.cls Document Class: extarticle 1996/10/08 v1.0 Non Standard LaTeX document class (/usr/share/texmf-texlive/tex/latex/base/size10.clo) (/usr/share/texmf-texlive/tex/latex/base/exscale.sty)) No file tmp.aux. ! Undefined control sequence. l.3 \textpipe
33293
This is in Windows, but answers for other operating systems can be handy to others.  Most guides say something to the effect of "hold down the Alt key and type in the code on the keypad".  This works fine for decimal codes (like 65 for 'A'), but not for  codes (like  for 'A').  Some applicatons provide other facilities that will allow hexadecimal Unicode character codes to be typed and then transformed.  Word allows you to type the code (such as 200f) and then convert it to Unicode by typing Alt-X.  I'm looking for a general method of doing this that will work with the standard input.
87241
For some processes I use, I almost always run them as background processes by indicating that with "&amp;" at the end. Is there a way to make this standard? Would it be possible to use the alias command in the .bashrc file to do this?
32411
The title pretty much says it all: how can I type Unicode characters - specifically the em-dash —?
33598
As of now I'm using below line to print with out dot's  fprintf( stdout, "%-40s[%d]", tag, data);   I'm expecting the output would be something like following,   Number of cards..................................[500] Fixed prize amount [in whole dollars]............[10] Is this a high winner prize?.....................[yes]   How to print out dash or dot using fprintf/printf?
43114
Whenever I'm at the console login, I press up arrow intentionally to see the previously typed commands. But I see this ^[[A.  But when I press Ctrl Alt Print Screen Scroll Lock Pause Break Page Up Page Down Win keys doesn't echo any characters.  What might be the reason behind?  Does ^[[A sort of characters imply anything?
18666
amsfonts doesn't have lowercase caligraphic letters, so when you do $\mathcal{Hello World}$ you get some odd results. (Likewise for \mathbb I believe)  Now, what surprises me is not that there aren't lowercase mathcal letters, but that given this, the document compiles at all! What is going on that means that \mathcal{lowercase} is interpreted as being a string of random symbols? It seems what letter gets turned in to what symbol is constant, so this isn't just random: there's a reason why this happens as it does.  What is going on? Can some explain the details of what's happening beneath the surface that means that LaTeX interprets lowercase letters inside \mathcal as a variety of mathematical symbols?  [I don't understand enough to work out what tags would be relevant here...]