COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Angle brackets in text mode

• Email
• Follow

I am trying to figure out the correct way to enter angle brackets in
LaTeX text mode. Entering < and > directly translates into completely
different characters, \langle and \rangle are for math mode and so, I
have resorted to using \verb to produce them in text mode. Is this the
best way? It seems unlikely that I should have to use \verb to get them.

Thomas Arildsen

 0
Reply Thomas 11/2/2010 9:25:36 AM

See related articles to this posting

Thomas Arildsen <tha.es-aau-dk@spamgourmet.com> wrote:

> I am trying to figure out the correct way to enter angle brackets in
> LaTeX text mode. Entering < and > directly translates into completely
> different characters, \langle and \rangle are for math mode and so, I
> have resorted to using \verb to produce them in text mode. Is this the
> best way? It seems unlikely that I should have to use \verb to get them.
>
> Thomas Arildsen

\textlangle and \textrangle from textcomp are exactly for this;
but $\langle$text$\rangle$ works as well.

Ciao
Enrico

 0
Reply Enrico 11/2/2010 10:05:06 AM

On 2010-11-02 10:25, Thomas Arildsen wrote:
> I am trying to figure out the correct way to enter angle brackets in
> LaTeX text mode. Entering<  and>  directly translates into completely
> different characters, \langle and \rangle are for math mode and so, I
> have resorted to using \verb to produce them in text mode. Is this the
> best way? It seems unlikely that I should have to use \verb to get them.

In what (semantical) context do you want to use angle brackets?

/August

 0
Reply August 11/2/2010 10:48:06 AM

Enrico Gregorio <Facile.da.trovare@in.rete.it> writes:

> Thomas Arildsen <tha.es-aau-dk@spamgourmet.com> wrote:
>
>> I am trying to figure out the correct way to enter angle brackets in
>> LaTeX text mode. Entering < and > directly translates into completely
>> different characters, \langle and \rangle are for math mode and so, I
>> have resorted to using \verb to produce them in text mode. Is this the
>> best way? It seems unlikely that I should have to use \verb to get them.
>
> \textlangle and \textrangle from textcomp are exactly for this;
> but $\langle$text$\rangle$ works as well.

note that < and > are oddly represented only if you're using the
(default) ot1 encoding.

it _may_ be that your installation is configured so that simply adding

\usepackage[T1]{fontenc}

will sort the problem, but this is a non-trivial change if you're using
the default (computer modern) fonts.

i tend to use

\usepackage[T1]{fontenc}
\usepackage{lmodern}

but, again, that is only ok if your installation has the latin modern
fonts.  most recent installations do, but...
--
Robin Fairbairns, Cambridge

 0
Reply Robin 11/2/2010 10:59:26 AM

On 2010-11-02 11:05, Enrico Gregorio wrote:
> \textlangle and \textrangle from textcomp are exactly for this;
> but $\langle$text$\rangle$ works as well.

I think the general recommendation is to include complete expressions in
math mode. This is to get the correct spacing and sizes. In this
particular case it may not affect the output though but I would prefer
$\langle\mbox{text}\rangle$ over $\langle$text$\rangle$.

/August

 0
Reply August 11/2/2010 11:02:53 AM

Robin Fairbairns <rf10@sxp10.cl.cam.ac.uk> wrote:

> Enrico Gregorio <Facile.da.trovare@in.rete.it> writes:
>
> > Thomas Arildsen <tha.es-aau-dk@spamgourmet.com> wrote:
> >
> >> I am trying to figure out the correct way to enter angle brackets in
> >> LaTeX text mode. Entering < and > directly translates into completely
> >> different characters, \langle and \rangle are for math mode and so, I
> >> have resorted to using \verb to produce them in text mode. Is this the
> >> best way? It seems unlikely that I should have to use \verb to get them.
> >
> > \textlangle and \textrangle from textcomp are exactly for this;
> > but $\langle$text$\rangle$ works as well.
>
> note that < and > are oddly represented only if you're using the
> (default) ot1 encoding.
>
> it _may_ be that your installation is configured so that simply adding
>
>   \usepackage[T1]{fontenc}
>
> will sort the problem, but this is a non-trivial change if you're using
> the default (computer modern) fonts.
>
> i tend to use
>
>   \usepackage[T1]{fontenc}
>   \usepackage{lmodern}
>
> but, again, that is only ok if your installation has the latin modern
> fonts.  most recent installations do, but...

