### Generic Command Line Front End Help Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/tools.txt Example of getting help for the generic front end with specific components. ```bash docutils --parser=markdown --writer=xml --help ``` -------------------------------- ### Install and Test Commands Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Commands for installing Scalene in development mode, running tests, linters, and specific test files. ```bash pip install -e . python3 -m pytest tests/ python3.X -m pytest tests/ mypy scalene ruff check scalene python3 -m pytest tests/test_coverup_83.py -v ``` -------------------------------- ### Installing multiple Python versions with pyenv Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/testing.txt This example shows how to install and configure multiple Python versions using 'pyenv'. ```shell # assuming your system runs 3.9.x pyenv install 3.7.12 pyenv install 3.8.12 pyenv install 3.10.1 # reset your shims rm -rf ~/.pyenv/shims && pyenv rehash ``` -------------------------------- ### Profile with interval, then view Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example command to run Scalene with a profiling interval and then view the results. ```bash python -m scalene run --profile-interval=2 test/testme.py && python -m scalene view --cli ``` -------------------------------- ### GitHub Workflows Example Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Indication that GitHub workflows use the new CLI syntax. ```yaml ``` -------------------------------- ### Installation Target Source: https://github.com/plasma-umass/scalene/blob/master/CMakeLists.txt Defines the installation rules for the 'scalene' target. ```cmake # Installation install(TARGETS scalene LIBRARY DESTINATION scalene RUNTIME DESTINATION scalene ) ``` -------------------------------- ### Test Dependencies Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Command to install necessary dependencies for running tests. ```bash pip install pytest pytest-asyncio hypothesis ``` -------------------------------- ### Include by URL Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt An example of how to include content from a URL using the 'include' directive. ```rst .. include:: :url: https://www.example.org/inclusion.txt ``` -------------------------------- ### XeTeX/LuaTeX Font Setup Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/latex.txt Setting main, sans-serif, and monospace fonts using the fontspec package. ```latex \setmainfont{DejaVu Serif} \setsansfont{DejaVu Sans} \setmonofont[HyphenChar=None]{DejaVu Sans Mono} ``` -------------------------------- ### Profile with module invocation Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example command to run Scalene by invoking a Python module. ```bash python -m scalene run --- -m import_stress_test && python -m scalene view --cli ``` -------------------------------- ### Object reference example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example of using interpreted text for object references. ```rst See Figure :ref:`figure name` and Equation :ref:`eq:identity`. See :figure:`figure name` on :page:`figure name`. ``` -------------------------------- ### YAML Configuration Example Source: https://github.com/plasma-umass/scalene/blob/master/scalene/scalene-usage.txt Example of a scalene.yaml file with various profiling options. ```yaml outfile: my-profile.json cpu-only: true profile-only: "mypackage,utils" cpu-percent-threshold: 5 ``` -------------------------------- ### Literal Block Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/rst/problems.txt An example demonstrating how to start a section with a literal block in reStructuredText. ```rst Section Title ------------- :: print "this is example literal" ``` -------------------------------- ### Example of using BibTeX support Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/config.txt Demonstrates how to specify style and database for BibTeX support. ```bash --use-bibtex=mystyle,mydb1,mydb2 ``` -------------------------------- ### BuildHTML.py Configuration Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/tools.txt Example of using buildhtml.py with a specific configuration file. ```bash cd docutils tools/buildhtml.py --config=tools/docutils.conf ``` -------------------------------- ### Smoke Tests Example Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example of a smoke test using the Scalene CLI. ```python # test/smoketest.py cmd = [sys.executable, "-m", "scalene", "run", "-o", str(outfile), *rest, fname] ``` -------------------------------- ### Combined Stacks JSON Example Source: https://github.com/plasma-umass/scalene/blob/master/Scalene-Agents.md Example of how Python and native frames are represented in combined_stacks. ```json {"kind": "py", "display_name": "hot", "filename_or_module": "/app/work.py", "line": 42, "ip": null, "offset": null} {"kind": "native", "display_name": "cblas_dgemm", "filename_or_module": "/lib/libBLAS.so", "line": null, "ip": 140735, "offset": 32} ``` -------------------------------- ### Jim Fulton's glob usage example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt An example demonstrating how globs can be used with the --convert-link-extensions-for option. ```bash rst2html.py --convert-link-extensions-for "`echo *.txt`" foo.txt ``` -------------------------------- ### Identifier Normalization Example 2 Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt Example of normalizing a string starting with a number into a valid CSS class name. ```text "1000_Steps!" becomes "steps" ``` -------------------------------- ### File-specific settings support Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example of how to add file-specific settings to configuration files. ```ini [file index.txt] compact-lists: no [source_file index.txt] ... [dest_file index.html] ... ``` -------------------------------- ### Jim Fulton's multiple arguments example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt An example showing the use of multiple arguments with the --convert-link-extensions-for option. ```bash rst2html.py --convert-link-extensions-for *.txt -- foo.txt ``` -------------------------------- ### Custom directive example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example of defining and using a custom directive, similar to macros. ```rst .. directive:: incr .. class:: incremental .. incr:: ``` ```rst .. directive:: printed-links .. topic:: Links :class: print-block .. target-notes:: :class: print-inline ``` -------------------------------- ### Add-stylesheet option - Default and custom stylesheet Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example command to use the default stylesheet and a custom one. ```bash rstpep2html.py --add-stylesheet-path custom.css ... ``` -------------------------------- ### Doctest Block Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/peps/pep-0287.txt Shows a doctest block, which starts with '>>> ' and is used for Python-specific usage examples, mimicking interactive sessions. ```text >>> print 'Python-specific usage examples; begun with ">>>"' Python-specific usage examples; begun with ">>>" >>> print '(cut and pasted from interactive sessions)' (cut and pasted from interactive sessions) ``` -------------------------------- ### Profile Completion Message Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example output message after profiling completes. ```text Scalene: profile saved to scalene-profile.json To view in browser: scalene view To view in terminal: scalene view --cli ``` -------------------------------- ### Scalene View Examples Source: https://github.com/plasma-umass/scalene/blob/master/index.rst Examples of how to use the 'scalene view' command. ```console % scalene view % scalene view --cli % scalene view --html % scalene view myprofile.json ``` -------------------------------- ### Table with Bullet List Syntax for Row Starts Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/rst/problems.txt A reStructuredText table example where bullet list syntax in the first column indicates row starts, allowing for multi-line rows. ```rst ===== ===== col 1 col 2 ===== ===== - 1 Second column of row 1. - 2 Second column of row 2. Second line of paragraph. - 3 Second column of row 3. Second paragraph of row 3, column 2 ===== ===== ``` -------------------------------- ### List values example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/config.txt Examples demonstrating how list values are parsed in configuration files, showing different delimiters and whitespace handling. ```config strip-classes: ham,eggs, strip-elements-with-classes: sugar, salt, flour stylesheet: html4css1.css, math.css, style with spaces.css stylesheet-path: ../styles/my.css, ../styles/funny.css ``` ```config expose_internals: b:c:d ``` -------------------------------- ### CLI Structure - View Subcommand Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example usage of the Scalene 'view' subcommand. ```bash # View an existing profile scalene view [options] [profile.json] ``` -------------------------------- ### CLI Structure - Run Subcommand Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example usage of the Scalene 'run' subcommand. ```bash # Profile a program (saves to scalene-profile.json by default) scalene run [options] yourprogram.py ``` -------------------------------- ### Build the GUI Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Command to build the web-based GUI for Scalene. ```bash npm --prefix scalene/scalene-gui run build ``` -------------------------------- ### Indirect Links Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt An example demonstrating how to create indirect links using citation references. ```python `Goodger (2005)`_ is helpful. .. _Goodger (2005): [goodger2005]_ .. [goodger2005] citation text ``` -------------------------------- ### Python Version Check Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example of checking Python version for conditional code execution. ```python import sys if sys.version_info >= (3, 14): # Python 3.14+ specific code else: # Older Python versions ``` -------------------------------- ### Setting up Option Parser Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/runtime-settings-processing.txt Demonstrates the setup of the OptionParser for retrieving default values. ```python optpar = publisher.setup_option_parser(…, settings_spec, config_section, **defaults) ``` -------------------------------- ### Build Instructions for Windows DLL Source: https://github.com/plasma-umass/scalene/blob/master/agents/windows-memory-profiling-port.md Commands to configure, build, and run the Scalene profiler on Windows, including CMake and MSBuild steps. ```bash # Configure with CMake (for ARM64 native) cmake -B build -A ARM64 -DPython3_ROOT_DIR="C:\Users\emery\AppData\Local\Programs\Python\Python311-arm64" # Build the DLL MSBuild.exe build/scalene.sln -p:Configuration=Release -p:Platform=ARM64 -t:scalene # DLL is automatically placed in scalene\ directory # Run profiler python -m scalene --cli --cpu --memory test\testme.py ``` -------------------------------- ### Adding a New CLI Option - scalene_parseargs.py Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example of adding a new argument to the parser in `scalene_parseargs.py`. ```python parser.add_argument( "--my-option", dest="my_option", action="store_true", default=defaults.my_option, help="Description of option", ) ``` -------------------------------- ### Get help Source: https://github.com/plasma-umass/scalene/blob/master/index.rst Commands to access help information for Scalene. ```console scalene --help # main help scalene run --help # profiling options scalene run --help-advanced # advanced profiling options scalene view --help # viewing options ``` -------------------------------- ### Adding a New CLI Option - ScaleneArgumentsDict Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example of adding a new option to the `ScaleneArgumentsDict` in `scalene_arguments.py`. ```python class ScaleneArgumentsDict(TypedDict, total=False): my_option: bool ``` -------------------------------- ### Example of using --stylesheet Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/odt.txt Demonstrates how to use a custom stylesheet with the rst2odt.py command. ```bash $ rst2odt.py --stylesheet=mystyles.odt test2.txt test2.odt ``` -------------------------------- ### Bold version of any mathematical symbol Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/mathematics.txt Example using \boldsymbol to get a bold version of mathematical symbols. ```math \boldsymbol{\cos(x)\pm\alpha \approx 3\Gamma \quad \forall x\in\mathbb{R}} ``` -------------------------------- ### Example reStructuredText Input Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/hacking.txt A simple reStructuredText file used to illustrate Docutils processing stages. ```rst My *favorite* language is Python_. .. _Python: https://www.python.org/ ``` -------------------------------- ### Command Line Examples Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/odt.txt Examples of using the rst2odt.py command with different options. ```bash $ rst2odt.py -s -g python_comments.txt python_comments.odt ``` ```bash $ rst2odt.py --source-url=odtwriter.txt --generator \ --stylesheet=/myconfigs/styles.odt odtwriter.txt odtwriter.odt ``` -------------------------------- ### Configuration File Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/odt.txt Example of setting stylesheet option in a configuration file. ```ini [odf_odt writer] stylesheet: styles1.odt ``` -------------------------------- ### HTML Output from rst2html.py Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/hacking.txt The resulting HTML output after processing the example reStructuredText file with the rst2html.py tool. ```html [uninteresting HTML code removed]

