Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sample Cell 1 words with spaces in one inline cell

Cell[TextData[Cell[BoxData[\(TraditionalForm\`\(Y\ =\ \(\({\(x\ \[Element]\ \([\(a,\ b\)]\)\)\ :\ \(there\ is\ a\ finite\ subcover\ in\ \(\[Sum]\ \(of\ the\ \(interval\ [\(a,\ x\)]\)\)\)\)}\) .\ \)\)\)], "InlineFormula", FormatType -> "TraditionalForm"]], "Text"]

When saving it as Tex, or Copy As Latex, the spaces between words will lost,

What's the right and good method to deal with such thing? The worst is each time this happen, I modify it in Tex Editor.


As Silva's answer suggested, creating text cell for inline words block. What occurred in my mind is to develop some palletes like this post(my prevous quesion) to do the similar thing. How to make AutoAction take effect only one time?


As you see in the picture, I'm handling the InlineFormula with blue color. In the biggest blue block, there are two words blockthere is a finite subcover in and of the interval. Consider one possible situation, there are five or more words block in the inline cell with depth 2. enter image description here

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I guess that is because you put your text all in an "InlineFormula" Cell, which is an equivalent to the LaTeX inline formula environment (i.e. $...$), so they are understand as many variables multiply together. And as you know, spaces between multipliers are omitted by default.

The following code works on my computer:

Cell[TextData[
   Cell[BoxData[FormBox[RowBox[{"Y", "=", RowBox[{"{", RowBox[{

            RowBox[{"x", "\[Element]", 
              RowBox[{"[", RowBox[{"a", ",", "b"}], "]"}]}],

            Cell[": there is a finite subcover in ", "Text"],

            "\[CapitalSigma]",

            Cell[" of the interval ", "Text"],

            RowBox[{"[", RowBox[{"a", ",", "x"}], "]"}]
            }], "}"}]}], TraditionalForm]]]], "Text"] // CellPrint

enter image description here

Then copy the printed cell into a new notebook and save it as TeX:

enter image description here

Render it with mathjax engine on this site:

$Y=\{x\in [a,b]\text{: there is a finite subcover in }\Sigma \text{ of the interval }[a,x]\}$

share|improve this answer
    
hi, Suppose my default new inline cell style is InlineFormula, then I selected the content(Y={x...[a,x]}) in one Text-Style cell and type ctrl+( to create one inline cell, but if I choose the words there is a finite subcover in and create another inline cell, it's style is also InlineFormula unless I changed style to Text, and futher, if there are 5 parts of words block, I should select 5 times and change inline cell style, seems too boring. –  HyperGroups Jun 7 '13 at 3:57
    
@HyperGroups yes it's annoying.. There used to be a typesetting system made by Wolfram Research called Publicon, maybe you would like to try it. –  Silvia Jun 7 '13 at 4:09
1  
Wolfram has discontinued the sale of Publicon. Publicon's advanced technical publishing capabilities are merging into functionality in Mathematica and other Wolfram technologies.wolfram.com/products/publicon Seems that's not a long-run choice. –  HyperGroups Jun 7 '13 at 4:15
    
I've updated the post and added one prevous link about a pallete to create and flatten inline cells. The inconvenient is I should move my mouse/cursor to the pallete, If there would be some similar function like Format-Brush in Microsoft-Word, that would be better. –  HyperGroups Jun 7 '13 at 4:19
    
@HyperGroups Hmm.. OT: I think format-frush in MS-Word is a real disaster for structured typesetting.. One should define the styles first and use them as describers in the text body. I see you're from China, so I presume you read Chinese, thus I suggest a great book on typesetting in Word: 《Word排版艺术》. Hope it helps. –  Silvia Jun 7 '13 at 4:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.