With \usepackage[T1]{fontenc} you get < and > with the corresponding
input, but I believe that these symbols should not be used in place
of angle brackets.

Ciao
Enrico

 0
Reply Enrico 11/2/2010 12:20:51 PM

On Tue, 02 Nov 2010 12:02:53 +0100, August Karlstrom wrote:

> On 2010-11-02 11:05, Enrico Gregorio wrote:
>> \textlangle and \textrangle from textcomp are exactly for this; but
>> $\langle$text$\rangle$ works as well.
>
> I think the general recommendation is to include complete expressions in
> math mode. This is to get the correct spacing and sizes. In this
> particular case it may not affect the output though but I would prefer
> $\langle\mbox{text}\rangle$ over $\langle$text$\rangle$.
>
>
> /August

Thanks to all for the suggestions. That made it a bit clearer.
Best regards,

Thomas Arildsen

 0
Reply Thomas 11/3/2010 9:41:39 AM

On Tue, 02 Nov 2010 11:48:06 +0100, August Karlstrom wrote:

> On 2010-11-02 10:25, Thomas Arildsen wrote:
>> I am trying to figure out the correct way to enter angle brackets in
>> LaTeX text mode. Entering<  and>  directly translates into completely
>> different characters, \langle and \rangle are for math mode and so, I
>> have resorted to using \verb to produce them in text mode. Is this the
>> best way? It seems unlikely that I should have to use \verb to get
>> them.
>
> In what (semantical) context do you want to use angle brackets?
>
>
> /August

I am using it to write things like (in some documentation):

Type 'help <function>' too see the help information.

Best regards,
Thomas Arildsen

 0
Reply Thomas 11/3/2010 9:43:16 AM

Le 03/11/2010 10:43, Thomas Arildsen a écrit :
> On Tue, 02 Nov 2010 11:48:06 +0100, August Karlstrom wrote:
>
>> On 2010-11-02 10:25, Thomas Arildsen wrote:
>>> I am trying to figure out the correct way to enter angle brackets in
>>> LaTeX text mode. Entering<   and>   directly translates into completely
>>> different characters, \langle and \rangle are for math mode and so, I
>>> have resorted to using \verb to produce them in text mode. Is this the
>>> best way? It seems unlikely that I should have to use \verb to get
>>> them.
>>
>> In what (semantical) context do you want to use angle brackets?
>>
>>
>> /August
>
> I am using it to write things like (in some documentation):
>
> Type 'help<function>' too see the help information.

The very standard package doc.sty used to make package documentations
defines \meta with
\ensuremath\langle ... \ensuremath\rangle

Precisely:

\DeclareRobustCommand\meta[1]{%
\ensuremath\langle
\ifmmode \expandafter \nfss@text \fi
{%
\meta@font@select
\edef\meta@hyphen@restore
{\hyphenchar\the\font\the\hyphenchar\font}%
\hyphenchar\font\m@ne
\language\l@nohyphenation
#1\/%
\meta@hyphen@restore
}\ensuremath\rangle
}

Yours sincerely.

>
> Best regards,
> Thomas Arildsen


 0
Reply GL 11/3/2010 12:40:48 PM

On Wed, 03 Nov 2010 13:40:48 +0100, GL wrote:

> Le 03/11/2010 10:43, Thomas Arildsen a écrit :
[snip]
>> I am using it to write things like (in some documentation):
>>
>> Type 'help<function>' too see the help information.
>
> The very standard package doc.sty used to make package documentations
> defines \meta with
> 	\ensuremath\langle ... \ensuremath\rangle
>
> Precisely:
>
> \DeclareRobustCommand\meta[1]{%
>       \ensuremath\langle
>       \ifmmode \expandafter \nfss@text \fi
>       {%
>        \meta@font@select
>        \edef\meta@hyphen@restore
>          {\hyphenchar\the\font\the\hyphenchar\font}%
>        \hyphenchar\font\m@ne
>        \language\l@nohyphenation
>        #1\/%
>        \meta@hyphen@restore
>       }\ensuremath\rangle
> }
>
>
> Yours sincerely.

