Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Question regarding Mathematica's treatment of whitespace

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61828] Re: [mg61808] Re: Question regarding Mathematica's treatment of whitespace
  • From: <bsyehuda at gmail.com>
  • Date: Mon, 31 Oct 2005 06:10:05 -0500 (EST)
  • References: <200510300443.AAA09795@smc.vnet.net> <dk28rb$e6u$1@smc.vnet.net> <200510310617.BAA28505@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Chris,
Although not you wanted, but you can always triple left-click with the mouse
on a parenteses or brackets (curly / square) and the front end will select
the relevant code covered by it. Also if you triple left-click on a head of
an expresion it will select all the code that is enclosed by this head.
Until a decent coloring will be implemented in the front end (I believe it
will) you can use this property
yehuda

On 10/31/05, Steven T. Hatton <hattons at globalsymmetry.com> wrote:
>
> Chris Chiasson wrote:
>
> > I don't know how to do it, but it may be easier to change the way that
> > the Mathematicia Front End automatically indents/spaces code to your
> > "one true braces form" (to quote Joel Spolsky without looking up the
> > real quotation...)
>
> The rule Mathematica uses to determine if input is terminated by and end
> of
> line marker, which I suspect is '\n', is whether the line constitutes a
> syntactically complete expression myFunction[x_]:=Module\n does constitute
> such an expression. This may not seem intuitive to people accustomed to
> strongly typed and highly structured languages such as C or C++. One
> alternative is to use
> myFunction[xx_]:=
> Module[
> {
> x=xx;
> }.
> DoSomething[x]
> ]
>
> I really wish there were better syntax highlighting, particularly with
> parentheses. Trying to sort out where things begin and end in deeply
> nested boxes can be maddening. Forget for the moment that Mathematica
> doesn't provide the named entity references in MathML when you copy from a
> cell, and consider who much easier it is to find the ends of nesting
> component in the following (admittedly verbose) representation:
>
> <math xmlns='http://www.w3.org/1998/Math/MathML'>
> <mn>5) </mn>
> </math>
> <math xmlns='http://www.w3.org/1998/Math/MathML'>
> <mrow>
> <mrow>
> <mi>M</mi>
> <mtext> </mtext>
> <mo>&#8834;</mo>
> <mtext> </mtext>
> <mi>&#8469;</mi>
> </mrow>
> <mtext> </mtext>
> <mo>&#8717;</mo>
> <mtext> </mtext>
> <mrow>
> <mrow>
> <mn>0</mn>
> <mtext> </mtext>
> <mo>&#8712;</mo>
> <mtext> </mtext>
> <mi>M</mi>
> </mrow>
> <mtext> </mtext>
> <mo>&#8743;</mo>
> <mtext> </mtext>
> <mrow>
> <mo>(</mo>
> <mrow>
> <mrow>
> <mi>m</mi>
> <mo>&#8712;</mo>
> <mi>M</mi>
> </mrow>
> <mtext> </mtext>
> <mo>&#62755;</mo>
> <mtext> </mtext>
> <mrow>
> <msup>
> <mi>m</mi>
> <mo>&#8242;</mo>
> </msup>
> <mo>&#8712;</mo>
> </mrow>
> </mrow>
> <mo>)</mo>
> </mrow>
> </mrow>
> </mrow>
> </math>
>
>
> Put that in your FrontEnd and `C-E' the cell (IOW, Ctrl+Shift-e). It often
> happens that Mathematica doesn't correctly format expressions similar to
> this, and I am forced to go in an untangle it. That is not my idea of fun.
> --
> "Philosophy is written in this grand book, The Universe. ... But the book
> cannot be understood unless one first learns to comprehend the language...
> in which it is written. It is written in the language of mathematics, ...
;
> without which wanders about in a dark labyrinth." The Lion of Gaul
>
>


  • Prev by Date: Re: Exporting notebooks to xml (cnxml)
  • Next by Date: problem with making boxes
  • Previous by thread: Re: Question regarding Mathematica's treatment of whitespace
  • Next by thread: Re: Question regarding Mathematica's treatment of whitespace