[OS X TeX] Invisible character

Ross Moore ross at ics.mq.edu.au
Fri Jun 23 03:15:19 CEST 2006


Hi Jonathan,

I know this thread has gone a long way since this message, but ...

On 23/06/2006, at 1:12 AM, Jonathan Kew wrote:

> On 22 Jun 2006, at 3:54 pm, Alain Schremmer wrote:
>>
>> 1) Robertson's macros do use the bullet as place-holder. But, 
>> occasionally, I use "sparse" tables in which I "leave [many 
>> place-holders] as-is" hence my quest for an invisible place-holder.
>
> Another option would be to redefine the bullet so that it disappears. 
> For example,
>
>   \catcode`\•=\active \def•{}
>
> will do this, by making the bullet character a macro that expands to 
> nothing.

Why make it a macro ?

Using  pdfeTeX  the character is ignored naturally,
   ---  unless you load a package that specifically alters its catcode;
   e.g.  utf8.def   sets it to a macro
                    •=macro:->\@inpenc at undefined@ {utf8} .
            and latin1.def  gives   •=macro:->\IeC {\textyen }.

    But you can get around this using:   \let •\relax
    (However, a space following the •  still has an effect.)

Leaving it unspecified (assuming no other input-encoding packages are 
used)
has an interesting consequence for portability (see below).


Another possibility is to set it to:    \catcode`\•= 15  (invalid 
character).
Now TeX will stop with a warning:

! Text line contains an invalid character.
l.32 •
       ••   •••
?

This is a pretty strong reminder that you've forgotten to do something.


Alternatively, you could try:
      \catcode`\•= 14  (comment character)
which makes the •  act in the same way as  % .

This now lets you write comments after the  •  to remind yourself of the
kind of data that needs to be inserted; e.g.,

\catcode`\•= 14
\begin{tabular}{lcrc}
• left-aligned text goes here
&• centered-text goes here
&• right-aligned text goes here
&• more centered-text goes here
\end{tabular}


>
> You'd need to place this *before* the \begin{tabular} or whatever, but 
> might want to place it *within* a surrounding environment such as 
> {centered}, so that the effect is contained and doesn't affect any 
> bullets that you may happen to use later in the document.

Yes, that is a good point about localizing the special meaning.


>
> (It wouldn't interfere with bullets auto-generated by LaTeX, e.g., by 
> {itemize}, only those that occur as literal characters in the input 
> text.)

There is another point that needs to be considered here.

If you tried leaving the •  totally unspecified, then beware of what 
happens when
you change processing engine.
For example, XeTeX would not see • as a benign character, to be ignored 
upon input,
but would place the • character itself into the output.

This suggests that perhaps XeTeX might allow an extra catcode value that
declares a character to be ignored on input, for compatibility with 
what can
be achieved with other engines such as eTeX and TeX itself.
         Just a thought.


>
> JK
>

Hope this helps,

	Ross

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list