Thanks, I will take a look at that too.
Best regards,

Thomas Arildsen

 0
Reply Thomas 11/5/2010 7:57:43 AM

On Wed, 03 Nov 2010 13:40:48 +0100, GL <gouailles@gmail.com> wrote:

>Le 03/11/2010 10:43, Thomas Arildsen a �crit :
>> On Tue, 02 Nov 2010 11:48:06 +0100, August Karlstrom wrote:
>>

[...]

>> I am using it to write things like (in some documentation):
>>
>> Type 'help<function>' too see the help information.
>
>The very standard package doc.sty used to make package documentations
>defines \meta with
>	\ensuremath\langle ... \ensuremath\rangle
>
>Precisely:
>
>\DeclareRobustCommand\meta[1]{%
>      \ensuremath\langle
>      \ifmmode \expandafter \nfss@text \fi
>      {%
>       \meta@font@select
>       \edef\meta@hyphen@restore
>         {\hyphenchar\the\font\the\hyphenchar\font}%
>       \hyphenchar\font\m@ne
>       \language\l@nohyphenation
>       #1\/%
>       \meta@hyphen@restore
>      }\ensuremath\rangle
>}

This seems strange to me. Does setting \hyphenchar\font
to -1 do anything important except turn off hyphenation?
Does setting \language to \l@nohyphenation do anything
important except turn off hyphenation? Are both needed?

