I'm in the process of creating a notebook that contains a style to write documents. I would like Mathematica to behave similar to LaTeX in the sense that when I write a "Definition" cell then it will write "Definition [Chapter#].[Definition#]".
To see what I mean do the following. In an empty notebook create a cell and modify the style to "Chapter". You can do this by selecting the cell and the going to Format->Style->Other, enter "Chapter".
Now go to Format->Edit StyleSheet.... Enter Chapter in the input box. This will generate a cell labeled Chapter. Select that cell, and click on Cell->Show Expression. At this point select all that text that you see there and replace it with the following:
Cell[StyleData["Chapter"],
CellFrame->{{0, 0}, {0, 0}},
ShowCellBracket->Automatic,
CellMargins->{{42, 27}, {10, 30}},
CounterIncrements->"Chapter",
CounterAssignments->{{"Section", 0}, {"Definition", 0}},
FontFamily->"Verdana",
FontSize->24,
FontWeight->"Bold",
CellFrameLabels->{{
Cell[
TextData[{
"Chapter ",
CounterBox["Chapter"]
}], "ChapterLabel", CellBaseline -> Baseline], Inherited}, {
Inherited, Inherited}},
FontColor->RGBColor[0.641154, 0.223011, 0.0623026]]
This will change the style of how a chapter cell is displayed. I changed the color and font. The most important thing to me is the CellFrameLabels. Noticed that I have made it so that every time you create a chapter cell it will display: Chapter [Chapter Number].
In the picture above I have created several chapter cells and I have added the text: ": Title of Chapter #".
This is simple enough, we can create any cell, apply a definition and take advantange of counters to label the cells.
I have noticed how some books have definitions enclosed in box. So in this case I would like to create a box that contains Definition. Here is my lame attempt with the definition of the cell "Definition".
Cell[StyleData["Definition"],
CellFrame->{{0, 0}, {0, 2}},
ShowCellBracket->Automatic,
CellMargins->{{27, 27}, {0, 8}},
PageBreakWithin->False,
CellFrameMargins->16,
CellFrameColor->RGBColor[0.641154, 0.223011, 0.0623026],
Background->RGBColor[0.963821, 0.927581, 0.844465],
FontFamily->"Verdana",
CounterIncrements->"Definition",
FontSize->12,
CellFrameLabels->{{
Cell[
TextData[{
"Definition ",
CounterBox["Chapter"], ".",
CounterBox["Definition"]
}], "DefinitionLabel", CellBaseline -> Baseline], Inherited}, {
Inherited, Inherited}},
]
Here is how it looks in the notebook:
Here is the question: Is there a way to make the CellFrameLabels part of the cell? I want the label to have the same background and to be inline with the other text. Here is a screen shot of how I want it to look:
I have made the "label" bold font and blue. This is something that the user should not be able to modify.
I don't think that it's possible to do in the way you want. CellLabels can only be text, while both CellDingbat and CellFrameLabels can be arbitrary cell expressions.
Both CellDingbat -> ... and CellFrameLabels -> {{...,None},{None,None}} work if the cell is only a single line long. But do not automatically resize for multiple line cells (at least as far as I could tell). For example:
Cell["Abcdefg", "Text",
CellFrame->{{0, 1}, {0, 2}},
CellMargins->{{30, 24}, {6, 6}},
CellFrameMargins->0,
CellFrameColor->RGBColor[0, 0, 1],
CellFrameLabels->{{Cell[" Definition 1.1 ", "Text",
CellFrame -> {{2, 0}, {0, 2}}, CellFrameMargins -> 0], None}, {None, None}},
CellFrameLabelMargins->0,
Background->RGBColor[0, 1, 1]]
Putting a CellFrameLabel on the top does not have this problem, but I don't know how to align it to the left...
Cell["Abcde", "Text",
CellFrame->{{1, 1}, {0, 2}},
CellMargins->{{30, 24}, {6, 6}},
CellFrameMargins->0,
CellFrameColor->RGBColor[0, 0, 1],
CellFrameLabels->{{None, None}, {None,
Cell[" Definition 1.1 ", "Text",
CellFrame -> {{2, 2}, {0, 2}}, CellFrameMargins -> 0]}},
CellFrameLabelMargins->0,
Background->RGBColor[0, 1, 1]]
I think that maybe the best looking solution would be to include the "Definition ch.def:" in the cell contents.
Cell[TextData[{
Cell["Definition 1.1: ", Editable->False, Selectable->False, Deletable->False],
"Abcdefg"}], "Text",
CellFrame->{{1, 1}, {0, 2}},
CellMargins->{{30, 24}, {6, 6}},
CellFrameColor->RGBColor[0, 0, 1],
Background->RGBColor[0, 1, 1]]
Make it so that it's not deletable by the average user and it is probably almost as good as a cell(frame)label. It can include counters so that it automatically shows the correct numbering. The only problem is that it does not appear automatically, but if you just copy a pre-existing cell, then that's not too much of a problem.
Edit: Adding an input alias that creates the non-deletable counter
First we get the current input aliases,
oldAliases = InputAliases /. Options[EvaluationNotebook[], InputAliases];
then replace any existing alias EscdefEsc with our new one:
newAliases =
Append[DeleteCases[oldAliases, "def" -> _],
"def" -> Cell[TextData[
RowBox[StyleBox[#, FontWeight->"Bold", FontColor->Blue]&/#{"Definition ",
CounterBox["Chapter"], ".", CounterBox["Definition"], ": "}]],(*"Text",*)
Editable -> False, Selectable -> False, Deletable -> False]];
SetOptions[EvaluationNotebook[], InputAliases -> newAliases]
Since I don't have your style sheet, I need to set a couple of counters:
CellPrint[Cell["Setting the counters", "Text",
CounterAssignments -> {{"Chapter", 2}, {"Definition", 3}}]]
Now I can use the alias in an existing cell - it inherits the styling of the parent cell (unless otherwise specified):
Another option is to make a palette to go with your stylesheet. This would be useful since there's only a limited number of MenuCommandKey values that you can use for your new styles (n.b. overwriting the default ones will just confuse people). See this answer for an example of such a palette.
Related
To add a Divider between rows in a Grid, one way I know how to do it is by using the Dividers option. But this is used at the end, and one must then know the row number to which a divider needs to be below it. So, for large grid, I find myself using trial and error until I find the correct row number. Then when I change the grid later, I have to do the trial and error again to put the divider in the correct place in case it moved after my changes.
In this example, there is a grid with 3 rows and I want to add divider below say the second row, so I can do this:
Grid[{
{1},
{2},
{3}
}, Frame -> True, Dividers -> {All, 3 -> True}]
Another way, is to put False and True, in correct order where I want a divider, like this
Grid[{
{1},
{2},
{3}
}, Frame -> True, Dividers -> {All, {True, False, True, True}}]
It would be nice if I could do something like this (like one can do for Manipulate) (ofcourse this below does not work here)
Grid[{
{1},
{2},
Delimiter,
{3}
}, Frame -> True]
or
Grid[{
{1},
{Item[2,Dividers->True]},
{3}
}, Frame -> True]
or such thing.
It will make code maintenance easier.
I looked at using Item and such for this, but not able to figure it out.
Any one knows of a trick to do it?
edit:
btw, This trick if possible, does not only apply to Dividers. But it would be useful to be able to do many of the other Grid options, which now is done at the Grid level, be done as well at the item level. For example, if I want to add an extra space after some row, it will easier to say so right at the pace I wanted this done. Also, if I wanted to change the Item size, easier to do it at the spot, same for Spacings, etc.. So that when moving/copying code for a whole row or Item, it is self contained and copy it with all its options together.
I think now this might require a new option add to Mathematica Grid to make it work right and be consistent with the over all grid design.
This is all until a GUI builder is made for Mathematica.
I find that I spend more than 60% of my time when I write a demo getting the GUI to fit and look right. With a GUI builder, I can spend this time working on the algorithm instead. When I use Matlab GUIDE to make GUI, it takes me less than 5% of my time to make a similar GUI.
I wish that WRI would make a GUI builder for Mathematica, I think this will be the killer app for Mathematica if you ask me. But no body asked me :)
edit(2)
comment on Mr Wizard nice solution below.
I mainly wanted this feature for the Grids I use to layout controls for Manipulate. Here is a simple example:
Manipulate[x,
Grid[{
{Control[{{x, 0, "x"}, 0, 10, 1}]},
{Control[{{y, 0, "y"}, 0, 10, 1}]}
}, Frame -> None, Dividers -> {None, {False, True, False}}
]
]
(and I have to use Grid for setting up the controls). I can't use function calls here. I can't write, using Wizard's solution below, the following:
Manipulate[x,
myGrid[{
{Control[{{x, 0, "x"}, 0, 10, 1}]},
spec["Divider"],
{Control[{{y, 0, "y"}, 0, 10, 1}]}
}, Frame -> None
],
Initialization :>
{
specfunc["Divider", lst_] := Dividers -> {None, # -> True & /# lst};
myGrid[dat_, opts : OptionsPattern[]] :=
Module[{x = 1},
Grid[#, opts, Sequence ## #2] & ##
Reap[If[MatchQ[#, _spec], Sow[x, #[[1]]]; ## &[], x++; #] & /#
dat, _, specfunc]
]
}
]
This gives an error, since Mathematica tries to first read the body of Manipulate to parse it, BEFORE reading and processing the initialization section.
But outside Manipulate, it will ofcourse work:
myGrid[{
{Control[{{x, 0, "x"}, 0, 10, 1}]},
spec["Divider"],
{Control[{{y, 0, "y"}, 0, 10, 1}]}
}, Frame -> None
]
specfunc["Divider", lst_] := Dividers -> {None, # -> True & /# lst};
myGrid[dat_, opts : OptionsPattern[]] :=
Module[{x = 1},
Grid[#, opts, Sequence ## #2] & ##
Reap[If[MatchQ[#, _spec], Sow[x, #[[1]]]; ## &[], x++; #] & /#
dat, _, specfunc]
]
I need to spend more time on this, to see if I can get it to work inside Manipulate.
btw, getting stuff like this to work inside Manipulate is really hard. Only trick I know is using macros with the With[{},.... Grid....] pattern I learned from Leonid.
For example of such difficulties, see this question of mine
How to define constants for use with With[] in one place and then apply them later?
edit(3)
My be I doing something wrong, but I am getting some errors inside Manipulate:
first example:
Manipulate[x,
Evaluate#grid[{
{Control[{{x, 0, "x"}, 0, 10, 1}]}
}
],
Initialization :>
{
grid[tab_, opts___] :=
Module[{divlocal, divglobal, div, pos},
divglobal = (Dividers /. opts) /. Dividers -> {False, False};
If[Depth[divglobal] == 1, divglobal = {divglobal, divglobal}];
If[Length[divglobal] == 1, AppendTo[divglobal, False]];
pos = Position[tab, Dividers -> _, 1];
divlocal =
MapIndexed[# - #2[[1]] + 1 -> Dividers /. tab[[#]] &,
Flatten[pos]];
divglobal[[2]] = {divglobal[[2]], divlocal};
Grid[Delete[tab, pos], Dividers -> divglobal, opts]];
}
]
gives error:
ReplaceAll::rmix: Elements of {False,{}} are a mixture of lists and nonlists. >>
same if I replace the above with
Evaluate#grid[{
Dividers -> {Thick, Blue},
{Control[{{x, 0, "x"}, 0, 10, 1}]}
}
],
Tried Dynamic# in place of Evaluate# no luck. may be small fix is all what is needed? or I am not using it right?
This solutions should allow you to combine specifications for dividers between rows specified within the table with those specified using the Dividers option.
grid[tab_, opts___] :=
Module[{divlocal, divglobal, div, pos},
(* extract option value of Dividers from opts to divglobal *)
(* default value is {False, False} *)
divglobal = (Dividers /. {opts}) /. Dividers -> {False, False};
(* transform divglobal so that it is in the form {colspecs, rowspecs} *)
If[Head[divglobal] =!= List, divglobal = {divglobal, divglobal}];
If[Length[divglobal] == 1, AppendTo[divglobal, False]];
(* Extract positions of dividers between rows from tab *)
pos = Position[tab, Dividers -> _, 1];
(* Build list of rules for divider specifications between rows *)
divlocal = MapIndexed[# - #2[[1]] + 1 -> Dividers /. tab[[#]] &, Flatten[pos]];
(* Final settings for dividers are {colspecs, {rowspecs, divlocal}} *)
divglobal[[2]] = {divglobal[[2]], divlocal};
Grid[Delete[tab, pos], Dividers -> divglobal, opts]]
To specify a divider between rows you need to insert Dividers->spec at the desired position where spec is either False, True, or a graphics directive (colour, thickness, etc.). For example
tab = {{1, 2, 3}, Dividers -> {Thick, Blue}, {4, 5, 6}, {7, 8, 9},
Dividers -> False, {10, 11, 12}};
grid[tab, Dividers -> All]
Edit
I've added some comments to my code at the request of Mr. Wizard.
I propose that you use a new head that can hold instructions (spec below), and a new function that processes these instructions (specfunc below) as individually required. The benefit is that this is easily generalized for different interleaved instructions, and each can be processed in an arbitrary way.
specfunc["Divider", lst_] := Dividers -> {All, # -> True & /# lst}
myGrid[dat_, opts:OptionsPattern[]] :=
Module[{x = 1},
Grid[#, opts, Sequence ## #2] & ##
Reap[
If[MatchQ[#, _spec], Sow[x, #[[1]]]; ## &[], x++; #] & /# dat,
_,
specfunc
]
]
Usage:
dat =
{
{1, 2, 3},
{4, 5, 6},
spec["Divider"],
{7, 8, 9},
spec["Divider"],
{"a", "b", "c"}
};
myGrid[dat, Frame -> True]
If each instruction can be a single string such as "Divider" and you have no conflict using them this way, you could eliminate spec and use MatchQ[#, _String] and Sow[x, #].
Addressing your updated question, as I noted in a comment below I believe that it makes more sense to use the most basic elements in your final Manipulate object, and write tools to help you generate this object most easily. I believe that attempting to make these kinds of customization inside the Manipulate block itself is doomed to fail, and probably in weird and opaque ways.
Nevertheless, for this particular case this appears to work, though I doubt it is robust:
Manipulate[x,
Evaluate[
{specfunc["Divider", lst_] := Dividers -> {All, # -> True & /# lst};
myGrid[dat_, opts : OptionsPattern[]] :=
Module[{x = 1},
Grid[#, opts, Sequence ## #2] & ##
Reap[If[MatchQ[#, _spec], Sow[x, #[[1]]]; ## &[], x++; #] & /#
dat, _, specfunc]]};
myGrid[{{Control[{{x, 0, "x"}, 0, 10, 1}]},
spec["Divider"], {Control[{{y, 0, "y"}, 0, 10, 1}]}},
Frame -> True]
]
]
I am running out of space on the Manipulate interface. So, I am looking to see if I can overload a PopupMenu to serve more than one purpose.
Here is the problem:
I have a PopupMenu where I use to select an entry from it. But depending on another choice I make somewhere else, some of these entries in the menu will no longer make sense to select.
So, I was wondering, if I can make some of the entries in the PopupMenu 'selectable' based on a setting of a Dynamic? (may be disabled, or grayed out, or what would be best, have the whole list itself by dynamic, i.e. the whole popUp menu be dyanmic, so I can select different menus based on value of another dynamic. But I do not think this is possible)
Currently, the WHOLE PopupMenu can be enabled or disabled based on a dynamic setting. But I want to do this at the entry level inside the Popupmenu.
Here is an example to illustrate:
Manipulate[selection,
Grid[{
{"x", SetterBar[Dynamic[x], {1, 2}]},
{"selection", PopupMenu[Dynamic[selection],
{
"NONE", "SOR", "SSOR"
}, Enabled -> Dynamic[x == 1]], SpanFromLeft
}
}]
]
In the above, when X=1, the whole menu is enabled.
But what I want, if X=1, is to be able to select only say "NONE" (or the list just show "NONE"), and when X=2, then be able to select only "SOR" and "SSOR" (or the list just show these 2 choices).
i.e. the system will not let "SOR" be selected if x=2. Trying to select it will cause no change and the menu will remain on its previous setting and not change.
Again, I know I can break things into 2 popuMenus, and control each one based on X setting like this below, but I do not have more space to add more menus:
Manipulate[If[x == 1, selectionA, selectionB],
Grid[{
{"x", SetterBar[Dynamic[x], {1, 2}]},
{"selection", PopupMenu[Dynamic[selectionA],
{
"NONE"
}, Enabled -> Dynamic[x == 1]], SpanFromLeft
},
{"selection", PopupMenu[Dynamic[selectionB],
{
"SOR", "SSOR"
}, Enabled -> Dynamic[x == 2]], SpanFromLeft
}
}]
]
My question is: Is there a way to do the above in Mathematica? I am using 8.04.
Best solution would be to have the list of items for the menu itself by Dynamic (or the whole menu be dynamic), so I can tell it to use listA when X=1 or use listB when X=2, etc.. But I do not know how to do this and do not know if it is even possible.
ps. This is my current attempt at a solution
Manipulate[selection,
Grid[{
{"x", SetterBar[Dynamic[x], {1, 2}]},
{"selection", PopupMenu[Dynamic[selection],
{
Dynamic[If[x == 1, listA, listB]]
}
]
}
}
],
Initialization :>
(
listA = {"A", "B"};
listB = {"C", "D"};
)
]
But it is not working too well yet. Will keep at it....
thanks
Update:
Looking at Simon solution below inspired me a little more, so this is what I have so far:
Manipulate[selection,
Grid[{
{"x", SetterBar[Dynamic[x], {1, 2}]},
{"selection",
Dynamic[If[x == 1,
(
selection = "A";
PopupMenu[Dynamic[selection], {"A", "B"}]
),
(
selection = "C";
PopupMenu[Dynamic[selection], {"C", "D"}]
)
]
]
}
}
]
]
Is this the type of thing you're looking for?
Manipulate[
Switch[x,
1, If[selection =!= None, selection = None],
2, If[selection === None, selection = "SOR"]];
selection,
{x, {1, 2}, ControlType -> SetterBar},
{{selection, None}, Switch[x, 1, {None}, 2, {"SOR", "SSOR"}, _, {"huh"}],
ControlType -> PopupMenu}]
Note the Switch at the top that controls the defaults for selection when x is changed.
Edit:
Following your request to have the menu logic localised to the control Grid and stealing Heike's default mechanism, here's a new version:
Manipulate[selection,
Grid[With[{menu = {{None}, {"A", "B"}, {"emu", "num"}}},
{{"Which menu?", SetterBar[Dynamic[x], Range[Length[menu]]]},
{"Menu selection:", Dynamic[
If[MemberQ[menu[[x]], selection], selection = menu[[x, 1]]];
PopupMenu[Dynamic[selection], menu[[x]]]]}}]],
{{selection, None}, None}, {{x, 1}, None}]
Note that the menu list does not need to be localized with a With statement - it can be set elsewhere in the code.
This solution is similar to Simon's answer, but it doesn't explicitly use the number of lists so it should work for an arbitrary number of lists
choices = {{"a", "b", "c"}, {None}, {"e", "f"}};
Manipulate[
If[Not[MemberQ[x, selection]], selection = x[[1]]];
selection,
{{x, choices[[1]]}, MapIndexed[# -> #2[[1]] &, choices], SetterBar},
{selection, x, ControlType -> PopupMenu}]
Please consider :
colors = {Red, Green, Blue};
style = {Thickness[.01], Thickness[.01], Thickness[.01]};
cAxes = {{{0, 0, 0}, {0, 0, 1}}, {{0, 0, 0}, {0, 1, 0}}, {{0, 0,
0}, {1, 0, 0}}};
Graphics3D[{{#1, #2, Line##3} & ### Transpose#{colors, style, cAxes},
Blue, Specularity[White, 3], Sphere[{.5, .5, .5}, .1]},
Boxed -> False, FaceGrids -> All,
FaceGridsStyle -> Directive[Black, Dashed]]
Using Yoda`s solution on How to Style Lines
How could I color the Sphere using GrayLevel (I will manipulate it later).
And How could I have denser FaceGrids ? 10 Lines horizontally & Vertically. I also don`t understand why the Edges one are distant to one another.
It's always good practice to group the graphics object and its styles in a list, in case you need to quickly add another one with different styles. By that, I mean write it as {Blue, Specularity[White, 3], Sphere[{.5, .5, .5}, .1]}. Now you can easily add a GrayLevel term before Sphere and it'll work.
For the FaceGrids, I believe you'll have to manually define the lines at your desired spacing for each face. Here's an example for showing how to do it for one face.
Graphics3D[{{#1, #2, Line##3} & ###
Transpose#{colors, style, cAxes}, {Blue, GrayLevel[0.3], Lighting -> "Neutral",
Specularity[White, 3], Sphere[{.5, .5, .5}, .1]}}, Boxed -> False,
FaceGrids -> {{{0, 0, 1},
Transpose#({#, #} & /# Range[0, 1, 0.1])}},
FaceGridsStyle -> Directive[Black, Dashed]]
The faces are defined as ±1 for the corresponding plane and the other two are zero. So {0,0,1} in my example corresponds to the z=1 plane.
The list supplied to FaceGrids can be easily computed for each face, instead of manually entering them, but I'll leave that to you :)
EDIT:
Since you want a uniform mesh all around, define where you want the grid lines drawn as
gridList = Transpose#({#, #} & /# Range[0, 1, 0.1]);
Then, use the following for FaceGrids:
FaceGrids -> Join ## Table[{RotateLeft[j {0, 0, 1}, i], gridList},
{i, {0, 1, 2}}, {j, {-1, 1}}]
Here's how the result should look like with PlotRangePadding -> None:
In addition to Yoda's response:
Lighting -> "Neutral" will allow grayscale object to show up as gray instead of with various colors.
PlotRangePadding -> None will remove the spaces on the grid lines (depending on the setting for PlotRange.)
Yoda beat me to typing out the FaceGrids setting (see documentation). But here is an alternative.
Instead of setting the FaceGrids setting explicitly, youcould also try setting FrameTicks, since by default the FaceGrids follow these, and then style the FrameTicks to be invisible using Opacity.
Please consider :
Needs["ErrorBarPlots`"];
list = {{223, 231, 167, 245, 292}, {90, 81, 88, 84, 106}}
Where the second list represent the StandardDeviation
ErrorListPlot[list // Transpose,
PlotRange -> {{0, 6}, {0, 500}}]
I find it very hard to customize those ErrorList Plot. So my ugly attempt to avoid using the package and achieve the filling I wanted :
ListPlot[{(list[[1]] - list[[2]]), (list[[1]] +
list[[2]]), list[[1]]}, Filling -> {1 -> {2}}, Joined -> True]
Questions :
Is there an " efficient" way to adjust the appearance using ErrorListPlot ?
If not How would you suggest handling error bar using ListPlot or BarChart ?
I have to mention that I use Joined so as to increase the visibility but, each point represent a different subject so they should not be but : Using ErrorListPlot I could not make the mean visible enough :-(
EDIT : #Sjoerd
You can use Filling with a normal ListPlot, not joined, to get vertical lines rather than area filling. Then style the dots as you like with PlotStyle. But also check out some of the options to ErrorListPlot. There are options to do what you need.
ErrorListPlot[list // Transpose, PlotRange -> {{0, 6}, {0, 500}},
PlotStyle -> {AbsolutePointSize[14], AbsoluteThickness[2]}]
According to the documentation, ErrorListPlot takes all the same options as ListPlot.
I am not able to find how to do the following. When using Manipulate, it automatically shows a little '+' at the end of the control, as the following
Manipulate[x,
{{x, 0, "x"}, 0, 1, .1, Appearance -> "Labeled"}
]
Now, I want to set up the control directly myself using Dynamic, and make it look just like the above, like this: (Btw, thanks to Simon for showing the correct syntax to do this here
Manipulate[x,
{{xChanged, False}, None},
Grid[{
{"x ",
Slider[Dynamic[x, (x = #; xChanged = True; #) &], {0, 1, .1}],
Spacer[2],
Dynamic#x
}
}, Frame -> None, Spacings -> {0.2, 0.1}, Alignment -> Center]
]
Now, the only thing missing is the little '+'. I can't use the AppearanceElement options on the above. So, next I tried this
Manipulate[x,
{{xChanged, False}, None},
Grid[{
{"x ",
Animator[Dynamic[x, (x = #; xChanged = True; #) &], {0, 1, .1},
AnimationRunning -> False], Spacer[2],
Dynamic#x
}
}, Frame -> None, Spacings -> {0.2, 0.1}, Alignment -> Center]
]
But that gives too many. I only need the '+' which is labeled 'Show animation controls' when using Manipulate. But I can't find the element which matches this one.
It is strange that it is so hard to find the names of these elements. I go to ref/AppearanceElements and it does not even list the names. When I go to ref/Manipulate it mentions the following ones under Appearance Elements option {"HideControlsButton", "SnapshotButton", "ResetButton", "UpdateButton" and I tried them all, but they are not what I want.
I went to ref/Manipulator, and saw these "InputField", "StepLeftButton", "PlayPauseButton", "StepRightButton", "FasterSlowerButtons", "DirectionButton", "InlineInputField". But none of them is the 'Show animation controls' one.
Does any one know how to get '+' element?
(strange that these elements are not all be listed in one place, in ref/AppearanceElements )
Thank you,
Is there any reason that you can't use a Manipulator?
Manipulate[x, {{xChanged, False}, None}, {x, None},
Grid[{{"x ",
Manipulator[
Dynamic[x, (x = #; xChanged = True; #) &], {0, 1, .1}],
Spacer[2], Dynamic#x}}, Frame -> None, Spacings -> {0.2, 0.1},
Alignment -> Center]]
Or Control:
Manipulate[x,
Grid[{{"test: ", Control[{x, 0, 1}], Spacer[9], Dynamic[x]}},
Spacings -> {0.2, 0.1}]]