I'm going through some lecture notes, Fundamentals of Mathematica Programming (see the .nb file there). I'd like to be able to do the exercises right there in the notebook; but for some reason I can't figure out how to make the default cell an Input cell. In other words, when I'm clicking in that notebook to create a new cell--in the exercises--the cell is by default a text cell. I'd like for it to be an Input cell so that I don't have to manually change it each time. Ideas?
The default cell style of a vanilla Mathematica install should already be "Input". It sounds like you perhaps are using an edited default stylesheet or have changed the preferences.
For recent versions (6.0+), go to Preferences, and under the Evaluation tab, make sure "Style of newly typed cells" is set to "Input", and that the drop-down below it labeled "Format type of new input cells" is set to "StandardForm".
For older versions, make sure Cell → Default Input FormatType in the menu is set to StandardForm. To check/change the default cell input type, open Format → Option Inspector... in the menu and navigate to Cell Options → New Cell Defaults and set DefaultNewCellStyle to "Input".
You can set the scope of the Option Inspector to global or notebook in the dropdown at the top. The particular notebook you linked to has the default style set to "Text" which is the problem.
Related
Using Oracle Form Builder 10.1.2.3.0, I have a List Item of type Combo Box with a Prompt and next to it in the same Block is a CheckBox.
When I disable these two items with
SET_ITEM_PROPERTY('block.item', ENABLED, PROPERTY_FALSE);
the CheckBox and its prompt go gray but the prompt portion of the List Item does not change. This makes the form and its developer look ridiculous.
Is this a bug?
To accomplish what I want I have to execute these when the List Item's enablement changes:
set_item_property('block.item', foreground_color, 'r150g150b150')
set_item_property('block.item', foreground_color, 'r70g70b70')
And these are just guesses because the color meter app is not perfect.
Half of the problem would "go away" if I could use a visual attribute but the form builder app complains about the "gray" color not being named.
Surely there is a better solution. Maybe playing with the LAF? But I have yet to figure out LAF customization.
I would not expect the prompt to change, but the edit area where text is entered will change. There is one exception. If running with colorScheme SWAN or BLAF the text edit are will always remain white unless you explicitly change the color. This is expected behavior.
If you are using SWAN or BLAF, which EBS does, by setting readOnlyBackground=true you can cause the edit area to go from white to a non-white color (the exact color will depend on the colorscheme in use). Because this parameter is not in the config by default it would need to be added manually and also added to the html template file.
If notes (as opposed to simple category phrases) are written in the Comments field of macOS folders, is there a way using Automator (or whatever) to simply hover over the folder and see the contents of that field as a tooltip?
I don't believe it's possible to create such a hover effect.
However, you can just show the comments continuously:
View -> as List
View -> Show View Options
Show Columns: Comments (and maybe Tags?)
Or right click on the column headers to quickly change the columns being shown.
The advantage here (besides being possible) is that you do not have to wait for the tooltip to appear. Apologies, however, if this doesn't fit the workflow you had in mind.
Is it possible to change number of tabs and tabs name in simple UI Tab Control? How to do it? (user interface diagram)
I'm using EA 11.
No. Tab 1 | Tab 2 | Tab 3 is part of the element's image and you can't change them. There is a workaround which works visually, but won't help if you're looking to generate code out of your models.
Create a Text element (in the Common toolbox), and give it the name of your GUI's first tab.
Set a different default fill and text color for the Text element (Right-click and select Appearence - Default Appearance).
Pick the Fill and Border Color for the Text element that best matches the Tab Control's foreground, either in the diagram toolbar or the Text element's context menu.
Move and resize the Text element to cover Tab 1.
Repeat as necessary for the other tabs, using the appropriate color.
The Text elements are local to the diagram they're in and are not shown in the project browser (they are diagram objects but not proper model elements), but they move with the Tab Control so it works visually.
By making several copies of the Tab Control and varying which Text element has the foreground color, you can use this technique to show the different panes.
You can change number of tabs and selected tab this way (at least in EA 13):
Open Properties of the Tab Control;
In "General" select "Wireframing" tab. You'll see "Tabs" property with a value "Tab1";
Select this "Tabs" property and click on "Notes" menu. An editor appears;
In this editor you can change number of names of tabs;
Close editor and for "Tabs" property choose selected Tab;
I need to export my notebook to show my work.
I want the pdf just to look like what I see on my screen in the same format as I scroll down through my notebook.
Is it possible ?
Edit :
New solution, new problem, thanks to Verbeia, I was able to have obtain a "1 long page" pdf out of my notebook. But there remain weird formatting behavior as below, can we fix that ?
While my notebook looks like :
This works for me under Mac OS X 10.6, Mma 8.0.1:
Select the whole notebook. This is easiest done if you have a top-level title or heading at the beginning of the document.
Choose "Save Selection As..." from the File menu (screenshot 1).
Choose PDF from the resulting dialog (screenshot 2).
You need to use "Save Selection As...", because "Save As" does try to calculate page breaks. If I understand your question correctly, you want a long "scroll" PDF with no page breaks. "Save Selection As..." does that.
EDIT in response to 500's question edit
To ensure the content goes "full width", you need to set the Printing Environment properly. I found setting the Printing Environment to the default Printing (see screenshot) and setting landscape paper in the Page Setup gave good results. Alternatively, you could go to the Option Inspector and set the Page Size or Paper Size settings for that notebook explicitly.
(on Mac OS X you get there from the Mathematica menu > Preferences > Advanced Tab > Show Option Inspector button > Notebook options > Printing options > Printing Options)
I don't know whether this will help for the this specific case. You can explicitly enter a page break into Mathematica using Insert > Page Break (appears at the bottom of the Insert menu). Try doing that before and after the image you have here.
Exporting by saving the notebook as a pdf and exporting by using the Export function often have different results as well. You may wish to try using the Export function out.
This question and the comments and answers prompted this question. How do I effectively use Cells and CellGroups in mathematica? I've always only programmed systematically inside the input cells, entering the next line in a new cell after evaluating the previous. Looking around at the different options available, this seemed inefficient.
How do I use these more effectively? I tried organizing my code into sections using command-5 and into subsections, etc. But then when I try to get back to input cell with command-9, it doesn't evaluate it. I'm sure I'm doing something wrong, so help is appreciated.
Cell groups are just that, a way to group cells together. These groups can be easily selected, executed as one, and opened/closed (collapsed). By default these groups are indicated by a series of blue brackets to the right of the cells:
As seen above, output cells are automatically grouped with the input cell that created them. Also, the Section cell automatically groups the Text, Input, and Output cells below it. Finally the Title cell groups all cells below it, including the Section cell.
The different classes of cells that are available, such as Title, Section, etc., are determined by the active Stylesheet. The way they group is controlled by the option CellGroupingRules. This is a more advanced area, and details are probably better addressed in a different question.
Cell Grouping can be done either automatically, the default, or manually, or to a limited extent by a combination thereof. This is all handled by the menu commands in Cell > Grouping > ... or the keyboard shortcuts listed there.
If using Automatic Grouping, then styling a cell in a style that groups (as controlled by CellGroupingRules) will automatically group "lesser" cells and cell groups beneath it.
To style a cell, select the entire cell, not just the cell contents, by either:
clicking on the blue cell bracket (or the area where it would be if it is hidden)
clicking within the cell and using Alt+. until the entire cell is selected
clicking and dragging from above the cell, where the cursor is horizontal, to below the cell
Then, use menu Format > Style > ..., or the corresponding key combinations.
The same methods can be used to select cell groups, rather than individual cells.
To create a new cell of a particular style:
click outside of existing cells where the cursor is horizontal
this should create a horizontal rule as shown in earlier illustration
specify a style, again with Format > Style > ... or keyboard shortcuts
start typing (or paste) the contents of the new cell
To create a new Input cell, the default style, simply do step (1) and then type or paste the input.
It depends on your stylesheet. Input is not the nineth numbered style in every stylesheet. Also, you have to select the cell bracket to change a cell's style.
I use sections particularly to be able to use folding, i.e. the double clicking on the cell group bracket to hide the lower ranking cells. That makes for a clean document. It doesn't do anything with the Input cells (except for the context option).