8
$\begingroup$

Inserted a horizontal line with Right click > Insert > Thin Horizontal Line.

Cannot see a way to remove such a line. Help!

$\endgroup$
1
  • 3
    $\begingroup$ I vote for this question to remain open, to stand as a useful reference. Since the cell has Selectable -> False and ShowCellBracket -> False, it is quite unintuitive that it can in fact be selected and deleted like any cell. $\endgroup$ Aug 20 '15 at 1:14
7
$\begingroup$

You can select it just like any other cell, and then delete it.

On my system, it is a cell of the form:

Cell[" ", "Text",
 Editable -> False, Selectable -> False, 
 CellFrame -> {{0, 0}, {0, 3}}, ShowCellBracket -> False, 
 CellMargins -> {{0, 0}, {1, 1}}, 
 CellElementSpacings -> {"CellMinHeight" -> 1}, CellFrameMargins -> 0,
 CellFrameColor -> RGBColor[0, 0, 1], CellSize -> {Inherited, 5}
]

This can be verified by wrapping the Cell above with NotebookPut@*Notebook@*List.

$\endgroup$
2
  • $\begingroup$ How is that selecting it? That's going into a text editor to change it. $\endgroup$
    – Melab
    Feb 26 '16 at 2:30
  • 1
    $\begingroup$ @Melab The "On my system…" is more by way of information. You can simply use the mouse (by dragging upwards) or Shift+uparrow to select the cell in the same way as you'd select any other cell. $\endgroup$ Feb 26 '16 at 9:15
2
$\begingroup$

In Mathematica 12, to remove a horizontal line from a cell, you select the cell (bracket on the RHS) and right click with the mouse and select Properties. Go to Cell Options/Cell Frame Options and remove CellFrame. It will be bolded.

$\endgroup$
2
$\begingroup$

v12.2 update.

If you have just inserted the line, then Undo will remove it.

If the line is at the same height as an edge of the right bracket of a cell, then select this cell, go to menu Insert > Horizontal Line > None or uncheck the box. This is the inverse procedure of creating the line.

I have a notebook with a line at the end, apparently not attached to any cell.

To remove it, I had to to Edit > Select All, then as before Insert > ...

Such a detached line can be created with Insert > Horizontal Line > Paste ... and it cannot be selected so it is bit hard to delete it.

You can see the two sorts of lines on the screenshot.

screen shot showing the two kinds of lines

$\endgroup$
1
$\begingroup$

To delete a cell, or group of cells, hover your mouse on the right side of the notebook until you see the square brackets. Select (click on) the set of brackets corresponding to the cells you want to delete, and then hit “delete.”

Source - https://www.colorado.edu/amath/sites/default/files/attached-files/notes_01.pdf

$\endgroup$
1
  • $\begingroup$ This does not work for horizontal line. $\endgroup$ Jan 23 '21 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy