Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Question about typesetting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124145] Re: Question about typesetting
  • From: A Retey <awnl at gmx-topmail.de>
  • Date: Wed, 11 Jan 2012 04:20:08 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jeh5ku$r48$1@smc.vnet.net>

Hi,


> When we have a text cell with a few lines of text and when we insert a
> button in the very beginning, then of course the text starts immediately
> behind the button and wraps without indention over the lines of the
> cell, as far to the right as possible.
>
> I want to achieve the same layout by means of a kernel command. The best
> I could find is
>
> In[4]:= Style[Row[{Button["Buttontext",Null]," ","These sentences form a
> very long text. These sentences form a very long text. These sentences
> form a very long text. These sentences form a very long text. These
> sentences form a very long text. These sentences form a very long text.
> These sentences form a very long text. These sentences form a very long
> text. These sentences form a very long text."}], LineIndent->0]
>
> There is no indention at the left hand side of the output cell. But the
> soft line breaks in the string are not as far to the right as possible,
> and the display of the string starts at a new line instead of straight
> after the button.
>
> It seems to me that it must be possible to arrive at the same layout as
> a text cell. Maybe there is a simple solution, but I cannot find it. Can
> someone give me a hint?
>

Not sure whether I fully understand your problem, but this should do 
what you describe (note that my or your mailer will probably add some 
line breaks to the long string, you need to get rid of them before 
trying the code below...):

CellPrint[
  TextCell[Row[{Button["Buttontext", Null], " ",
     "These sentences form a very long text. These sentences form a \
very long text. These sentences form a very long text. These \
sentences form a very long text. These sentences form a very long \
text. These sentences form a very long text. These sentences form a \
very long text. These sentences form a very long text. These \
sentences form a very long text."}], "Text"]]

hth,

albert



  • Prev by Date: Booelan matrices for ordering and sorting
  • Next by Date: NMinimize Method suboptions
  • Previous by thread: Question about typesetting
  • Next by thread: Re: Question about typesetting