Message Boards Message Boards

0
|
6374 Views
|
7 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Adjusting the space between two paragraphs individually

Is there an easy way to adjust the space between two paragraphs (of either the same or different styles) individually for some singular cases, without changing the style definition? Similarly to how the font, colour, font size etc. can be modified individually?

The background of the question is that I am doing my slides in Mathematica, with a style file I modified from an existing SlideShow template (Steel), which tries to imitate LaTeX style. Sometimes I have several equations in a sequence with some single words such as "and" in between. For such cases it would be beneficial to decrease the spacing, to be able to put more equations on one slide, and have a more aesthetic appearance.

I enclose a screen shot here where I would like to decrease the spacing both before and after the line containing "with" for better looks and better use of space. Any suggestions? Thanks in advance. ________________________________________________________________________________ Parts of a slide where change of spacing between certain lines would be useful

POSTED BY: Imre Pazsit
7 Replies

This is indeed very versatile, and the framed header looks terrific. Thank you for the tips, I am going to experiment with it!

POSTED BY: Imre Pazsit

Writing the slide page cell by cell and then adjusting the margins is one method for doing this and it might be the simpler method. Still, I would like to present a different approach that I think will have more versatility. It essentially formats the page as a column of lines. It does use my Presentations Application.

Here pagelet is essentially a Column without the brackets and phrase is a Row without the brackets. The routine integrate formats an integral without attempting to evaluate it. (It comes from the Student's Integral portion of Presentations that allows integrals to be manipulated before evaluation). And the prime symbol used is a real character so x' is a real Symbol. A BaseStyle can be specified for the entire page and special Style constructs can be used at various places when needed. The spacing between lines is much easier to specify. There is only one cell to close up. This, of course, looks simpler in the notebook without the notation for special characters.

<< Presentations`

pagelet[
  Framed[Style[
    "The equation for the Green's function in one-group theory",
    FontFamily -> "Helvetica", FontWeight -> "Heavy"],
   Background -> Blend[{White, Brown}, 0.2], FrameStyle -> Gray],

  phrase["For a one-dimensional reactor of dimension ", 2 a, ":"],
  phrase[Spacer[60], HoldForm[\!\(
\*SubscriptBox[\(\[DifferenceDelta]\), \(x\)]\(G[x, 
        x?, \[Omega]]\)\) + (B^2)[w] G[x, x?, \[Omega]] == \[Delta][
      x - x?]/Subscript[D, 0]]],
  "with",
  phrase[Spacer[60], G[x, x?, \[Omega]] == 0, " for ", 
   "x, x? \[Equal] ", \[PlusMinus]a],
  "Then the solution for the neutron noise is given by",
  phrase[Spacer[60], \[Delta] \[Phi][x, \[Omega]] == 
    integrate[G[x, x?, \[Omega]]\[CenterDot]S[x?, \[Omega]], x?]],

  Spacings -> {Automatic, {1, 1, 1, 0, 0, 1, 1}},
  BaseStyle -> {FontSize -> 18, FontFamily -> "Times", 
    FontWeight -> Medium, 
    FractionBoxOptions -> {AllowScriptLevelChange -> False}}
  ] // TraditionalForm

The portion of the page that fits inside the regular margins of the cell is:

enter image description here

Exactly. I didn't know your level (and also for others that don't know about editing the Cell expression directly) so I went the Option Inspector route.

Happy to be able to help...

POSTED BY: David Reiss

Thanks a lot, this works perfectly. Actually now that I learned the concept of CellMargins, I can edit my paragraph much faster by opening the cell in question by Shift-Command-E and edit the CellMargins data there manually. Thank you!

POSTED BY: Imre Pazsit

Thanks a lot, I see how this works, but I do not know how to combine it with formatted text.However, I got another tips as you might have seen, and it solves the problem. Thank you for your comment anyway.

POSTED BY: Imre Pazsit

1) Select the Cell in question.

2) Open the Option Inspector with its scope set to "Selection"

3) Search for CellMargins using the search box.

4) Adjust the values in the CellMargins option to change the spacings on any one (or more) of the four sides of the selected Cell. The items in the list are of the form {{left,right},{bottom,top}}

The CellMargins documentation, http://reference.wolfram.com/language/ref/CellMargins.html, gives you detailed information on this Option.

POSTED BY: David Reiss

Something like this?

Column[{
  aaa,
  xxx,
  "with",
  yyy,
  zzz},
 Spacings -> {Automatic, {1, 1, 0, 0, 1}}
 ]

Copy and evaluate to see the result. The expressions aaa et cetera would be Row constructs.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract