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


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

Re: getting empty lines when copying as MathML

From "Hobbs, Sylvia (DPH)" <sylvia.hobbs@state.ma.us>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: getting empty lines when copying as MathML
Date 2011-06-21 11:24 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <itpv1t$m7i$1@smc.vnet.net> (permalink)
References <201106210951.FAA20817@smc.vnet.net>

Show all headers | View raw


You could just paste the MathML code into Microsoft Word, then click on Edit, click on Find, type ^p^p, click on Replace, then type ^p, click on Replace all, then it becomes:

<math xmlns='http://www.w3.org/1998/Math/MathML'
    mathematica:form='StandardForm'
    xmlns:mathematica='http://www.wolfram.com/XML/'>
 <mrow>
  <msup>
   <mi>x</mi>
   <mn>2</mn>
  </msup>
  <mo>+</mo>
  <mrow>

If MathML code has been already pasted into text email or HTML and you are copying it from there, the paragraph mark becomes a manual line. So after pasting into Microsoft Word, then clicking on Edit, then Find, you would instead go to the bottom of the find and replace menu, click on special, click on manual line break twice, then click on Replace, type ^p, then Replace all.

Sylvia Hobbs
________________________________________
From: Cory Sand [yrocsand@gmail.com]
Sent: Tuesday, June 21, 2011 5:51 AM
Subject: getting empty lines when copying as MathML

Hi,
I sometimes use Mathematica generate MathML code for pasting into my HTML
pages. The problem is, every other line of code is an empty line. For
example,

<math xmlns='http://www.w3.org/1998/Math/MathML'

    mathematica:form='StandardForm'

    xmlns:mathematica='http://www.wolfram.com/XML/'>

 <mrow>

  <msup>

   <mi>x</mi>

   <mn>2</mn>

  </msup>

  <mo>+</mo>

  <mrow>

   <mn>3</mn>

   <mo>&#8290;</mo>

   <mi>x</mi>

  </mrow>

 </mrow>

</math>

Is there a way to get Mathematica to generate the code without the empty
lines?

Thanks=

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


Thread

Re: getting empty lines when copying as MathML "Hobbs, Sylvia (DPH)" <sylvia.hobbs@state.ma.us> - 2011-06-21 11:24 +0000

csiph-web