罗马数字
将任意输出表达式中的整数转换为罗马数字.
时钟表盘.
In[1]:=
![Click for copyable input](assets.zh/roman-numerals/In_33.png)
clock = ClockGauge[{10, 10, 30},
TicksStyle -> ColorData[40, 2], GaugeMarkers -> "FlatProfileNeedle"]
Out[1]=
![](assets.zh/roman-numerals/O_28.png)
In[2]:=
![Click for copyable input](assets.zh/roman-numerals/In_34.png)
clock /. Text[s_Integer, rest__] :> Text[RomanNumeral[s], rest]
Out[2]=
![](assets.zh/roman-numerals/O_29.png)
指针式表盘.
In[3]:=
![Click for copyable input](assets.zh/roman-numerals/In_35.png)
AngularGauge[
Quantity[714, "RomanOunces"], {Quantity[0, "RomanOunces"],
Quantity[1000, "RomanOunces"]}, GaugeLabels -> "Unit",
PlotTheme -> "Monochrome"] /.
Text[s_Integer, rest__] :> Text[RomanNumeral[s], rest]
Out[3]=
![](assets.zh/roman-numerals/O_30.png)