Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

< and > in text mode

239 views
Skip to first unread message

Bart Van Loon

unread,
May 2, 2004, 11:42:42 PM5/2/04
to
Hei,

is it possible to set the lesser and greater than symbol while in text mode?

I have a text in which I have to set a lot of <tags> and now they all
look like $<$this$>$. That's okay, as long as I don't want any extra
formatting on the tag. If I want a bold one for example, I need to
seperately make the parts in math mode bold from the part in text mode...

greetings,
Bart

Le TeXnicien de surface

unread,
May 3, 2004, 1:40:35 AM5/3/04
to
Bart Van Loon wrote / a écrit :

There are \textless and \textgreater. imho I, for one, would have made
a macro such as \newcommand{\Tag}[1]{\textless {#1}\texgreater} or
something to that effect.

> greetings,

hih

--
Le TeXnicien de surface

Maurizio Loreti

unread,
May 3, 2004, 1:34:18 AM5/3/04
to
Bart Van Loon <bbb...@kotnet.org> writes:

> is it possible to set the lesser and greater than symbol while in text mode?

\textgreater and the like?

--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy ROT13: ybe...@cq.vasa.vg

Philipp Lehman

unread,
May 3, 2004, 2:00:16 AM5/3/04
to
Bart Van Loon wrote:

> is it possible to set the lesser and greater than symbol while in
> text mode?

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
< >
\end{document}

--
Sender address blackholed, do not reply by email!
You can still reach me at plehman at gmx dot net.

Joerg Fischer

unread,
May 3, 2004, 9:57:14 AM5/3/04
to
* Philipp Lehman wrote:
> Bart Van Loon wrote:
>
>> is it possible to set the lesser and greater than symbol while in
>> text mode?
>
> \documentclass{article}
> \usepackage[T1]{fontenc}
> \begin{document}
>< >
> \end{document}

You mean probably \usepackage[latin1]{inputenc}

(instead of \usepackage[T1]{fontenc} which has nothing to do with
it).

Gruß,
Jörg

Ulrike Fischer

unread,
May 3, 2004, 10:18:39 AM5/3/04
to
Joerg Fischer <jf...@yahoo.de> schrieb:

Try the example with and without \usepackage[T1]{fontenc}.
Try the example with and without \usepackage[latin1]{inputenc}.

When do you get < > in the document?

--
Ulrike Fischer
e-mail: zusätzlich meinen Vornamen vor dem @ einfügen.
e-mail: add my first name between the news and the @.

Philipp Lehman

unread,
May 3, 2004, 10:35:33 AM5/3/04
to
Joerg Fischer wrote:

> * Philipp Lehman wrote:
>> Bart Van Loon wrote:
>>
>>> is it possible to set the lesser and greater than symbol while in
>>> text mode?
>>
>> \documentclass{article}
>> \usepackage[T1]{fontenc}
>> \begin{document}
>>< >
>> \end{document}
>
> You mean probably \usepackage[latin1]{inputenc}

Nope. This is not an input encoding problem. "<" and ">" are plain
Ascii.

> (instead of \usepackage[T1]{fontenc} which has nothing to do with
> it).

Did you even bother trying?

Stictly speaking, it's not an output encoding problem either. It's one
of CM's weird traits hence switching to EC will sidestep the issue.

Enrico Gregorio

unread,
May 3, 2004, 11:10:02 AM5/3/04
to
Joerg Fischer <jf...@yahoo.de> wrote:

Jörg, you are wrong. Choosing the T1 encoding has the side effect
of selecting the EC fonts, or other Cork-encoded, which have < and >
in the normal (ASCII) position.

The "correct" solution, however, is to use \textless and \textgreater
which work in any encoding.

Ciao
Enrico

Joerg Fischer

unread,
May 3, 2004, 3:02:25 PM5/3/04
to
* Philipp Lehman wrote:
> Did you even bother trying?

No, sorry.



> Stictly speaking, it's not an output encoding problem either. It's one
> of CM's weird traits hence switching to EC will sidestep the issue.

It is indeed weird, but switching to EC triggers additional side
effects. So the proper solution is \textless and \textgreater.

Cheers,
Jörg

Bart Van Loon

unread,
May 3, 2004, 4:50:08 PM5/3/04
to
Hi!

Le TeXnicien de surface wrote:
> Bart Van Loon wrote / a écrit :

>>is it possible to set the lesser and greater than symbol while in
>>text mode?
>>
>>I have a text in which I have to set a lot of <tags> and now they
>>all look like $<$this$>$. That's okay, as long as I don't want any
>>extra formatting on the tag. If I want a bold one for example, I
>>need to seperately make the parts in math mode bold from the part in
>>text mode...
> There are \textless and \textgreater. imho I, for one, would have made
> a macro such as \newcommand{\Tag}[1]{\textless {#1}\texgreater} or
> something to that effect.

Thanks a lot! I created the following commands now:

\newcommand{\opentag}[1]{\textless\mbox{#1}\textgreater}
\newcommand{\closetag}[1]{\textless\mbox{/#1}\textgreater}
\newcommand{\singletag}[1]{\textless\mbox{#1 /}\textgreater}

and they work just perfect for me.

greetings,
Bart

Robin Fairbairns

unread,
May 4, 2004, 8:08:21 AM5/4/04
to
Joerg Fischer <jf...@yahoo.de> writes:
>* Philipp Lehman wrote:
>> Did you even bother trying?
>
>No, sorry.
>
>> Stictly speaking, it's not an output encoding problem either. It's one
>> of CM's weird traits hence switching to EC will sidestep the issue.
>
>It is indeed weird, but switching to EC triggers additional side
>effects.

yeah. you get your hyphenation right.

outline fonts for cork encoding should not be a problem any more, with
current tex distributions.

> So the proper solution is \textless and \textgreater.

apart from the fact that they take a heck of a lot more typing.
--
Robin (http://www.tex.ac.uk/faq) Fairbairns, Cambridge

Joerg Fischer

unread,
May 4, 2004, 3:02:38 PM5/4/04
to
* Robin Fairbairns wrote:
>>It is indeed weird, but switching to EC triggers additional side
>>effects.
>
> yeah. you get your hyphenation right.

What is fix-cm intended for?
Hint:
% The appearance of the T1 and TS1 encoded CM fonts (aka `EC') is
% made as similar as possible to the traditional (OT1 encoded) ones.



> outline fonts for cork encoding should not be a problem any more, with
> current tex distributions.

Another example of causing side-effects.

>> So the proper solution is \textless and \textgreater.
>
> apart from the fact that they take a heck of a lot more typing.

Robin, you should learn more about capable text editors.

Cheers,
Jörg

Joerg Fischer

unread,
May 4, 2004, 3:05:28 PM5/4/04
to
* Bart Van Loon wrote:
> Thanks a lot! I created the following commands now:
>
> \newcommand{\opentag}[1]{\textless\mbox{#1}\textgreater}
> \newcommand{\closetag}[1]{\textless\mbox{/#1}\textgreater}
> \newcommand{\singletag}[1]{\textless\mbox{#1 /}\textgreater}

This looks like you are typesetting html or xml source text. If so,
using a package like `listings' could be another option.

Cheers,
Jörg

Robin Fairbairns

unread,
May 4, 2004, 5:49:04 PM5/4/04
to
Joerg Fischer <jf...@yahoo.de> writes:
>* Robin Fairbairns wrote:
>>>It is indeed weird, but switching to EC triggers additional side
>>>effects.
>>
>> yeah. you get your hyphenation right.
>
>What is fix-cm intended for?
>Hint:
> % The appearance of the T1 and TS1 encoded CM fonts (aka `EC') is
> % made as similar as possible to the traditional (OT1 encoded) ones.

by default T1/cmr/... etc. appear using very closely spaced optically
sized fonts. fix-cm causes latex to use a smaller number of optical
sizes for the ec fonts.

i don't use ec fonts for type 1 encoding, precisely because of the
embarrassing plethora of fonts: i use latin modern, which uses optical
sizes exactly the same as knuth's.

doesn't seem to me to have anything to do with hyphenation, which
doesn't work with standard tex, ot1 fonts, and most european
languages. (exception: english, which has a few diareses and a few
imported accents, only.)



>> outline fonts for cork encoding should not be a problem any more, with
>> current tex distributions.
>
>Another example of causing side-effects.

but not a serious one, any more.

>>> So the proper solution is \textless and \textgreater.
>>
>> apart from the fact that they take a heck of a lot more typing.
>
>Robin, you should learn more about capable text editors.

ho ho very droll.

you know, if i used word, i wouldn't show my arthritic fingers so much
-- it does the capitalisation at the start of sentences for me.

so it _does_ have its uses.

Joerg Fischer

unread,
May 5, 2004, 12:38:29 AM5/5/04
to
* Robin Fairbairns wrote:
> doesn't seem to me to have anything to do with hyphenation,

This is exactly the point. If someone likes to get the hyphenation
right, why you believe he likes to use different looking fonts?
This is what I call (unwanted) side-effects.

>>>> So the proper solution is \textless and \textgreater.
>>>
>>> apart from the fact that they take a heck of a lot more typing.
>>
>>Robin, you should learn more about capable text editors.
>
> ho ho very droll.

If you map Alt+, to \textless and Alt+. to \textgreater, you have
exactly the same amount of typing, and this is only the simplest
solution. Hence the argument about having more typing isn't
convincing.

Cheers,
Jörg

Robin Fairbairns

unread,
May 5, 2004, 7:24:02 PM5/5/04
to
Joerg Fischer <jf...@yahoo.de> writes:
>* Robin Fairbairns wrote:
>> doesn't seem to me to have anything to do with hyphenation,
>
>This is exactly the point. If someone likes to get the hyphenation
>right, why you believe he likes to use different looking fonts?
>This is what I call (unwanted) side-effects.

so don't use fonts that have a different look. easy.

i've said this three times now. you plainly know better than i do,
since i only use the things.

plainly no point in carrying on the exchange.

0 new messages