Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text to MathCAD 1

Status
Not open for further replies.

treddie

Computer
Dec 17, 2005
417
Hi.

I was wondering if there is a way to get MathCAD to recognize text on the clipboard as equations and not a bitmap image or simply text?
"Paste special" does not do it.

I am rather astounded that MathCAD seems to be so out of touch with the outside "text" world. Am I wrong in assuming it has no text-to-equation conversion ability?
 
Replies continue below

Recommended for you

A few people have written parsers to do that, but the program itself cannot. If the text is converted to the current Mathcad XML format, it would be able to read the equations. Since there is no universally accepted "text equation" format, this is hardly surprising, I think.

I don't think there are many users with a need to continually convert text equations, whatever that means, into native format.

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
Thanks, IRstuff, I will check further into the parsers.

I guess I'm one of the odd ones who needs to take long equations out of a text document every now and then and import them into MathCAD.

I know there is no universally accepted scheme, but at least many writers use the almost universal conventions +-*/() and ^ or **, and if anything is different, it surely is easier to make the mods to whatever is already there rather than having to start from scratch. Especially when you have to keep track of all the negative signs and such. Just seems like it's asking for trouble having to start from scratch all the time. I ALWAYS miss a negative sign here or there or accidentally see 2^3 as 2*3. :)
 
I just wish there was a translator from/to MathType which is on a lot more machines than LaTEX.

David
 
I think there could be a market for a math-translator program. I just do not see how it, in principle, would be that big of a deal. You could even customize to give it flexibility. Yet another thing to have to code in my stack of things to code! :)

I am buried in code that I have to write so that I can get back to the stack of code I MEANT to write. :)) IT NEVER ENDS!!!!
 
Well, I guess my way around that conundrum is to never write text equations, except in this forum. Otherwise, I do almost all equations in Mathcad, which is the 4 program I open up each morning. If there's even a remote possibility that you need that equation in Mathcad, why write in anything else?

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
Only because many times I work from existing documents written by others. In order to experiment and/or modify their equations to fit my immediate task, I only have two choices:
1. Copy their equations into MathCAD, which does not work.
2. Copy them in by hand.

For instance, right now I am working on a set of equations that have maybe a hundred terms each. It is very easy to introduce typos, so assuming the original equations themselves had no typos, then the amount of work is more than doubled because now I have to do a detailed proof of my OWN typing.
 
The one parser I supposedly have in my possession doesn't seem to work [cry]
Attached is PDF of a sample Mathcad sheet:
The general format appears to Polish Notation, i.e., operator preceeds all the operands. This is what the Mathcad sheet's XML looks like:
Code:
	<regions>
		<region region-id="4" left="6" top="27" width="25.5" height="12.75" align-x="18.75" align-y="36" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:define xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:id xml:space="preserve">b</ml:id>
					<ml:real>3</ml:real>
				</ml:define>
			</math>
			<rendering item-idref="1"/>
		</region>
		<region region-id="19" left="54" top="27" width="28.5" height="12.75" align-x="65.25" align-y="36" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:define xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:id xml:space="preserve">a</ml:id>
					<ml:real>15</ml:real>
				</ml:define>
			</math>
			<rendering item-idref="2"/>
		</region>
		<region region-id="11" left="114" top="27" width="28.5" height="12.75" align-x="125.25" align-y="36" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:define warning="WarnRedefinedBIUnit" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:id xml:space="preserve">c</ml:id>
					<ml:real>23</ml:real>
				</ml:define>
			</math>
			<rendering item-idref="3"/>
		</region>
		<region region-id="20" left="180" top="27" width="25.5" height="12.75" align-x="192.75" align-y="36" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:define xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:id xml:space="preserve">d</ml:id>
					<ml:real>2</ml:real>
				</ml:define>
			</math>
			<rendering item-idref="4"/>
		</region>
		<region region-id="2" left="78" top="75" width="50.25" height="12.75" align-x="105.75" align-y="84" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:plus/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:id xml:space="preserve">b</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>18</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="5"/>
		</region>
		<region region-id="5" left="78" top="99" width="41.25" height="18.75" align-x="92.25" align-y="114" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:pow/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:real>2</ml:real>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>225</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="6"/>
		</region>
		<region region-id="6" left="78" top="121.5" width="50.25" height="14.25" align-x="94.5" align-y="132" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:sqrt/>
						<ml:id xml:space="preserve">a</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>3.872983346207417</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="7"/>
		</region>
		<region region-id="7" left="78" top="147" width="41.25" height="12.75" align-x="96.75" align-y="156" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:mult/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:id xml:space="preserve">b</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>45</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="8"/>
		</region>
		<region region-id="8" left="78" top="158.25" width="32.25" height="27.75" align-x="92.25" align-y="174" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:div/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:id xml:space="preserve">b</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>5</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="9"/>
		</region>
		<region region-id="9" left="78" top="195" width="50.25" height="12.75" align-x="105.75" align-y="204" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:minus/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:id xml:space="preserve">b</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>12</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="10"/>
		</region>
		<region region-id="10" left="78" top="219" width="55.5" height="12.75" align-x="111" align-y="228" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:plus/>
						<ml:id xml:space="preserve">a</ml:id>
						<ml:apply>
							<ml:neg/>
							<ml:id xml:space="preserve">b</ml:id>
						</ml:apply>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>12</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="11"/>
		</region>
		<region region-id="21" left="78" top="245.25" width="76.5" height="42.75" align-x="120.75" align-y="276" show-border="false" show-highlight="false" is-protected="true" z-order="0" background-color="inherit" tag="">
			<math optimize="false" disable-calc="false">
				<ml:eval placeholderMultiplicationStyle="default" xmlns:ml="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
					<ml:apply>
						<ml:div/>
						<ml:apply>
							<ml:mult/>
							<ml:apply>
								<ml:div/>
								<ml:apply>
									<ml:plus/>
									<ml:id xml:space="preserve">a</ml:id>
									<ml:id xml:space="preserve">b</ml:id>
								</ml:apply>
								<ml:id xml:space="preserve">c</ml:id>
							</ml:apply>
							<ml:id xml:space="preserve">d</ml:id>
						</ml:apply>
						<ml:id xml:space="preserve">b</ml:id>
					</ml:apply>
					<result xmlns="[URL unfurl="true"]http://schemas.mathsoft.com/math30">[/URL]
						<ml:real>0.52173913043478259</ml:real>
					</result>
				</ml:eval>
			</math>
			<rendering item-idref="12"/>
		</region>
	</regions>[/code

TTFN

FAQ731-376
[url=http://www.telegraph.co.uk/news/worldnews/asia/china/8191790/China-blocks-websites-ahead-of-Nobel-Peace-Prize-ceremony.html]Chinese prisoner wins Nobel Peace Prize[/url]
 
Well,by the looks of it, I might have my work cut out for me writing my own parser, unless I can find one that works.

It just seems odd that MathCAD is at version 14, and is still back in the 80s when it comes to interoperability, or at least a decent set of import/export converters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor