Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

StylesheetTools

Guides

  • Stylesheet Tools

Symbols

  • GenerateCommonStylesheet
  • StyleDataConnectivityGraph
  • StyleDataInheritanceSummary
  • StylesheetConnectivityGraph
  • StylesheetEvaluateAndSave
  • StylesheetFlatten
  • StylesheetPathFind
  • StylesheetQ
  • StylesheetRebase
  • StylesheetRemoveRedundantOptions
  • StylesheetReplaceAll
  • StylesheetReplaceRepeated
  • StylesheetReportRedundantOptions
  • StylesheetReportSyntaxErrors
  • StylesheetReportUnintendedEvaluation
  • StylesheetWrite
Wolfram`StylesheetTools`
StylesheetWrite
​
StylesheetWrite
[styleDataopts]
inserts the specified modifications to the private stylesheet.
​
​
StylesheetWrite
[{
s
1

o
1
,
s
2

o
2
,…}]
inserts multiple modifications to the private stylesheet.
​
​
StylesheetWrite
[nbObj,mods]
inserts the stylesheet modifications to the stylesheet
NotebookObject
nbObj
.
​
Details and Options

Examples  
(10)
Basic Examples  
(3)
Create a new notebook that contains a cell that uses the
"StyleA"
style which is not currently defined:
In[1]:=
nbObj=CreateDocument[TextCell["This is a cell using StyleA.","StyleA"],WindowSize{300,300},SaveableFalse]
Out[1]=
NotebookObject
Untitled-3

Modify the private stylesheet to increase the
FontSize
of
"StyleA"
:
In[2]:=
StylesheetWrite
[nbObj,"StyleA"FontSize40]
View the changes to the private stylesheet:
In[3]:=
CurrentValue[nbObj,StyleDefinitions]
Out[3]=
Notebook[{Cell[StyleData[StyleDefinitionsDefault.nb]],Cell[StyleData[StyleA],FontSize40]},VisibleFalse,FrontEndVersion13.1 for Microsoft Windows (64-bit) (August 22, 2022),StyleDefinitionsPrivateStylesheetFormatting.nb]
​
Create a new notebook that contains cells that use undefined styles:
In[1]:=
nbObj=CreateDocument[{TextCell["This is a cell using StyleB.","StyleB"],TextCell["This is a cell using StyleC.","StyleC"]},WindowSize{300,300},SaveableFalse]
Out[1]=
NotebookObject
Untitled-4

Add multiple styles to the private stylesheet to modify
"StyleB"
and
"StyleC"
:
In[2]:=
StylesheetWrite
[nbObj,{"StyleB"FontColorRed,"StyleC"{FontColorBlue,FontSlantItalic}}]
​
Create a stylesheet notebook:
In[1]:=
nbObj=CreateDocument[{Cell[StyleData[StyleDefinitions"Default.nb"]]},WindowSize{400,300},StyleDefinitions"StylesheetFormatting.nb"];
Add styles to this new stylesheet:
In[2]:=
StylesheetWrite
[nbObj,{{"StyleA",StyleDefinitionsStyleData["StyleB"]}FontSize40,"StyleB"FontColorRed,"StyleC"{FontColorBlue,FontSlantItalic}}]
Scope  
(3)

Options  
(3)

Possible Issues  
(1)

SeeAlso
StyleData
 
▪
Inherited
 
▪
StyleDefinitions
 
▪
NotebookWrite
 
▪
NotebookObject
TechNotes
▪
Working With Stylesheets
RelatedGuides
▪
Stylesheet Tools
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com