Notebook with version-dependent cellsCreating version specific notebook styles: decide based on whether version is at least 11.1How can I make an invisible Cell?How to Keep Input Cells Hidden After Evaluating NotebookA notebook created on demand from a main document showing executable input along with output cellsOld notebook (Version 3) not opening in version 9Saving notebook, excluding output cells, without losing “working notebook” output cellsPrint notebook with all cells openedWriting cells from other notebooks into current notebook?Notebook cells space on disk profilerSyntax highlighting in text cellsReferencing cells after reopening a saved notebookEvaluate notebook without opening cell groups
Garage door sticks on a bolt
When did Unix stop storing passwords in clear text?
Minimal Python logging
How can this Stack Exchange site have an animated favicon?
One-digit products in a row of numbers
Does the app TikTok violate trademark?
How do my husband and I get over our fear of having another difficult baby?
Why would an airline put 15 passengers at once on standby?
Received a package but didn't order it
Two side-by-side squares are inscribed in a semicircle. The diameter of the semicircle is 16. What is the sum of the two squares' areas?
Suffocation while cooking under an umbrella?
Why did the Soviet Union not "grant" Inner Mongolia to Mongolia after World War Two?
If a spaceship ran out of fuel somewhere in space between Earth and Mars, does it slowly drift off to the Sun?
Lost passport which have valid student visa but I make new passport unable paste
Fix Ethernet 10/100 PoE cable with 7 out of 8 wires alive
Sci-fi movie with one survivor and an organism(?) recreating his memories
An impressive body of work
When does a UA Sea Sorcerer choose to use the Curse of the Sea feature's additional effect?
Do interval ratios take overtones into account or solely the fundamental frequency?
Assembly of PCBs containing a mix of SMT and thru-hole parts?
Equations with Sigma
Is differentiation as a map discontinuous?
A word that refers to saying something in an attempt to anger or embarrass someone into doing something that they don’t want to do?
What should I consider when deciding whether to delay an exam?
Notebook with version-dependent cells
Creating version specific notebook styles: decide based on whether version is at least 11.1How can I make an invisible Cell?How to Keep Input Cells Hidden After Evaluating NotebookA notebook created on demand from a main document showing executable input along with output cellsOld notebook (Version 3) not opening in version 9Saving notebook, excluding output cells, without losing “working notebook” output cellsPrint notebook with all cells openedWriting cells from other notebooks into current notebook?Notebook cells space on disk profilerSyntax highlighting in text cellsReferencing cells after reopening a saved notebookEvaluate notebook without opening cell groups
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I want to make a notebook with the following special feature: some of its cells show up only when the notebook is opened in for instance versions 11 and 12, but are hidden if the notebook is opened in other versions. Is this possible to do?
notebooks cells
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment
|
$begingroup$
I want to make a notebook with the following special feature: some of its cells show up only when the notebook is opened in for instance versions 11 and 12, but are hidden if the notebook is opened in other versions. Is this possible to do?
notebooks cells
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of$VersionNumber
.
$endgroup$
– 浪川菜奈
7 hours ago
add a comment
|
$begingroup$
I want to make a notebook with the following special feature: some of its cells show up only when the notebook is opened in for instance versions 11 and 12, but are hidden if the notebook is opened in other versions. Is this possible to do?
notebooks cells
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
I want to make a notebook with the following special feature: some of its cells show up only when the notebook is opened in for instance versions 11 and 12, but are hidden if the notebook is opened in other versions. Is this possible to do?
notebooks cells
notebooks cells
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 8 hours ago
浪川菜奈浪川菜奈
161 bronze badge
161 bronze badge
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
浪川菜奈 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of$VersionNumber
.
$endgroup$
– 浪川菜奈
7 hours ago
add a comment
|
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of$VersionNumber
.
$endgroup$
– 浪川菜奈
7 hours ago
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of
$VersionNumber
.$endgroup$
– 浪川菜奈
7 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of
$VersionNumber
.$endgroup$
– 浪川菜奈
7 hours ago
add a comment
|
1 Answer
1
active
oldest
votes
$begingroup$
You can use the approach from this question to get front-end-only version dependent styling of cells and combine it with this question to get invisible cells:
CellPrint@Cell[
BoxData["Only in 12.0+"],
"Text",
"Text",
CellElementSpacings ->
"CellMinHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
],
"ClosedCellHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
]
,
CellMargins -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
-2,
Inherited
],
CellOpen ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12],
ShowCellBracket ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12]
]
CellPrint@Cell["All versions", "Text"]
The above cell will print two cells, the first one is only visible in version 12.0 and higher, in lower versions it will be completely invisible:
Version 12.0:
Version 11.3:
$endgroup$
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
浪川菜奈 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f206695%2fnotebook-with-version-dependent-cells%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can use the approach from this question to get front-end-only version dependent styling of cells and combine it with this question to get invisible cells:
CellPrint@Cell[
BoxData["Only in 12.0+"],
"Text",
"Text",
CellElementSpacings ->
"CellMinHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
],
"ClosedCellHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
]
,
CellMargins -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
-2,
Inherited
],
CellOpen ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12],
ShowCellBracket ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12]
]
CellPrint@Cell["All versions", "Text"]
The above cell will print two cells, the first one is only visible in version 12.0 and higher, in lower versions it will be completely invisible:
Version 12.0:
Version 11.3:
$endgroup$
add a comment
|
$begingroup$
You can use the approach from this question to get front-end-only version dependent styling of cells and combine it with this question to get invisible cells:
CellPrint@Cell[
BoxData["Only in 12.0+"],
"Text",
"Text",
CellElementSpacings ->
"CellMinHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
],
"ClosedCellHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
]
,
CellMargins -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
-2,
Inherited
],
CellOpen ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12],
ShowCellBracket ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12]
]
CellPrint@Cell["All versions", "Text"]
The above cell will print two cells, the first one is only visible in version 12.0 and higher, in lower versions it will be completely invisible:
Version 12.0:
Version 11.3:
$endgroup$
add a comment
|
$begingroup$
You can use the approach from this question to get front-end-only version dependent styling of cells and combine it with this question to get invisible cells:
CellPrint@Cell[
BoxData["Only in 12.0+"],
"Text",
"Text",
CellElementSpacings ->
"CellMinHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
],
"ClosedCellHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
]
,
CellMargins -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
-2,
Inherited
],
CellOpen ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12],
ShowCellBracket ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12]
]
CellPrint@Cell["All versions", "Text"]
The above cell will print two cells, the first one is only visible in version 12.0 and higher, in lower versions it will be completely invisible:
Version 12.0:
Version 11.3:
$endgroup$
You can use the approach from this question to get front-end-only version dependent styling of cells and combine it with this question to get invisible cells:
CellPrint@Cell[
BoxData["Only in 12.0+"],
"Text",
"Text",
CellElementSpacings ->
"CellMinHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
],
"ClosedCellHeight" -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
0,
Inherited
]
,
CellMargins -> FEPrivate`If[
FEPrivate`Less[FEPrivate`$VersionNumber, 12],
-2,
Inherited
],
CellOpen ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12],
ShowCellBracket ->
FEPrivate`Not@FEPrivate`Less[FEPrivate`$VersionNumber, 12]
]
CellPrint@Cell["All versions", "Text"]
The above cell will print two cells, the first one is only visible in version 12.0 and higher, in lower versions it will be completely invisible:
Version 12.0:
Version 11.3:
answered 6 hours ago


Lukas LangLukas Lang
9,9591 gold badge13 silver badges37 bronze badges
9,9591 gold badge13 silver badges37 bronze badges
add a comment
|
add a comment
|
浪川菜奈 is a new contributor. Be nice, and check out our Code of Conduct.
浪川菜奈 is a new contributor. Be nice, and check out our Code of Conduct.
浪川菜奈 is a new contributor. Be nice, and check out our Code of Conduct.
浪川菜奈 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f206695%2fnotebook-with-version-dependent-cells%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Do you want Input Cells to be visible or hidden depending on Mathematica's version or maybe Output Cells?
$endgroup$
– Markhaim
8 hours ago
$begingroup$
It is arbitrary, I just want to mark a bunch of cells (no matter the type) to only show up for certain values of
$VersionNumber
.$endgroup$
– 浪川菜奈
7 hours ago