Changeset 2268:23a0d4af6348


Ignore:
Timestamp:
01/03/07 12:16:54 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

Notebook improvements. Add a %hideall command.

Location:
sage/server/notebook
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sage/server/notebook/cell.py

    r2266 r2268  
    230230 
    231231    def is_auto_cell(self): 
    232         return '%auto' in self.__in.split('\n')[0] 
     232        return '#auto' in self.__in.split('\n')[0] 
    233233 
    234234    def changed_input_text(self): 
     
    406406    
    407407    def html(self, wrap=None, div_wrap=True, do_print=False): 
     408        if self.__in.lstrip()[:8] == '%hideall': 
     409            return '' 
     410         
    408411        if wrap is None: 
    409412            wrap = self.notebook().defaults()['word_wrap_cols'] 
    410  
    411413        if self.worksheet().compute_process_has_been_started(): 
    412414            evaluated = (self.worksheet().sage() is self.sage()) and not self.interrupted() 
  • sage/server/notebook/css.py

    r2107 r2268  
    937937} 
    938938 
     939/* 
    939940textarea.cell_input_hide { 
    940941  background-color: white; 
    941942  color:#cccccc;  
    942943  border: 0px solid white; 
    943 /*  border-top: 1px solid #aaaaff; 
    944   border-bottom: 1px solid #aaaaff; 
    945   */ 
    946944  font-family: courier, monospace; 
    947945  font-size:12pt; 
     
    954952  margin:0px; 
    955953} 
     954*/ 
     955 
     956textarea.cell_input_hide { 
     957  background-color: white; 
     958  color:#ffffff; 
     959  border: 0px solid white; 
     960  font-family: courier, monospace; 
     961  font-size:12pt; 
     962  overflow:hidden; 
     963  padding-left:3px; 
     964  padding-top:0px; 
     965  padding-bottom:0px; 
     966  width: 100%; 
     967  height:0.5em;  
     968  margin:0px; 
     969} 
     970 
    956971 
    957972textarea.cell_input_active { 
  • sage/server/notebook/notebook.py

    r2265 r2268  
    10621062            ('HTML', 'Begin an input block with %html and it will be output as HTML.  Use the &lt;sage>...&lt;/sage> tag to do computations in an HTML block and have the typeset output inserted.  Use &lt;$>...&lt;/$> and &lt;$$>...&lt;/$$> to insert typeset math in the HTML block.  This does <i>not</i> require latex.'), 
    10631063            ('Shell', 'Begin a block with %sh to have the rest of the block evaluated as a shell script.  The current working directory is maintained.'), 
    1064             ('Autoevaluate Cells on Load', 'Any cells with "%auto" in the first line (e.g., in a comment) are automatically evaluated when the worksheet is first opened.'), 
     1064            ('Autoevaluate Cells on Load', 'Any cells with "#auto" in the input is automatically evaluated when the worksheet is first opened.'), 
    10651065            ('Create New Worksheet', "Use the menu on the left, or simply put a new worksheet name in the URL, e.g., if your notebook is at http://localhost:8000, then visiting http://localhost:8000/tests will create a new worksheet named tests."), 
    10661066               ('Evaluate Input', 'Press shift-enter.  You can start several calculations at once.  If you press alt-enter instead, then a new cell is created after the current one.'), 
     
    10801080                ('Source Code', 
    10811081                 'Put ?? after the object and press tab.'), 
    1082                 ('Hide Input', 
    1083                  'Put %hide at the beginning of the cell.  This can be followed by %gap, %latex, %maxima, etc.  Note that %hide must be first. Put a blank line at the beginning so the "%hide" does not appear.'), 
     1082                ('Hide Cell Input', 
     1083                 'Put %hide at the beginning of the cell.  This can be followed by %gap, %latex, %maxima, etc.  Note that %hide must be first.  From the edit screen, use %hideall to hide a complete cell.'), 
    10841084                ('Detailed Help', 
    10851085                 'Type "help(object)" and press shift-return.'), 
Note: See TracChangeset for help on using the changeset viewer.