Font Color issue in Mathematica 12Mathematica color schemes for the colorblindFont sizes in graphicsChange Default Font Color of CommandsHow to change the font color and size of tick labels by defaultLine graphics opaqueness issueColor Space issue with GraphicsGraphics Alignment IssueIssue with FrameTick marks in Mathematica 11.3Mathematica 12, supported GPUsMathematica 12.0.0 crashes on second 'Quit[]'
Changing the lines of the arrowhead in circuitikz
Why do 401k up to company match, then fill Roth IRA, then finish filling 401k?
How to creep the reader out with what seems like a normal person?
How to interact with ERC20 interface?
Trainer for recumbent bikes
How to pronounce 'C++' in Spanish
Can not tell colimits from limits
Realistic Necromancy?
function to receive a character input and return date format (with incorrect input)
Will a top journal at least read my introduction?
How to make a pipeline wait for end-of-file or stop after an error?
Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?
Don’t seats that recline flat defeat the purpose of having seatbelts?
How do Bards prepare spells?
Why is current rating for multicore cable lower than single core with the same cross section?
How come there are so many candidates for the 2020 Democratic party presidential nomination?
Will tsunami waves travel forever if there was no land?
With a Canadian student visa, can I spend a night at Vancouver before continuing to Toronto?
Help to reproduce a tcolorbox with a decoration
Why we can't write in air?
Was it really necessary for the Lunar module LM to have 2 stages?
Who is the Umpire in this picture?
Is thermodynamics only applicable to systems in equilibrium?
Please, smoke with good manners
Font Color issue in Mathematica 12
Mathematica color schemes for the colorblindFont sizes in graphicsChange Default Font Color of CommandsHow to change the font color and size of tick labels by defaultLine graphics opaqueness issueColor Space issue with GraphicsGraphics Alignment IssueIssue with FrameTick marks in Mathematica 11.3Mathematica 12, supported GPUsMathematica 12.0.0 crashes on second 'Quit[]'
$begingroup$
TD = 8 + 12 + 12 + 12 + 33 + (61 + 1/4) + (41 + 1/4)/2 +
15/2 + (18 + 3/4) + (18 + 3/4)/2 + 14/2;
CM = 15/2 + (61 + 1/4) + (41 + 1/4)/2 +
24 + (3 + 3/4) + (18 + 3/4) + (18 + 3/4)/2 + 14/2 + (24 + 3/4) +
9/2;
TP = 2*90;
countsDim1 = CM, TD, TP/(TD + TP + CM)
n = 384 + 179;
labels = Placed[
Row /@ Thread["" <> ToString@# <>
" H" & /@ N[(n countsDim1[[1]]), 5],
N[(n countsDim1[[2]]), 5], Round@N[(n countsDim1)[[3]]]],
"RadialOuter"];
legend = Placed[
SwatchLegend[Automatic,
Row /@ Thread["CM ", "TD ", "TP ",
Row["(", #, , ")"] & /@
Quantity[Round[100 countsDim1], "Percent"]],
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> Black, FontWeight -> Bold,
LegendMarkerSize -> 26], After, Bottom, Framed];
type = Framed[
PieChart[countsDim1, ChartLabels -> labels, ChartLegends -> legend,
PlotRange -> All,
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> White, FontWeight -> Bold, PlotTheme -> "Business",
ImageSize -> Medium], Background -> LightGreen]
In Mathematica 11.3 above code would produce a Pie Chart with the percentage of the Legend
black. In Mathematica 12, I get the text of the percentage with gray color.
Below the same figure with Mathematica 11.3 (albeit without the bold text of the LegendLabel
)
What is different in Mathematica 12?
How can I get the percentage in black color (and bold)?
graphics version-12
$endgroup$
add a comment |
$begingroup$
TD = 8 + 12 + 12 + 12 + 33 + (61 + 1/4) + (41 + 1/4)/2 +
15/2 + (18 + 3/4) + (18 + 3/4)/2 + 14/2;
CM = 15/2 + (61 + 1/4) + (41 + 1/4)/2 +
24 + (3 + 3/4) + (18 + 3/4) + (18 + 3/4)/2 + 14/2 + (24 + 3/4) +
9/2;
TP = 2*90;
countsDim1 = CM, TD, TP/(TD + TP + CM)
n = 384 + 179;
labels = Placed[
Row /@ Thread["" <> ToString@# <>
" H" & /@ N[(n countsDim1[[1]]), 5],
N[(n countsDim1[[2]]), 5], Round@N[(n countsDim1)[[3]]]],
"RadialOuter"];
legend = Placed[
SwatchLegend[Automatic,
Row /@ Thread["CM ", "TD ", "TP ",
Row["(", #, , ")"] & /@
Quantity[Round[100 countsDim1], "Percent"]],
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> Black, FontWeight -> Bold,
LegendMarkerSize -> 26], After, Bottom, Framed];
type = Framed[
PieChart[countsDim1, ChartLabels -> labels, ChartLegends -> legend,
PlotRange -> All,
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> White, FontWeight -> Bold, PlotTheme -> "Business",
ImageSize -> Medium], Background -> LightGreen]
In Mathematica 11.3 above code would produce a Pie Chart with the percentage of the Legend
black. In Mathematica 12, I get the text of the percentage with gray color.
Below the same figure with Mathematica 11.3 (albeit without the bold text of the LegendLabel
)
What is different in Mathematica 12?
How can I get the percentage in black color (and bold)?
graphics version-12
$endgroup$
add a comment |
$begingroup$
TD = 8 + 12 + 12 + 12 + 33 + (61 + 1/4) + (41 + 1/4)/2 +
15/2 + (18 + 3/4) + (18 + 3/4)/2 + 14/2;
CM = 15/2 + (61 + 1/4) + (41 + 1/4)/2 +
24 + (3 + 3/4) + (18 + 3/4) + (18 + 3/4)/2 + 14/2 + (24 + 3/4) +
9/2;
TP = 2*90;
countsDim1 = CM, TD, TP/(TD + TP + CM)
n = 384 + 179;
labels = Placed[
Row /@ Thread["" <> ToString@# <>
" H" & /@ N[(n countsDim1[[1]]), 5],
N[(n countsDim1[[2]]), 5], Round@N[(n countsDim1)[[3]]]],
"RadialOuter"];
legend = Placed[
SwatchLegend[Automatic,
Row /@ Thread["CM ", "TD ", "TP ",
Row["(", #, , ")"] & /@
Quantity[Round[100 countsDim1], "Percent"]],
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> Black, FontWeight -> Bold,
LegendMarkerSize -> 26], After, Bottom, Framed];
type = Framed[
PieChart[countsDim1, ChartLabels -> labels, ChartLegends -> legend,
PlotRange -> All,
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> White, FontWeight -> Bold, PlotTheme -> "Business",
ImageSize -> Medium], Background -> LightGreen]
In Mathematica 11.3 above code would produce a Pie Chart with the percentage of the Legend
black. In Mathematica 12, I get the text of the percentage with gray color.
Below the same figure with Mathematica 11.3 (albeit without the bold text of the LegendLabel
)
What is different in Mathematica 12?
How can I get the percentage in black color (and bold)?
graphics version-12
$endgroup$
TD = 8 + 12 + 12 + 12 + 33 + (61 + 1/4) + (41 + 1/4)/2 +
15/2 + (18 + 3/4) + (18 + 3/4)/2 + 14/2;
CM = 15/2 + (61 + 1/4) + (41 + 1/4)/2 +
24 + (3 + 3/4) + (18 + 3/4) + (18 + 3/4)/2 + 14/2 + (24 + 3/4) +
9/2;
TP = 2*90;
countsDim1 = CM, TD, TP/(TD + TP + CM)
n = 384 + 179;
labels = Placed[
Row /@ Thread["" <> ToString@# <>
" H" & /@ N[(n countsDim1[[1]]), 5],
N[(n countsDim1[[2]]), 5], Round@N[(n countsDim1)[[3]]]],
"RadialOuter"];
legend = Placed[
SwatchLegend[Automatic,
Row /@ Thread["CM ", "TD ", "TP ",
Row["(", #, , ")"] & /@
Quantity[Round[100 countsDim1], "Percent"]],
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> Black, FontWeight -> Bold,
LegendMarkerSize -> 26], After, Bottom, Framed];
type = Framed[
PieChart[countsDim1, ChartLabels -> labels, ChartLegends -> legend,
PlotRange -> All,
LabelStyle -> FontSize -> 26, FontFamily -> "Latin Modern Roman",
FontColor -> White, FontWeight -> Bold, PlotTheme -> "Business",
ImageSize -> Medium], Background -> LightGreen]
In Mathematica 11.3 above code would produce a Pie Chart with the percentage of the Legend
black. In Mathematica 12, I get the text of the percentage with gray color.
Below the same figure with Mathematica 11.3 (albeit without the bold text of the LegendLabel
)
What is different in Mathematica 12?
How can I get the percentage in black color (and bold)?
graphics version-12
graphics version-12
edited 4 hours ago
Dimitris
asked 5 hours ago
DimitrisDimitris
2,3621332
2,3621332
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
I don't know why it was visualized like that in Mathematica 11.3, but generally speaking, styling can be affected when you plot objects like entities, quantities, etc. instead of their corresponding strings. To be fully in control of the styling, I would suggest converting the quantity to a number.
I suggest replacing
Row["(", #, , ")"]
with
Row["(", QuantityMagnitude[#], "%)"]
$endgroup$
add a comment |
$begingroup$
Looks like a bug to me:
In version 12.0, the typesetting of Quantity
objects in TraditionalForm
(which is used for legends in Legended
expressions) breaks after typesetting a quantity with the same unit in StandardForm
. To see this, consider the following example: (use a fresh kernel)
TraditionalForm@Quantity[3.5, "Percent"]
Quantity[3.5, "Percent"]
TraditionalForm@Quantity[3.5, "Percent"]
TraditionalForm@Quantity[1, "Percent"]
As you can see, quantities are typeset differently in TraditionalForm
, and the one for TraditionalForm
changes after typesetting in StandardForm
once. The case of 1
is handled differently for some reason and does not break.
In 11.3, the typesetting of the TraditionalForm
variant does not break after typesetting the StandardForm
variant. This is why your example works in 11.3: The style for TraditionalForm
does not set the FontColor
, while the StandardForm
one does (see CurrentValue[StyleDefinitions, "QuantityPanel"]
, which is only used for StandardForm
). That this works seems like a lucky coincidence, so I would suggest to use the method from @C.E.'s answer anyway, even if this gets fixed.
Tracking down the issue
The issue is caused by a change to the caching used for quantity typesetting:
(* cache lookup in 11.3 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
(* cache lookup in 12.0 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form_:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
Note the change from form:StandardForm
to form_:StandardForm
- this extends the caching from StandardForm
to all forms. The reason I think this is a bug is that this is the only definition of QuantityBox
that defaults form
to anything (all the others require an explicit form to be given), which suggests someone "fixed" a typo.
The issue with the caching code is that it ignores form
when performing the cache lookup. Writing to the cache still requires StandardForm
(here, the form:StandardForm
pattern is still present in 12.0). The code was already questionable in 11.3 (since the caching partially supports forms other than StandardForm
), but this was not an issue since it was only ever called with StandardForm
.
$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/3.0/"u003ecc by-sa 3.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
);
);
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%2f197228%2ffont-color-issue-in-mathematica-12%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
I don't know why it was visualized like that in Mathematica 11.3, but generally speaking, styling can be affected when you plot objects like entities, quantities, etc. instead of their corresponding strings. To be fully in control of the styling, I would suggest converting the quantity to a number.
I suggest replacing
Row["(", #, , ")"]
with
Row["(", QuantityMagnitude[#], "%)"]
$endgroup$
add a comment |
$begingroup$
I don't know why it was visualized like that in Mathematica 11.3, but generally speaking, styling can be affected when you plot objects like entities, quantities, etc. instead of their corresponding strings. To be fully in control of the styling, I would suggest converting the quantity to a number.
I suggest replacing
Row["(", #, , ")"]
with
Row["(", QuantityMagnitude[#], "%)"]
$endgroup$
add a comment |
$begingroup$
I don't know why it was visualized like that in Mathematica 11.3, but generally speaking, styling can be affected when you plot objects like entities, quantities, etc. instead of their corresponding strings. To be fully in control of the styling, I would suggest converting the quantity to a number.
I suggest replacing
Row["(", #, , ")"]
with
Row["(", QuantityMagnitude[#], "%)"]
$endgroup$
I don't know why it was visualized like that in Mathematica 11.3, but generally speaking, styling can be affected when you plot objects like entities, quantities, etc. instead of their corresponding strings. To be fully in control of the styling, I would suggest converting the quantity to a number.
I suggest replacing
Row["(", #, , ")"]
with
Row["(", QuantityMagnitude[#], "%)"]
answered 2 hours ago
C. E.C. E.
51.5k3101207
51.5k3101207
add a comment |
add a comment |
$begingroup$
Looks like a bug to me:
In version 12.0, the typesetting of Quantity
objects in TraditionalForm
(which is used for legends in Legended
expressions) breaks after typesetting a quantity with the same unit in StandardForm
. To see this, consider the following example: (use a fresh kernel)
TraditionalForm@Quantity[3.5, "Percent"]
Quantity[3.5, "Percent"]
TraditionalForm@Quantity[3.5, "Percent"]
TraditionalForm@Quantity[1, "Percent"]
As you can see, quantities are typeset differently in TraditionalForm
, and the one for TraditionalForm
changes after typesetting in StandardForm
once. The case of 1
is handled differently for some reason and does not break.
In 11.3, the typesetting of the TraditionalForm
variant does not break after typesetting the StandardForm
variant. This is why your example works in 11.3: The style for TraditionalForm
does not set the FontColor
, while the StandardForm
one does (see CurrentValue[StyleDefinitions, "QuantityPanel"]
, which is only used for StandardForm
). That this works seems like a lucky coincidence, so I would suggest to use the method from @C.E.'s answer anyway, even if this gets fixed.
Tracking down the issue
The issue is caused by a change to the caching used for quantity typesetting:
(* cache lookup in 11.3 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
(* cache lookup in 12.0 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form_:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
Note the change from form:StandardForm
to form_:StandardForm
- this extends the caching from StandardForm
to all forms. The reason I think this is a bug is that this is the only definition of QuantityBox
that defaults form
to anything (all the others require an explicit form to be given), which suggests someone "fixed" a typo.
The issue with the caching code is that it ignores form
when performing the cache lookup. Writing to the cache still requires StandardForm
(here, the form:StandardForm
pattern is still present in 12.0). The code was already questionable in 11.3 (since the caching partially supports forms other than StandardForm
), but this was not an issue since it was only ever called with StandardForm
.
$endgroup$
add a comment |
$begingroup$
Looks like a bug to me:
In version 12.0, the typesetting of Quantity
objects in TraditionalForm
(which is used for legends in Legended
expressions) breaks after typesetting a quantity with the same unit in StandardForm
. To see this, consider the following example: (use a fresh kernel)
TraditionalForm@Quantity[3.5, "Percent"]
Quantity[3.5, "Percent"]
TraditionalForm@Quantity[3.5, "Percent"]
TraditionalForm@Quantity[1, "Percent"]
As you can see, quantities are typeset differently in TraditionalForm
, and the one for TraditionalForm
changes after typesetting in StandardForm
once. The case of 1
is handled differently for some reason and does not break.
In 11.3, the typesetting of the TraditionalForm
variant does not break after typesetting the StandardForm
variant. This is why your example works in 11.3: The style for TraditionalForm
does not set the FontColor
, while the StandardForm
one does (see CurrentValue[StyleDefinitions, "QuantityPanel"]
, which is only used for StandardForm
). That this works seems like a lucky coincidence, so I would suggest to use the method from @C.E.'s answer anyway, even if this gets fixed.
Tracking down the issue
The issue is caused by a change to the caching used for quantity typesetting:
(* cache lookup in 11.3 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
(* cache lookup in 12.0 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form_:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
Note the change from form:StandardForm
to form_:StandardForm
- this extends the caching from StandardForm
to all forms. The reason I think this is a bug is that this is the only definition of QuantityBox
that defaults form
to anything (all the others require an explicit form to be given), which suggests someone "fixed" a typo.
The issue with the caching code is that it ignores form
when performing the cache lookup. Writing to the cache still requires StandardForm
(here, the form:StandardForm
pattern is still present in 12.0). The code was already questionable in 11.3 (since the caching partially supports forms other than StandardForm
), but this was not an issue since it was only ever called with StandardForm
.
$endgroup$
add a comment |
$begingroup$
Looks like a bug to me:
In version 12.0, the typesetting of Quantity
objects in TraditionalForm
(which is used for legends in Legended
expressions) breaks after typesetting a quantity with the same unit in StandardForm
. To see this, consider the following example: (use a fresh kernel)
TraditionalForm@Quantity[3.5, "Percent"]
Quantity[3.5, "Percent"]
TraditionalForm@Quantity[3.5, "Percent"]
TraditionalForm@Quantity[1, "Percent"]
As you can see, quantities are typeset differently in TraditionalForm
, and the one for TraditionalForm
changes after typesetting in StandardForm
once. The case of 1
is handled differently for some reason and does not break.
In 11.3, the typesetting of the TraditionalForm
variant does not break after typesetting the StandardForm
variant. This is why your example works in 11.3: The style for TraditionalForm
does not set the FontColor
, while the StandardForm
one does (see CurrentValue[StyleDefinitions, "QuantityPanel"]
, which is only used for StandardForm
). That this works seems like a lucky coincidence, so I would suggest to use the method from @C.E.'s answer anyway, even if this gets fixed.
Tracking down the issue
The issue is caused by a change to the caching used for quantity typesetting:
(* cache lookup in 11.3 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
(* cache lookup in 12.0 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form_:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
Note the change from form:StandardForm
to form_:StandardForm
- this extends the caching from StandardForm
to all forms. The reason I think this is a bug is that this is the only definition of QuantityBox
that defaults form
to anything (all the others require an explicit form to be given), which suggests someone "fixed" a typo.
The issue with the caching code is that it ignores form
when performing the cache lookup. Writing to the cache still requires StandardForm
(here, the form:StandardForm
pattern is still present in 12.0). The code was already questionable in 11.3 (since the caching partially supports forms other than StandardForm
), but this was not an issue since it was only ever called with StandardForm
.
$endgroup$
Looks like a bug to me:
In version 12.0, the typesetting of Quantity
objects in TraditionalForm
(which is used for legends in Legended
expressions) breaks after typesetting a quantity with the same unit in StandardForm
. To see this, consider the following example: (use a fresh kernel)
TraditionalForm@Quantity[3.5, "Percent"]
Quantity[3.5, "Percent"]
TraditionalForm@Quantity[3.5, "Percent"]
TraditionalForm@Quantity[1, "Percent"]
As you can see, quantities are typeset differently in TraditionalForm
, and the one for TraditionalForm
changes after typesetting in StandardForm
once. The case of 1
is handled differently for some reason and does not break.
In 11.3, the typesetting of the TraditionalForm
variant does not break after typesetting the StandardForm
variant. This is why your example works in 11.3: The style for TraditionalForm
does not set the FontColor
, while the StandardForm
one does (see CurrentValue[StyleDefinitions, "QuantityPanel"]
, which is only used for StandardForm
). That this works seems like a lucky coincidence, so I would suggest to use the method from @C.E.'s answer anyway, even if this gets fixed.
Tracking down the issue
The issue is caused by a change to the caching used for quantity typesetting:
(* cache lookup in 11.3 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
(* cache lookup in 12.0 typesetting code for Quantity *)
QuantityUnits`QuantityBox[
Quantity[n_, unit_?QuantityUnits`Private`UnitDisplayCacheContainsQ], form_:StandardForm]
] :=
Quiet[QuantityUnits`Private`getUnitDisplayForm[unit, n, form], Part::partw]
Note the change from form:StandardForm
to form_:StandardForm
- this extends the caching from StandardForm
to all forms. The reason I think this is a bug is that this is the only definition of QuantityBox
that defaults form
to anything (all the others require an explicit form to be given), which suggests someone "fixed" a typo.
The issue with the caching code is that it ignores form
when performing the cache lookup. Writing to the cache still requires StandardForm
(here, the form:StandardForm
pattern is still present in 12.0). The code was already questionable in 11.3 (since the caching partially supports forms other than StandardForm
), but this was not an issue since it was only ever called with StandardForm
.
answered 48 mins ago
Lukas LangLukas Lang
7,48011032
7,48011032
add a comment |
add a comment |
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%2f197228%2ffont-color-issue-in-mathematica-12%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