Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4464

A two part notation question

From Ethan Dyer <ethansdyer@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject A two part notation question
Date 2011-08-19 10:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j2le74$ndf$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hi. I have a two part question regarding notation in general and OverBar 
in particular.

Part 1)

	There seems to be a peculiarity in the notation package which I 
would like to know how to get around. The following works correctly:

<<Notation`


Notation[ParsedBoxWrapper[OverscriptBox["x_","a"]]<=>ParsedBoxWrapper[RowBox[List["f","[","x_","]"]]]].

This replaces f[x_] with the letter "a" appearing over x_. What I really want to do is have f[x_] display as OverBar[x] for both input and output.

When I try to do this:


Notation[ParsedBoxWrapper[OverscriptBox["x_","_"]]<=>ParsedBoxWrapper[RowBox[List["f","[","x_","]"]]]].

I get an error because Notation interprets the underscore that should appear over the argument as another Blank to be matched.

My first question is how to do this correctly in the notation package?

Part 2)

	What is the way to do this correctly, not using Notation. I can do Format[f[x_]]:=OverBar[x] which works great for output. What is the correct way to have this also work for input, ie be able to copy and paste expressions with overbar apearing?

Thank you very much.

Ethan

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

A two part notation question Ethan Dyer <ethansdyer@gmail.com> - 2011-08-19 10:34 +0000
  Re: A two part notation question Simon <simonjtyler@gmail.com> - 2011-08-21 09:31 +0000

csiph-web