f

#### Help with \left and \right

I like to use the following command

\newcommand{\set}[1]{\left\{#1\right\}}

Hence \set{1,2,3} is typeset as

{1,2,3}

My problem is that the useage of \left...\right dosen't allow
linebreaks in between the delimiters. Hence I often get overfull hbox
warnings and lines continuing too far into the margin. The alternative
is to define \set without using \left and \right and loose the nice
feature of always have the brackets being the right size when used in
displayed equations.

What I would like to do is define \set to use \left...\right if it is
used in displaymath mode and use \{...\} if it is in text or math mode.
Is there a way to do this without having to define two different
commands?


 0
6/13/2006 6:40:58 AM
comp.text.tex 39027 articles. 3 followers.

3 Replies
549 Views

Similar Articles

[PageSpeed] 34

SomeGuy wrote:
> I like to use the following command
>
> \newcommand{\set}[1]{\left\{#1\right\}}
>
> Hence \set{1,2,3} is typeset as
>
> {1,2,3}
>
> My problem is that the useage of \left...\right dosen't allow
> linebreaks in between the delimiters. Hence I often get overfull hbox
> warnings and lines continuing too far into the margin. The alternative
> is to define \set without using \left and \right and loose the nice
> feature of always have the brackets being the right size when used in
> displayed equations.
>
> What I would like to do is define \set to use \left...\right if it is
> used in displaymath mode and use \{...\} if it is in text or math mode.
> Is there a way to do this without having to define two different
> commands?
>

well, this will not auto scale but it is help full none the less

use the mathtools package, and then

\DeclarePairedDelimiter\set{\{}{\}}

now

\set{x,y}        = \{x,y\}
\set[\big]{x,y}  = \bigl\{x,y\bigr\}
....
\set[\Bigg]{x,y} = \Biggl\{x,y\Biggr\}
\set*{x,y}       = \left\{x,y\right\}

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ:      http://www.tex.ac.uk/faq
LaTeX book:     http://www.imf.au.dk/system/latex/bog/    (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl

 0
daleif2 (2648)
6/13/2006 8:25:03 AM
> use the mathtools package, and then
>
> \DeclarePairedDelimiter\set{\{}{\}}
>
>
> now
>
> \set{x,y}        = \{x,y\}
> \set[\big]{x,y}  = \bigl\{x,y\bigr\}
> ...
> \set[\Bigg]{x,y} = \Biggl\{x,y\Biggr\}
> \set*{x,y}       = \left\{x,y\right\}
>

Thanks. That helps a lot.

I'm going to see if I can trap certain environments like equation and
align.

Something like this

\DeclarePairedDelimiter\setbrackets{\{}{\}}
\newcommand{\set}[1]{ \setbrackets{#1}}

\newenvironment{Equation}
{ \renewcommand{\set}[1]{\setbrackets*{#1}
$$} { \renewcommand{\set}[1]{\setbrackets{#1}$$ }

However I'd have to define this for every environment that uses
displaymath (and their * versions too).


 0
6/13/2006 9:45:19 PM
SomeGuy wrote:
>> use the mathtools package, and then
>>
>> \DeclarePairedDelimiter\set{\{}{\}}
>>
>>
>> now
>>
>> \set{x,y}        = \{x,y\}
>> \set[\big]{x,y}  = \bigl\{x,y\bigr\}
>> ...
>> \set[\Bigg]{x,y} = \Biggl\{x,y\Biggr\}
>> \set*{x,y}       = \left\{x,y\right\}
>>
>
> Thanks. That helps a lot.
>
> I'm going to see if I can trap certain environments like equation and
> align.
>
> Something like this
>
> \DeclarePairedDelimiter\setbrackets{\{}{\}}
> \newcommand{\set}[1]{ \setbrackets{#1}}
>
> \newenvironment{Equation}
>                 { \renewcommand{\set}[1]{\setbrackets*{#1}
> $$} > { \renewcommand{\set}[1]{\setbrackets{#1} >$$ }
>
> However I'd have to define this for every environment that uses
> displaymath (and their * versions too).
>

blindly using \left\right in displayed math is generally not a good idea.

\left(\sum_{\substack{i<j\\i\in K}}\right)

/daleif


 0
daleif (791)
6/13/2006 11:56:09 PM

Similar Artilces:

Text widget with mixed left-to-right and right-to-left Unicode text abilities?
Hi, is there one of these? If not I might have a go at writing a simple one of them.... Apologies if this is a FAQ, I did search the archive a bit before posting. Best, Charles. ...

textarea: get text left and right from selected text
Hello everybody, I am looking for a method to get the text on the left and the right side if a user selects some text in a textarea. Regards Mario *** mariomueller escribi�/wrote (23 Aug 2006 12:31:43 -0700): > I am looking for a method to get the text on the left and the right > side if a user selects some text in a textarea. This article may help: http://www.quirksmode.org/js/selected.html -- -+ http://alvaro.es - �lvaro G. Vicario - Burgos, Spain ++ Mi sitio sobre programaci�n web: http://bits.demogracia.com +- Mi web de humor con rayos UVA: http://www.demogracia.com -- Hi ...

what does SHIFT-left-or-right of up-down-left-right do?
Well, I know about shift up-and-down: shift-right ("red" or whatever) up and down on choose-box, HIST, things like that, take the cursor all the way to the beginning or the end. shift-left ("white") on up and down scroll the screen-full up or down (the FIRST such click *stupidly* goes to the final CURRENTLY-ON-SCREEN choice or whatever (meaning TWO double-button-pushes to scroll-down that FIRST time.) What are some of the OTHER possibilities, ie with the left and right arrows? Oh, apparantely undocumented, I've found (via mistaken key-pushes) that RIGHT-arrow will do a SWAP (on stack), and that an UP-arrow gets you into HIST (that HIST is *one nice feature*!) Other tricks with those arrows? Thanks! David David Combs wrote: > Well, I know about shift up-and-down: > > shift-right ("red" or whatever) up and down on > choose-box, HIST, things like that, take the > cursor all the way to the beginning or the end. > > shift-left ("white") on up and down scroll the > screen-full up or down (the FIRST such click > *stupidly* goes to the final CURRENTLY-ON-SCREEN > choice or whatever (meaning TWO double-button-pushes > to scroll-down that FIRST time.) > > > What are some of the OTHER possibilities, ie with the > left and right arrows? > > > Oh, apparantely undocumented,...

Right-to-left text
I come back to right-to-left text such as Arabic and Hebrew. (Previous thread was "non-Latin-1 in iCab 3".) My test page http://www.unics.uni-hannover.de/nhtcapri/right-to-left.html lists all HTML and CSS constructs for bidirectional text. It uses only ASCII digits! You do not need to know Arabic or Hebrew; you don't even need fonts with Arabic or Hebrew letters. If your browser passes this test, it is likely to display Arabic and Hebrew pages correctly. ...

does PHP read left to right or right to left?
I've two functions. currentHeadline looks in $_GET for a variable called 'image' and prints what it finds. showThumbnail takes an image for a parameter and resizes it before sending it to the screen. But when I do this: <?php showThumbnail(currentImage(), 20, 20); ?> showThumbnail is telling me that it is not being given a file name, and currentImage is printing the file name to the screen. How is that possible? What is the right way to do this? lawrence k wrote: > I've two functions. currentHeadline looks in$_GET for a variable > called 'image' and pr...

LEFT + LEFT vs LEFT + RIGHT
In order to do a full outer join in MySQL one must use a union. Is there any good reason to do SELECT ... LEFT JOIN UNION SELECT ... RIGHT JOIN rather than SELECT ... LEFT JOIN UNION SELECT ... LEFT JOIN with the tables swapped on the latter LEFT JOIN? Paul Lautman wrote: > In order to do a full outer join in MySQL one must use a union. > Is there any good reason to do > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > RIGHT JOIN > > rather than > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > LEFT JOIN > ...

Text and Image inside table <td> Alight Text Left and Image right in same cell ??
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg" runat=server /> </asp:Label> </td> <td > On 2006-10-24, Jason <jason@cyberpine.com> wrote: > Is that possible? How? Set text-align: left on the cell as usual (it's likely to be the default), and make the image float: right. To work around a Firefox float bug, better to put the image befor...

Help Help Help Help Help
please,help us . we have a seious problem, we are designing a radio controlled car that is guided by the PC, to send the data wireless between the PC and the Car and vice versa. we use 2 transmitter/reciever circuits from 2 seperate radio controlled car each running with a different frequency (27 MHz & 40 MHz)and modify the functionality of each to do the disered work. but on mounting a transmitter(40MHz) and reciever(27MHz) on the car, and attach another transmitter(27MHz) and reciever(40MHz) to the PC; we found that on sending signals from the car to the PC on the transmitter & rec...

Right to left text area
Hi, I have been trying to get right to left text working for a while now. What I want is a JTextArea, with my own very specific font (for a middle-eastern language that is RTL). I have the TTF font, and I can get the JTextArea to type with this font. I have even devised a way to map key strokes on the keyboard to the glyphs from the font that I want. What I cannot figure out is how to make this text start and flow from the right to the left. I have tried all variations of setComponentOrientation() and setAlignmentX(). I have even tried creating my own DefaultKeyTypedAction() that...

right to left text field
just i want to change the direction of the writing in the text field to be from right to left. I tried Font.layoutGlyphVector but I don't know how to set the arguments especailly the first and the second arguments. Am i in the right way or there is another way? pls help. polaris wrote: > just i want to change the direction of the writing in the text field > to be from right to left. I tried Font.layoutGlyphVector but I don't > know how to set the arguments especailly the first and the second > arguments. Am i in the right way or there is another way? pls help. > Mayb...

help!help!help!help!
I am a student.I am going to make a simulation of a robot (FANUC Robot M-16iB) under the matlab\simulink environment . It is a normal 6DOF robot.I want to realize any angle and any speed (under the max speed) and any position and orientation control. As I just starting to do this new field,I have no experience about it. Can you give me some simulation demo or examples for 6DOF robot? I am very eager to get these.Please write back to me as soon as possible,thank you! Sincerely, Connie&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288; zhanglijuan920@sohu.c...

input text right to left
Hi, I am new to java. Am creating a math page for teachers. I have math problems where the input needs to be right to left (e.g. adding two several digit numbers in a column). Is there an easy way to specify that the text insertion point needs to move from right to left instead on the standard left to right? I tried the direction property, but that doesn't seem to work. kd ROBT NISHIDA <kddran.6.26.83@verizon.net> wrote: > I am new to java. Am creating a math page for teachers. I have math > problems where the input needs to be right to left (e.g. adding two several > digit numbers in a column). Is there an easy way to specify that the text > insertion point needs to move from right to left instead on the standard > left to right? I tried the direction property, but that doesn't seem to > work. What kind of "math page" do you mean? HTML as part of a web application? Part of an applet? Please specify, as the answer depends on this. The possibilities I can think of are: - Part of an HTML page: Look at the HTML specification, or one of the dozens reference manuals on HTML. - Part of a Swing interface (either an application or an applet): Have a look at the Java API for ypou input elements. Especially alignment. -- Oscar Kind http://home.hccnet.nl/okind/ Software Developer for contact information, see website PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61...

help
Im working with Java. Im writing this program right now.....and one of the thing i have to do is present a matrix onto the screen....my problem is that i dont know how to make to make the far right colum of the matrix to be right aligned. Any help will be much appreciated heres what i have right now 0.000 0.000 0.000 2.000 0.000 0.000 0.000 12.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 138.000 HERES WHAT I WANT 0.000 0.000 0.000 2.000 0.000 0.000 0.000 12.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 138.000 Please help System.out.prin...

Changing x-axis plot from right to left to left to right
Hi, For mathematical reasons, I need to change the way that gnuplots my data along the X axis from right to left to left to right (that is, at the minute it plots from 20 down to 1, not from 1 to 20) I am aware of set xrange reverse but this just inverts the whole graph and displays from 17 .... 1 down along the x-axis rather than plotting the other way round. I'm rather stuck and would appreciate some advice. Regards Jamie On 14.08.2012 17:52, Jamie Rees wrote: > For mathematical reasons, I need to change the way that gnuplots my > data along the X axis from right to left to left to right (that is, > at the minute it plots from 20 down to 1, not from 1 to 20) That makes no sense whatsoever. gnuplot generates some kind of picture. It makes absolutely no difference whatsoever whether a line was drawn from left to right or right to left --- it'll be the same line in the end, consisisting of exactly the same pixels being coloured. So since this doesn't make sense, maybe you should tell us what your actual problem is, so we can find out how that might be solved. On Tuesday, August 14, 2012 6:12:33 PM UTC+1, Hans-Bernhard Br=F6ker wrote: > On 14.08.2012 17:52, Jamie Rees wrote: >=20 >=20 >=20 > > For mathematical reasons, I need to change the way that gnuplots my >=20 > > data along the X axis from right to left to left to right (that is, >=20 > > at the minute it plots from...

HELP : right to left property
Hello My VB6 project is prepared and compiled on my machine. Right to Left Property has been set to true on all forms. all Menus are showing Right aligned. When I install the application on other computer, the Right to Left Property is LOST. Neither the form, nor the controls (having RTL ability) are preserving the Right to Left Property. Is there any DLL that I should ship with the Setup Package ? Thanks tahaminejad@hotmail.com (shadi)'s wild thoughts were released on 11 Mar 2005 08:21:35 -0800 bearing the following fruit: >Hello >My VB6 project is prepared and c...

Right to Left Hebrew Help Compiling
Recently I wrote a condensed Windows Hypertext user manual using Shalom Help Maker on Paint Shop Pro 7. My manual used text and BMP graphics. I would like to compile a translated manual to Hebrew. I am using Windows XP English and also configured for right to left typing. What is the best way to go about this? Obviously the typing is right to left direction. The only work around that I can think of is to make a picture of the text, and then add the picture. Time consuming at best, and demands Gif converted to BMP in order to work and accept links. Do you have any ideas?...

How to have left and right aligned text on same line?
Hi, I wish to have text both left and right aligned on the same line. This is so appropriate bits of text will fall under either of a pair of images floated left and right. I have tried something like: CSS file: span.right {text-align: right} HTML file: <p> The Isle of Man, where I was born and grew up. <span class="right">Canada, where I choose to live.</span> </p> but it doesn't appear to work. I guess this is because 'text-align' applies to block containers, and so to the whole paragraph (not p...

right-to-left text entry
I am modifying an application that uses OpenMotif 2.2.3 on Red Hat EL 3.0 I need to allow a user to enter text into a single line text entry field in right-to-left order (for Arabic input). Is this at all possible? Is there any documentation anywhere about it? I have scoured Google, to no avail. I have tried playing with a verification callback on the text entry widget, but can't seem to get the cursor to behave in a sensible fashion. Please, can anyone help? Thanks. ...

Arabic (right-to-left) TeX (not arabtex)
Hi there, I'm looking for a TeX package that will allow entry of arabic (right-to-left) text. A know of arabTeX, but this apparently only accepts ascii left-to-right transliterated text rather than 'the real thing'. I hear e-TeX can do it. Can anyone suggest where I can obtain this, or any other suitable package? Many thanks Waleed On Mon, 29 Nov 2004 10:18:36 -0000, Waleed <wax@liv.ac.uk> wrote: > Hi there, > > I'm looking for a TeX package that will allow entry of arabic > (right-to-left) text. > > A know of arabTeX, but this apparently onl...

Equation numbering left *and* right
Hello, could anybody help me with the following question. I use Plain TeX from PCTeX (thus, no LATEX). Suppose you are writing a maximization problem of a certain function, and you want to do the following when writing the first order conditions: on the LEFT border you want the maximizing variable to appear, on the RIGHT hand border, you want the equation number to appear; like this: z_1: f'(z_1, z_2) - C'(z_1,z_2) (15) The idea is that there are several partial first order conditions. I tried to use \eqno and \leqno. The problem is that you cannot use t...

text box orientation right to left
Hi, I am new to java. Am creating a math webpage for teachers. I have math problems where the input needs to be right to left (e.g. adding two multi-digit numbers in a column). Is there an easy way to specify that the caret position needs to move from right to left instead of the standard left to right? kd "kd dolezal/rob nishida" <kddran.6.26.83@verizon.net> wrote in message news:<QGtgd.926\$vJ.799@trnddc02>... > Hi, > > I am new to java. Am creating a math webpage for teachers. I have math > problems where the input needs to be right to left (e....

Equation with right or left flushed text
I want to have some "standard" equations, possible within gather or similar environments, with centered formula bodies but want to have a zero width box containing text at the extreme left. For example I would like output to look like this: Einstein's Formula E = mc^2 (23) where (23) is the equation number, E=mc^2 is centered (or positioned as it should be within given environment) without regard to widths of Einstein's Formula or (23). \shoveleft seems only to go back to the left most part of series of equations rather than the left margin. Any suggestions or help gratefully appreciated. ds david.mrlucky.schwartz@gmail.com wrote: > I want to have some "standard" equations, possible within gather or > similar environments, with centered formula bodies but want to have a > zero width box containing text at the extreme left. For example I > would like output to look like this: > > Einstein's Formula E = mc^2 (23) > > where (23) is the equation number, E=mc^2 is centered (or positioned > as it should be within given environment) without regard to widths of > Einstein's Formula or (23). \shoveleft seems only to go back to the > left most part of series of equations rather than the left margin. > > Any suggestions or help gratefully appreciated. ds \begin{flalign} \text{Einstein's Formula} & E &= mc^2 && \end{flalign} untested /daleif ...

Konqueror fails on right-to-left text
Support for right-to-left text in Konqueror is not as good as in Firefox 2 or in Internet Explorer 7. FYI, this is my bug report: https://bugs.kde.org/show_bug.cgi?id=165509 The test page (which displays OK in Firefox and IE 7) is http://freenet-homepage.de/prilop/right-to-left.html http://www.unics.uni-hannover.de/nhtcapri/right-to-left.html -- I used to believe in reincarnation in a former life. ...

Right to left writing in text widget
Hi Everybody, I have a request concerning to typing text right to left in a text widget. I have no idea how to solve this problem. Is there anybody hwo has an answer? With the Best: Zsolt -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to majordomo@lists.stanford.edu ...

Web resources about - Help with \left and \right - comp.text.tex

Trump calls China's Tiananmen protests a 'riot'
The outspoken billionaire made the remark during a televised debate late Thursday when asked about the student-led protests and subsequent government ...

Apple irony: Can you trust the FBI if conspiracy claims Hoover ordered the assassination of Kennedy
The Department of Justice on Thursday sent a strongly worded message to Apple over the iPhone encryption battle with the FBI. The DOJ said the ...

Captain America: Civil War trailer 2 shows Avengers beatdown
The movie might be called Captain America: Civil War, but it looks more like an Avengers flick in the second trailer for the film that has just ...

Jessica Chaffin & Diana Maria Riva Join CBS’ Matt LeBlanc Comedy Pilot
Jessica Chaffin ( Spy ) and Telenovela ‘s Diana Maria Riva have been cast opposite Matt LeBlanc in CBS ' untitled LeBlanc/Filgos comedy pilot ...

Tom Wheeler, chairman of the US Federal Communications Commission (FCC), took to The Huffington Post to share news of his latest proposal which ...

ECB's Mario Draghi unveils stimulus package, but signals end to rate cuts
​European Central Bank chief Mario Draghi unleashed a bold easing package on Thursday, cutting rates and expanding asset buys, but undid the ...

Escaped Mississippi murder suspect killed
Escaped murder suspect Rafael Arnez McCloud was shot dead Thursday during a home burglary in Vicksburg, Mississippi, Warren County Sheriff Martin ...

Android N Comes With Data Saving Features
Having apps run and update themselves in the background is great if you wish to be more efficient and launch apps that won’t need refreshing. ...

NFL Rumors: Chris Long Leaving Los Angeles Rams For Dallas Cowboys
NFL rumors have swirled around the Dallas Cowboys looking to upgrade their defensive line. While some still believe that a backup quarterback ...

LGBT ‘Star Wars’ Characters: A Brief History
A lot has changed in the last few years when it comes to LGBT “Star Wars” characters. For the longest time there were almost none. Now we’ve ...

Resources last updated: 3/11/2016 11:56:19 AM