My favorite language is Python.

``` -------------------------------- ### Adding a New AI Provider - Provider Module Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example TypeScript code for creating a new AI provider module. ```typescript export async function sendPromptToNewProvider( prompt: string, apiKey: string ): Promise { // API call implementation } export async function fetchNewProviderModels(apiKey: string): Promise { // Optional: fetch available models from API } ``` -------------------------------- ### Load and configure LaTeX syntax highlighting Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/latex.txt Example of loading and configuring the listings package for LaTeX syntax highlighting. ```latex \lstloadlanguages{'[LaTeX]TeX'} % comma separated list of languages \newcommand{\DUCLASSlatex}{\lstset{language='[LaTeX]TeX'}} ``` -------------------------------- ### Generic Command Line Front End Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/tools.txt Example of processing a Markdown file to Pseudo-XML using the generic front end. ```bash python3 -m docutils --parser=markdown --writer=pseudoxml\ test.md test.txt ``` -------------------------------- ### Port Binding in Tests Source: https://github.com/plasma-umass/scalene/blob/master/CLAUDE.md Example of bad practice (hardcoded port) and good practice (finding available port) for testing port availability. ```python # Bad - port 49200 might be in use port = 49200 sock.bind(("", port)) # Good - find an available port first port = find_available_port(49200, 49300) if port is None: return # Skip test if no ports available sock.bind(("", port)) ``` -------------------------------- ### rst2html.py command line usage Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/hacking.txt Example of using the rst2html.py tool to convert a reStructuredText file to HTML, including linking a stylesheet. ```bash $ rst2html.py --link-stylesheet test.txt ``` -------------------------------- ### setup_option_parser() Call Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/runtime-settings-processing.txt Demonstrates the call to publisher.setup_option_parser(), which sets up the option parser for processing settings. ```python optpar = publisher.setup_option_parser(…, settings_spec, config_section, **defaults) ``` -------------------------------- ### Header Directive Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt Example of the `header` directive. ```text .. header:: This space for rent. ``` -------------------------------- ### Add-stylesheet option - Single custom stylesheet Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example command to use only one custom stylesheet. ```bash rstpep2html.py --stylesheet-path custom.css ... ``` -------------------------------- ### Add-stylesheet option - Default, local, and external stylesheet Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example command to use the default stylesheet, a custom local stylesheet, and an external stylesheet. ```bash rstpep2html.py --add-stylesheet-path custom.css \ --add-stylesheet https://www.example.org/external.css ... ``` -------------------------------- ### Iconv command example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/config.txt Example of using the 'iconv' command for character encoding conversion. ```shell $(shell iconv -f utf8 -t latin1 hamdeps.txt) ``` -------------------------------- ### Doctest Block Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/restructuredtext.txt An example of a doctest block. ```rst >>> print 'this is a Doctest block' this is a doctest block ``` -------------------------------- ### Organization Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/doctree.txt Example of how to specify the organization in reStructuredText. ```reStructuredText Document Title ============== :Organization: Humankind ``` -------------------------------- ### Prune option for buildhtml.py Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example of extending the --prune option to accept file names. ```bash --prune=docs/user/rst/cheatsheet.txt ``` -------------------------------- ### Contents Directive Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt Example of the `contents` directive with options. ```text .. contents:: Table of Contents :depth: 2 ``` -------------------------------- ### BuildHTML.py Usage Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/tools.txt Example of using buildhtml.py to generate HTML for documentation. ```bash cd docutils/tools buildhtml.py .. ``` -------------------------------- ### Problematic URLs - Unbalanced braces example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt Example demonstrating how unbalanced braces fail when used with \href and \url. ```text file with { <../strange{name>__ <../strange{name>__ ``` -------------------------------- ### Image directive example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt This is a basic example of the image directive. ```rst .. image:: picture.png ``` -------------------------------- ### Scalene help command Source: https://github.com/plasma-umass/scalene/blob/master/README.md This command shows all available options for Scalene. ```console % scalene --help Scalene: a high-precision CPU and memory profiler, version 1.5.51 (2025.01.29) https://github.com/plasma-umass/scalene commands: run Profile a Python program (saves to scalene-profile.json) view View an existing profile in browser or terminal examples: % scalene run your_program.py # profile, save to scalene-profile.json % scalene view # view scalene-profile.json in browser % scalene view --cli # view profile in terminal in Jupyter, line mode: %scrun [options] statement in Jupyter, cell mode: %%scalene [options] your code here % scalene run --help Profile a Python program with Scalene. examples: % scalene run prog.py # profile, save to scalene-profile.json % scalene run -o my.json prog.py # save to custom file % scalene run --cpu-only prog.py # profile CPU only (faster) % scalene run -c scalene.yaml prog.py # load options from config file % scalene run prog.py --- --arg # pass args to program % scalene run --help-advanced # show advanced options options: -h, --help show this help message and exit -o, --outfile OUTFILE output file (default: scalene-profile.json) --cpu-only only profile CPU time (no memory/GPU) -c, --config FILE load options from YAML config file --help-advanced show advanced options % scalene run --help-advanced Advanced options for scalene run: background profiling: Use --off to start with profiling disabled, then control it from another terminal: % scalene run --off prog.py # start with profiling off % python3 -m scalene.profile --on --pid # resume profiling % python3 -m scalene.profile --off --pid # suspend profiling options: --profile-all profile all code, not just the target program --profile-only PATH only profile files containing these strings (comma-separated) --profile-exclude PATH exclude files containing these strings (comma-separated) --profile-system-libraries profile Python stdlib and installed packages (default: skip) --gpu profile GPU time and memory --memory profile memory usage --stacks collect stack traces (default: on) --no-stacks disable stack-trace collection --profile-interval N output profiles every N seconds (default: inf) --use-virtual-time measure only CPU time, not I/O or blocking --cpu-percent-threshold N only report lines with at least N% CPU (default: 1%) --cpu-sampling-rate N CPU sampling rate in seconds (default: 0.01) --allocation-sampling-window N allocation sampling window in bytes --malloc-threshold N only report lines with at least N allocations (default: 100) --program-path PATH directory containing code to profile --memory-leak-detector EXPERIMENTAL: report likely memory leaks --on start with profiling on (default) --off start with profiling off % scalene view --help View an existing Scalene profile. examples: % scalene view # open in browser % scalene view --cli # view in terminal % scalene view --html # save to scalene-profile.html % scalene view --standalone # save as self-contained HTML % scalene view myprofile.json # open specific profile in browser options: -h, --help show this help message and exit --cli display profile in the terminal --html save to scalene-profile.html (no browser) --standalone save as self-contained HTML with all assets embedded -r, --reduced only show lines with activity (--cli mode) ``` -------------------------------- ### DANGER Admonition Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt Example of a specific admonition directive. ```rst .. DANGER:: Beware killer rabbits! ``` -------------------------------- ### Substitution Reference Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/restructuredtext.txt Example of a simple substitution reference. ```rst This is a simple |substitution reference|. It will be replaced by the processing system. ``` -------------------------------- ### Commonly used command-line options Source: https://github.com/plasma-umass/scalene/blob/master/README.md Examples of common Scalene commands for profiling, viewing results, and configuring options. ```console # Profile a program (saves to scalene-profile.json) scalene run your_prog.py python3 -m scalene run your_prog.py # equivalent alternative # View a profile scalene view # open profile in browser scalene view --cli # view in terminal scalene view --html # save to scalene-profile.html scalene view --standalone # save as self-contained HTML # Common profiling options scalene run --cpu-only your_prog.py # only profile CPU (faster) scalene run -o results.json your_prog.py # custom output filename scalene run -c config.yaml your_prog.py # load options from config file # Pass arguments to your program (use --- separator) scalene run your_prog.py --- --arg1 --arg2 # Get help scalene --help # main help scalene run --help # profiling options scalene run --help-advanced # advanced profiling options scalene view --help # viewing options ``` -------------------------------- ### Phantom Space Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/mathematics.txt Example using \phantom for spacing. ```math \frac{\phantom{XXX}+1}{XXX-1} ``` -------------------------------- ### SGML Book Structure Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/dev/todo.txt An example of how an SGML system coordinated book structure and component files, using 'inrefid' attributes for insertion references. ```xml Title of the Book ``` -------------------------------- ### Generic Admonition Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/directives.txt Example of a generic admonition with a custom title. ```rst .. admonition:: And, by the way... You can make up your own admonition too. ``` -------------------------------- ### Example of using --stylesheet-path with multiple stylesheets Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/howto/html-stylesheets.txt This command demonstrates how to specify multiple stylesheets using the --stylesheet option. ```bash rst2html.py --stylesheet=html4css1.css,transition-stars.css ``` -------------------------------- ### Citation Reference Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/restructuredtext.txt Example of a citation reference with a label 'CIT2002'. ```rst Here is a citation reference: [CIT2002]_. ``` -------------------------------- ### Standalone Hyperlink Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/rst/restructuredtext.txt Example of a standalone hyperlink treated as a URI. ```rst `__init__ `__ ``` -------------------------------- ### Local installation - Step 1 Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/user/emacs.txt URL to download the rst.el file. ```URL https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/tools/editors/emacs/rst.el ``` -------------------------------- ### Sidebar Directive Example Source: https://github.com/plasma-umass/scalene/blob/master/test/expensive_benchmarks/docutils_data/docs/ref/doctree.txt Example of how to use the 'sidebar' directive in reStructuredText. ```rst .. sidebar:: Optional Title :subtitle: If Desired Body. ```