Message Boards Message Boards

0
|
5379 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Suppressing display of input and formatting output

I want to create a document which in some places does not display the input expression, only the output. Creating a cell with the following contents

Sum[q^n*Sin[n*t], {n, 1, Infinity}] // HoldForm
Sum[q^n*Cos[n*t], {n, 1, Infinity}] // HoldForm

and setting the cell property open to False produces the desired result, but still adds some vertical white space in the place of the suppressed input.

Is there a way of making Input totally invisible, without using any space?

And how could one unhide such a cell again?

POSTED BY: Erich Neuwirth
2 Replies

You could make a backnote notebook, then delete the input cells all together?

On the other hand, if there was a way to change the property of the input cell to closed, and also remove the tiny marker left on the right as well, then how well one open these cells again if you can't see the marker to click on in order to change the property back to open?

enter image description here

POSTED BY: Nasser M. Abbasi

Removing the CellBracket is handled by the option setting (within the Cell expression)

ShowCellBracket->False

However this still leaves some vertical space before and after the cell, and it seems one cannot get rid of it by choosing the vertical spacing options for the cell in question (coloring it gray so you can see where it is). Execute this to see:

CreateDocument[
 {TextCell["This is some text", "Text"],
  TextCell["This is some text", "Text", ShowCellBracket -> False, 
   CellOpen -> False, Background -> GrayLevel[.7], 
   CellElementSpacings -> {"ClosedCellHeight" -> 0}],
  TextCell["This is some text", "Text"]}]

The issue probably is not the closed cell itself here. It is that the cell before it has an default option to place space between it and the next cell, and the cell after the closed cell has a default option to place space before it and the cell above it.

As for finding closed cells that have no cell bracket, if they are input cells, one could select all input cells and then use the menu optoin to make all cells open. Alternatively, a more sophisticated approach is to tag cells and programmatically find cells with the specified tags and reset their options to make them open. A bunch of stuff about tagging can be found here:

http://library.wolfram.com/infocenter/Conferences/7246/

POSTED BY: David Reiss
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