I've always used
\ensuremath{\langle\mbox{\itshape#1\/}\rangle}
sometimes with different font selection command(s).
Of course \mbox prevents even manual hyphenation, but
this is something I've never needed.

Dan
To reply by email, change LookInSig to luecking

 0
Reply Dan 11/5/2010 4:51:36 PM

Le 05/11/2010 17:52, Dan Luecking a �crit :
> On Wed, 03 Nov 2010 13:40:48 +0100, GL<gouailles@gmail.com>  wrote:
>
>> Le 03/11/2010 10:43, Thomas Arildsen a �crit :
>>> On Tue, 02 Nov 2010 11:48:06 +0100, August Karlstrom wrote:
>>>
>
> [...]
>
>>> I am using it to write things like (in some documentation):
>>>
>>> Type 'help<function>' too see the help information.
>>
>> The very standard package doc.sty used to make package documentations
>> defines \meta with
>> 	\ensuremath\langle ... \ensuremath\rangle
>>
>> Precisely:
>>
>> \DeclareRobustCommand\meta[1]{%
>>       \ensuremath\langle
>>       \ifmmode \expandafter \nfss@text \fi
>>       {%
>>        \meta@font@select
>>        \edef\meta@hyphen@restore
>>          {\hyphenchar\the\font\the\hyphenchar\font}%
>>        \hyphenchar\font\m@ne
>>        \language\l@nohyphenation
>>        #1\/%
>>        \meta@hyphen@restore
>>       }\ensuremath\rangle
>> }
>
> This seems strange to me. Does setting \hyphenchar\font
> to -1 do anything important except turn off hyphenation?
> Does setting \language to \l@nohyphenation do anything
> important except turn off hyphenation? Are both needed?

\hypenchar\font=-1 does not turn hyphenation off, but set
the hyphen character to an empty character.

Now why not \mbox I don't known. doc.sty wants to stick
to TeX rather than LaTeX, although the command is defined
with \DeclareRobustCommand ...

> I've always used
>    \ensuremath{\langle\mbox{\itshape#1\/}\rangle}
> sometimes with different font selection command(s).
> Of course \mbox prevents even manual hyphenation, but
> this is something I've never needed.
>
>
> Dan
> To reply by email, change LookInSig to luecking


 0
Reply GL 11/5/2010 5:01:55 PM

GL <gouailles@gmail.com> writes:

> > This seems strange to me. Does setting \hyphenchar\font
> > to -1 do anything important except turn off hyphenation?

What do you mean by important?  Its detailed behaviour is
different from other methods.

> > Does setting \language to \l@nohyphenation do anything
> > important except turn off hyphenation? Are both needed?

Setting hyphenchar turns off hyphenation *by font*.
Setting language controls hyphenation by language region.
Setting \hyphenpenalty controls hyphenation by paragraph
(relevant value at end of paragraph).

> \hypenchar\font=-1 does not turn hyphenation off, but set
> the hyphen character to an empty character.

You are wrong.  However, setting it to a valid number but
an empty character slot does do hyphenation without any
hyphen character.  (The TeXbook used to say that missing
characters would inhibit hyphenation.)

--
Donald Arseneau                          asnd@triumf.ca

 0
Reply Donald 11/5/2010 6:44:56 PM

On Fri, 05 Nov 2010 18:01:55 +0100, GL <gouailles@gmail.com> wrote:

>Le 05/11/2010 17:52, Dan Luecking a �crit :
>> On Wed, 03 Nov 2010 13:40:48 +0100, GL<gouailles@gmail.com>  wrote:
>>
>>> Le 03/11/2010 10:43, Thomas Arildsen a �crit :
>>>> On Tue, 02 Nov 2010 11:48:06 +0100, August Karlstrom wrote:
>>>>
>>
>> [...]
>>
>>>> I am using it to write things like (in some documentation):
>>>>
>>>> Type 'help<function>' too see the help information.
>>>
>>> The very standard package doc.sty used to make package documentations
>>> defines \meta with
>>> 	\ensuremath\langle ... \ensuremath\rangle
>>>
>>> Precisely:
>>>
>>> \DeclareRobustCommand\meta[1]{%
>>>       \ensuremath\langle
>>>       \ifmmode \expandafter \nfss@text \fi
>>>       {%
>>>        \meta@font@select
>>>        \edef\meta@hyphen@restore
>>>          {\hyphenchar\the\font\the\hyphenchar\font}%
>>>        \hyphenchar\font\m@ne
>>>        \language\l@nohyphenation
>>>        #1\/%
>>>        \meta@hyphen@restore
>>>       }\ensuremath\rangle
>>> }
>>
>> This seems strange to me. Does setting \hyphenchar\font
>> to -1 do anything important except turn off hyphenation?
>> Does setting \language to \l@nohyphenation do anything
>> important except turn off hyphenation? Are both needed?
>
>\hypenchar\font=-1 does not turn hyphenation off, but set
>the hyphen character to an empty character.

From the TeXbook, page 454:
"If a suitable starting letter is found, let it be in
font~$f$. Hyphenation is abandoned unless the
^|\hyphenchar| of~$f$ is a number between 0 and~255,
inclusive."

Dan
To reply by email, change LookInSig to luecking

 0
Reply Dan 11/5/2010 6:56:18 PM

On 05 Nov 2010 11:44:56 -0700, Donald Arseneau <asnd@triumf.ca> wrote:

>GL <gouailles@gmail.com> writes:
>
>> > This seems strange to me. Does setting \hyphenchar\font
>> > to -1 do anything important except turn off hyphenation?
>
>What do you mean by important?  Its detailed behaviour is
>different from other methods.

OK: does it have a purpose inside the definition of \meta
apart from inhibiting hyphenation? Note that, unless the user
changes fonts inside the argument of \meta, the change to
\hyphenchar completely inhihits hyphenation.

>
>> > Does setting \language to \l@nohyphenation do anything
>> > important except turn off hyphenation? Are both needed?
>
>Setting hyphenchar turns off hyphenation *by font*.
>Setting language controls hyphenation by language region.
>Setting \hyphenpenalty controls hyphenation by paragraph
>(relevant value at end of paragraph).

Again, unless the user changes language inside the argument
of \meta, this change inhibits hyphenation.

The authors of \meta seems to have chosen definition that
inhibits hyphenation, but lets it occur if the argument
contains both a language and font change, or a discretionary.

So let me make my question clear: I was wondering why this
method was chosen, and was wondering if there were any side
effects that I was unaware of. If not, I can conclude they
wanted to inhibit hyphenation, but wanted to allow it
at discretionaries. (I imagine that no one would likely change
font and language.)

Dan
To reply by email, change LookInSig to luecking

 0
Reply Dan 11/8/2010 6:25:56 PM

Dan Luecking <LookInSig@uark.edu> writes:

> On 05 Nov 2010 11:44:56 -0700, Donald Arseneau <asnd@triumf.ca> wrote:
>
> >GL <gouailles@gmail.com> writes:
> >
> >> > This seems strange to me. Does setting \hyphenchar\font
> >> > to -1 do anything important except turn off hyphenation?
> >
> >What do you mean by important?  Its detailed behaviour is
> >different from other methods.
>
> OK: does it have a purpose inside the definition of \meta
> apart from inhibiting hyphenation?

Not that I know of.

> >> > Does setting \language to \l@nohyphenation do anything
> >> > important except turn off hyphenation? Are both needed?

Now I see what you (GL?) mean by " Are both needed?"

> The authors of \meta seems to have chosen definition that
> inhibits hyphenation, but lets it occur if the argument
> contains both a language and font change, or a discretionary.

Also, the \hyphenchar=-1 is important on installations
where the "nohyphenation" language was not built into the
format (latex.fmt).

> So let me make my question clear: I was wondering why this
> method was chosen, and was wondering if there were any side
> effects that I was unaware of. If not, I can conclude they
> wanted to inhibit hyphenation, but wanted to allow it
> at discretionaries. (I imagine that no one would likely change
> font and language.)

I can't speak for the authors, but I guess the two settings are a
belt-and-suspenders solution.

--
Donald Arseneau                          asnd@triumf.ca

 0
Reply Donald 11/9/2010 9:32:40 PM

On Nov 2, 9:25=A0am, Thomas Arildsen <tha.es-aau...@spamgourmet.com>
wrote:
> I am trying to figure out the correct way to enter angle brackets in
> LaTeX text mode. Entering < and > directly translates into completely

Hi,

amsmath is your friend when it comes to entering text in math mode:

\usepackage{amsmath}

$\langle\text{YOUR TEXT HERE}\rangle$

Note that the \langle and \rangle are already quite high as delimiters
of text expressions, which is why I didn't use \left\langle and \right
\rangle.

Regards,

Marc van Dongen

 0
Reply Marc 11/10/2010 1:36:47 PM

I took my first <a href="http://bestfinance-blog.com/topics/personal-loans">personal loans</a> when I was 25 and this aided my relatives a lot. But, I need the collateral loan once more time.
 0
Reply Aisha27Nguyen 12/22/2010 2:20:54 PM

On 02 Nov 2010 09:25:36 GMT, Thomas Arildsen wrote:
> I am trying to figure out the correct way to enter angle brackets in
> LaTeX text mode.

\usepackage{textcomp}

\textlangle \textrangle

http://www.ctan.org/tex-archive/info/symbols/comprehensive/

Bob T.

 0
Reply Bob 12/22/2010 2:52:35 PM

18 Replies
2509 Views

Similar Articles

12/19/2013 5:50:08 PM
page loaded in 47118 ms. (0)

 Reply:

Similar Artilces:

angualr bracket in text mode
Is there a way to draw <angular brackets> in text mode? hzmonte@hotmail.com wrote: > Is there a way to draw <angular brackets> in text mode? \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lmodern}% you might not need this line if you've got the CM-Super fonts \begin{document} here are some <angle brackets> \end{document} The reason this doesn't work by default is that LaTeX still uses Donald Knuth's Computer Modern fonts in their original encoding, which was optimised for space rather than consistency. He couldn't afford to include useles...

Angle brackets
Hello, What is the symbol for angle brackets? I need to use a set to represent a Martingale. Thank you, Schiz In article <e7hdqn$nht$1@geraldo.cc.utexas.edu>, Schizoid Man wrote: > What is the symbol for angle brackets? I need to use a set to represent > a Martingale. You mean something like \documentclass{minimal} \begin{document} $\langle x \mid y\rangle$ \end{document} Or read Herbert Voss's documentation about the Math Mode: ftp://cam.ctan.org/tex-archive/info/math/voss/mathmode/Mathmode.pdf -- Maarten Bergvelt Maarten Bergvelt wrote: > In article <...

text in mode
Hello in text-mode how can I modifiy the font and size of the text? underline and the rest using the keyboard. thanks > how can I modifiy the font and size of the text? underline and the > rest using the keyboard. For underline use: M-g u If you want to change the face type M-g o <ENTER> then the face you want to use. If you want to see which face are available type: M-x list-faces-display. Have a look in the menu for more information. For font size I only know <SHIFT>-<MOUSE-1> that give a menu to choose from but set it for the frame not only part of the text. Ho...

How to "draw" (print) "graphics" on black text screen (console)
I would like to "draw" polygons on console (black) screen in "text mode". That is, to draw '**'s instead of lines. Purpose is to let students activate polygon methods and see it on screen, even before they learn AWT and graphics. I wonder if there are freeware classes doing this. If not, how do I do gotoXY() in black console screen. That is, how do I control the cursor position ?. Also, is there a clearScreen () method ? How do I find the actual dimentions (in characters) of the screen ? (not necessarily 25X80). Or, how do I maximize it ? Thanks, Memi (highs...

Multiprogramming in the text mode
hello, Does multiprogramming really matters when the OS is in text mode?This is because when the OS is in text mode a user cannot run more than 2 or 3 programms in general.However,if the OS has a GUI support,then a user can run a large number of programs.Now he can open a large number of editors all at the same time in addition to doing other usual activities. So,my point is that if the OS supports only the text mode,then what is the use of multiprogramming in that OS? Thanks > Does multiprogramming really matters when the OS is in text > mode?This is because when the OS is in text...

Laptop in Text Mode
Just curious, my laptop in text mode has a large border around the screen. It always did this when I had windows on it and switched to either 800x600 or 640x480. Is there a way to make it fill the screen or get bigger anyway? It works just fine and everything is readable, I would just like to kick it up a bit. On 21 Aug 2003 10:32:40 -0700, Felwynne staggered into the Black Sun and said: > Just curious, my laptop in text mode has a large border around the > screen. It always did this when I had windows on it and switched to > either 800x600 or 640x480. Is there a way to make it ...

new text mode
Hi, we have a text-based simulator here. As I use emacs very often, I wonder if it is (easily) possible to do the following "sim"-mode: + highlight some keywords the simulator uses + comment lines in different color (a comment is a whole line beginning with '*' or '%' + highlight functions (such as sin or cos) As this is very simular to C-mode I wonder if I can reconfigure this. Thanks for any hint Michael -- Remove the sport from my address to obtain email www.enertex.de - Innovative Systeml�sungen der Energie- und Elektrotechnik On Oct 18, 11:07 am, Michael ...

display text mode?
Hi, I want to display something more in my startup.m. However, I had problems in doing so, even with the showcase sentences from Matlab help menu. Please see the following scripts: (matlab version 7.1) >> disp('jax', 'texmode', 'on') ??? Error using ==> disp Too many input arguments. >> disp('{\itEquation:} \alpha^2 + \beta^2 \rightarrow \gamma^2, \chi, \phi_3 = {\bfcool}', 'texmode','on') ??? Error using ==> disp Too many input arguments. The second one is from help menu 'disp command [1][2]'. Any comment or sugge...

Text mode switching
Hi everybody, Is there any way to switch from graphic mode to text mode in a konsole window? I mean the same way is done when a MSDOS window is open and press Alt+Enter to toggle modes. I currently use KDE. I know there is something like Ctl+Alt+F1 but this starts a new session and I want to keep the same window. Thanks in advance Marco On 2006-08-10, MACruzQ <macruzq@myway.com> wrote: > Is there any way to switch from graphic mode to text mode in a konsole > window? F11 ? it mostly depends on the kind of graphical terminal you're using. Davide -- Nahh, that impendin...