diff --git a/.lycheeignore b/.lycheeignore
index e310297..798141f 100644
--- a/.lycheeignore
+++ b/.lycheeignore
@@ -38,7 +38,7 @@ file:///path/to/
# GitHub URLs for this repository (will be checked differently)
# Exclude to avoid checking during development
-# https://github.com/metanorma/postscript-guide
+# https://github.com/claricle/postscript-guide
# Template/placeholder patterns in examples
PLACEHOLDER
@@ -51,3 +51,10 @@ FIXME
# PostScript.org site unavailable
https://www.postscript.org/
+
+# Schema.org may be temporarily unavailable
+https://schema.org/
+
+# Internal files
+file:///home/runner/work/postscript-guide/postscript-guide/LICENSE
+file:///home/runner/work/postscript-guide/postscript-guide/docs/LINK_CHECKING.md
diff --git a/README.adoc b/README.adoc
index 3adb163..1a33da2 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,7 +1,7 @@
= PostScript Language Guide
-image:https://img.shields.io/github/license/metanorma/postscript-guide.svg[License]
-image:https://img.shields.io/github/actions/workflow/status/metanorma/postscript-guide/pages.yml?branch=main[Build Status]
+image:https://img.shields.io/github/license/claricle/postscript-guide.svg[License]
+image:https://img.shields.io/github/actions/workflow/status/claricle/postscript-guide/pages.yml?branch=main[Build Status]
== Purpose
@@ -15,7 +15,7 @@ accessible, well-organized resource for developers, designers, and anyone
working with PostScript.
The documentation is deployed at:
-https://metanorma.github.io/postscript-guide/
+https://claricle.github.io/postscript-guide/
== Features
@@ -46,7 +46,7 @@ Clone the repository:
[source,bash]
----
-git clone https://github.com/metanorma/postscript-guide.git
+git clone https://github.com/claricle/postscript-guide.git
cd postscript-guide
----
@@ -219,7 +219,7 @@ Reference Guide.
[[reporting-issues]]
=== Reporting issues
-* Use the https://github.com/metanorma/postscript-guide/issues[GitHub Issues]
+* Use the https://github.com/claricle/postscript-guide/issues[GitHub Issues]
page
* Provide clear descriptions of errors or missing content
* Include specific examples when possible
@@ -289,8 +289,8 @@ for details.
[[support]]
== Support
-Documentation:: https://metanorma.github.io/postscript-guide/
+Documentation:: https://claricle.github.io/postscript-guide/
-Issues:: https://github.com/metanorma/postscript-guide/issues
+Issues:: https://github.com/claricle/postscript-guide/issues
-Discussions:: https://github.com/metanorma/postscript-guide/discussions
+Discussions:: https://github.com/claricle/postscript-guide/discussions
diff --git a/_config.yml b/_config.yml
index 751fad4..00a021b 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,18 +1,18 @@
title: "PostScript Language Guide"
description: "Comprehensive documentation for the PostScript programming language, covering operators, syntax, and practical usage examples"
# baseurl: "/postscript-guide"
-url: "https://metanorma.github.io"
+url: "https://claricle.github.io"
# Repository
-repository: metanorma/postscript-guide
+repository: claricle/postscript-guide
# Theme configuration
theme: just-the-docs
color_scheme: light
-# Logo and favicon (optional, can be added later)
-# logo: "/assets/images/logo.png"
-# favicon_ico: "/assets/images/favicon.ico"
+# Logo and favicon
+logo: "/docs/assets/images/logo.svg"
+favicon_ico: "/docs/assets/images/favicon.ico"
# AsciiDoc support
asciidoc: {}
@@ -47,9 +47,9 @@ nav_fold: true
# External links
aux_links:
"Source":
- - "https://github.com/metanorma/postscript-guide"
+ - "https://github.com/claricle/postscript-guide"
"Report Issues":
- - "https://github.com/metanorma/postscript-guide/issues"
+ - "https://github.com/claricle/postscript-guide/issues"
"Adobe PostScript Language Reference Manual":
- "https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf"
@@ -63,7 +63,7 @@ back_to_top_text: "Back to top"
heading_anchors: true
# Footer
-footer_content: "Copyright © 2025 Metanorma. PostScript is a trademark of Adobe. Distributed under the MIT License."
+footer_content: "Copyright © 2025 Ribose. PostScript is a trademark of Adobe. Distributed under the MIT License."
# Collections
collections:
diff --git a/docs/_config.yml b/docs/_config.yml
deleted file mode 100644
index ac6237c..0000000
--- a/docs/_config.yml
+++ /dev/null
@@ -1,119 +0,0 @@
-title: "PostScript Language Guide"
-description: "Comprehensive documentation for the PostScript programming language, covering operators, syntax, and practical usage examples"
-# baseurl: "/postscript-guide"
-url: "https://metanorma.github.io"
-
-# Repository
-repository: metanorma/postscript-guide
-
-# Theme configuration
-theme: just-the-docs
-color_scheme: light
-
-# Logo and favicon (optional, can be added later)
-# logo: "/assets/images/logo.png"
-# favicon_ico: "/assets/images/favicon.ico"
-
-# AsciiDoc support
-asciidoc: {}
-asciidoctor:
- attributes:
- idprefix: ''
- idseparator: '-'
- source-highlighter: rouge
- icons: font
- experimental: true
- sectanchors: true
- linkattrs: true
- sectnums: true
- toc: left
- toclevels: 3
-
-# Search configuration
-search_enabled: true
-search:
- heading_level: 3
- previews: 3
- preview_words_before: 5
- preview_words_after: 10
- tokenizer_separator: /[\s/]+/
- rel_url: true
- button: true
-
-# Navigation
-nav_sort: case_insensitive
-nav_fold: true
-
-# External links
-aux_links:
- "Source":
- - "https://github.com/metanorma/postscript-guide"
- "Report Issues":
- - "https://github.com/metanorma/postscript-guide/issues"
- "Adobe PostScript Language Reference Manual":
- - "https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf"
-
-aux_links_new_tab: true
-
-# Back to top
-back_to_top: true
-back_to_top_text: "Back to top"
-
-# Heading anchors
-heading_anchors: true
-
-# Footer
-footer_content: "Copyright © 2025 Metanorma. PostScript is a trademark of Adobe. Distributed under the MIT License."
-
-# Collections
-collections:
- commands:
- output: true
- permalink: /:collection/:path
- pages:
- output: true
- permalink: /:path
-
-# Defaults
-defaults:
- - scope:
- path: ""
- type: pages
- values:
- layout: default
- # - scope:
- # path: "docs"
- # values:
- # layout: default
-
-# Plugins
-plugins:
- - jekyll-asciidoc
- - jekyll-seo-tag
-
-# Markdown settings (for any markdown files)
-markdown: kramdown
-kramdown:
- input: GFM
- hard_wrap: false
- syntax_highlighter: rouge
-
-# Exclude from processing
-exclude:
- - Gemfile
- - Gemfile.lock
- - node_modules
- - vendor
- - .sass-cache
- - .jekyll-cache
- - .bundle
- - README.md
- - LICENSE
- - .git
- - .gitignore
-
-# Include
-include:
- - docs
-
-permalink: pretty
diff --git a/docs/_includes/head_custom.html b/docs/_includes/head_custom.html
new file mode 100644
index 0000000..3636f69
--- /dev/null
+++ b/docs/_includes/head_custom.html
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/assets/images/logo.svg b/docs/assets/images/logo.svg
new file mode 100644
index 0000000..17b1af4
--- /dev/null
+++ b/docs/assets/images/logo.svg
@@ -0,0 +1,100 @@
+
+
+
diff --git a/docs/commands/arithmetic-math/index.adoc b/docs/commands/arithmetic-math/index.adoc
index 6951d4f..a6c5407 100644
--- a/docs/commands/arithmetic-math/index.adoc
+++ b/docs/commands/arithmetic-math/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Arithmetic and Math
-parent: Command Reference
+parent: Commands
nav_order: 2
---
@@ -17,54 +17,54 @@ PostScript provides a comprehensive set of arithmetic and mathematical operators
The fundamental arithmetic operations:
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
-* xref:../div.adoc[`div`] - Divide (real result)
-* xref:../idiv.adoc[`idiv`] - Integer division
-* xref:../mod.adoc[`mod`] - Modulo (remainder)
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
+* link:/docs/commands/references/div/[`div`] - Divide (real result)
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division
+* link:/docs/commands/references/mod/[`mod`] - Modulo (remainder)
==== Unary Operations
Operations on a single number:
-* xref:../abs.adoc[`abs`] - Absolute value
-* xref:../neg.adoc[`neg`] - Negate
-* xref:../ceiling.adoc[`ceiling`] - Round up to integer
-* xref:../floor.adoc[`floor`] - Round down to integer
-* xref:../round.adoc[`round`] - Round to nearest integer
-* xref:../truncate.adoc[`truncate`] - Truncate to integer
+* link:/docs/commands/references/abs/[`abs`] - Absolute value
+* link:/docs/commands/references/neg/[`neg`] - Negate
+* link:/docs/commands/references/ceiling/[`ceiling`] - Round up to integer
+* link:/docs/commands/references/floor/[`floor`] - Round down to integer
+* link:/docs/commands/references/round/[`round`] - Round to nearest integer
+* link:/docs/commands/references/truncate/[`truncate`] - Truncate to integer
==== Exponential and Logarithmic
Power and logarithm functions:
-* xref:../sqrt.adoc[`sqrt`] - Square root
-* xref:../exp.adoc[`exp`] - Exponential (base^exponent)
-* xref:../ln.adoc[`ln`] - Natural logarithm (base e)
-* xref:../log.adoc[`log`] - Common logarithm (base 10)
+* link:/docs/commands/references/sqrt/[`sqrt`] - Square root
+* link:/docs/commands/references/exp/[`exp`] - Exponential (base^exponent)
+* link:/docs/commands/references/ln/[`ln`] - Natural logarithm (base e)
+* link:/docs/commands/references/log/[`log`] - Common logarithm (base 10)
==== Trigonometric
Trigonometric functions (angles in degrees):
-* xref:../sin.adoc[`sin`] - Sine
-* xref:../cos.adoc[`cos`] - Cosine
-* xref:../atan.adoc[`atan`] - Arctangent
+* link:/docs/commands/references/sin/[`sin`] - Sine
+* link:/docs/commands/references/cos/[`cos`] - Cosine
+* link:/docs/commands/references/atan/[`atan`] - Arctangent
==== Bitwise Operations
Operations on integer bit patterns:
-* xref:../bitshift.adoc[`bitshift`] - Bitwise shift left or right
+* link:/docs/commands/references/bitshift/[`bitshift`] - Bitwise shift left or right
==== Random Numbers
Pseudo-random number generation:
-* xref:../rand.adoc[`rand`] - Generate random integer
-* xref:../srand.adoc[`srand`] - Seed random generator
-* xref:../rrand.adoc[`rrand`] - Get/set random seed
+* link:/docs/commands/references/rand/[`rand`] - Generate random integer
+* link:/docs/commands/references/srand/[`srand`] - Seed random generator
+* link:/docs/commands/references/rrand/[`rrand`] - Get/set random seed
=== Type Coercion Rules
@@ -186,5 +186,5 @@ Real numbers have finite precision. Avoid comparing reals for exact equality:
=== See Also
-* xref:../../levels/index.adoc[PostScript Language Levels]
-* xref:../stack-manipulation/index.adoc[Stack Manipulation]
\ No newline at end of file
+* link:/docs/levels/[PostScript Language Levels]
+* link:/docs/commands/references/[Stack Manipulation]
\ No newline at end of file
diff --git a/docs/commands/array-string/index.adoc b/docs/commands/array-string/index.adoc
index e7948b1..fc9130e 100644
--- a/docs/commands/array-string/index.adoc
+++ b/docs/commands/array-string/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Array and String Operations
-parent: Command Reference
+parent: Commands
nav_order: 3
---
@@ -14,10 +14,10 @@ Array and string operations provide the foundation for data structure manipulati
Arrays and strings in PostScript share many operational characteristics:
* Both are indexed collections (0-based indexing)
-* Both support element access via xref:../get.adoc[`get`] and xref:../put.adoc[`put`]
-* Both can have subsequences extracted via xref:../getinterval.adoc[`getinterval`]
-* Both can be iterated over using xref:../forall.adoc[`forall`]
-* Both have a xref:../length.adoc[`length`] that can be queried
+* Both support element access via link:/docs/commands/references/get/[`get`] and link:/docs/commands/references/put/[`put`]
+* Both can have subsequences extracted via link:/docs/commands/references/getinterval/[`getinterval`]
+* Both can be iterated over using link:/docs/commands/references/forall/[`forall`]
+* Both have a link:/docs/commands/references/length/[`length`] that can be queried
However, they differ in important ways:
@@ -33,22 +33,22 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../array.adoc[`array`]
+| link:/docs/commands/references/array/[`array`]
| Create a new array of specified length
-| xref:left-bracket.adoc[`[`]
+| link:/docs/commands/references/brackets/[`[`]
| Begin array construction (mark)
-| xref:right-bracket.adoc[`]`]
+| link:/docs/commands/references/brackets/[`]`]
| End array construction
-| xref:../aload.adoc[`aload`]
+| link:/docs/commands/references/aload/[`aload`]
| Load all array elements onto stack
-| xref:../astore.adoc[`astore`]
+| link:/docs/commands/references/astore/[`astore`]
| Store stack elements into array
-| xref:../packedarray.adoc[`packedarray`]
+| link:/docs/commands/references/packedarray/[`packedarray`]
| Create read-only packed array (Level 2)
|===
@@ -58,19 +58,19 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../get.adoc[`get`]
+| link:/docs/commands/references/get/[`get`]
| Get single element from array/string
-| xref:../put.adoc[`put`]
+| link:/docs/commands/references/put/[`put`]
| Put value into array/string element
-| xref:../getinterval.adoc[`getinterval`]
+| link:/docs/commands/references/getinterval/[`getinterval`]
| Extract subarray or substring
-| xref:../putinterval.adoc[`putinterval`]
+| link:/docs/commands/references/putinterval/[`putinterval`]
| Insert array/string into another
-| xref:../length.adoc[`length`]
+| link:/docs/commands/references/length/[`length`]
| Get length of array/string
|===
@@ -80,7 +80,7 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Execute procedure for each element
|===
@@ -92,16 +92,16 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../string.adoc[`string`]
+| link:/docs/commands/references/string/[`string`]
| Create new string of specified length
-| xref:../anchorsearch.adoc[`anchorsearch`]
+| link:/docs/commands/references/anchorsearch/[`anchorsearch`]
| Search for prefix in string
-| xref:../search.adoc[`search`]
+| link:/docs/commands/references/search/[`search`]
| Search for substring
-| xref:../token.adoc[`token`]
+| link:/docs/commands/references/token/[`token`]
| Parse next token from string/file
|===
@@ -111,25 +111,25 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../cvs.adoc[`cvs`]
+| link:/docs/commands/references/cvs/[`cvs`]
| Convert any object to string representation
-| xref:../cvn.adoc[`cvn`]
+| link:/docs/commands/references/cvn/[`cvn`]
| Convert string to name
-| xref:../cvr.adoc[`cvr`]
+| link:/docs/commands/references/cvr/[`cvr`]
| Convert to real number
-| xref:../cvi.adoc[`cvi`]
+| link:/docs/commands/references/cvi/[`cvi`]
| Convert to integer
-| xref:../cvlit.adoc[`cvlit`]
+| link:/docs/commands/references/cvlit/[`cvlit`]
| Convert to literal attribute
-| xref:../cvx.adoc[`cvx`]
+| link:/docs/commands/references/cvx/[`cvx`]
| Convert to executable attribute
-| xref:../type.adoc[`type`]
+| link:/docs/commands/references/type/[`type`]
| Get object type as name
|===
@@ -139,13 +139,13 @@ However, they differ in important ways:
|===
| Command | Description
-| xref:../xcheck.adoc[`xcheck`]
+| link:/docs/commands/references/xcheck/[`xcheck`]
| Check if object is executable
-| xref:../rcheck.adoc[`rcheck`]
+| link:/docs/commands/references/rcheck/[`rcheck`]
| Check if object is readable
-| xref:../wcheck.adoc[`wcheck`]
+| link:/docs/commands/references/wcheck/[`wcheck`]
| Check if object is writable
|===
@@ -220,6 +220,6 @@ Process all elements in a collection:
== See Also
-* xref:../stack-manipulation/index.adoc[Stack Manipulation Commands] - For basic data movement
-* xref:../arithmetic-math/index.adoc[Arithmetic and Math Commands] - For numeric operations
+* link:/docs/commands/references/[Stack Manipulation Commands] - For basic data movement
+* link:/docs/commands/references/[Arithmetic and Math Commands] - For numeric operations
* Control Flow Commands - For conditional and loop constructs (to be documented)
\ No newline at end of file
diff --git a/docs/commands/array-string/left-bracket.adoc b/docs/commands/array-string/left-bracket.adoc
deleted file mode 100644
index 8059eaf..0000000
--- a/docs/commands/array-string/left-bracket.adoc
+++ /dev/null
@@ -1,163 +0,0 @@
----
-layout: default
-title: "["
-parent: Array and String Operations
-grand_parent: Command Reference
-nav_order: 2
----
-
-== [
-
-Marks the beginning of array construction by pushing a mark on the operand stack.
-
-=== Syntax
-
-----
-– [ → mark
-----
-
-=== Stack Effects
-
-.Before
-[cols="1,3"]
-|===
-| Level | Object
-
-| (empty or any objects)
-|
-|===
-
-.After
-[cols="1,3"]
-|===
-| Level | Object
-
-| 0
-| `mark` (array construction marker)
-|===
-
-=== Description
-
-The xref:../left-bracket.adoc[`[`] operator pushes a special mark object on the operand stack to indicate the beginning of an array being constructed. It works in conjunction with xref:right-bracket.adoc[`]`], which collects all objects above the mark into an array.
-
-This is the most common and convenient way to construct arrays with known contents. The xref:../left-bracket.adoc[`[`] operator is actually equivalent to the xref:../stack-manipulation/mark.adoc[`mark`] operator, but its use with xref:right-bracket.adoc[`]`] gives it special significance for array construction.
-
-=== PostScript Level
-
-*Level 1* and later
-
-=== Examples
-
-.Simple array construction
-[source,postscript]
-----
-[ 1 2 3 ] % Creates array [1 2 3]
-----
-
-.Mixed-type array
-[source,postscript]
-----
-[ 42 (hello) /name true ] % Array with different types
-----
-
-.Nested arrays
-[source,postscript]
-----
-[ 1 [ 2 3 ] 4 ] % Array containing another array
-% Result: [1 [2 3] 4]
-----
-
-.Empty array
-[source,postscript]
-----
-[ ] % Creates empty array []
-----
-
-.Complex expressions in arrays
-[source,postscript]
-----
-[ 1 2 add 3 4 mul ] % Expressions evaluated before array creation
-% Result: [3 12]
-----
-
-=== Common Use Cases
-
-==== Literal Data Structures
-
-[source,postscript]
-----
-/colors [ /red /green /blue ] def
-/coordinates [ 100 200 ] def
-----
-
-==== Procedure Arguments
-
-[source,postscript]
-----
-[ 1 2 3 ] { 10 mul } forall % Pass array to forall
-----
-
-==== Matrix Definitions
-
-[source,postscript]
-----
-[ 1 0 0 1 0 0 ] % Identity transformation matrix
-----
-
-=== Common Pitfalls
-
-WARNING: *Unmatched Brackets* - Every xref:../left-bracket.adoc[`[`] must have a corresponding xref:right-bracket.adoc[`]`]. Unmatched brackets cause a [`syntaxerror`].
-
-[source,postscript]
-----
-[ 1 2 3 % Missing ] causes syntaxerror
-----
-
-WARNING: *Execution vs. Literal* - Objects between xref:../left-bracket.adoc[`[`] and xref:right-bracket.adoc[`]`] are evaluated before being placed in the array.
-
-[source,postscript]
-----
-[ 1 2 add ] % Results in [3], not [1 2 add]
-----
-
-TIP: *Literal Arrays* - The array created by xref:left-bracket.adoc:[`[ ... ]`] has the literal attribute by default. Use xref:../cvx.adoc[`cvx`] to make it executable if needed.
-
-=== Error Conditions
-
-[cols="1,3"]
-|===
-| Error | Condition
-
-| [`stackoverflow`]
-| Operand stack overflow when pushing mark
-
-| [`syntaxerror`]
-| No matching xref:right-bracket.adoc[`]`] before end of file/string
-|===
-
-=== Implementation Notes
-
-* The mark object pushed by xref:../left-bracket.adoc[`[`] is the same as that created by xref:../stack-manipulation/mark.adoc[`mark`]
-* Marks are used for error recovery and can be detected with xref:../stack-manipulation/counttomark.adoc[`counttomark`]
-* The interpreter treats `[` specially during scanning for array literal syntax
-
-=== Relationship to mark
-
-The xref:../left-bracket.adoc[`[`] operator is functionally equivalent to xref:../stack-manipulation/mark.adoc[`mark`]:
-
-[source,postscript]
-----
-mark 1 2 3 ] % Same as [ 1 2 3 ]
-[ 1 2 3 % Must be closed with ]
-----
-
-However, xref:../left-bracket.adoc[`[`] and xref:right-bracket.adoc[`]`] provide clearer syntax for array construction.
-
-=== See Also
-
-*xref:right-bracket.adoc xref`]`] - End array construction
-* xref:../stack-manipulation/mark.adoc[`mark`] - Push mark object
-* xref:../stack-manipulation/cleartomark.adoc[`cleartomark`] - Clear to mark
-* xref:../stack-manipulation/counttomark.adoc[`counttomark`] - Count objects to mark
-* xref:../array.adoc[`array`] - Create uninitialized array
-* xref:../astore.adoc[`astore`] - Store stack into array
\ No newline at end of file
diff --git a/docs/commands/array-string/right-bracket.adoc b/docs/commands/array-string/right-bracket.adoc
deleted file mode 100644
index 9353c20..0000000
--- a/docs/commands/array-string/right-bracket.adoc
+++ /dev/null
@@ -1,193 +0,0 @@
----
-layout: default
-title: "]"
-parent: Array and String Operations
-grand_parent: Command Reference
-nav_order: 3
----
-
-== ]
-
-Ends array construction by collecting all objects above the topmost mark into a new array.
-
-=== Syntax
-
-----
-mark obj₀ ... objₙ₋₁ ] → array
-----
-
-=== Stack Effects
-
-.Before
-[cols="1,3"]
-|===
-| Level | Object
-
-| n+1
-| `mark`
-
-| n
-| `obj₀`
-
-| ...
-| ...
-
-| 0
-| `objₙ₋₁`
-|===
-
-.After
-[cols="1,3"]
-|===
-| Level | Object
-
-| 0
-| `array` (containing obj₀ through objₙ₋₁)
-|===
-
-=== Description
-
-The xref:right-bracket.adoc[`]`] operator completes array construction by:
-
-1. Counting all objects on the operand stack down to the topmost mark
-2. Removing those objects from the stack
-3. Creating a new array containing those objects in order
-4. Removing the mark
-5. Pushing the new array on the stack
-
-The array is created with the literal attribute and allocated in local or global VM according to the current VM allocation mode.
-
-=== PostScript Level
-
-*Level 1* and later
-
-=== Examples
-
-.Basic array construction
-[source,postscript]
-----
-[ 1 2 3 ] % Creates [1 2 3]
-----
-
-.Mixed types
-[source,postscript]
-----
-[ 42 (text) /name [ nested ] ]
-% Creates [42 (text) /name [nested]]
-----
-
-.Empty array
-[source,postscript]
-----
-[ ] % Creates []
-----
-
-.Computed values
-[source,postscript]
-----
-[ 10 20 add 30 ] % Creates [30 30]
-----
-
-.Building from stack
-[source,postscript]
-----
-1 2 3 % Stack: 1 2 3
-mark exch exch exch % Stack: mark 1 2 3
-] % Stack: [1 2 3]
-----
-
-=== Common Use Cases
-
-==== Data Initialization
-
-[source,postscript]
-----
-/primes [ 2 3 5 7 11 13 ] def
-----
-
-==== Coordinate Pairs
-
-[source,postscript]
-----
-/point [ 100 200 ] def
-----
-
-==== Color Definitions
-
-[source,postscript]
-----
-/red [ 1 0 0 ] def % RGB
-/cyan [ 0 1 1 1 ] def % CMYK
-----
-
-=== Common Pitfalls
-
-WARNING: *Unmatched Brackets* - The xref:right-bracket.adoc[`]`] operator requires a matching xref:../left-bracket.adoc[`[`] (mark) on the stack. Without it, an [`unmatchedmark`] error occurs.
-
-[source,postscript]
-----
-1 2 3 ] % Error: no matching [
-----
-
-WARNING: *Evaluation of Contents* - Objects between brackets are evaluated before being placed in the array.
-
-[source,postscript]
-----
-[ /x 5 def ] % Executes def, creates [5]
- % NOT [/x 5 def]
-----
-
-TIP: *Immediate vs. Literal Arrays* - To create an array without evaluating its contents, use the `/{ ... }` executable array syntax (procedure syntax).
-
-[source,postscript]
-----
-/proc { 1 2 add } def % Procedure (unevaluated)
-[ 1 2 add ] % Array [3] (evaluated)
-----
-
-=== Error Conditions
-
-[cols="1,3"]
-|===
-| Error | Condition
-
-| [`stackoverflow`]
-| Resulting array would overflow stack (extremely rare)
-
-| [`unmatchedmark`]
-| No mark on stack (no matching xref:../left-bracket.adoc)[`[`]
-
-| [`VMerror`]
-| Insufficient VM to allocate array
-|===
-
-=== Implementation Notes
-
-* The xref:right-bracket.adoc[`]`] operator is syntactic sugar recognized during parsing
-* When scanned, `[ ... ]` creates a literal array object
-* The objects are placed in the array in the order they appeared between brackets
-* Index 0 contains the first object after xref:../left-bracket.adoc[`[`]
-
-=== Comparison with astore
-
-The xref:right-bracket.adoc[`]`] operator is similar to xref:../astore.adoc[`astore`] but more convenient:
-
-[source,postscript]
-----
-% Using [ ]
-[ 1 2 3 ]
-
-% Equivalent using astore
-1 2 3 3 array astore
-----
-
-The bracket syntax is clearer and doesn't require knowing the count in advance.
-
-=== See Also
-
-* xref:left-bracket.adoc[`[`] - Begin array construction
-* xref:../stack-manipulation/mark.adoc[`mark`] - Push mark object
-* xref:../stack-manipulation/cleartomark.adoc[`cleartomark`] - Clear to mark
-* xref:../array.adoc[`array`] - Create uninitialized array
-* xref:../astore.adoc[`astore`] - Store stack into array
-* xref:../packedarray.adoc[`packedarray`] - Create read-only array
\ No newline at end of file
diff --git a/docs/commands/by-category.adoc b/docs/commands/by-category.adoc
index f5ca262..ddf483e 100644
--- a/docs/commands/by-category.adoc
+++ b/docs/commands/by-category.adoc
@@ -11,28 +11,28 @@ All PostScript operators organized by functional category.
=== Stack Manipulation
-xref:stack-manipulation/index.adoc[View all stack commands →]
+link:/docs/commands/references/[View all stack commands →]
=== Arithmetic and Math
-xref:arithmetic-math/index.adoc[View all math commands →]
+link:/docs/commands/references/[View all math commands →]
=== Array and String Operations
-xref:array-string/index.adoc[View all array/string commands →]
+link:/docs/commands/references/[View all array/string commands →]
=== Dictionary Operations
-xref:dictionary/index.adoc[View all dictionary commands →]
+link:/docs/commands/references/[View all dictionary commands →]
=== Control Flow
-xref:control-flow/index.adoc[View all control flow commands →]
+link:/docs/commands/references/[View all control flow commands →]
=== Graphics State
-xref:graphics-state/index.adoc[View all graphics state commands →]
+link:/docs/commands/references/[View all graphics state commands →]
=== See Also
-* xref:index.adoc[Alphabetical Index]
\ No newline at end of file
+* link:/docs/commands/[Alphabetical Index]
\ No newline at end of file
diff --git a/docs/commands/color/index.adoc b/docs/commands/color/index.adoc
index 18fc1fa..51de74a 100644
--- a/docs/commands/color/index.adoc
+++ b/docs/commands/color/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: Color
-parent: Command Reference
-has_children: true
+parent: Commands
---
== Color
@@ -18,12 +17,12 @@ This category contains PostScript operators for color.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/control-flow/index.adoc b/docs/commands/control-flow/index.adoc
index f85b17c..3880379 100644
--- a/docs/commands/control-flow/index.adoc
+++ b/docs/commands/control-flow/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Control Flow
-parent: Command Reference
+parent: Commands
nav_order: 5
---
@@ -26,10 +26,10 @@ PostScript control flow operates through:
|===
| Command | Description
-| xref:../if.adoc[`if`]
+| link:/docs/commands/references/if/[`if`]
| Execute procedure if condition is true
-| xref:../ifelse.adoc[`ifelse`]
+| link:/docs/commands/references/ifelse/[`ifelse`]
| Execute one of two procedures based on condition
|===
@@ -39,16 +39,16 @@ PostScript control flow operates through:
|===
| Command | Description
-| xref:../for.adoc[`for`]
+| link:/docs/commands/references/for/[`for`]
| Loop with numeric control variable
-| xref:../repeat.adoc[`repeat`]
+| link:/docs/commands/references/repeat/[`repeat`]
| Execute procedure a fixed number of times
-| xref:../loop.adoc[`loop`]
+| link:/docs/commands/references/loop/[`loop`]
| Execute procedure indefinitely until exit
-| xref:../array-string/forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Iterate over array, string, or dictionary elements
|===
@@ -58,16 +58,16 @@ PostScript control flow operates through:
|===
| Command | Description
-| xref:../exit.adoc[`exit`]
+| link:/docs/commands/references/exit/[`exit`]
| Terminate innermost loop early
-| xref:../stop.adoc[`stop`]
+| link:/docs/commands/references/stop/[`stop`]
| Terminate stopped context
-| xref:../stopped.adoc[`stopped`]
+| link:/docs/commands/references/stopped/[`stopped`]
| Execute object with error catching
-| xref:../quit.adoc[`quit`]
+| link:/docs/commands/references/quit/[`quit`]
| Terminate interpreter
|===
@@ -77,10 +77,10 @@ PostScript control flow operates through:
|===
| Command | Description
-| xref:../exec.adoc[`exec`]
+| link:/docs/commands/references/exec/[`exec`]
| Execute an object
-| xref:../array-string/cvx.adoc[`cvx`]
+| link:/docs/commands/references/cvx/[`cvx`]
| Convert to executable attribute
|===
@@ -154,19 +154,19 @@ x 0 gt {
|===
| Loop Type | Use When | Control Variable
-| xref:../for.adoc[`for`]
+| link:/docs/commands/references/for/[`for`]
| Numeric sequence needed
| Yes
-| xref:../repeat.adoc[`repeat`]
+| link:/docs/commands/references/repeat/[`repeat`]
| Simple fixed repetition
| No
-| xref:../loop.adoc[`loop`]
+| link:/docs/commands/references/loop/[`loop`]
| Indefinite looping
| No
-| xref:../array-string/forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Iterating collections
| Yes (element)
|===
@@ -195,9 +195,9 @@ Control flow operators require procedures (executable arrays):
=== Loop Termination
-* xref:../exit.adoc[`exit`] exits innermost loop only
-* xref:../stop.adoc[`stop`] exits stopped context
-* Infinite loops possible with xref:../loop.adoc[`loop`]
+* link:/docs/commands/references/exit/[`exit`] exits innermost loop only
+* link:/docs/commands/references/stop/[`stop`] exits stopped context
+* Infinite loops possible with link:/docs/commands/references/loop/[`loop`]
=== Stack Effects
@@ -221,6 +221,6 @@ TIP: *Use exit Carefully* - Only works within loop contexts (for, repeat, loop,
== See Also
-* xref:../dictionary/index.adoc[Dictionary Operations] - For scoping with begin/end
-* xref:../array-string/index.adoc[Array Operations] - For forall iteration
+* link:/docs/commands/references/[Dictionary Operations] - For scoping with begin/end
+* link:/docs/commands/references/array-string/[Array Operations] - For forall iteration
* Error Handling (to be documented) - For comprehensive error management
\ No newline at end of file
diff --git a/docs/commands/device-output/index.adoc b/docs/commands/device-output/index.adoc
index 8564a8a..9f46395 100644
--- a/docs/commands/device-output/index.adoc
+++ b/docs/commands/device-output/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: Device Output
-parent: Command Reference
-has_children: true
+parent: Commands
---
== Device Output
@@ -18,12 +17,12 @@ This category contains PostScript operators for device output.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/dictionary/index.adoc b/docs/commands/dictionary/index.adoc
index 34cc862..1dab279 100644
--- a/docs/commands/dictionary/index.adoc
+++ b/docs/commands/dictionary/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Dictionary Operations
-parent: Command Reference
+parent: Commands
nav_order: 4
---
@@ -25,7 +25,7 @@ PostScript maintains a dictionary stack that controls name lookup:
* Top dictionary is searched first (current dictionary)
* Search proceeds down the stack until name is found
* Standard dictionaries: `systemdict`, `globaldict` (Level 2), `userdict`
-* User dictionaries can be pushed/popped with xref:../begin.adoc[`begin`] / xref:../end.adoc[`end`]
+* User dictionaries can be pushed/popped with link:/docs/commands/references/begin/[`begin`] / link:/docs/commands/references/end/[`end`]
== Command Categories
@@ -35,7 +35,7 @@ PostScript maintains a dictionary stack that controls name lookup:
|===
| Command | Description
-| xref:../dict.adoc[`dict`]
+| link:/docs/commands/references/dict/[`dict`]
| Create new dictionary with initial capacity
|===
@@ -45,19 +45,19 @@ PostScript maintains a dictionary stack that controls name lookup:
|===
| Command | Description
-| xref:../begin.adoc[`begin`]
+| link:/docs/commands/references/begin/[`begin`]
| Push dictionary onto dictionary stack
-| xref:../end.adoc[`end`]
+| link:/docs/commands/references/end/[`end`]
| Pop dictionary from dictionary stack
-| xref:../currentdict.adoc[`currentdict`]
+| link:/docs/commands/references/currentdict/[`currentdict`]
| Get current dictionary (top of stack)
-| xref:../countdictstack.adoc[`countdictstack`]
+| link:/docs/commands/references/countdictstack/[`countdictstack`]
| Count dictionaries on stack
-| xref:../dictstack.adoc[`dictstack`]
+| link:/docs/commands/references/dictstack/[`dictstack`]
| Copy dictionary stack to array
|===
@@ -67,22 +67,22 @@ PostScript maintains a dictionary stack that controls name lookup:
|===
| Command | Description
-| xref:../def.adoc[`def`]
+| link:/docs/commands/references/def/[`def`]
| Define key-value pair in current dictionary
-| xref:../load.adoc[`load`]
+| link:/docs/commands/references/load/[`load`]
| Look up and return value from dictionary stack
-| xref:../store.adoc[`store`]
+| link:/docs/commands/references/store/[`store`]
| Store value in dictionary stack (create if needed)
-| xref:../known.adoc[`known`]
+| link:/docs/commands/references/known/[`known`]
| Check if key exists in specific dictionary
-| xref:../where.adoc[`where`]
+| link:/docs/commands/references/where/[`where`]
| Find which dictionary contains key
-| xref:../undef.adoc[`undef`]
+| link:/docs/commands/references/undef/[`undef`]
| Remove key from dictionary (Level 2)
|===
@@ -92,19 +92,19 @@ PostScript maintains a dictionary stack that controls name lookup:
|===
| Command | Description
-| xref:../maxlength.adoc[`maxlength`]
+| link:/docs/commands/references/maxlength/[`maxlength`]
| Get maximum capacity
-| xref:../array-string/length.adoc[`length`]
+| link:/docs/commands/references/length/[`length`]
| Get current number of entries
-| xref:../array-string/get.adoc[`get`]
+| link:/docs/commands/references/get/[`get`]
| Get value for specific key
-| xref:../array-string/put.adoc[`put`]
+| link:/docs/commands/references/put/[`put`]
| Put key-value pair
-| xref:../array-string/forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Iterate over all key-value pairs
|===
@@ -194,7 +194,7 @@ The standard dictionary stack (bottom to top):
== Common Pitfalls
-WARNING: *Dictionary Stack Balance* - Every xref:../begin.adoc[`begin`] must have matching xref:../end.adoc[`end`]. Unbalanced stacks cause [`dictstackunderflow`] or [`dictstackoverflow`].
+WARNING: *Dictionary Stack Balance* - Every link:/docs/commands/references/begin/[`begin`] must have matching link:/docs/commands/references/end/[`end`]. Unbalanced stacks cause [`dictstackunderflow`] or [`dictstackoverflow`].
WARNING: *Fixed Capacity (Level 1)* - In Level 1, exceeding dictionary capacity causes [`dictfull`] error. Always allocate sufficient space.
@@ -212,6 +212,6 @@ end
== See Also
-* xref:../stack-manipulation/index.adoc[Stack Manipulation] - For general stack operations
-* xref:../array-string/index.adoc[Array and String Operations] - Similar composite types
+* link:/docs/commands/references/[Stack Manipulation] - For general stack operations
+* link:/docs/commands/references/[Array and String Operations] - Similar composite types
* Control Flow (to be documented) - Scoping with dictionaries
\ No newline at end of file
diff --git a/docs/commands/error-handling/index.adoc b/docs/commands/error-handling/index.adoc
index bd628f3..0449439 100644
--- a/docs/commands/error-handling/index.adoc
+++ b/docs/commands/error-handling/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: Error Handling
-parent: Command Reference
-has_children: true
+parent: Commands
---
== Error Handling
@@ -18,12 +17,12 @@ This category contains PostScript operators for error handling.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/file-io/index.adoc b/docs/commands/file-io/index.adoc
index fa35f7c..daac4fc 100644
--- a/docs/commands/file-io/index.adoc
+++ b/docs/commands/file-io/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: File Io
-parent: Command Reference
-has_children: true
+parent: Commands
---
== File Io
@@ -18,12 +17,12 @@ This category contains PostScript operators for file io.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/font-text/findfont.adoc b/docs/commands/font-text/findfont.adoc
deleted file mode 100644
index 0dad419..0000000
--- a/docs/commands/font-text/findfont.adoc
+++ /dev/null
@@ -1,115 +0,0 @@
----
-layout: default
-title: findfont
-parent: "Font and Text"
-grand_parent: "Command Reference"
-nav_order: 1
----
-
-== findfont
-
-Obtain font dictionary by name.
-
-=== Syntax
-
-```
-key findfont font
-```
-
-=== Stack Effects
-
-**Before:**
-```
-key
-```
-
-**After:**
-```
-font
-```
-
-=== Description
-
-xref:../findfont.adoc[`findfont`] obtains a font dictionary identified by the specified `key` and pushes it on the operand stack. The `key` may be a key previously passed to xref:../definefont.adoc[`definefont`], in which case the font dictionary associated with `key` (in the font directory) is returned.
-
-If `key` is not registered as a font in VM, xref:../findfont.adoc[`findfont`] takes an action that varies according to the environment in which the PostScript interpreter is operating. In some environments, xref:../findfont.adoc[`findfont`] may attempt to read a font definition from an external source, such as a file. In other environments, xref:../findfont.adoc[`findfont`] substitutes a default font or executes the error `invalidfont`.
-
-xref:../findfont.adoc[`findfont`] is a special case of `findresource` applied to the Font category.
-
-xref:../findfont.adoc[`findfont`], like `findresource`, normally looks first for fonts defined in local VM, then for fonts defined in global VM. However, if the current VM allocation mode is global, xref:../findfont.adoc[`findfont`] considers only fonts defined in global VM. If xref:../findfont.adoc[`findfont`] needs to load a font into VM, it may use either local or global VM, depending on the font. Generally, Type 1 fonts are loaded into global VM; fonts of other types are loaded into local VM.
-
-xref:../findfont.adoc[`findfont`] is not an operator, but rather a built-in procedure. It may be redefined by a PostScript language program that requires different strategies for finding fonts.
-
-=== Parameters
-
-**key** (`name` or `string`)
-: The name of the font to find (e.g., `/Helvetica`, `/Times-Roman`)
-
-=== Returns
-
-**font** (`dictionary`)
-: The font dictionary associated with the specified key
-
-=== Examples
-
-==== Basic Font Loading
-
-```postscript
-/Helvetica findfont
-% Returns the Helvetica font dictionary
-```
-
-==== Loading and Using a Font
-
-```postscript
-/Times-Roman findfont % Get Times-Roman font
-12 scalefont % Scale to 12 points
-setfont % Set as current font
-```
-
-==== Font with Fallback
-
-```postscript
-{
- /MyCustomFont findfont
-} stopped {
- pop % Remove error
- /Helvetica findfont % Use fallback font
-} if
-```
-
-=== Errors
-
-**invalidfont**
-: If the font name is not valid or the font dictionary is malformed
-
-**stackunderflow**
-: If the operand stack is empty
-
-**typecheck**
-: If `key` is not a name or string
-
-=== Font Discovery
-
-The font discovery mechanism varies by implementation:
-
-1. **Local VM fonts** - Defined by xref:../definefont.adoc[`definefont`] in local VM
-2. **Global VM fonts** - Defined by xref:../definefont.adoc[`definefont`] in global VM
-3. **External fonts** - Loaded from font files or other external sources
-4. **Substitution fonts** - Default fonts substituted when requested font not found
-
-=== VM Allocation
-
-When loading fonts from external sources:
-
-- **Type 1 fonts** are typically loaded into global VM
-- **Other font types** are typically loaded into local VM
-- The current VM allocation mode affects which fonts are visible
-
-=== See Also
-
-- xref:../scalefont.adoc[`scalefont`] - Scale font by uniform factor
-- xref:../makefont.adoc[`makefont`] - Transform font by matrix
-- xref:../setfont.adoc[`setfont`] - Establish current font
-- xref:../definefont.adoc[`definefont`] - Register font in font directory
-- xref:../currentfont.adoc[`currentfont`] - Get current font dictionary
\ No newline at end of file
diff --git a/docs/commands/font-text/index.adoc b/docs/commands/font-text/index.adoc
index 6992395..917432a 100644
--- a/docs/commands/font-text/index.adoc
+++ b/docs/commands/font-text/index.adoc
@@ -1,9 +1,8 @@
---
layout: default
title: Font and Text
-parent: Command Reference
+parent: Commands
nav_order: 10
-has_children: true
---
== Font and Text
@@ -22,25 +21,25 @@ PostScript provides comprehensive font and text capabilities including font sele
|===
| Command | Description
-| xref:../findfont.adoc[`findfont`]
+| link:/docs/commands/references/findfont/[`findfont`]
| Obtain font dictionary by name
-| xref:../scalefont.adoc[`scalefont`]
+| link:/docs/commands/references/scalefont/[`scalefont`]
| Scale font uniformly
-| xref:../makefont.adoc[`makefont`]
+| link:/docs/commands/references/makefont/[`makefont`]
| Transform font by matrix
-| xref:../setfont.adoc[`setfont`]
+| link:/docs/commands/references/setfont/[`setfont`]
| Establish current font
-| xref:../currentfont.adoc[`currentfont`]
+| link:/docs/commands/references/currentfont/[`currentfont`]
| Get current font
-| xref:../definefont.adoc[`definefont`]
+| link:/docs/commands/references/definefont/[`definefont`]
| Register font
-| xref:../undefinefont.adoc[`undefinefont`]
+| link:/docs/commands/references/undefinefont/[`undefinefont`]
| Remove font (Level 2)
|===
@@ -50,22 +49,22 @@ PostScript provides comprehensive font and text capabilities including font sele
|===
| Command | Description
-| xref:../show.adoc[`show`]
+| link:/docs/commands/references/show/[`show`]
| Paint text string
-| xref:../ashow.adoc[`ashow`]
+| link:/docs/commands/references/ashow/[`ashow`]
| Show with spacing adjustment
-| xref:../widthshow.adoc[`widthshow`]
+| link:/docs/commands/references/widthshow/[`widthshow`]
| Show with selective width adjustment
-| xref:../awidthshow.adoc[`awidthshow`]
+| link:/docs/commands/references/awidthshow/[`awidthshow`]
| Combined spacing adjustment
-| xref:../kshow.adoc[`kshow`]
+| link:/docs/commands/references/kshow/[`kshow`]
| Show with kerning
-| xref:../cshow.adoc[`cshow`]
+| link:/docs/commands/references/cshow/[`cshow`]
| Show with per-character control (Level 2)
|===
@@ -75,14 +74,14 @@ PostScript provides comprehensive font and text capabilities including font sele
|===
| Command | Description
-| xref:../stringwidth.adoc[`stringwidth`]
+| link:/docs/commands/references/stringwidth/[`stringwidth`]
| Calculate text width
-| xref:../charpath.adoc[`charpath`]
+| link:/docs/commands/references/charpath/[`charpath`]
| Get character outlines
|===
== See Also
-* xref:../../usage/advanced/fonts-text.adoc[Font & Text Guide]
-* xref:../graphics-state/index.adoc[Graphics State]
+* link:/docs/usage/advanced/fonts-text/[Font & Text Guide]
+* link:/docs/commands/references/[Graphics State]
diff --git a/docs/commands/graphics-state/index.adoc b/docs/commands/graphics-state/index.adoc
index 88a3944..8be0e09 100644
--- a/docs/commands/graphics-state/index.adoc
+++ b/docs/commands/graphics-state/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Graphics State
-parent: Command Reference
+parent: Commands
nav_order: 6
---
@@ -26,8 +26,8 @@ Each parameter has a current value that affects subsequent graphics operations.
PostScript provides a stack for saving and restoring graphics state:
-* xref:../gsave.adoc[`gsave`] saves current state
-* xref:../grestore.adoc[`grestore`] restores saved state
+* link:/docs/commands/references/gsave/[`gsave`] saves current state
+* link:/docs/commands/references/grestore/[`grestore`] restores saved state
* State changes are isolated between save/restore pairs
* Enables temporary modifications without losing previous state
@@ -39,22 +39,22 @@ PostScript provides a stack for saving and restoring graphics state:
|===
| Command | Description
-| xref:../gsave.adoc[`gsave`]
+| link:/docs/commands/references/gsave/[`gsave`]
| Push copy of graphics state onto graphics state stack
-| xref:../grestore.adoc[`grestore`]
+| link:/docs/commands/references/grestore/[`grestore`]
| Restore graphics state from top of stack
-| xref:../grestoreall.adoc[`grestoreall`]
+| link:/docs/commands/references/grestoreall/[`grestoreall`]
| Restore to bottommost save level
-| xref:../gstate.adoc[`gstate`]
+| link:/docs/commands/references/gstate/[`gstate`]
| Create gstate object (Level 2)
-| xref:../setgstate.adoc[`setgstate`]
+| link:/docs/commands/references/setgstate/[`setgstate`]
| Set graphics state from gstate object (Level 2)
-| xref:../currentgstate.adoc[`currentgstate`]
+| link:/docs/commands/references/currentgstate/[`currentgstate`]
| Copy current state to gstate object (Level 2)
|===
@@ -64,34 +64,34 @@ PostScript provides a stack for saving and restoring graphics state:
|===
| Command | Description
-| xref:../setlinewidth.adoc[`setlinewidth`]
+| link:/docs/commands/references/setlinewidth/[`setlinewidth`]
| Set line width for stroking
-| xref:../setlinecap.adoc[`setlinecap`]
+| link:/docs/commands/references/setlinecap/[`setlinecap`]
| Set line cap style (butt, round, square)
-| xref:../setlinejoin.adoc[`setlinejoin`]
+| link:/docs/commands/references/setlinejoin/[`setlinejoin`]
| Set line join style (miter, round, bevel)
-| xref:../setmiterlimit.adoc[`setmiterlimit`]
+| link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]
| Set miter limit for sharp corners
-| xref:../setdash.adoc[`setdash`]
+| link:/docs/commands/references/setdash/[`setdash`]
| Set dash pattern for lines
-| xref:../currentlinewidth.adoc[`currentlinewidth`]
+| link:/docs/commands/references/currentlinewidth/[`currentlinewidth`]
| Get current line width
-| xref:../currentlinecap.adoc[`currentlinecap`]
+| link:/docs/commands/references/currentlinecap/[`currentlinecap`]
| Get current line cap
-| xref:../currentlinejoin.adoc[`currentlinejoin`]
+| link:/docs/commands/references/currentlinejoin/[`currentlinejoin`]
| Get current line join
-| xref:../currentmiterlimit.adoc[`currentmiterlimit`]
+| link:/docs/commands/references/currentmiterlimit/[`currentmiterlimit`]
| Get current miter limit
-| xref:../currentdash.adoc[`currentdash`]
+| link:/docs/commands/references/currentdash/[`currentdash`]
| Get current dash pattern
|===
@@ -101,28 +101,28 @@ PostScript provides a stack for saving and restoring graphics state:
|===
| Command | Description
-| xref:../setgray.adoc[`setgray`]
+| link:/docs/commands/references/setgray/[`setgray`]
| Set gray level (0=black, 1=white)
-| xref:../setrgbcolor.adoc[`setrgbcolor`]
+| link:/docs/commands/references/setrgbcolor/[`setrgbcolor`]
| Set RGB color
-| xref:../setcmykcolor.adoc[`setcmykcolor`]
+| link:/docs/commands/references/setcmykcolor/[`setcmykcolor`]
| Set CMYK color (Level 2)
-| xref:../sethsbcolor.adoc[`sethsbcolor`]
+| link:/docs/commands/references/sethsbcolor/[`sethsbcolor`]
| Set HSB color
-| xref:../currentgray.adoc[`currentgray`]
+| link:/docs/commands/references/currentgray/[`currentgray`]
| Get current gray value
-| xref:../currentrgbcolor.adoc[`currentrgbcolor`]
+| link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`]
| Get current RGB color
-| xref:../currentcmykcolor.adoc[`currentcmykcolor`]
+| link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`]
| Get current CMYK color (Level 2)
-| xref:../currenthsbcolor.adoc[`currenthsbcolor`]
+| link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`]
| Get current HSB color
|===
@@ -172,8 +172,8 @@ grestore
Graphics state changes affect all subsequent operations until:
* Another state change occurs
-* xref:../grestore.adoc[`grestore`] restores previous state
-* xref:../initgraphics.adoc[`initgraphics`] resets to defaults
+* link:/docs/commands/references/grestore/[`grestore`] restores previous state
+* link:/docs/commands/initgraphics/[`initgraphics`] resets to defaults
* Page is complete (showpage)
=== save vs. gsave
@@ -182,13 +182,13 @@ Graphics state changes affect all subsequent operations until:
|===
| Operator | Saves | Restores
-| xref:../dictionary/begin.adoc[`save`]
+| link:/docs/commands/references/begin/[`save`]
| VM + graphics state
| [`restore`]
-| xref:../gsave.adoc[`gsave`]
+| link:/docs/commands/references/gsave/[`gsave`]
| Graphics state only
-| xref:../grestore.adoc[`grestore`]
+| link:/docs/commands/references/grestore/[`grestore`]
|===
=== Device Dependence
@@ -202,9 +202,9 @@ Some parameters are device-dependent:
== Common Pitfalls
-WARNING: *Unbalanced gsave/grestore* - Every xref:../gsave.adoc[`gsave`] must have matching xref:../grestore.adoc[`grestore`].
+WARNING: *Unbalanced gsave/grestore* - Every link:/docs/commands/references/gsave/[`gsave`] must have matching link:/docs/commands/references/grestore/[`grestore`].
-WARNING: *Color Space* - Color operators may switch color space (e.g., xref:../setgray.adoc[`setgray`]) → DeviceGray.
+WARNING: *Color Space* - Color operators may switch color space (e.g., link:/docs/commands/references/setgray/[`setgray`]) → DeviceGray.
WARNING: *Dash Pattern Reset* - Empty dash array `[]` resets to solid lines.
diff --git a/docs/commands/image/index.adoc b/docs/commands/image/index.adoc
index 4d90ed5..2924cc9 100644
--- a/docs/commands/image/index.adoc
+++ b/docs/commands/image/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: Image
-parent: Command Reference
-has_children: true
+parent: Commands
---
== Image
@@ -18,12 +17,12 @@ This category contains PostScript operators for image.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/index.adoc b/docs/commands/index.adoc
index 51ca53b..844eab9 100644
--- a/docs/commands/index.adoc
+++ b/docs/commands/index.adoc
@@ -1,182 +1,45 @@
---
layout: default
-title: Command Reference
+title: Commands
nav_order: 6
-permalink: /commands/
+has_children: true
---
== Command Reference
:description: Complete reference for all PostScript operators
:keywords: postscript, commands, operators, reference
-:permalink: /commands/
[.lead]
Complete reference documentation for all PostScript operators, organized alphabetically and by functional category.
=== Browse Commands
-==== By Category
-
-Commands are organized into functional categories for easier discovery:
-
-* xref:stack-manipulation/index.adoc[Stack Manipulation] - Operations on the operand stack
-* xref:arithmetic-math/index.adoc[Arithmetic and Math] - Mathematical operations and functions
-* xref:array-string/index.adoc[Array and String Operations] - Collection and text manipulation
-* xref:dictionary/index.adoc[Dictionary Operations] - Key-value store operations
-* xref:graphics-state/index.adoc[Graphics State] - Graphics parameter management
-* xref:path-construction/index.adoc[Path Construction] - Vector path building
-* xref:painting/index.adoc[Painting] - Rendering and output operations
-* xref:transformations/index.adoc[Coordinate Transformations] - CTM and coordinate operations
-* xref:font-text/index.adoc[Font and Text] - Typography and text rendering
-* xref:color/index.adoc[Color] - Color space and color operations
-* xref:image/index.adoc[Image] - Raster image handling
-* xref:device-output/index.adoc[Device and Output] - Device control and output
-* xref:file-io/index.adoc[File and I/O] - File operations and streams
-* xref:control-flow/index.adoc[Control Flow] - Program flow control
-* xref:resource-management/index.adoc[Resource Management] - VM and resource handling
-* xref:error-handling/index.adoc[Error Handling] - Error management and recovery
-
-==== xref:by-category.adoc[Categorical Index]
-
-View all commands grouped by their functional categories.
-
-=== Alphabetical Index
-
-==== A
-
-`abs`, `add`, `aload`, `anchorsearch`, `and`, `arc`, `arcn`, `arct`, `arcto`, `array`, `ashow`, `astore`, `atan`, `awidthshow`
-
-==== B
-
-`begin`, `bind`, `bitshift`, `bytesavailable`
-
-==== C
-
-`cachestatus`, `ceiling`, `charpath`, `clear`, `cleardictstack`, `cleartomark`, `clip`, `clippath`, `closefile`, `closepath`, `colorimage`, `concat`, `concatmatrix`, `copy`, `copypage`, `cos`, `count`, `countdictstack`, `countexecstack`, `counttomark`, `currentcmykcolor`, `currentcolorspace`, `currentdash`, `currentdict`, `currentfile`, `currentflat`, `currentfont`, `currentgray`, `currentgstate`, `currenthsbcolor`, `currentlinecap`, `currentlinejoin`, `currentlinewidth`, `currentmatrix`, `currentmiterlimit`, `currentpoint`, `currentrgbcolor`, `currentscreen`, `currenttransfer`, `curveto`, `cvi`, `cvlit`, `cvn`, `cvr`, `cvrs`, `cvs`, `cvx`
-
-==== D
-
-`def`, `defaultmatrix`, `definefont`, `dict`, `dictstack`, `div`, `dtransform`, `dup`
-
-==== E
-
-`echo`, `eexec`, `end`, `eoclip`, `eofill`, `eq`, `erasepage`, `errordict`, `exch`, `exec`, `execstack`, `executeonly`, `exit`, `exp`
-
-==== F
-
-`false`, `file`, `fill`, `findfont`, `flattenpath`, `floor`, `flush`, `flushfile`, `FontDirectory`, `for`, `forall`, `framedevice`
-
-==== G
-
-`ge`, `get`, `getinterval`, `grestore`, `grestoreall`, `gsave`, `gt`
-
-==== H
-
-`handleerror`
-
-==== I
-
-`idiv`, `idtransform`, `if`, `ifelse`, `image`, `imagemask`, `index`, `initclip`, `initgraphics`, `initmatrix`, `inustroke`, `invertmatrix`, `itransform`
-
-==== K
-
-`known`, `kshow`
-
-==== L
-
-`le`, `length`, `lineto`, `ln`, `load`, `log`, `loop`, `lt`
-
-==== M
-
-`makefont`, `mark`, `matrix`, `maxlength`, `mod`, `moveto`, `mul`
-
-==== N
-
-`ne`, `neg`, `newpath`, `noaccess`, `not`, `null`, `nulldevice`
+==== link:/docs/commands/references/[Alphabetical Reference]
-==== O
+Browse all commands in alphabetical order in the Command Reference section.
-`or`
-
-==== P
-
-`pathbbox`, `pathforall`, `pop`, `print`, `printobject`, `product`, `prompt`, `pstack`, `put`, `putinterval`
-
-==== Q
-
-`quit`
-
-==== R
-
-`rand`, `rcheck`, `rcurveto`, `read`, `readhexstring`, `readline`, `readonly`, `readstring`, `repeat`, `resetfile`, `restore`, `reversepath`, `revision`, `rlineto`, `rmoveto`, `roll`, `rotate`, `round`, `rrand`, `run`
-
-==== S
-
-`save`, `scale`, `scalefont`, `search`, `setcachedevice`, `setcachelimit`, `setcharwidth`, `setcmykcolor`, `setcolorspace`, `setdash`, `setfont`, `setgray`, `setgstate`, `sethsbcolor`, `setlinecap`, `setlinejoin`, `setlinewidth`, `setmatrix`, `setmiterlimit`, `setrgbcolor`, `setscreen`, `settransfer`, `show`, `showpage`, `sin`, `sqrt`, `srand`, `StandardEncoding`, `start`, `status`, `statusdict`, `stop`, `stopped`, `store`, `string`, `stringwidth`, `stroke`, `strokepath`, `sub`, `systemdict`
-
-==== T
-
-`token`, `transform`, `translate`, `true`, `truncate`, `type`
-
-==== U
-
-`uappend`, `ucache`, `ueofill`, `ufill`, `undef`, `upath`, `userdict`, `usertime`, `ustroke`, `ustrokepath`
-
-==== V
-
-`version`, `vmstatus`
-
-==== W
-
-`wcheck`, `where`, `widthshow`, `write`, `writehexstring`, `writeobject`, `writestring`
-
-==== X
-
-`xcheck`, `xor`, `xshow`, `xyshow`
-
-==== Y
-
-`yshow`
-
-=== Command Page Format
-
-Each command page includes:
-
-* **Description**: Purpose and usage
-* **Syntax**: Stack effect notation
-* **Parameters**: Detailed parameter descriptions
-* **Return Values**: Result descriptions
-* **Examples**: Basic and advanced usage
-* **Edge Cases**: Common pitfalls and warnings
-* **Related Commands**: Cross-references
-* **PostScript Level**: Version introduced
-* **Error Conditions**: Possible errors
-
-=== Stack Effect Notation
-
-Commands are documented using standard PostScript stack notation:
-
-[source]
-----
-operand1 operand2 operator result1 result2
-----
-
-This shows:
-
-* **Before** the operator name: operands consumed from the stack (bottom to top)
-* **After** the operator name: results produced on the stack (bottom to top)
-
-==== Example
-
-[source,postscript]
-----
-3 4 add 7
-----
+==== By Category
-This means: `add` pops two numbers (3 and 4) and pushes their sum (7).
+Commands are organized into functional categories for easier discovery:
-=== See Also
+* link:/docs/commands/stack-manipulation/[Stack Manipulation] - Operations on the operand stack
+* link:/docs/commands/arithmetic-math/[Arithmetic and Math] - Mathematical operations and functions
+* link:/docs/commands/array-string/[Array and String Operations] - Collection and text manipulation
+* link:/docs/commands/dictionary/[Dictionary Operations] - Key-value store operations
+* link:/docs/commands/graphics-state/[Graphics State] - Graphics parameter management
+* link:/docs/commands/path-construction/[Path Construction] - Vector path building
+* link:/docs/commands/painting/[Painting] - Rendering and output operations
+* link:/docs/commands/transformations/[Coordinate Transformations] - CTM and coordinate operations
+* link:/docs/commands/font-text/[Font and Text] - Typography and text rendering
+* link:/docs/commands/color/[Color] - Color space and color operations
+* link:/docs/commands/image/[Image] - Raster image handling
+* link:/docs/commands/device-output/[Device and Output] - Device control and output
+* link:/docs/commands/file-io/[File and I/O] - File operations and streams
+* link:/docs/commands/control-flow/[Control Flow] - Program flow control
+* link:/docs/commands/resource-management/[Resource Management] - VM and resource handling
+* link:/docs/commands/error-handling/[Error Handling] - Error management and recovery
+
+==== link:/docs/commands/by-category/[Categorical Index]
+
+View all commands grouped by their functional categories with descriptions.
-* xref:../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../usage/basic/stack-operations.adoc[Stack Operations] - Working with the stack
-* xref:../levels/index.adoc[PostScript Levels] - Version-specific features
\ No newline at end of file
diff --git a/docs/commands/painting/index.adoc b/docs/commands/painting/index.adoc
index 99f46dd..4ff8890 100644
--- a/docs/commands/painting/index.adoc
+++ b/docs/commands/painting/index.adoc
@@ -1,9 +1,8 @@
---
layout: default
title: Painting
-parent: Command Reference
+parent: Commands
nav_order: 8
-has_children: true
---
== Painting
@@ -26,19 +25,19 @@ PostScript provides three primary painting operations:
|===
| Command | Description
-| xref:../fill.adoc[`fill`]
+| link:/docs/commands/references/fill/[`fill`]
| Fill path interior (non-zero winding rule)
-| xref:../eofill.adoc[`eofill`]
+| link:/docs/commands/references/eofill/[`eofill`]
| Fill path interior (even-odd rule)
-| xref:../ufill.adoc[`ufill`]
+| link:/docs/commands/references/ufill/[`ufill`]
| Fill user path (Level 2)
-| xref:../ueofill.adoc[`ueofill`]
+| link:/docs/commands/references/ueofill/[`ueofill`]
| Even-odd fill user path (Level 2)
-| xref:../rectfill.adoc[`rectfill`]
+| link:/docs/commands/references/rectfill/[`rectfill`]
| Fill rectangles (Level 2)
|===
@@ -48,19 +47,19 @@ PostScript provides three primary painting operations:
|===
| Command | Description
-| xref:../stroke.adoc[`stroke`]
+| link:/docs/commands/references/stroke/[`stroke`]
| Paint along path
-| xref:../strokepath.adoc[`strokepath`]
+| link:/docs/commands/references/strokepath/[`strokepath`]
| Convert stroke to outline path
-| xref:../ustroke.adoc[`ustroke`]
+| link:/docs/commands/references/ustroke/[`ustroke`]
| Stroke user path (Level 2)
-| xref:../ustrokepath.adoc[`ustrokepath`]
+| link:/docs/commands/references/ustrokepath/[`ustrokepath`]
| Convert user path stroke to outline (Level 2)
-| xref:../rectstroke.adoc[`rectstroke`]
+| link:/docs/commands/references/rectstroke/[`rectstroke`]
| Stroke rectangles (Level 2)
|===
@@ -70,20 +69,20 @@ PostScript provides three primary painting operations:
|===
| Command | Description
-| xref:../clip.adoc[`clip`]
+| link:/docs/commands/references/clip/[`clip`]
| Intersect clipping path (non-zero winding)
-| xref:../eoclip.adoc[`eoclip`]
+| link:/docs/commands/references/eoclip/[`eoclip`]
| Intersect clipping path (even-odd rule)
-| xref:../clippath.adoc[`clippath`]
+| link:/docs/commands/references/clippath/[`clippath`]
| Set current path to clipping path
-| xref:../rectclip.adoc[`rectclip`]
+| link:/docs/commands/references/rectclip/[`rectclip`]
| Clip to rectangles (Level 2)
|===
== See Also
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../graphics-state/index.adoc[Graphics State]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Graphics State]
diff --git a/docs/commands/path-construction/index.adoc b/docs/commands/path-construction/index.adoc
index e5f22c4..28ce4da 100644
--- a/docs/commands/path-construction/index.adoc
+++ b/docs/commands/path-construction/index.adoc
@@ -1,9 +1,8 @@
---
layout: default
title: Path Construction
-parent: Command Reference
+parent: Commands
nav_order: 7
-has_children: true
---
== Path Construction
@@ -26,22 +25,22 @@ Path construction in PostScript follows a three-step process:
|===
| Command | Description
-| xref:../newpath.adoc[`newpath`]
+| link:/docs/commands/references/newpath/[`newpath`]
| Initialize path to empty
-| xref:../moveto.adoc[`moveto`]
+| link:/docs/commands/references/moveto/[`moveto`]
| Set current point (start new subpath)
-| xref:../lineto.adoc[`lineto`]
+| link:/docs/commands/references/lineto/[`lineto`]
| Add straight line to current point
-| xref:../curveto.adoc[`curveto`]
+| link:/docs/commands/references/curveto/[`curveto`]
| Add Bézier curve to path
-| xref:../closepath.adoc[`closepath`]
+| link:/docs/commands/references/closepath/[`closepath`]
| Close current subpath
-| xref:../currentpoint.adoc[`currentpoint`]
+| link:/docs/commands/references/currentpoint/[`currentpoint`]
| Get coordinates of current point
|===
@@ -51,13 +50,13 @@ Path construction in PostScript follows a three-step process:
|===
| Command | Description
-| xref:../rmoveto.adoc[`rmoveto`]
+| link:/docs/commands/references/rmoveto/[`rmoveto`]
| Relative moveto
-| xref:../rlineto.adoc[`rlineto`]
+| link:/docs/commands/references/rlineto/[`rlineto`]
| Relative lineto
-| xref:../rcurveto.adoc[`rcurveto`]
+| link:/docs/commands/references/rcurveto/[`rcurveto`]
| Relative curveto
|===
@@ -67,16 +66,16 @@ Path construction in PostScript follows a three-step process:
|===
| Command | Description
-| xref:../arc.adoc[`arc`]
+| link:/docs/commands/references/arc/[`arc`]
| Add counterclockwise circular arc
-| xref:../arcn.adoc[`arcn`]
+| link:/docs/commands/references/arcn/[`arcn`]
| Add clockwise circular arc
-| xref:../arct.adoc[`arct`]
+| link:/docs/commands/references/arct/[`arct`]
| Add arc defined by tangent lines
-| xref:../arcto.adoc[`arcto`]
+| link:/docs/commands/references/arcto/[`arcto`]
| Like arct but returns tangent points
|===
@@ -128,6 +127,6 @@ closepath
== See Also
-* xref:../painting/index.adoc[Painting] - Fill and stroke paths
-* xref:../graphics-state/index.adoc[Graphics State] - Line parameters
-* xref:../transformations/index.adoc[Transformations] - Coordinate systems
+* link:/docs/commands/references/[Painting] - Fill and stroke paths
+* link:/docs/commands/references/[Graphics State] - Line parameters
+* link:/docs/commands/references/[Transformations] - Coordinate systems
diff --git a/docs/commands/arithmetic-math/abs.adoc b/docs/commands/references/abs.adoc
similarity index 94%
rename from docs/commands/arithmetic-math/abs.adoc
rename to docs/commands/references/abs.adoc
index a729cc5..6d496ed 100644
--- a/docs/commands/arithmetic-math/abs.adoc
+++ b/docs/commands/references/abs.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: abs
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
= abs
@@ -250,10 +249,10 @@ The operand must be numeric (integer or real). Other types will cause a `typeche
== Related Commands
-* xref:../neg.adoc[`neg`] - Negate a number
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../sqrt.adoc[`sqrt`] - Square root
+* link:/docs/commands/references/neg/[`neg`] - Negate a number
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/sqrt/[`sqrt`] - Square root
== PostScript Level
@@ -339,5 +338,5 @@ The `abs` operator is extremely fast:
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/add.adoc b/docs/commands/references/add.adoc
similarity index 91%
rename from docs/commands/arithmetic-math/add.adoc
rename to docs/commands/references/add.adoc
index 9397245..567ef33 100644
--- a/docs/commands/arithmetic-math/add.adoc
+++ b/docs/commands/references/add.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: add
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
= add
@@ -215,12 +214,12 @@ Both operands must be numeric (integer or real). Other types will cause a `typec
== Related Commands
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
-* xref:../div.adoc[`div`] - Divide two numbers (real result)
-* xref:../idiv.adoc[`idiv`] - Integer division
-* xref:../mod.adoc[`mod`] - Modulo (remainder)
-* xref:../neg.adoc[`neg`] - Negate a number
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
+* link:/docs/commands/references/div/[`div`] - Divide two numbers (real result)
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division
+* link:/docs/commands/references/mod/[`mod`] - Modulo (remainder)
+* link:/docs/commands/references/neg/[`neg`] - Negate a number
== PostScript Level
@@ -285,5 +284,5 @@ For adding many values, consider:
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/array-string/aload.adoc b/docs/commands/references/aload.adoc
similarity index 65%
rename from docs/commands/array-string/aload.adoc
rename to docs/commands/references/aload.adoc
index 60240bc..a54fe46 100644
--- a/docs/commands/array-string/aload.adoc
+++ b/docs/commands/references/aload.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: aload
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -48,7 +47,7 @@ packedarray aload → packedarray₀ ... packedarrayₙ₋₁ packedarray
=== Description
-xref:../aload.adoc[`aload`] successively pushes all _n_ elements of an array or packed array onto the operand stack (where _n_ is the length of the operand), and finally pushes the array or packed array itself back onto the stack.
+link:/docs/commands/references/aload/[`aload`] successively pushes all _n_ elements of an array or packed array onto the operand stack (where _n_ is the length of the operand), and finally pushes the array or packed array itself back onto the stack.
The elements are pushed in index order: element 0 first, element _n_-1 last.
@@ -111,7 +110,7 @@ matrix currentmatrix aload pop
=== Common Pitfalls
-WARNING: *Array Remains on Stack* - xref:../aload.adoc[`aload`] leaves the original array on the stack. Use link:../stack-manipulation/pop.adoc[`pop`] if you don't need it.
+WARNING: *Array Remains on Stack* - link:/docs/commands/references/aload/[`aload`] leaves the original array on the stack. Use link:../stack-manipulation/pop/[`pop`] if you don't need it.
[source,postscript]
----
@@ -126,7 +125,7 @@ WARNING: *Stack Overflow* - Loading large arrays can overflow the operand stack.
1000 array aload % Might cause stackoverflow
----
-TIP: *Use with forall* - For processing array elements, xref:../forall.adoc[`forall`] is often more appropriate than xref:../aload.adoc[`aload`].
+TIP: *Use with forall* - For processing array elements, link:/docs/commands/references/forall/[`forall`] is often more appropriate than link:/docs/commands/references/aload/[`aload`].
=== Error Conditions
@@ -152,19 +151,19 @@ TIP: *Use with forall* - For processing array elements, xref:../forall.adoc[`for
* Elements are shared between the array and stack (not copied)
* Modifying a composite element affects both the array and the stack value
* Works identically for arrays and packed arrays
-* The array reference on top of stack can be used to restore values with xref:../astore.adoc[`astore`]
+* The array reference on top of stack can be used to restore values with link:/docs/commands/references/astore/[`astore`]
=== Performance Considerations
* Loading small arrays is efficient
-* For large arrays, consider using xref:../get.adoc[`get`] to access specific elements
-* For iteration, xref:../forall.adoc[`forall`] is more memory-efficient
+* For large arrays, consider using link:/docs/commands/references/get/[`get`] to access specific elements
+* For iteration, link:/docs/commands/references/forall/[`forall`] is more memory-efficient
=== See Also
-* xref:../astore.adoc[`astore`] - Store stack into array
-* xref:../get.adoc[`get`] - Get single array element
-* xref:../getinterval.adoc[`getinterval`] - Get subarray
-* xref:../forall.adoc[`forall`] - Iterate over array elements
-* xref:../length.adoc[`length`] - Get array length
-* xref:../stack-manipulation/pop.adoc[`pop`] - Remove top stack element
\ No newline at end of file
+* link:/docs/commands/references/astore/[`astore`] - Store stack into array
+* link:/docs/commands/references/get/[`get`] - Get single array element
+* link:/docs/commands/references/getinterval/[`getinterval`] - Get subarray
+* link:/docs/commands/references/forall/[`forall`] - Iterate over array elements
+* link:/docs/commands/references/length/[`length`] - Get array length
+* link:/docs/commands/references/pop/[`pop`] - Remove top stack element
\ No newline at end of file
diff --git a/docs/commands/array-string/anchorsearch.adoc b/docs/commands/references/anchorsearch.adoc
similarity index 80%
rename from docs/commands/array-string/anchorsearch.adoc
rename to docs/commands/references/anchorsearch.adoc
index 87455a7..6fade2e 100644
--- a/docs/commands/array-string/anchorsearch.adoc
+++ b/docs/commands/references/anchorsearch.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: anchorsearch
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 14
---
@@ -60,7 +59,7 @@ string seek anchorsearch → post match true (if found)
=== Description
-xref:../anchorsearch.adoc[`anchorsearch`] determines if _string_ begins with _seek_ (i.e., _string_ is at least as long as _seek_ and the initial characters match exactly).
+link:/docs/commands/references/anchorsearch/[`anchorsearch`] determines if _string_ begins with _seek_ (i.e., _string_ is at least as long as _seek_ and the initial characters match exactly).
If it matches:
* Splits _string_ into _match_ (the matching prefix) and _post_ (the remainder)
@@ -145,7 +144,7 @@ filename (.ps) anchorsearch {
=== Common Pitfalls
-WARNING: *Must Match At Start* - xref:../anchorsearch.adoc[`anchorsearch`] only finds prefixes, not substrings anywhere in the string.
+WARNING: *Must Match At Start* - link:/docs/commands/references/anchorsearch/[`anchorsearch`] only finds prefixes, not substrings anywhere in the string.
[source,postscript]
----
@@ -159,7 +158,7 @@ WARNING: *Case Sensitive* - Matching is exact, including case.
(PostScript) (post) anchorsearch % false
----
-TIP: *Use search for Anywhere* - For substring search anywhere in string, use xref:../search.adoc[`search`] instead.
+TIP: *Use search for Anywhere* - For substring search anywhere in string, use link:/docs/commands/references/search/[`search`] instead.
=== Error Conditions
@@ -188,6 +187,6 @@ TIP: *Use search for Anywhere* - For substring search anywhere in string, use xr
=== See Also
-* xref:../search.adoc[`search`] - Search for substring anywhere
-* xref:../token.adoc[`token`] - Parse token from string
-* xref:../getinterval.adoc[`getinterval`] - Extract substring
\ No newline at end of file
+* link:/docs/commands/references/search/[`search`] - Search for substring anywhere
+* link:/docs/commands/references/token/[`token`] - Parse token from string
+* link:/docs/commands/references/getinterval/[`getinterval`] - Extract substring
\ No newline at end of file
diff --git a/docs/commands/path-construction/arc.adoc b/docs/commands/references/arc.adoc
similarity index 69%
rename from docs/commands/path-construction/arc.adoc
rename to docs/commands/references/arc.adoc
index 8f0b529..955e4b9 100644
--- a/docs/commands/path-construction/arc.adoc
+++ b/docs/commands/references/arc.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: arc
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -50,13 +49,13 @@ x y r ang1 ang2 arc → -
=== Description
-xref:../arc.adoc[`arc`] appends a counterclockwise arc of a circle to the current path. The arc has (x, y) as center, r as radius, ang1 as the angle from (x, y) to the first endpoint, and ang2 as the angle from (x, y) to the second endpoint.
+link:/docs/commands/references/arc/[`arc`] appends a counterclockwise arc of a circle to the current path. The arc has (x, y) as center, r as radius, ang1 as the angle from (x, y) to the first endpoint, and ang2 as the angle from (x, y) to the second endpoint.
Angles are measured in degrees counterclockwise from the positive x-axis of the current user coordinate system.
-If there is a current point, xref:../arc.adoc[`arc`] includes a straight line segment from the current point to the first endpoint of the arc, then adds the arc into the current path. If the current path is empty, xref:../arc.adoc[`arc`] does not produce the initial straight line segment. In any event, the second endpoint of the arc becomes the new current point.
+If there is a current point, link:/docs/commands/references/arc/[`arc`] includes a straight line segment from the current point to the first endpoint of the arc, then adds the arc into the current path. If the current path is empty, link:/docs/commands/references/arc/[`arc`] does not produce the initial straight line segment. In any event, the second endpoint of the arc becomes the new current point.
-The curve produced is circular in user space. If user space is scaled non-uniformly (differently in x and y), xref:../arc.adoc[`arc`] will produce elliptical curves in device space.
+The curve produced is circular in user space. If user space is scaled non-uniformly (differently in x and y), link:/docs/commands/references/arc/[`arc`] will produce elliptical curves in device space.
=== PostScript Level
@@ -190,7 +189,7 @@ WARNING: *Angle Units* - Angles are in **degrees**, not radians. A full circle i
200 200 50 0 360 arc % Correct: full circle
----
-WARNING: *Counterclockwise Direction* - xref:../arc.adoc[`arc`] always draws counterclockwise. For clockwise arcs, use xref:../arcn.adoc[`arcn`].
+WARNING: *Counterclockwise Direction* - link:/docs/commands/references/arc/[`arc`] always draws counterclockwise. For clockwise arcs, use link:/docs/commands/references/arcn/[`arcn`].
[source,postscript]
----
@@ -207,13 +206,13 @@ WARNING: *Non-uniform Scaling* - If the CTM has non-uniform scaling, arcs become
100 100 50 0 360 arc % Produces an ellipse, not a circle
----
-TIP: *Connecting Line* - If a current point exists, xref:../arc.adoc[`arc`] adds a connecting line to the arc's start. Use xref:../moveto.adoc[`moveto`] to the start point to avoid this.
+TIP: *Connecting Line* - If a current point exists, link:/docs/commands/references/arc/[`arc`] adds a connecting line to the arc's start. Use link:/docs/commands/references/moveto/[`moveto`] to the start point to avoid this.
=== Implementation Notes
* Arcs are internally represented as one or more Bézier cubic curves
* The conversion is accurate enough for faithful arc rendering
-* Programs using `pathforall` will see xref:../curveto.adoc[`curveto`] segments
+* Programs using `pathforall` will see link:/docs/commands/references/curveto/[`curveto`] segments
* Angles wrap around: 370° is equivalent to 10°
* Negative angles are valid: -90° equals 270°
* Zero radius creates a point (degenerate arc)
@@ -243,9 +242,9 @@ TIP: *Connecting Line* - If a current point exists, xref:../arc.adoc[`arc`] adds
=== See Also
-* xref:../arcn.adoc[`arcn`] - Clockwise arc
-* xref:../arct.adoc[`arct`] - Arc defined by tangent lines
-* xref:../arcto.adoc[`arcto`] - Like arct but returns tangent points
-* xref:../curveto.adoc[`curveto`] - Bézier cubic curve
-* xref:../moveto.adoc[`moveto`] - Set current point
-* xref:../closepath.adoc[`closepath`] - Close current subpath
\ No newline at end of file
+* link:/docs/commands/references/arcn/[`arcn`] - Clockwise arc
+* link:/docs/commands/references/arct/[`arct`] - Arc defined by tangent lines
+* link:/docs/commands/references/arcto/[`arcto`] - Like arct but returns tangent points
+* link:/docs/commands/references/curveto/[`curveto`] - Bézier cubic curve
+* link:/docs/commands/references/moveto/[`moveto`] - Set current point
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
\ No newline at end of file
diff --git a/docs/commands/path-construction/arcn.adoc b/docs/commands/references/arcn.adoc
similarity index 73%
rename from docs/commands/path-construction/arcn.adoc
rename to docs/commands/references/arcn.adoc
index 87201a3..50c9a6d 100644
--- a/docs/commands/path-construction/arcn.adoc
+++ b/docs/commands/references/arcn.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: arcn
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -50,11 +49,11 @@ x y r ang1 ang2 arcn → -
=== Description
-xref:../arcn.adoc[`arcn`] (arc negative) behaves like xref:../arc.adoc[`arc`], but builds its arc segment in a clockwise direction in user space instead of counterclockwise.
+link:/docs/commands/references/arcn/[`arcn`] (arc negative) behaves like link:/docs/commands/references/arc/[`arc`], but builds its arc segment in a clockwise direction in user space instead of counterclockwise.
The arc has (x, y) as center, r as radius, ang1 as the angle from (x, y) to the first endpoint, and ang2 as the angle from (x, y) to the second endpoint. Angles are measured in degrees counterclockwise from the positive x-axis.
-If there is a current point, xref:../arcn.adoc[`arcn`] includes a straight line segment from the current point to the first endpoint of the arc. The second endpoint of the arc becomes the new current point.
+If there is a current point, link:/docs/commands/references/arcn/[`arcn`] includes a straight line segment from the current point to the first endpoint of the arc. The second endpoint of the arc becomes the new current point.
=== PostScript Level
@@ -167,7 +166,7 @@ fill
=== Common Pitfalls
-WARNING: *Clockwise Means Negative Direction* - Even though you specify ang1 to ang2, xref:../arcn.adoc[`arcn`] draws clockwise (decreasing angles).
+WARNING: *Clockwise Means Negative Direction* - Even though you specify ang1 to ang2, link:/docs/commands/references/arcn/[`arcn`] draws clockwise (decreasing angles).
[source,postscript]
----
@@ -184,7 +183,7 @@ WARNING: *Angle Order Still Matters* - ang1 is the start angle, ang2 is the end
200 200 50 90 0 arcn % Goes 90° clockwise (90→45→0)
----
-TIP: *Use for Interior Paths* - xref:../arcn.adoc[`arcn`] is essential for creating holes in shapes when combined with xref:../arc.adoc[`arc`], as opposite directions create non-overlapping regions.
+TIP: *Use for Interior Paths* - link:/docs/commands/references/arcn/[`arcn`] is essential for creating holes in shapes when combined with link:/docs/commands/references/arc/[`arc`], as opposite directions create non-overlapping regions.
=== Error Conditions
@@ -207,19 +206,19 @@ TIP: *Use for Interior Paths* - xref:../arcn.adoc[`arcn`] is essential for creat
* Internally represented as Bézier cubic curves
* Direction matters for fill rules (non-zero winding number)
* Clockwise and counterclockwise arcs can create holes in filled shapes
-* Same accuracy considerations as xref:../arc.adoc[`arc`]
+* Same accuracy considerations as link:/docs/commands/references/arc/[`arc`]
* Produces elliptical curves if CTM has non-uniform scaling
=== Performance Considerations
-* Same performance characteristics as xref:../arc.adoc[`arc`]
+* Same performance characteristics as link:/docs/commands/references/arc/[`arc`]
* No additional overhead for clockwise direction
* Useful for efficient hole creation in complex paths
=== See Also
-* xref:../arc.adoc[`arc`] - Counterclockwise arc
-* xref:../arct.adoc[`arct`] - Arc defined by tangent lines
-* xref:../arcto.adoc[`arcto`] - Like arct but returns tangent points
-* xref:../closepath.adoc[`closepath`] - Close current subpath
-* xref:../moveto.adoc[`moveto`] - Set current point
\ No newline at end of file
+* link:/docs/commands/references/arc/[`arc`] - Counterclockwise arc
+* link:/docs/commands/references/arct/[`arct`] - Arc defined by tangent lines
+* link:/docs/commands/references/arcto/[`arcto`] - Like arct but returns tangent points
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
+* link:/docs/commands/references/moveto/[`moveto`] - Set current point
\ No newline at end of file
diff --git a/docs/commands/path-construction/arct.adoc b/docs/commands/references/arct.adoc
similarity index 70%
rename from docs/commands/path-construction/arct.adoc
rename to docs/commands/references/arct.adoc
index 471c975..bcfd0c9 100644
--- a/docs/commands/path-construction/arct.adoc
+++ b/docs/commands/references/arct.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: arct
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -50,19 +49,19 @@ x1 y1 x2 y2 r arct → -
=== Description
-xref:../arct.adoc[`arct`] appends an arc of a circle to the current path, possibly preceded by a straight line segment. The arc is defined by a radius r and two tangent lines.
+link:/docs/commands/references/arct/[`arct`] appends an arc of a circle to the current path, possibly preceded by a straight line segment. The arc is defined by a radius r and two tangent lines.
The tangent lines are:
1. From the current point (x0, y0) to (x1, y1)
2. From (x1, y1) to (x2, y2)
-If the current point is undefined, xref:../arct.adoc[`arct`] executes the [`nocurrentpoint`] error.
+If the current point is undefined, link:/docs/commands/references/arct/[`arct`] executes the [`nocurrentpoint`] error.
The center of the arc is located at distance r perpendicular to both tangent lines, within the inner angle between them. The arc begins at the first tangent point (xt1, yt1) on the first tangent line, and ends at the second tangent point (xt2, yt2) on the second tangent line.
-Before constructing the arc, xref:../arct.adoc[`arct`] adds a straight line from the current point to (xt1, yt1), unless those points are the same. The point (xt2, yt2) becomes the new current point.
+Before constructing the arc, link:/docs/commands/references/arct/[`arct`] adds a straight line from the current point to (xt1, yt1), unless those points are the same. The point (xt2, yt2) becomes the new current point.
-If the two tangent lines are collinear, xref:../arct.adoc[`arct`] merely appends a straight line from (x0, y0) to (x1, y1).
+If the two tangent lines are collinear, link:/docs/commands/references/arct/[`arct`] merely appends a straight line from (x0, y0) to (x1, y1).
=== PostScript Level
@@ -186,7 +185,7 @@ stroke
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../arct.adoc[`arct`] needs a current point to define the first tangent line.
+WARNING: *Requires Current Point* - link:/docs/commands/references/arct/[`arct`] needs a current point to define the first tangent line.
[source,postscript]
----
@@ -204,7 +203,7 @@ WARNING: *Collinear Points* - If the three points are collinear, no arc is creat
WARNING: *Radius Too Large* - Very large radii relative to the angle may produce unexpected results or hit numerical limits.
-TIP: *Perfect for UI Corners* - xref:../arct.adoc[`arct`] is ideal for creating rounded corners in user interfaces and technical drawings where corners are defined by intersecting lines.
+TIP: *Perfect for UI Corners* - link:/docs/commands/references/arct/[`arct`] is ideal for creating rounded corners in user interfaces and technical drawings where corners are defined by intersecting lines.
=== Error Conditions
@@ -234,18 +233,18 @@ TIP: *Perfect for UI Corners* - xref:../arct.adoc[`arct`] is ideal for creating
* Non-uniform scaling produces elliptical results
* Internally converted to Bézier curves
* The connecting line from current point is automatic
-* Tangent points are calculated but not returned (use xref:../arcto.adoc[`arcto`] for that)
+* Tangent points are calculated but not returned (use link:/docs/commands/references/arcto/[`arcto`] for that)
=== Performance Considerations
-* Slightly more complex than xref:../arc.adoc[`arc`] due to tangent calculations
+* Slightly more complex than link:/docs/commands/references/arc/[`arc`] due to tangent calculations
* Very efficient for creating rounded corners
* Single operation replaces manual tangent point calculation
=== See Also
-* xref:../arcto.adoc[`arcto`] - Like arct but returns tangent points
-* xref:../arc.adoc[`arc`] - Counterclockwise circular arc
-* xref:../arcn.adoc[`arcn`] - Clockwise circular arc
-* xref:../curveto.adoc[`curveto`] - Bézier cubic curve
-* xref:../lineto.adoc[`lineto`] - Straight line segment
\ No newline at end of file
+* link:/docs/commands/references/arcto/[`arcto`] - Like arct but returns tangent points
+* link:/docs/commands/references/arc/[`arc`] - Counterclockwise circular arc
+* link:/docs/commands/references/arcn/[`arcn`] - Clockwise circular arc
+* link:/docs/commands/references/curveto/[`curveto`] - Bézier cubic curve
+* link:/docs/commands/references/lineto/[`lineto`] - Straight line segment
\ No newline at end of file
diff --git a/docs/commands/path-construction/arcto.adoc b/docs/commands/references/arcto.adoc
similarity index 76%
rename from docs/commands/path-construction/arcto.adoc
rename to docs/commands/references/arcto.adoc
index c44bad6..b148f62 100644
--- a/docs/commands/path-construction/arcto.adoc
+++ b/docs/commands/references/arcto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: arcto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -59,7 +58,7 @@ x1 y1 x2 y2 r arcto → xt1 yt1 xt2 yt2
=== Description
-xref:../arcto.adoc[`arcto`] produces the same effect as xref:../arct.adoc[`arct`]. It also returns the two tangent point coordinates (xt1, yt1) and (xt2, yt2) in user space.
+link:/docs/commands/references/arcto/[`arcto`] produces the same effect as link:/docs/commands/references/arct/[`arct`]. It also returns the two tangent point coordinates (xt1, yt1) and (xt2, yt2) in user space.
The arc is defined by:
1. A tangent line from the current point (x0, y0) to (x1, y1)
@@ -68,7 +67,7 @@ The arc is defined by:
The arc is tangent to both lines, and the tangent points are returned on the stack.
-xref:../arcto.adoc[`arcto`] is not allowed as an element of a user path, whereas xref:../arct.adoc[`arct`] is allowed.
+link:/docs/commands/references/arcto/[`arcto`] is not allowed as an element of a user path, whereas link:/docs/commands/references/arct/[`arct`] is allowed.
=== PostScript Level
@@ -224,9 +223,9 @@ newpath
=== Common Pitfalls
-WARNING: *Not for User Paths* - Unlike xref:../arct.adoc[`arct`], xref:../arcto.adoc[`arcto`] cannot be used in user paths.
+WARNING: *Not for User Paths* - Unlike link:/docs/commands/references/arct/[`arct`], link:/docs/commands/references/arcto/[`arcto`] cannot be used in user paths.
-WARNING: *Stack Management* - xref:../arcto.adoc[`arcto`] leaves four values on the stack. Remember to pop them if not needed.
+WARNING: *Stack Management* - link:/docs/commands/references/arcto/[`arcto`] leaves four values on the stack. Remember to pop them if not needed.
[source,postscript]
----
@@ -237,7 +236,7 @@ newpath
stroke % May cause typecheck error
----
-TIP: *Use When You Need Tangent Points* - If you don't need the tangent points, use xref:../arct.adoc[`arct`] instead for cleaner stack management.
+TIP: *Use When You Need Tangent Points* - If you don't need the tangent points, use link:/docs/commands/references/arct/[`arct`] instead for cleaner stack management.
=== Error Conditions
@@ -263,7 +262,7 @@ TIP: *Use When You Need Tangent Points* - If you don't need the tangent points,
=== Implementation Notes
-* Identical path construction to xref:../arct.adoc[`arct`]
+* Identical path construction to link:/docs/commands/references/arct/[`arct`]
* Returns tangent points in user space coordinates
* Tangent points are on the original tangent lines, not the arc
* Useful for geometric calculations and annotations
@@ -271,13 +270,13 @@ TIP: *Use When You Need Tangent Points* - If you don't need the tangent points,
=== Performance Considerations
-* Slightly slower than xref:../arct.adoc[`arct`] due to returning tangent points
+* Slightly slower than link:/docs/commands/references/arct/[`arct`] due to returning tangent points
* Overhead is minimal for most applications
-* Consider using xref:../arct.adoc[`arct`] if tangent points aren't needed
+* Consider using link:/docs/commands/references/arct/[`arct`] if tangent points aren't needed
=== See Also
-* xref:../arct.adoc[`arct`] - Arc by tangent (no tangent point return)
-* xref:../arc.adoc[`arc`] - Counterclockwise circular arc
-* xref:../arcn.adoc[`arcn`] - Clockwise circular arc
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/arct/[`arct`] - Arc by tangent (no tangent point return)
+* link:/docs/commands/references/arc/[`arc`] - Counterclockwise circular arc
+* link:/docs/commands/references/arcn/[`arcn`] - Clockwise circular arc
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/array-string/array.adoc b/docs/commands/references/array.adoc
similarity index 67%
rename from docs/commands/array-string/array.adoc
rename to docs/commands/references/array.adoc
index 4072566..200ec57 100644
--- a/docs/commands/array-string/array.adoc
+++ b/docs/commands/references/array.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: array
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -38,7 +37,7 @@ int array → array
=== Description
-xref:../array.adoc[`array`] creates a new array object of length _int_, with each element initialized to null. The array is allocated in local or global VM according to the current VM allocation mode.
+link:/docs/commands/references/array/[`array`] creates a new array object of length _int_, with each element initialized to null. The array is allocated in local or global VM according to the current VM allocation mode.
The _int_ operand must be:
@@ -102,7 +101,7 @@ dup 1 200 put % y coordinate
=== Common Pitfalls
-WARNING: *Uninitialized Elements* - Remember that xref:../array.adoc[`array`] initializes all elements to null. You must explicitly populate the array before using its elements.
+WARNING: *Uninitialized Elements* - Remember that link:/docs/commands/references/array/[`array`] initializes all elements to null. You must explicitly populate the array before using its elements.
[source,postscript]
----
@@ -112,7 +111,7 @@ WARNING: *Uninitialized Elements* - Remember that xref:../array.adoc[`array`] in
WARNING: *VM Allocation* - Arrays are allocated in VM. Creating many large arrays can exhaust available memory.
-TIP: *Array Literals vs. array Operator* - For known, fixed-size arrays, use the literal syntax `[ ... ]` instead. Use xref:../array.adoc[`array`] when the size is computed dynamically.
+TIP: *Array Literals vs. array Operator* - For known, fixed-size arrays, use the literal syntax `[ ... ]` instead. Use link:/docs/commands/references/array/[`array`] when the size is computed dynamically.
=== Error Conditions
@@ -140,7 +139,7 @@ TIP: *Array Literals vs. array Operator* - For known, fixed-size arrays, use the
* Most PostScript implementations support arrays up to at least 65,535 elements
* Array allocation is typically faster for small arrays
-* Consider using xref:../packedarray.adoc[`packedarray`] for read-only data (Level 2)
+* Consider using link:/docs/commands/references/packedarray/[`packedarray`] for read-only data (Level 2)
=== Performance Considerations
@@ -150,10 +149,10 @@ TIP: *Array Literals vs. array Operator* - For known, fixed-size arrays, use the
=== See Also
-* xref:left-bracket.adoc[`[`] - Begin array construction
-* xref:right-bracket.adoc[`]`] - End array construction
-* xref:../astore.adoc[`astore`] - Store stack elements into array
-* xref:../packedarray.adoc[`packedarray`] - Create read-only packed array (Level 2)
-* xref:../length.adoc[`length`] - Get array length
-* xref:../get.adoc[`get`] - Get array element
-* xref:../put.adoc[`put`] - Put value into array
\ No newline at end of file
+* link:/docs/commands/references/brackets/[`[`] - Begin array construction
+* link:/docs/commands/references/brackets/[`]`] - End array construction
+* link:/docs/commands/references/astore/[`astore`] - Store stack elements into array
+* link:/docs/commands/references/packedarray/[`packedarray`] - Create read-only packed array (Level 2)
+* link:/docs/commands/references/length/[`length`] - Get array length
+* link:/docs/commands/references/get/[`get`] - Get array element
+* link:/docs/commands/references/put/[`put`] - Put value into array
\ No newline at end of file
diff --git a/docs/commands/font-text/ashow.adoc b/docs/commands/references/ashow.adoc
similarity index 73%
rename from docs/commands/font-text/ashow.adoc
rename to docs/commands/references/ashow.adoc
index 2aeab7a..67b1879 100644
--- a/docs/commands/font-text/ashow.adoc
+++ b/docs/commands/references/ashow.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ashow
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 9
---
@@ -30,7 +29,7 @@ ax ay string
=== Description
-xref:../ashow.adoc[`ashow`] paints the characters of `string` in a manner similar to xref:../show.adoc[`show`]. But while doing so, xref:../ashow.adoc[`ashow`] adjusts the width of each character shown by adding `ax` to the character's x width and `ay` to its y width, thus modifying the spacing between characters.
+link:/docs/commands/references/ashow/[`ashow`] paints the characters of `string` in a manner similar to link:/docs/commands/references/show/[`show`]. But while doing so, link:/docs/commands/references/ashow/[`ashow`] adjusts the width of each character shown by adding `ax` to the character's x width and `ay` to its y width, thus modifying the spacing between characters.
The numbers `ax` and `ay` are x and y displacements in the user coordinate system, not in the character coordinate system. This operator enables a string of text to be fitted to a specific width by adjusting all the spaces between characters by a uniform amount.
@@ -103,7 +102,7 @@ The numbers `ax` and `ay` are x and y displacements in the user coordinate syste
: Current font is not valid
**nocurrentpoint**
-: Current point is not defined before xref:../ashow.adoc[`ashow`]
+: Current point is not defined before link:/docs/commands/references/ashow/[`ashow`]
**stackunderflow**
: Fewer than three operands on stack
@@ -182,10 +181,10 @@ grestore
=== Performance Notes
-- xref:../ashow.adoc[`ashow`] is slightly slower than xref:../show.adoc[`show`] due to spacing calculations
+- link:/docs/commands/references/ashow/[`ashow`] is slightly slower than link:/docs/commands/references/show/[`show`] due to spacing calculations
- Character caching still applies
-- For uniform spacing of all text, set once and use xref:../show.adoc[`show`]
-- For spacing only specific characters, use xref:../widthshow.adoc[`widthshow`] instead
+- For uniform spacing of all text, set once and use link:/docs/commands/references/show/[`show`]
+- For spacing only specific characters, use link:/docs/commands/references/widthshow/[`widthshow`] instead
=== Advanced Usage
@@ -209,10 +208,10 @@ grestore
=== See Also
-- xref:../show.adoc[`show`] - Basic text painting
-- xref:../widthshow.adoc[`widthshow`] - Adjust specific character width
-- xref:../awidthshow.adoc[`awidthshow`] - Combine xref:../ashow.adoc[`ashow`] and xref:../widthshow.adoc[`widthshow`]
-- xref:../kshow.adoc[`kshow`] - Show with kerning procedure
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
+- link:/docs/commands/references/show/[`show`] - Basic text painting
+- link:/docs/commands/references/widthshow/[`widthshow`] - Adjust specific character width
+- link:/docs/commands/references/awidthshow/[`awidthshow`] - Combine link:/docs/commands/references/ashow/[`ashow`] and link:/docs/commands/references/widthshow/[`widthshow`]
+- link:/docs/commands/references/kshow/[`kshow`] - Show with kerning procedure
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
- `moveto` - Set current point
\ No newline at end of file
diff --git a/docs/commands/array-string/astore.adoc b/docs/commands/references/astore.adoc
similarity index 78%
rename from docs/commands/array-string/astore.adoc
rename to docs/commands/references/astore.adoc
index d8efc02..cc7cdfc 100644
--- a/docs/commands/array-string/astore.adoc
+++ b/docs/commands/references/astore.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: astore
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -47,14 +46,14 @@ any₀ ... anyₙ₋₁ array astore → array
=== Description
-xref:../astore.adoc[`astore`] stores objects from the operand stack into an array:
+link:/docs/commands/references/astore/[`astore`] stores objects from the operand stack into an array:
1. Removes the array from the stack and determines its length _n_
2. Removes _n_ objects from the stack
3. Stores them into the array (topmost stack element → array[n-1], bottommost → array[0])
4. Pushes the array back onto the stack
-The array must have been previously created with the correct length. xref:../astore.adoc[`astore`] cannot be performed on packed arrays (they are read-only).
+The array must have been previously created with the correct length. link:/docs/commands/references/astore/[`astore`] cannot be performed on packed arrays (they are read-only).
=== PostScript Level
@@ -136,7 +135,7 @@ WARNING: *Stack Order* - Objects are stored in reverse stack order: topmost stac
WARNING: *Global/Local VM Restrictions* - If the array is in global VM and any stored object is in local VM, [`invalidaccess`] error occurs.
-TIP: *Pre-create Array* - Always create the array first with the correct size using xref:../array.adoc[`array`].
+TIP: *Pre-create Array* - Always create the array first with the correct size using link:/docs/commands/references/array/[`array`].
=== Error Conditions
@@ -172,12 +171,12 @@ TIP: *Pre-create Array* - Always create the array first with the correct size us
[ 1 2 3 ] % [1 2 3] (more convenient)
----
-The `[ ]` syntax is usually more convenient for literal arrays, but xref:../astore.adoc[`astore`] is useful when the array size is computed dynamically.
+The `[ ]` syntax is usually more convenient for literal arrays, but link:/docs/commands/references/astore/[`astore`] is useful when the array size is computed dynamically.
=== See Also
-* xref:../aload.adoc[`aload`] - Load array elements onto stack
-* xref:../array.adoc[`array`] - Create new array
-* xref:../put.adoc[`put`] - Put single value into array
-* xref:../putinterval.adoc[`putinterval`] - Put subarray into array
-* xref:left-bracket.adoc[`[`] / xref:right-bracket.adoc[`]`] - Array literal syntax
\ No newline at end of file
+* link:/docs/commands/references/aload/[`aload`] - Load array elements onto stack
+* link:/docs/commands/references/array/[`array`] - Create new array
+* link:/docs/commands/references/put/[`put`] - Put single value into array
+* link:/docs/commands/references/putinterval/[`putinterval`] - Put subarray into array
+* link:/docs/commands/references/brackets/[`[`] / link:/docs/commands/references/brackets/[`]`] - Array literal syntax
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/atan.adoc b/docs/commands/references/atan.adoc
similarity index 91%
rename from docs/commands/arithmetic-math/atan.adoc
rename to docs/commands/references/atan.adoc
index 5001852..844ad20 100644
--- a/docs/commands/arithmetic-math/atan.adoc
+++ b/docs/commands/references/atan.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: atan
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 19
---
= atan
@@ -100,8 +99,8 @@ WARNING: PostScript returns angles in *degrees* (0-360), not radians!
== Related Commands
-* xref:../sin.adoc[`sin`] - Sine (degrees)
-* xref:../cos.adoc[`cos`] - Cosine (degrees)
+* link:/docs/commands/references/sin/[`sin`] - Sine (degrees)
+* link:/docs/commands/references/cos/[`cos`] - Cosine (degrees)
== PostScript Level
@@ -125,4 +124,4 @@ Both num and den are zero.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/font-text/awidthshow.adoc b/docs/commands/references/awidthshow.adoc
similarity index 79%
rename from docs/commands/font-text/awidthshow.adoc
rename to docs/commands/references/awidthshow.adoc
index e321f56..c2b1dd1 100644
--- a/docs/commands/font-text/awidthshow.adoc
+++ b/docs/commands/references/awidthshow.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: awidthshow
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 11
---
@@ -30,11 +29,11 @@ cx cy char ax ay string
=== Description
-xref:../awidthshow.adoc[`awidthshow`] paints the characters of `string` in a manner similar to xref:../show.adoc[`show`], but combines the special effects of xref:../ashow.adoc[`ashow`] and xref:../widthshow.adoc[`widthshow`].
+link:/docs/commands/references/awidthshow/[`awidthshow`] paints the characters of `string` in a manner similar to link:/docs/commands/references/show/[`show`], but combines the special effects of link:/docs/commands/references/ashow/[`ashow`] and link:/docs/commands/references/widthshow/[`widthshow`].
-xref:../awidthshow.adoc[`awidthshow`] adjusts the width of each character shown by adding `ax` to its x width and `ay` to its y width, thus modifying the spacing between characters. Furthermore, xref:../awidthshow.adoc[`awidthshow`] modifies the width of each occurrence of the character `char` by an additional amount `(cx, cy)`.
+link:/docs/commands/references/awidthshow/[`awidthshow`] adjusts the width of each character shown by adding `ax` to its x width and `ay` to its y width, thus modifying the spacing between characters. Furthermore, link:/docs/commands/references/awidthshow/[`awidthshow`] modifies the width of each occurrence of the character `char` by an additional amount `(cx, cy)`.
-The interpretation of `char` is as described for the xref:../widthshow.adoc[`widthshow`] operator.
+The interpretation of `char` is as described for the link:/docs/commands/references/widthshow/[`widthshow`] operator.
This operator enables fitting a string of text to a specific width by adjusting all of the spaces between characters by a uniform amount, while independently controlling the width of some specific character, such as the space character.
@@ -256,16 +255,16 @@ The space character (ASCII 32) is the most common target:
=== Performance Notes
-- More expensive than xref:../show.adoc[`show`], xref:../ashow.adoc[`ashow`], or xref:../widthshow.adoc[`widthshow`] alone
+- More expensive than link:/docs/commands/references/show/[`show`], link:/docs/commands/references/ashow/[`ashow`], or link:/docs/commands/references/widthshow/[`widthshow`] alone
- Two conditional checks per character
- Still benefits from font caching
- For best performance, prefer simpler operators when possible
=== See Also
-- xref:../show.adoc[`show`] - Basic text painting
-- xref:../ashow.adoc[`ashow`] - Uniform character spacing adjustment
-- xref:../widthshow.adoc[`widthshow`] - Selective character width adjustment
-- xref:../kshow.adoc[`kshow`] - Show with kerning procedure
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
\ No newline at end of file
+- link:/docs/commands/references/show/[`show`] - Basic text painting
+- link:/docs/commands/references/ashow/[`ashow`] - Uniform character spacing adjustment
+- link:/docs/commands/references/widthshow/[`widthshow`] - Selective character width adjustment
+- link:/docs/commands/references/kshow/[`kshow`] - Show with kerning procedure
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
\ No newline at end of file
diff --git a/docs/commands/dictionary/begin.adoc b/docs/commands/references/begin.adoc
similarity index 71%
rename from docs/commands/dictionary/begin.adoc
rename to docs/commands/references/begin.adoc
index 9548dab..89e19f4 100644
--- a/docs/commands/dictionary/begin.adoc
+++ b/docs/commands/references/begin.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: begin
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -38,13 +37,13 @@ dict begin → –
=== Description
-xref:../begin.adoc[`begin`] pushes _dict_ onto the dictionary stack, making it the current dictionary. This dictionary becomes the first one consulted during:
+link:/docs/commands/references/begin/[`begin`] pushes _dict_ onto the dictionary stack, making it the current dictionary. This dictionary becomes the first one consulted during:
* Implicit name lookup by the interpreter
-* xref:../def.adoc[`def`] - defines in current dictionary
-* xref:../load.adoc[`load`] - searches dictionary stack
-* xref:../store.adoc[`store`] - searches dictionary stack
-* xref:../where.adoc[`where`] - searches dictionary stack
+* link:/docs/commands/references/def/[`def`] - defines in current dictionary
+* link:/docs/commands/references/load/[`load`] - searches dictionary stack
+* link:/docs/commands/references/store/[`store`] - searches dictionary stack
+* link:/docs/commands/references/where/[`where`] - searches dictionary stack
=== PostScript Level
@@ -131,7 +130,7 @@ end
=== Common Pitfalls
-WARNING: *Must Match with end* - Every xref:../begin.adoc[`begin`] must have a corresponding xref:../end.adoc[`end`]. Unmatched begins cause [`dictstackoverflow`].
+WARNING: *Must Match with end* - Every link:/docs/commands/references/begin/[`begin`] must have a corresponding link:/docs/commands/references/end/[`end`]. Unmatched begins cause [`dictstackoverflow`].
[source,postscript]
----
@@ -194,8 +193,8 @@ systemdict
=== See Also
-* xref:../end.adoc[`end`] - Pop dictionary from stack
-* xref:../currentdict.adoc[`currentdict`] - Get current dictionary
-* xref:../def.adoc[`def`] - Define in current dictionary
-* xref:../dictstack.adoc[`dictstack`] - Examine dictionary stack
-* xref:../countdictstack.adoc[`countdictstack`] - Count stack depth
\ No newline at end of file
+* link:/docs/commands/references/end/[`end`] - Pop dictionary from stack
+* link:/docs/commands/references/currentdict/[`currentdict`] - Get current dictionary
+* link:/docs/commands/references/def/[`def`] - Define in current dictionary
+* link:/docs/commands/references/dictstack/[`dictstack`] - Examine dictionary stack
+* link:/docs/commands/references/countdictstack/[`countdictstack`] - Count stack depth
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/bitshift.adoc b/docs/commands/references/bitshift.adoc
similarity index 91%
rename from docs/commands/arithmetic-math/bitshift.adoc
rename to docs/commands/references/bitshift.adoc
index 2e71db9..ff9b1f9 100644
--- a/docs/commands/arithmetic-math/bitshift.adoc
+++ b/docs/commands/references/bitshift.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: bitshift
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 20
---
= bitshift
@@ -107,8 +106,8 @@ WARNING: Right shift only works correctly for positive integers.
== Related Commands
-* xref:../mul.adoc[`mul`] - Multiplication
-* xref:../idiv.adoc[`idiv`] - Integer division
+* link:/docs/commands/references/mul/[`mul`] - Multiplication
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division
== PostScript Level
@@ -130,4 +129,4 @@ One or both operands are not integers.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/references/brackets.adoc b/docs/commands/references/brackets.adoc
new file mode 100644
index 0000000..d86082a
--- /dev/null
+++ b/docs/commands/references/brackets.adoc
@@ -0,0 +1,283 @@
+---
+layout: default
+title: "`[` ... `]` (Array Brackets)"
+parent: Command Reference
+nav_order: 2
+---
+
+== `[` and `]` (Array Brackets)
+
+Array construction operators that work together to create literal arrays in PostScript.
+
+=== Overview
+
+The bracket operators `[` and `]` provide the most convenient syntax for constructing arrays with known contents:
+
+* `[` marks the beginning of array construction by pushing a mark on the operand stack
+* `]` ends array construction by collecting all objects above the mark into a new array
+
+These operators are typically used together as a pair to define literal arrays in PostScript code.
+
+=== Syntax
+
+==== [ (Left Bracket)
+
+----
+– [ → mark
+----
+
+==== ] (Right Bracket)
+
+----
+mark obj₀ ... objₙ₋₁ ] → array
+----
+
+=== Stack Effects
+
+==== [ (Left Bracket)
+
+.Before
+[cols="1,3"]
+|===
+| Level | Object
+
+| (empty or any objects)
+|
+|===
+
+.After
+[cols="1,3"]
+|===
+| Level | Object
+
+| 0
+| `mark` (array construction marker)
+|===
+
+==== ] (Right Bracket)
+
+.Before
+[cols="1,3"]
+|===
+| Level | Object
+
+| n+1
+| `mark`
+
+| n
+| `obj₀`
+
+| ...
+| ...
+
+| 0
+| `objₙ₋₁`
+|===
+
+.After
+[cols="1,3"]
+|===
+| Level | Object
+
+| 0
+| `array` (containing obj₀ through objₙ₋₁)
+|===
+
+=== Description
+
+==== How Array Construction Works
+
+The `[` operator pushes a special mark object on the operand stack to indicate the beginning of an array being constructed. It is functionally equivalent to the link:/docs/commands/references/mark/[`mark`] operator, but its use with `]` gives it special significance for array construction.
+
+The `]` operator completes array construction by:
+
+1. Counting all objects on the operand stack down to the topmost mark
+2. Removing those objects from the stack
+3. Creating a new array containing those objects in order
+4. Removing the mark
+5. Pushing the new array on the stack
+
+The resulting array is created with the literal attribute and allocated in local or global VM according to the current VM allocation mode.
+
+=== PostScript Level
+
+*Level 1* and later
+
+=== Examples
+
+.Simple array construction
+[source,postscript]
+----
+[ 1 2 3 ] % Creates array [1 2 3]
+----
+
+.Mixed-type array
+[source,postscript]
+----
+[ 42 (hello) /name true ] % Array with different types
+----
+
+.Nested arrays
+[source,postscript]
+----
+[ 1 [ 2 3 ] 4 ] % Array containing another array
+% Result: [1 [2 3] 4]
+----
+
+.Empty array
+[source,postscript]
+----
+[ ] % Creates empty array []
+----
+
+.Computed values in arrays
+[source,postscript]
+----
+[ 1 2 add 3 4 mul ] % Expressions evaluated before array creation
+% Result: [3 12]
+
+[ 10 20 add 30 ] % Creates [30 30]
+----
+
+.Building array from existing stack values
+[source,postscript]
+----
+1 2 3 % Stack: 1 2 3
+mark exch exch exch % Stack: mark 1 2 3
+] % Stack: [1 2 3]
+----
+
+=== Common Use Cases
+
+==== Literal Data Structures
+
+[source,postscript]
+----
+/colors [ /red /green /blue ] def
+/coordinates [ 100 200 ] def
+/primes [ 2 3 5 7 11 13 ] def
+----
+
+==== Procedure Arguments
+
+[source,postscript]
+----
+[ 1 2 3 ] { 10 mul } forall % Pass array to forall
+----
+
+==== Matrix Definitions
+
+[source,postscript]
+----
+[ 1 0 0 1 0 0 ] % Identity transformation matrix
+----
+
+==== Coordinate Pairs and Points
+
+[source,postscript]
+----
+/point [ 100 200 ] def
+----
+
+==== Color Definitions
+
+[source,postscript]
+----
+/red [ 1 0 0 ] def % RGB
+/cyan [ 0 1 1 1 ] def % CMYK
+----
+
+=== Common Pitfalls
+
+WARNING: *Unmatched Brackets* - Every `[` must have a corresponding `]`. Unmatched brackets cause a [`syntaxerror`] or [`unmatchedmark`] error.
+
+[source,postscript]
+----
+[ 1 2 3 % Missing ] causes syntaxerror
+1 2 3 ] % Missing [ causes unmatchedmark error
+----
+
+WARNING: *Execution vs. Literal* - Objects between `[` and `]` are evaluated before being placed in the array.
+
+[source,postscript]
+----
+[ 1 2 add ] % Results in [3], not [1 2 add]
+
+[ /x 5 def ] % Executes def, creates [5]
+ % NOT [/x 5 def]
+----
+
+TIP: *Literal vs. Executable Arrays* - Arrays created by `[ ... ]` have the literal attribute by default. To create an array without evaluating its contents, use the procedure syntax `{ ... }`. Use link:/docs/commands/references/cvx/[`cvx`] to make a literal array executable if needed.
+
+[source,postscript]
+----
+/proc { 1 2 add } def % Procedure (unevaluated)
+[ 1 2 add ] % Array [3] (evaluated)
+----
+
+=== Error Conditions
+
+[cols="1,3"]
+|===
+| Error | Condition
+
+| [`stackoverflow`]
+| Operand stack overflow when pushing mark, or resulting array would overflow stack
+
+| [`syntaxerror`]
+| No matching `]` before end of file/string
+
+| [`unmatchedmark`]
+| No mark on stack when `]` is executed (no matching `[`)
+
+| [`VMerror`]
+| Insufficient VM to allocate array
+|===
+
+=== Implementation Notes
+
+* The `[` operator is functionally equivalent to link:/docs/commands/references/mark/[`mark`]
+* The `]` operator is syntactic sugar recognized during parsing
+* Marks are used for error recovery and can be detected with link:/docs/commands/references/counttomark/[`counttomark`]
+* When scanned, `[ ... ]` creates a literal array object
+* The objects are placed in the array in the order they appeared between brackets
+* Index 0 contains the first object after `[`
+* The interpreter treats `[` and `]` specially during scanning for array literal syntax
+
+=== Relationship to Other Operators
+
+==== Equivalence with mark
+
+The `[` operator is functionally equivalent to link:/docs/commands/references/mark/[`mark`]:
+
+[source,postscript]
+----
+mark 1 2 3 ] % Same as [ 1 2 3 ]
+[ 1 2 3 % Must be closed with ]
+----
+
+However, `[` and `]` provide clearer syntax for array construction.
+
+==== Comparison with astore
+
+The `]` operator is similar to link:/docs/commands/references/astore/[`astore`] but more convenient:
+
+[source,postscript]
+----
+% Using [ ]
+[ 1 2 3 ]
+
+% Equivalent using astore
+1 2 3 3 array astore
+----
+
+The bracket syntax is clearer and doesn't require knowing the count in advance.
+
+=== See Also
+
+* link:/docs/commands/references/mark/[`mark`] - Push mark object
+* link:/docs/commands/references/cleartomark/[`cleartomark`] - Clear to mark
+* link:/docs/commands/references/counttomark/[`counttomark`] - Count objects to mark
+* link:/docs/commands/references/array/[`array`] - Create uninitialized array
+* link:/docs/commands/references/astore/[`astore`] - Store stack into array
+* link:/docs/commands/references/packedarray/[`packedarray`] - Create read-only array
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/ceiling.adoc b/docs/commands/references/ceiling.adoc
similarity index 93%
rename from docs/commands/arithmetic-math/ceiling.adoc
rename to docs/commands/references/ceiling.adoc
index 7668bee..da0c537 100644
--- a/docs/commands/arithmetic-math/ceiling.adoc
+++ b/docs/commands/references/ceiling.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ceiling
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
= ceiling
@@ -240,10 +239,10 @@ true ceiling % ERROR: typecheck
== Related Commands
-* xref:../floor.adoc[`floor`] - Round down to integer
-* xref:../round.adoc[`round`] - Round to nearest integer
-* xref:../truncate.adoc[`truncate`] - Truncate toward zero
-* xref:../abs.adoc[`abs`] - Absolute value
+* link:/docs/commands/references/floor/[`floor`] - Round down to integer
+* link:/docs/commands/references/round/[`round`] - Round to nearest integer
+* link:/docs/commands/references/truncate/[`truncate`] - Truncate toward zero
+* link:/docs/commands/references/abs/[`abs`] - Absolute value
== PostScript Level
@@ -318,5 +317,5 @@ The `ceiling` operator is fast:
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/font-text/charpath.adoc b/docs/commands/references/charpath.adoc
similarity index 77%
rename from docs/commands/font-text/charpath.adoc
rename to docs/commands/references/charpath.adoc
index 774144a..9acc950 100644
--- a/docs/commands/font-text/charpath.adoc
+++ b/docs/commands/references/charpath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: charpath
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 15
---
@@ -30,20 +29,20 @@ string bool
=== Description
-xref:../charpath.adoc[`charpath`] obtains the character path outlines that would result if `string` were shown at the current point using xref:../show.adoc[`show`]. Instead of painting the path, however, xref:../charpath.adoc[`charpath`] appends the path to the current path. This yields a result suitable for general filling, stroking, or clipping.
+link:/docs/commands/references/charpath/[`charpath`] obtains the character path outlines that would result if `string` were shown at the current point using link:/docs/commands/references/show/[`show`]. Instead of painting the path, however, link:/docs/commands/references/charpath/[`charpath`] appends the path to the current path. This yields a result suitable for general filling, stroking, or clipping.
The `bool` operand determines what happens if the character path is designed to be stroked rather than filled or outlined:
-- If `bool` is `false`, xref:../charpath.adoc[`charpath`] simply appends the character path to the current path; the result is suitable only for stroking.
-- If `bool` is `true`, xref:../charpath.adoc[`charpath`] applies the `strokepath` operator to the character path; the result is suitable for filling or clipping, but not for stroking.
+- If `bool` is `false`, link:/docs/commands/references/charpath/[`charpath`] simply appends the character path to the current path; the result is suitable only for stroking.
+- If `bool` is `true`, link:/docs/commands/references/charpath/[`charpath`] applies the `strokepath` operator to the character path; the result is suitable for filling or clipping, but not for stroking.
-xref:../charpath.adoc[`charpath`] does not produce results for portions of a character defined as images or masks rather than as paths.
+link:/docs/commands/references/charpath/[`charpath`] does not produce results for portions of a character defined as images or masks rather than as paths.
=== Protected Fonts
The outlines of some fonts are protected. (In Level 1 implementations, this applies to all fonts; in Level 2, only to certain special fonts and not to ordinary Type 1 or Type 3 fonts.)
-If the current font is protected, using xref:../charpath.adoc[`charpath`] to obtain its outlines causes the `pathforall` and `upath` operators to be disabled for as long as those outlines remain in the current path.
+If the current font is protected, using link:/docs/commands/references/charpath/[`charpath`] to obtain its outlines causes the `pathforall` and `upath` operators to be disabled for as long as those outlines remain in the current path.
=== Parameters
@@ -336,7 +335,7 @@ textPath 0 setgray 1 setlinewidth stroke
=== Limitations
**Image-based characters:**
-- xref:../charpath.adoc[`charpath`] does not produce paths for bitmap characters
+- link:/docs/commands/references/charpath/[`charpath`] does not produce paths for bitmap characters
- Some fonts mix paths and bitmaps
- Only path-based portions are included
@@ -355,23 +354,23 @@ textPath 0 setgray 1 setlinewidth stroke
|===
| Operator | Output
-| xref:../show.adoc[`show`]
+| link:/docs/commands/references/show/[`show`]
| Paints characters (rasterized)
-| xref:../charpath.adoc[`charpath`]
+| link:/docs/commands/references/charpath/[`charpath`]
| Constructs path outlines
-| xref:../stringwidth.adoc[`stringwidth`]
+| link:/docs/commands/references/stringwidth/[`stringwidth`]
| Returns width vector only
|===
=== See Also
-- xref:../show.adoc[`show`] - Paint text string
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
+- link:/docs/commands/references/show/[`show`] - Paint text string
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
- `pathbbox` - Get path bounding box
- `strokepath` - Convert stroke to filled path
- `clip` - Set clipping path
- `fill` - Fill path
- `stroke` - Stroke path
-- xref:../setfont.adoc[`setfont`] - Establish current font
\ No newline at end of file
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/clear.adoc b/docs/commands/references/clear.adoc
similarity index 85%
rename from docs/commands/stack-manipulation/clear.adoc
rename to docs/commands/references/clear.adoc
index 0b89a73..5a6bf6f 100644
--- a/docs/commands/stack-manipulation/clear.adoc
+++ b/docs/commands/references/clear.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: clear
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
= clear
@@ -230,7 +229,7 @@ end
mydict /value get % Stack: 42 (dictionary unaffected)
----
-TIP: Consider using xref:../cleartomark.adoc[`cleartomark`] instead of `clear` when you want to preserve elements below a certain point on the stack.
+TIP: Consider using link:/docs/commands/references/cleartomark/[`cleartomark`] instead of `clear` when you want to preserve elements below a certain point on the stack.
=== No Error on Empty Stack
@@ -245,10 +244,10 @@ count % Stack: 0
== Related Commands
-* xref:../pop.adoc[`pop`] - Remove single element
-* xref:../cleartomark.adoc[`cleartomark`] - Remove elements up to a mark
-* xref:../count.adoc[`count`] - Check if stack is empty
-* xref:../mark.adoc[`mark`] - Place marker for selective clearing
+* link:/docs/commands/references/pop/[`pop`] - Remove single element
+* link:/docs/commands/references/cleartomark/[`cleartomark`] - Remove elements up to a mark
+* link:/docs/commands/references/count/[`count`] - Check if stack is empty
+* link:/docs/commands/references/mark/[`mark`] - Place marker for selective clearing
== PostScript Level
@@ -269,7 +268,7 @@ Clearing is faster than individually popping each element.
== Best Practices
1. **Use sparingly**: Only clear when you truly need to discard all stack contents
-2. **Consider alternatives**: Use xref:../pop.adoc[`pop`] for selective removal or xref:../cleartomark.adoc[`cleartomark`] for bounded clearing
+2. **Consider alternatives**: Use link:/docs/commands/references/pop/[`pop`] for selective removal or link:/docs/commands/references/cleartomark/[`cleartomark`] for bounded clearing
3. **Error recovery**: Excellent for recovering from errors and resetting to known state
4. **Document intent**: Always comment why you're clearing the stack
5. **Test carefully**: Ensure you're not accidentally discarding needed data
@@ -320,7 +319,7 @@ add % Use the values
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/error-handling.adoc[Error Handling] - Using clear for error recovery
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/error-handling/[Error Handling] - Using clear for error recovery
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/stack-manipulation/cleartomark.adoc b/docs/commands/references/cleartomark.adoc
similarity index 86%
rename from docs/commands/stack-manipulation/cleartomark.adoc
rename to docs/commands/references/cleartomark.adoc
index 28d6d2f..b884634 100644
--- a/docs/commands/stack-manipulation/cleartomark.adoc
+++ b/docs/commands/references/cleartomark.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cleartomark
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
= cleartomark
@@ -13,7 +12,7 @@ Removes all elements from the operand stack down to and including the topmost ma
The `cleartomark` operator pops the operand stack repeatedly until it encounters a mark object, which it also pops and discards. All objects between the top of the stack and the mark (exclusive of the mark itself) are discarded along with the mark.
-This operator is commonly used to clean up after variable-argument operations or to discard intermediate results that were accumulated after placing a mark. It's the complement to xref:../mark.adoc[`mark`] for managing stack segments.
+This operator is commonly used to clean up after variable-argument operations or to discard intermediate results that were accumulated after placing a mark. It's the complement to link:/docs/commands/references/mark/[`mark`] for managing stack segments.
This is a Level 1 operator, available in all PostScript implementations.
@@ -253,7 +252,7 @@ cleartomark
% Stack: 10 20 30 (top elements and mark removed)
----
-TIP: Always pair xref:../mark.adoc[`mark`] with `cleartomark` to avoid accumulating marks on the stack. Verify mark existence before calling `cleartomark` in defensive code.
+TIP: Always pair link:/docs/commands/references/mark/[`mark`] with `cleartomark` to avoid accumulating marks on the stack. Verify mark existence before calling `cleartomark` in defensive code.
=== Clearing Empty Segment
@@ -269,10 +268,10 @@ mark pop % Stack: (empty)
== Related Commands
-* xref:../mark.adoc[`mark`] - Push a mark object onto stack
-* xref:../counttomark.adoc[`counttomark`] - Count elements to nearest mark
-* xref:../clear.adoc[`clear`] - Remove all elements from stack
-* xref:../pop.adoc[`pop`] - Remove single element
+* link:/docs/commands/references/mark/[`mark`] - Push a mark object onto stack
+* link:/docs/commands/references/counttomark/[`counttomark`] - Count elements to nearest mark
+* link:/docs/commands/references/clear/[`clear`] - Remove all elements from stack
+* link:/docs/commands/references/pop/[`pop`] - Remove single element
* `]` - Create array and remove mark (essentially cleartomark + array construction)
== PostScript Level
@@ -301,7 +300,7 @@ The operator must scan the stack to find the mark, so very deep marks are slight
== Best Practices
-1. **Always pair with mark**: Every xref:../mark.adoc[`mark`] should have a matching `cleartomark` or `]`
+1. **Always pair with mark**: Every link:/docs/commands/references/mark/[`mark`] should have a matching `cleartomark` or `]`
2. **Use for cleanup**: Excellent for cleaning up intermediate results
3. **Check for mark**: In defensive code, verify mark exists before calling
4. **Document mark usage**: Make it clear when procedures use marked segments
@@ -353,7 +352,7 @@ The operator must scan the stack to find the mark, so very deep marks are slight
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/error-handling.adoc[Error Handling] - Using marks for cleanup
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/error-handling/[Error Handling] - Using marks for cleanup
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/painting/clip.adoc b/docs/commands/references/clip.adoc
similarity index 64%
rename from docs/commands/painting/clip.adoc
rename to docs/commands/references/clip.adoc
index 7fae94d..036d91f 100644
--- a/docs/commands/painting/clip.adoc
+++ b/docs/commands/references/clip.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: clip
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -38,13 +37,13 @@ Intersects the current clipping path with the current path using the non-zero wi
=== Description
-xref:../clip.adoc[`clip`] intersects the inside of the current clipping path with the inside of the current path to produce a new, smaller current clipping path. The inside of the current path is determined by the normal PostScript non-zero winding number rule, while the inside of the current clipping path is determined by whatever rule was used at the time that path was created.
+link:/docs/commands/references/clip/[`clip`] intersects the inside of the current clipping path with the inside of the current path to produce a new, smaller current clipping path. The inside of the current path is determined by the normal PostScript non-zero winding number rule, while the inside of the current clipping path is determined by whatever rule was used at the time that path was created.
-In general, xref:../clip.adoc[`clip`] produces a new path whose inside (according to the non-zero winding number rule) consists of all areas that are inside both of the original paths. The way this new path is constructed (the order of its segments, whether it self-intersects, etc.) is not specified.
+In general, link:/docs/commands/references/clip/[`clip`] produces a new path whose inside (according to the non-zero winding number rule) consists of all areas that are inside both of the original paths. The way this new path is constructed (the order of its segments, whether it self-intersects, etc.) is not specified.
-xref:../clip.adoc[`clip`] treats an open subpath of the current path as though it were closed; it does not actually alter the path itself. It is permissible for the current path to be empty. The result of executing xref:../clip.adoc[`clip`] is always a non-empty clipping path, though it may enclose zero area.
+link:/docs/commands/references/clip/[`clip`] treats an open subpath of the current path as though it were closed; it does not actually alter the path itself. It is permissible for the current path to be empty. The result of executing link:/docs/commands/references/clip/[`clip`] is always a non-empty clipping path, though it may enclose zero area.
-Unlike xref:../fill.adoc[`fill`] and xref:../stroke.adoc[`stroke`], xref:../clip.adoc[`clip`] does not implicitly perform a xref:../path-construction/newpath.adoc[`newpath`] after it has finished using the current path.
+Unlike link:/docs/commands/references/fill/[`fill`] and link:/docs/commands/references/stroke/[`stroke`], link:/docs/commands/references/clip/[`clip`] does not implicitly perform a link:/docs/commands/references/newpath/[`newpath`] after it has finished using the current path.
=== PostScript Level
@@ -117,7 +116,7 @@ newpath
gsave
% Create mask
newpath
- 100 100 80 60 xref:../path-construction/arc.adoc[`arc`]
+ 100 100 80 60 link:/docs/commands/references/arc/[`arc`]
closepath
clip
newpath
@@ -169,22 +168,22 @@ grestore
=== Common Pitfalls
-WARNING: *Clipping Can Only Shrink* - There is no way to enlarge the current clipping path except by xref:../graphics-state/grestore.adoc[`grestore`] or `initclip`.
+WARNING: *Clipping Can Only Shrink* - There is no way to enlarge the current clipping path except by link:/docs/commands/references/grestore/[`grestore`] or `initclip`.
[source,postscript]
----
% First clip
newpath
-50 50 100 100 xref:../path-construction/arc.adoc[`arc`]
+50 50 100 100 link:/docs/commands/references/arc/[`arc`]
clip
% Can't expand beyond this
newpath
-0 0 200 200 xref:../path-construction/arc.adoc[`arc`]
+0 0 200 200 link:/docs/commands/references/arc/[`arc`]
clip % Still limited to intersection
----
-WARNING: *Path Not Cleared After clip* - Unlike xref:../fill.adoc[`fill`] and xref:../stroke.adoc[`stroke`], the path remains after xref:../clip.adoc[`clip`].
+WARNING: *Path Not Cleared After clip* - Unlike link:/docs/commands/references/fill/[`fill`] and link:/docs/commands/references/stroke/[`stroke`], the path remains after link:/docs/commands/references/clip/[`clip`].
[source,postscript]
----
@@ -239,7 +238,7 @@ grestore
=== Implementation Notes
* The clipping path is maintained separately from the current path
-* Clipping is applied during rendering of xref:../fill.adoc[`fill`], xref:../stroke.adoc[`stroke`], `show`, etc.
+* Clipping is applied during rendering of link:/docs/commands/references/fill/[`fill`], link:/docs/commands/references/stroke/[`stroke`], `show`, etc.
* Complex clipping paths may degrade rendering performance
* The clipping path can become arbitrarily complex through repeated clips
* Some implementations may have limits on clipping path complexity
@@ -248,22 +247,22 @@ grestore
The clipping path is part of the graphics state and is affected by:
-* xref:../graphics-state/gsave.adoc[`gsave`] - Saves current clipping path
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restores saved clipping path
+* link:/docs/commands/references/gsave/[`gsave`] - Saves current clipping path
+* link:/docs/commands/references/grestore/[`grestore`] - Restores saved clipping path
* `initclip` - Resets to device default
* `save`/`restore` - Saves/restores with VM state
The clipping path affects:
-* xref:../fill.adoc[`fill`] and xref:../eofill.adoc[`eofill`] - Clip filled area
-* xref:../stroke.adoc[`stroke`] - Clip stroked lines
+* link:/docs/commands/references/fill/[`fill`] and link:/docs/commands/references/eofill/[`eofill`] - Clip filled area
+* link:/docs/commands/references/stroke/[`stroke`] - Clip stroked lines
* `show` and text operators - Clip character outlines
* `image` and `imagemask` - Clip images
* All painting operations
=== Winding Number Rule
-xref:../clip.adoc[`clip`] uses the non-zero winding number rule:
+link:/docs/commands/references/clip/[`clip`] uses the non-zero winding number rule:
. Draw a ray from the point in any direction
. Count crossings with path segments:
@@ -282,7 +281,7 @@ This means path direction matters and can create solid fills from complex paths.
% Good practice
gsave
newpath
- 100 100 80 60 xref:../path-construction/arc.adoc[`arc`]
+ 100 100 80 60 link:/docs/commands/references/arc/[`arc`]
closepath
clip
newpath
@@ -382,14 +381,14 @@ grestore
gsave
% Outer clip
newpath
- 50 50 200 200 xref:../path-construction/arc.adoc[`arc`]
+ 50 50 200 200 link:/docs/commands/references/arc/[`arc`]
clip
newpath
gsave
% Inner clip (intersection)
newpath
- 100 100 100 100 xref:../path-construction/arc.adoc[`arc`]
+ 100 100 100 100 link:/docs/commands/references/arc/[`arc`]
clip
newpath
@@ -405,13 +404,13 @@ grestore
=== See Also
-* xref:../eoclip.adoc[`eoclip`] - Clip using even-odd rule
-* xref:../clippath.adoc[`clippath`] - Get current clipping path
+* link:/docs/commands/references/eoclip/[`eoclip`] - Clip using even-odd rule
+* link:/docs/commands/references/clippath/[`clippath`] - Get current clipping path
* `rectclip` - Clip to rectangles (Level 2)
* `initclip` - Reset to device default
-* xref:../fill.adoc[`fill`] - Fill path
-* xref:../stroke.adoc[`stroke`] - Stroke path
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../path-construction/closepath.adoc[`closepath`] - Close current subpath
\ No newline at end of file
+* link:/docs/commands/references/fill/[`fill`] - Fill path
+* link:/docs/commands/references/stroke/[`stroke`] - Stroke path
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
\ No newline at end of file
diff --git a/docs/commands/painting/clippath.adoc b/docs/commands/references/clippath.adoc
similarity index 73%
rename from docs/commands/painting/clippath.adoc
rename to docs/commands/references/clippath.adoc
index 2ba7b70..f85e71f 100644
--- a/docs/commands/painting/clippath.adoc
+++ b/docs/commands/references/clippath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: clippath
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -38,11 +37,11 @@ Sets the current path to the current clipping path.
=== Description
-xref:../clippath.adoc[`clippath`] sets the current path to one that describes the current clipping path. This operator is useful for determining the exact extent of the imaging area on the current output device.
+link:/docs/commands/references/clippath/[`clippath`] sets the current path to one that describes the current clipping path. This operator is useful for determining the exact extent of the imaging area on the current output device.
-If the current clipping path is the result of application of the xref:../clip.adoc[`clip`] or xref:../eoclip.adoc[`eoclip`] operator, the path set by xref:../clippath.adoc[`clippath`] is generally suitable only for filling or clipping. It is not suitable for stroking because it may contain interior segments or disconnected subpaths produced by the clipping process.
+If the current clipping path is the result of application of the link:/docs/commands/references/clip/[`clip`] or link:/docs/commands/references/eoclip/[`eoclip`] operator, the path set by link:/docs/commands/references/clippath/[`clippath`] is generally suitable only for filling or clipping. It is not suitable for stroking because it may contain interior segments or disconnected subpaths produced by the clipping process.
-The path returned by xref:../clippath.adoc[`clippath`] describes the clipping region as it exists in user space coordinates, transformed through the current transformation matrix (CTM).
+The path returned by link:/docs/commands/references/clippath/[`clippath`] describes the clipping region as it exists in user space coordinates, transformed through the current transformation matrix (CTM).
=== PostScript Level
@@ -160,7 +159,7 @@ showClipBorder
=== Common Pitfalls
-WARNING: *Result May Not Be Suitable for Stroking* - If the clip was created with xref:../clip.adoc[`clip`] or xref:../eoclip.adoc[`eoclip`], the path may have interior segments.
+WARNING: *Result May Not Be Suitable for Stroking* - If the clip was created with link:/docs/commands/references/clip/[`clip`] or link:/docs/commands/references/eoclip/[`eoclip`], the path may have interior segments.
[source,postscript]
----
@@ -187,7 +186,7 @@ clippath % Returns coordinates in scaled space
pathbbox % Bounds reflect current CTM
----
-WARNING: *Replaces Current Path* - xref:../clippath.adoc[`clippath`] replaces any existing current path.
+WARNING: *Replaces Current Path* - link:/docs/commands/references/clippath/[`clippath`] replaces any existing current path.
[source,postscript]
----
@@ -198,7 +197,7 @@ newpath
clippath % Previous path is lost
----
-TIP: *Use for Bounds Checking* - xref:../clippath.adoc[`clippath`] with `pathbbox` gives exact drawable area:
+TIP: *Use for Bounds Checking* - link:/docs/commands/references/clippath/[`clippath`] with `pathbbox` gives exact drawable area:
[source,postscript]
----
@@ -212,11 +211,11 @@ pop pop % Remove llx lly
=== Error Conditions
-None. xref:../clippath.adoc[`clippath`] cannot generate errors.
+None. link:/docs/commands/references/clippath/[`clippath`] cannot generate errors.
=== Implementation Notes
-* The path set by xref:../clippath.adoc[`clippath`] may be complex if multiple clip operations were performed
+* The path set by link:/docs/commands/references/clippath/[`clippath`] may be complex if multiple clip operations were performed
* The path accurately represents the intersection of all previous clip operations
* The path is always closed and suitable for filling
* Device-default clip paths are typically rectangular
@@ -224,12 +223,12 @@ None. xref:../clippath.adoc[`clippath`] cannot generate errors.
=== Interaction with Graphics State
-xref:../clippath.adoc[`clippath`] is affected by:
+link:/docs/commands/references/clippath/[`clippath`] is affected by:
* Current clipping path - This is what gets returned
* Current transformation matrix (CTM) - Path is returned in user space
-xref:../clippath.adoc[`clippath`] affects:
+link:/docs/commands/references/clippath/[`clippath`] affects:
* Current path - Replaced with the clip path
* Nothing else in graphics state
@@ -373,11 +372,11 @@ getDrawingArea
=== Performance Considerations
-* xref:../clippath.adoc[`clippath`] is a fast operation
+* link:/docs/commands/references/clippath/[`clippath`] is a fast operation
* The complexity of the returned path depends on clipping history
* Very complex clipping paths may result in large path structures
-* Using `pathbbox` after xref:../clippath.adoc[`clippath`] is efficient for bounds checking
-* No rendering is performed by xref:../clippath.adoc[`clippath`] itself
+* Using `pathbbox` after link:/docs/commands/references/clippath/[`clippath`] is efficient for bounds checking
+* No rendering is performed by link:/docs/commands/references/clippath/[`clippath`] itself
=== Common Patterns
@@ -411,12 +410,12 @@ clippath fill
=== See Also
-* xref:../clip.adoc[`clip`] - Set clipping path (non-zero winding)
-* xref:../eoclip.adoc[`eoclip`] - Set clipping path (even-odd rule)
+* link:/docs/commands/references/clip/[`clip`] - Set clipping path (non-zero winding)
+* link:/docs/commands/references/eoclip/[`eoclip`] - Set clipping path (even-odd rule)
* `initclip` - Reset to device default
* `rectclip` - Clip to rectangles (Level 2)
* `pathbbox` - Get path bounding box
* `infill` - Test if point inside path
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
\ No newline at end of file
diff --git a/docs/commands/path-construction/closepath.adoc b/docs/commands/references/closepath.adoc
similarity index 68%
rename from docs/commands/path-construction/closepath.adoc
rename to docs/commands/references/closepath.adoc
index ccb3a29..7852b7b 100644
--- a/docs/commands/path-construction/closepath.adoc
+++ b/docs/commands/references/closepath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: closepath
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -38,11 +37,11 @@ Closes the current subpath by adding a straight line back to its starting point.
=== Description
-xref:../closepath.adoc[`closepath`] closes the current subpath by appending a straight line segment connecting the current point to the subpath's starting point—generally, the point most recently specified by xref:../moveto.adoc[`moveto`].
+link:/docs/commands/references/closepath/[`closepath`] closes the current subpath by appending a straight line segment connecting the current point to the subpath's starting point—generally, the point most recently specified by link:/docs/commands/references/moveto/[`moveto`].
-If the current subpath is already closed or the current path is empty, xref:../closepath.adoc[`closepath`] does nothing.
+If the current subpath is already closed or the current path is empty, link:/docs/commands/references/closepath/[`closepath`] does nothing.
-xref:../closepath.adoc[`closepath`] terminates the current subpath. Appending another segment to the current path will begin a new subpath, even if it is drawn from the endpoint reached by xref:../closepath.adoc[`closepath`].
+link:/docs/commands/references/closepath/[`closepath`] terminates the current subpath. Appending another segment to the current path will begin a new subpath, even if it is drawn from the endpoint reached by link:/docs/commands/references/closepath/[`closepath`].
=== PostScript Level
@@ -160,7 +159,7 @@ stroke % Clean miter join at corner
=== Common Pitfalls
-WARNING: *Line Cap at Close Point* - The line cap setting doesn't affect the join where xref:../closepath.adoc[`closepath`] connects. The line join setting applies instead.
+WARNING: *Line Cap at Close Point* - The line cap setting doesn't affect the join where link:/docs/commands/references/closepath/[`closepath`] connects. The line join setting applies instead.
[source,postscript]
----
@@ -174,7 +173,7 @@ closepath
stroke % Join at (100,100) is mitered, not rounded
----
-WARNING: *Not Needed for All Shapes* - Complete arcs (0 to 360) are automatically closed. Adding xref:../closepath.adoc[`closepath`] doesn't hurt, but it's redundant.
+WARNING: *Not Needed for All Shapes* - Complete arcs (0 to 360) are automatically closed. Adding link:/docs/commands/references/closepath/[`closepath`] doesn't hurt, but it's redundant.
[source,postscript]
----
@@ -183,7 +182,7 @@ newpath
closepath % Redundant but harmless
----
-TIP: *Always Close Filled Paths* - For clean fills and strokes, always use xref:../closepath.adoc[`closepath`] to close shapes, even if the endpoints are very close.
+TIP: *Always Close Filled Paths* - For clean fills and strokes, always use link:/docs/commands/references/closepath/[`closepath`] to close shapes, even if the endpoints are very close.
=== Error Conditions
@@ -195,20 +194,20 @@ TIP: *Always Close Filled Paths* - For clean fills and strokes, always use xref:
| Path becomes too complex for implementation
|===
-Note: xref:../closepath.adoc[`closepath`] does not require a current point and will not generate a [`nocurrentpoint`] error.
+Note: link:/docs/commands/references/closepath/[`closepath`] does not require a current point and will not generate a [`nocurrentpoint`] error.
=== Implementation Notes
* Creates an explicit line segment in the path
* The closing segment participates in line join calculations
-* Current point after xref:../closepath.adoc[`closepath`] is the subpath start point
+* Current point after link:/docs/commands/references/closepath/[`closepath`] is the subpath start point
* Subsequent path operations start a new subpath
* Has no effect on empty paths or already-closed subpaths
* Essential for proper fill and stroke behavior
=== Behavior Details
-The behavior differs from simply using xref:../lineto.adoc[`lineto`] back to the starting point:
+The behavior differs from simply using link:/docs/commands/references/lineto/[`lineto`] back to the starting point:
[source,postscript]
----
@@ -240,8 +239,8 @@ closepath % Back to start, subpath closed
=== See Also
-* xref:../newpath.adoc[`newpath`] - Initialize empty path
-* xref:../moveto.adoc[`moveto`] - Start new subpath
-* xref:../lineto.adoc[`lineto`] - Add straight line segment
-* xref:../arc.adoc[`arc`] - Add circular arc
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/newpath/[`newpath`] - Initialize empty path
+* link:/docs/commands/references/moveto/[`moveto`] - Start new subpath
+* link:/docs/commands/references/lineto/[`lineto`] - Add straight line segment
+* link:/docs/commands/references/arc/[`arc`] - Add circular arc
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/transformations/concat.adoc b/docs/commands/references/concat.adoc
similarity index 79%
rename from docs/commands/transformations/concat.adoc
rename to docs/commands/references/concat.adoc
index 87fb914..3a15e02 100644
--- a/docs/commands/transformations/concat.adoc
+++ b/docs/commands/references/concat.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: concat
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -38,7 +37,7 @@ matrix concat → -
=== Description
-xref:../concat.adoc[`concat`] concatenates `matrix` with the current transformation matrix (CTM). Precisely, xref:../concat.adoc[`concat`] replaces the CTM by matrix × CTM.
+link:/docs/commands/references/concat/[`concat`] concatenates `matrix` with the current transformation matrix (CTM). Precisely, link:/docs/commands/references/concat/[`concat`] replaces the CTM by matrix × CTM.
The effect is to define a new user space whose coordinates are transformed into the former user space according to `matrix`. This allows arbitrary transformations including combinations of translation, scaling, rotation, and skewing.
@@ -184,7 +183,7 @@ WARNING: *Order of Operations* - Matrix multiplication is not commutative. Order
[2 0 0 2 0 0] concat % Then scale
----
-TIP: *Use Helper Operators* - For simple transformations, use xref:../translate.adoc[`translate`], xref:../scale.adoc[`scale`], and xref:../rotate.adoc[`rotate`] instead of xref:../concat.adoc[`concat`].
+TIP: *Use Helper Operators* - For simple transformations, use link:/docs/commands/references/translate/[`translate`], link:/docs/commands/references/scale/[`scale`], and link:/docs/commands/references/rotate/[`rotate`] instead of link:/docs/commands/references/concat/[`concat`].
[source,postscript]
----
@@ -225,7 +224,7 @@ myMatrix concat % Apply it
=== Implementation Notes
-* The matrix operand is not modified by xref:../concat.adoc[`concat`]
+* The matrix operand is not modified by link:/docs/commands/references/concat/[`concat`]
* Very large or very small matrix values may cause precision loss
* Degenerate matrices (determinant = 0) create non-invertible transformations
* The operation is equivalent to: CTM' = matrix × CTM
@@ -244,7 +243,7 @@ And the current CTM:
CTM = [a₀ b₀ c₀ d₀ tx₀ ty₀]
----
-xref:../concat.adoc[`concat`] computes:
+link:/docs/commands/references/concat/[`concat`] computes:
----
CTM' = M × CTM
@@ -293,10 +292,10 @@ A general transformation matrix can represent:
=== Performance Considerations
-* xref:../concat.adoc[`concat`] is a lightweight operation
+* link:/docs/commands/references/concat/[`concat`] is a lightweight operation
* No path recomputation is required
* Matrix multiplication is optimized
-* Using xref:../concat.adoc[`concat`] with precomputed matrices can be faster than multiple individual transformations
+* Using link:/docs/commands/references/concat/[`concat`] with precomputed matrices can be faster than multiple individual transformations
=== Relationship to Other Operators
@@ -339,12 +338,12 @@ concat
=== See Also
-* xref:../translate.adoc[`translate`] - Move origin
-* xref:../scale.adoc[`scale`] - Change unit size
-* xref:../rotate.adoc[`rotate`] - Rotate axes
-* xref:../concatmatrix.adoc[`concatmatrix`] - Multiply two matrices
-* xref:../setmatrix.adoc[`setmatrix`] - Replace CTM directly
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../matrix.adoc[`matrix`] - Create identity matrix
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/translate/[`translate`] - Move origin
+* link:/docs/commands/references/scale/[`scale`] - Change unit size
+* link:/docs/commands/references/rotate/[`rotate`] - Rotate axes
+* link:/docs/commands/references/concatmatrix/[`concatmatrix`] - Multiply two matrices
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Replace CTM directly
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/matrix/[`matrix`] - Create identity matrix
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/transformations/concatmatrix.adoc b/docs/commands/references/concatmatrix.adoc
similarity index 88%
rename from docs/commands/transformations/concatmatrix.adoc
rename to docs/commands/references/concatmatrix.adoc
index 138fb86..8ea75de 100644
--- a/docs/commands/transformations/concatmatrix.adoc
+++ b/docs/commands/references/concatmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: concatmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -44,7 +43,7 @@ matrix1 matrix2 matrix3 concatmatrix → matrix3
=== Description
-xref:../concatmatrix.adoc[`concatmatrix`] replaces the value of `matrix3` with the result of multiplying matrix1 × matrix2, and pushes the modified `matrix3` back on the operand stack.
+link:/docs/commands/references/concatmatrix/[`concatmatrix`] replaces the value of `matrix3` with the result of multiplying matrix1 × matrix2, and pushes the modified `matrix3` back on the operand stack.
This operator performs matrix multiplication without affecting the current transformation matrix (CTM). It is useful for building complex transformations from simpler ones.
@@ -228,7 +227,7 @@ M₁ = [a₁ b₁ c₁ d₁ tx₁ ty₁]
M₂ = [a₂ b₂ c₂ d₂ tx₂ ty₂]
----
-xref:../concatmatrix.adoc[`concatmatrix`] computes M₃ = M₁ × M₂:
+link:/docs/commands/references/concatmatrix/[`concatmatrix`] computes M₃ = M₁ × M₂:
----
M₃ = [a₁×a₂ + b₁×c₂ a₁×b₂ + b₁×d₂
@@ -309,9 +308,9 @@ m1 temp2 result concatmatrix
=== See Also
-* xref:../concat.adoc[`concat`] - Concatenate matrix with CTM
-* xref:../matrix.adoc[`matrix`] - Create identity matrix
-* xref:../invertmatrix.adoc[`invertmatrix`] - Invert a matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../setmatrix.adoc[`setmatrix`] - Set the CTM
-* xref:../transform.adoc[`transform`] - Transform coordinates by matrix
\ No newline at end of file
+* link:/docs/commands/references/concat/[`concat`] - Concatenate matrix with CTM
+* link:/docs/commands/references/matrix/[`matrix`] - Create identity matrix
+* link:/docs/commands/references/invertmatrix/[`invertmatrix`] - Invert a matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Set the CTM
+* link:/docs/commands/references/transform/[`transform`] - Transform coordinates by matrix
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/copy.adoc b/docs/commands/references/copy.adoc
similarity index 92%
rename from docs/commands/stack-manipulation/copy.adoc
rename to docs/commands/references/copy.adoc
index 0f73863..ec6fc90 100644
--- a/docs/commands/stack-manipulation/copy.adoc
+++ b/docs/commands/references/copy.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: copy
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
= copy
@@ -288,10 +287,10 @@ TIP: The composite form of `copy` performs only one level of copying. Nested com
== Related Commands
-* xref:../dup.adoc[`dup`] - Duplicate single element (reference only)
-* xref:../index.adoc[`index`] - Duplicate nth element
-* xref:../roll.adoc[`roll`] - Rotate stack elements
-* xref:../pop.adoc[`pop`] - Remove elements
+* link:/docs/commands/references/dup/[`dup`] - Duplicate single element (reference only)
+* link:/docs/commands/[`index`] - Duplicate nth element
+* link:/docs/commands/references/roll/[`roll`] - Rotate stack elements
+* link:/docs/commands/references/pop/[`pop`] - Remove elements
* `get` - Retrieve individual elements
* `put` - Store individual elements
* `putinterval` - Store subsequence
@@ -385,7 +384,7 @@ Attempting to copy into a read-only object, or copying local VM objects into glo
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/basic/composite-objects.adoc[Composite Objects] - Understanding object copying
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/basic/composite-objects/[Composite Objects] - Understanding object copying
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/arithmetic-math/cos.adoc b/docs/commands/references/cos.adoc
similarity index 84%
rename from docs/commands/arithmetic-math/cos.adoc
rename to docs/commands/references/cos.adoc
index 79d2f9f..f13d752 100644
--- a/docs/commands/arithmetic-math/cos.adoc
+++ b/docs/commands/references/cos.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cos
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 18
---
= cos
@@ -67,8 +66,8 @@ WARNING: PostScript uses *degrees*, not radians!
== Related Commands
-* xref:../sin.adoc[`sin`] - Sine (degrees)
-* xref:../atan.adoc[`atan`] - Arctangent (returns degrees)
+* link:/docs/commands/references/sin/[`sin`] - Sine (degrees)
+* link:/docs/commands/references/atan/[`atan`] - Arctangent (returns degrees)
== PostScript Level
@@ -84,4 +83,4 @@ The operand is not a number.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/count.adoc b/docs/commands/references/count.adoc
similarity index 90%
rename from docs/commands/stack-manipulation/count.adoc
rename to docs/commands/references/count.adoc
index ccc606a..c1aafd6 100644
--- a/docs/commands/stack-manipulation/count.adoc
+++ b/docs/commands/references/count.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: count
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
= count
@@ -233,11 +232,11 @@ TIP: Use `count` immediately before the operation that needs to know stack depth
== Related Commands
-* xref:../counttomark.adoc[`counttomark`] - Count elements until a mark
-* xref:../clear.adoc[`clear`] - Remove all elements from stack
-* xref:../pop.adoc[`pop`] - Remove single element
-* xref:../copy.adoc[`copy`] - Copy n elements
-* xref:../roll.adoc[`roll`] - Rotate n elements
+* link:/docs/commands/references/counttomark/[`counttomark`] - Count elements until a mark
+* link:/docs/commands/references/clear/[`clear`] - Remove all elements from stack
+* link:/docs/commands/references/pop/[`pop`] - Remove single element
+* link:/docs/commands/references/copy/[`copy`] - Copy n elements
+* link:/docs/commands/references/roll/[`roll`] - Rotate n elements
== PostScript Level
@@ -311,7 +310,7 @@ Use `count` freely for debugging and stack management without performance concer
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/debugging.adoc[Debugging Guide] - Using count for debugging
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/debugging/[Debugging Guide] - Using count for debugging
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/dictionary/countdictstack.adoc b/docs/commands/references/countdictstack.adoc
similarity index 79%
rename from docs/commands/dictionary/countdictstack.adoc
rename to docs/commands/references/countdictstack.adoc
index 0d2d5e4..7aee454 100644
--- a/docs/commands/dictionary/countdictstack.adoc
+++ b/docs/commands/references/countdictstack.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: countdictstack
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -38,9 +37,9 @@ Returns the number of dictionaries currently on the dictionary stack.
=== Description
-xref:../countdictstack.adoc[`countdictstack`] counts the number of dictionaries currently on the dictionary stack and pushes this count onto the operand stack.
+link:/docs/commands/references/countdictstack/[`countdictstack`] counts the number of dictionaries currently on the dictionary stack and pushes this count onto the operand stack.
-The count includes all dictionaries: permanent system dictionaries and any pushed by xref:../begin.adoc[`begin`].
+The count includes all dictionaries: permanent system dictionaries and any pushed by link:/docs/commands/references/begin/[`begin`].
=== PostScript Level
@@ -159,8 +158,8 @@ TIP: *Use for Defensive Programming* - Check dictionary stack balance in error h
=== See Also
-* xref:../dictstack.adoc[`dictstack`] - Copy dict stack to array
-* xref:../begin.adoc[`begin`] - Push dictionary
-* xref:../end.adoc[`end`] - Pop dictionary
-* xref:../currentdict.adoc[`currentdict`] - Get current dictionary
-* xref:../stack-manipulation/count.adoc[`count`] - Count operand stack depth
\ No newline at end of file
+* link:/docs/commands/references/dictstack/[`dictstack`] - Copy dict stack to array
+* link:/docs/commands/references/begin/[`begin`] - Push dictionary
+* link:/docs/commands/references/end/[`end`] - Pop dictionary
+* link:/docs/commands/references/currentdict/[`currentdict`] - Get current dictionary
+* link:/docs/commands/references/count/[`count`] - Count operand stack depth
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/counttomark.adoc b/docs/commands/references/counttomark.adoc
similarity index 90%
rename from docs/commands/stack-manipulation/counttomark.adoc
rename to docs/commands/references/counttomark.adoc
index 44e6e8a..376082e 100644
--- a/docs/commands/stack-manipulation/counttomark.adoc
+++ b/docs/commands/references/counttomark.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: counttomark
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
= counttomark
@@ -13,7 +12,7 @@ Counts the number of elements on the operand stack from the top down to (but not
The `counttomark` operator counts how many elements are on the operand stack between the top and the nearest mark object (searching from top to bottom). The mark itself is not counted, and the stack is left unchanged except for the count value being pushed.
-This operator is essential for implementing variable-argument procedures where the number of arguments is not known in advance. It's commonly used with xref:../mark.adoc[`mark`] to process all elements in a marked segment.
+This operator is essential for implementing variable-argument procedures where the number of arguments is not known in advance. It's commonly used with link:/docs/commands/references/mark/[`mark`] to process all elements in a marked segment.
This is a Level 1 operator, available in all PostScript implementations.
@@ -289,11 +288,11 @@ counttomark % Stack: mark 0
== Related Commands
-* xref:../mark.adoc[`mark`] - Push a mark object onto stack
-* xref:../cleartomark.adoc[`cleartomark`] - Remove elements down to and including mark
-* xref:../count.adoc[`count`] - Count total stack depth
+* link:/docs/commands/references/mark/[`mark`] - Push a mark object onto stack
+* link:/docs/commands/references/cleartomark/[`cleartomark`] - Remove elements down to and including mark
+* link:/docs/commands/references/count/[`count`] - Count total stack depth
* `]` - Create array from marked elements
-* xref:../pop.adoc[`pop`] - Remove single element
+* link:/docs/commands/references/pop/[`pop`] - Remove single element
== PostScript Level
@@ -329,7 +328,7 @@ For very deep marks, this can be slightly expensive, but in practice marked segm
== Best Practices
-1. **Use with mark**: Always ensure a xref:../mark.adoc[`mark`] exists before calling `counttomark`
+1. **Use with mark**: Always ensure a link:/docs/commands/references/mark/[`mark`] exists before calling `counttomark`
2. **Immediate use**: Use the count value immediately; don't store it for later
3. **Variable arguments**: Ideal for implementing procedures with variable-length argument lists
4. **Document expectations**: Clearly document when procedures expect marked arguments
@@ -401,7 +400,7 @@ For very deep marks, this can be slightly expensive, but in practice marked segm
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/basic/procedures.adoc[Procedures] - Implementing variable-argument functions
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/basic/procedures/[Procedures] - Implementing variable-argument functions
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/font-text/cshow.adoc b/docs/commands/references/cshow.adoc
similarity index 79%
rename from docs/commands/font-text/cshow.adoc
rename to docs/commands/references/cshow.adoc
index 1237e4f..dcbf253 100644
--- a/docs/commands/font-text/cshow.adoc
+++ b/docs/commands/references/cshow.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cshow
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 13
---
@@ -34,16 +33,16 @@ proc string
=== Description
-xref:../cshow.adoc[`cshow`] invokes `proc` once for each operation of the font mapping algorithm. The value of xref:../currentfont.adoc[`currentfont`] during the execution of `proc` is the base font that the algorithm ultimately selects.
+link:/docs/commands/references/cshow/[`cshow`] invokes `proc` once for each operation of the font mapping algorithm. The value of link:/docs/commands/references/currentfont/[`currentfont`] during the execution of `proc` is the base font that the algorithm ultimately selects.
When `proc` is invoked, the stack contains three values:
1. The selected character's code (an integer)
2. The x component of the width vector for the character in user coordinate system
3. The y component of the width vector for the character in user coordinate system
-xref:../cshow.adoc[`cshow`] does not paint the character and does not change the current point, although `proc` may do so. When `proc` completes execution, the value of xref:../currentfont.adoc[`currentfont`] is restored.
+link:/docs/commands/references/cshow/[`cshow`] does not paint the character and does not change the current point, although `proc` may do so. When `proc` completes execution, the value of link:/docs/commands/references/currentfont/[`currentfont`] is restored.
-xref:../cshow.adoc[`cshow`] can be used to provide careful positioning of individual characters while taking advantage of the composite font mapping machinery of the interpreter. xref:../cshow.adoc[`cshow`] is intended primarily for use with composite fonts. However, it can also be used with a base font. The mapping algorithm for a base font simply selects consecutive characters from the string.
+link:/docs/commands/references/cshow/[`cshow`] can be used to provide careful positioning of individual characters while taking advantage of the composite font mapping machinery of the interpreter. link:/docs/commands/references/cshow/[`cshow`] is intended primarily for use with composite fonts. However, it can also be used with a base font. The mapping algorithm for a base font simply selects consecutive characters from the string.
=== Parameters
@@ -181,7 +180,7 @@ Where:
=== Font Mapping with Composite Fonts
-For composite fonts, xref:../cshow.adoc[`cshow`] invokes the font mapping algorithm:
+For composite fonts, link:/docs/commands/references/cshow/[`cshow`] invokes the font mapping algorithm:
1. **FMapType** determines how to map string bytes to font selection
2. Selected base font becomes current during `proc` execution
@@ -295,24 +294,24 @@ end /MyComposite exch definefont pop
|===
| Operator | Best For
-| xref:../show.adoc[`show`]
+| link:/docs/commands/references/show/[`show`]
| Simple, fast text rendering
-| xref:../kshow.adoc[`kshow`]
+| link:/docs/commands/references/kshow/[`kshow`]
| Kerning between character pairs (base fonts only)
-| xref:../cshow.adoc[`cshow`]
+| link:/docs/commands/references/cshow/[`cshow`]
| Per-character control with composite fonts
-| xref:../charpath.adoc[`charpath`]
+| link:/docs/commands/references/charpath/[`charpath`]
| Getting character outlines for effects
|===
=== See Also
-- xref:../show.adoc[`show`] - Basic text painting
-- xref:../ashow.adoc[`ashow`] - Show with uniform spacing
-- xref:../kshow.adoc[`kshow`] - Show with kerning procedure
-- xref:../currentfont.adoc[`currentfont`] - Get current font
+- link:/docs/commands/references/show/[`show`] - Basic text painting
+- link:/docs/commands/references/ashow/[`ashow`] - Show with uniform spacing
+- link:/docs/commands/references/kshow/[`kshow`] - Show with kerning procedure
+- link:/docs/commands/references/currentfont/[`currentfont`] - Get current font
- `glyphshow` - Show glyph by name
- `rootfont` - Get root composite font
\ No newline at end of file
diff --git a/docs/commands/graphics-state/currentcmykcolor.adoc b/docs/commands/references/currentcmykcolor.adoc
similarity index 82%
rename from docs/commands/graphics-state/currentcmykcolor.adoc
rename to docs/commands/references/currentcmykcolor.adoc
index ab8903e..91f1443 100644
--- a/docs/commands/graphics-state/currentcmykcolor.adoc
+++ b/docs/commands/references/currentcmykcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentcmykcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 22
---
@@ -47,11 +46,11 @@ Returns current color as CMYK values.
=== Description
-xref:../currentcmykcolor.adoc[`currentcmykcolor`] returns the current color in the graphics state according to the cyan-magenta-yellow-black color space.
+link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] returns the current color in the graphics state according to the cyan-magenta-yellow-black color space.
-* If the current color space is **DeviceCMYK**, xref:../currentcmykcolor.adoc[`currentcmykcolor`] returns the color values most recently specified by xref:../setcmykcolor.adoc[`setcmykcolor`] or [`setcolor`].
-* If the current color space is **DeviceRGB** or **DeviceGray**, xref:../currentcmykcolor.adoc[`currentcmykcolor`] converts the current color to CMYK.
-* For any other color space, xref:../currentcmykcolor.adoc[`currentcmykcolor`] returns **0.0 0.0 0.0 1.0** (black).
+* If the current color space is **DeviceCMYK**, link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] returns the color values most recently specified by link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] or [`setcolor`].
+* If the current color space is **DeviceRGB** or **DeviceGray**, link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] converts the current color to CMYK.
+* For any other color space, link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] returns **0.0 0.0 0.0 1.0** (black).
Each returned value is in the range 0.0 (no ink) to 1.0 (full ink coverage).
@@ -286,7 +285,7 @@ No components = White (paper)
=== See Also
-* xref:../setcmykcolor.adoc[`setcmykcolor`] - Set CMYK color (Level 2)
-* xref:../currentrgbcolor.adoc[`currentrgbcolor`] - Get RGB color
-* xref:../currentgray.adoc[`currentgray`] - Get gray value
-* xref:../currenthsbcolor.adoc[`currenthsbcolor`] - Get HSB color
+* link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] - Set CMYK color (Level 2)
+* link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] - Get RGB color
+* link:/docs/commands/references/currentgray/[`currentgray`] - Get gray value
+* link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] - Get HSB color
diff --git a/docs/commands/graphics-state/currentdash.adoc b/docs/commands/references/currentdash.adoc
similarity index 86%
rename from docs/commands/graphics-state/currentdash.adoc
rename to docs/commands/references/currentdash.adoc
index 2b7d7f7..7bc5253 100644
--- a/docs/commands/graphics-state/currentdash.adoc
+++ b/docs/commands/references/currentdash.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentdash
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 14
---
@@ -41,7 +40,7 @@ Returns current dash pattern and offset.
=== Description
-xref:../currentdash.adoc[`currentdash`] returns the current dash pattern array and offset parameter from the graphics state. These are the values most recently set by xref:../setdash.adoc[`setdash`].
+link:/docs/commands/references/currentdash/[`currentdash`] returns the current dash pattern array and offset parameter from the graphics state. These are the values most recently set by link:/docs/commands/references/setdash/[`setdash`].
The dash pattern array specifies the pattern of dashes and gaps:
@@ -167,7 +166,7 @@ GetDashLength
=== Common Pitfalls
-WARNING: *Returned Array is Copy* - Modifying returned array requires calling xref:../setdash.adoc[`setdash`].
+WARNING: *Returned Array is Copy* - Modifying returned array requires calling link:/docs/commands/references/setdash/[`setdash`].
[source,postscript]
----
@@ -235,7 +234,7 @@ Common patterns:
=== See Also
-* xref:../setdash.adoc[`setdash`] - Set dash pattern
-* xref:../currentlinewidth.adoc[`currentlinewidth`] - Get line width
-* xref:../currentlinecap.adoc[`currentlinecap`] - Get line cap style
-* xref:../currentlinejoin.adoc[`currentlinejoin`] - Get line join style
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
+* link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] - Get line width
+* link:/docs/commands/references/currentlinecap/[`currentlinecap`] - Get line cap style
+* link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] - Get line join style
diff --git a/docs/commands/dictionary/currentdict.adoc b/docs/commands/references/currentdict.adoc
similarity index 71%
rename from docs/commands/dictionary/currentdict.adoc
rename to docs/commands/references/currentdict.adoc
index 8334135..90cb6a5 100644
--- a/docs/commands/dictionary/currentdict.adoc
+++ b/docs/commands/references/currentdict.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentdict
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -38,7 +37,7 @@ Returns the current dictionary (top of dictionary stack).
=== Description
-xref:../currentdict.adoc[`currentdict`] pushes the current dictionary (the dictionary on top of the dictionary stack) onto the operand stack.
+link:/docs/commands/references/currentdict/[`currentdict`] pushes the current dictionary (the dictionary on top of the dictionary stack) onto the operand stack.
This does NOT pop the dictionary stack - it just pushes a duplicate reference to the top dictionary.
@@ -104,7 +103,7 @@ currentdict /setting known not {
=== Common Pitfalls
-WARNING: *Does Not Pop Dictionary Stack* - xref:../currentdict.adoc[`currentdict`] leaves dictionary stack unchanged.
+WARNING: *Does Not Pop Dictionary Stack* - link:/docs/commands/references/currentdict/[`currentdict`] leaves dictionary stack unchanged.
[source,postscript]
----
@@ -143,7 +142,7 @@ currentdict { exch = = } forall % Print all entries
* Very fast operation
* Returns reference to actual dictionary (not a copy)
-* Standard use case for xref:../def.adoc[`def`] is `currentdict key value put`
+* Standard use case for link:/docs/commands/references/def/[`def`] is `currentdict key value put`
=== Typical Dictionary Stack
@@ -156,12 +155,12 @@ Top → Local dict (via begin)
Bottom → systemdict
----
-xref:../currentdict.adoc[`currentdict`] returns the topmost dictionary.
+link:/docs/commands/references/currentdict/[`currentdict`] returns the topmost dictionary.
=== See Also
-* xref:../begin.adoc[`begin`] - Push dictionary onto stack
-* xref:../end.adoc[`end`] - Pop dictionary from stack
-* xref:../dictstack.adoc[`dictstack`] - Copy entire dict stack to array
-* xref:../countdictstack.adoc[`countdictstack`] - Count dictionaries on stack
-* xref:../def.adoc[`def`] - Define in current dictionary
\ No newline at end of file
+* link:/docs/commands/references/begin/[`begin`] - Push dictionary onto stack
+* link:/docs/commands/references/end/[`end`] - Pop dictionary from stack
+* link:/docs/commands/references/dictstack/[`dictstack`] - Copy entire dict stack to array
+* link:/docs/commands/references/countdictstack/[`countdictstack`] - Count dictionaries on stack
+* link:/docs/commands/references/def/[`def`] - Define in current dictionary
\ No newline at end of file
diff --git a/docs/commands/font-text/currentfont.adoc b/docs/commands/references/currentfont.adoc
similarity index 69%
rename from docs/commands/font-text/currentfont.adoc
rename to docs/commands/references/currentfont.adoc
index b517cf0..c1fd949 100644
--- a/docs/commands/font-text/currentfont.adoc
+++ b/docs/commands/references/currentfont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentfont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 5
---
@@ -30,9 +29,9 @@ font
=== Description
-xref:../currentfont.adoc[`currentfont`] returns the current font dictionary in the graphics state. Normally, this is the font most recently established by xref:../setfont.adoc[`setfont`] or `selectfont`.
+link:/docs/commands/references/currentfont/[`currentfont`] returns the current font dictionary in the graphics state. Normally, this is the font most recently established by link:/docs/commands/references/setfont/[`setfont`] or `selectfont`.
-However, when executed inside a font's `BuildGlyph` or `BuildChar` procedure or a procedure invoked by xref:../cshow.adoc[`cshow`], xref:../currentfont.adoc[`currentfont`] returns the currently selected base font (descendant of a composite font).
+However, when executed inside a font's `BuildGlyph` or `BuildChar` procedure or a procedure invoked by link:/docs/commands/references/cshow/[`cshow`], link:/docs/commands/references/currentfont/[`currentfont`] returns the currently selected base font (descendant of a composite font).
=== Returns
@@ -97,16 +96,16 @@ currentfont /FontName get
=== Behavior with Composite Fonts
-When xref:../currentfont.adoc[`currentfont`] is called during font construction:
+When link:/docs/commands/references/currentfont/[`currentfont`] is called during font construction:
**In BuildGlyph/BuildChar procedures:**
: Returns the base font selected by the composite font machinery
-**In xref:../cshow.adoc[`cshow`] procedure:**
+**In link:/docs/commands/references/cshow/[`cshow`] procedure:**
: Returns the base font for the current character
**Normal context:**
-: Returns the top-level font set by xref:../setfont.adoc[`setfont`]
+: Returns the top-level font set by link:/docs/commands/references/setfont/[`setfont`]
To get the top-level composite font from within these procedures, use `rootfont` instead.
@@ -168,9 +167,9 @@ The returned font dictionary typically contains:
=== See Also
-- xref:../setfont.adoc[`setfont`] - Establish current font
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
-- xref:../scalefont.adoc[`scalefont`] - Scale font by uniform factor
-- xref:../makefont.adoc[`makefont`] - Transform font by matrix
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/scalefont/[`scalefont`] - Scale font by uniform factor
+- link:/docs/commands/references/makefont/[`makefont`] - Transform font by matrix
- `rootfont` - Get root font of composite font
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character
\ No newline at end of file
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character
\ No newline at end of file
diff --git a/docs/commands/graphics-state/currentgray.adoc b/docs/commands/references/currentgray.adoc
similarity index 77%
rename from docs/commands/graphics-state/currentgray.adoc
rename to docs/commands/references/currentgray.adoc
index df8255c..fca4a5f 100644
--- a/docs/commands/graphics-state/currentgray.adoc
+++ b/docs/commands/references/currentgray.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentgray
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 20
---
@@ -38,11 +37,11 @@ Returns current color as gray value.
=== Description
-xref:../currentgray.adoc[`currentgray`] returns the gray value of the current color parameter in the graphics state.
+link:/docs/commands/references/currentgray/[`currentgray`] returns the gray value of the current color parameter in the graphics state.
-* If the current color space is **DeviceGray**, xref:../currentgray.adoc[`currentgray`] returns the color value most recently specified to xref:../setgray.adoc[`setgray`] or [`setcolor`].
-* If the current color space is **DeviceRGB** or **DeviceCMYK**, xref:../currentgray.adoc[`currentgray`] converts the current color to a gray value using standard conversion formulas.
-* For any other color space, xref:../currentgray.adoc[`currentgray`] returns **0.0** (black).
+* If the current color space is **DeviceGray**, link:/docs/commands/references/currentgray/[`currentgray`] returns the color value most recently specified to link:/docs/commands/references/setgray/[`setgray`] or [`setcolor`].
+* If the current color space is **DeviceRGB** or **DeviceCMYK**, link:/docs/commands/references/currentgray/[`currentgray`] converts the current color to a gray value using standard conversion formulas.
+* For any other color space, link:/docs/commands/references/currentgray/[`currentgray`] returns **0.0** (black).
The returned value is always in the range 0.0 (black) to 1.0 (white).
@@ -222,7 +221,7 @@ gray = 0.0
=== See Also
-* xref:../setgray.adoc[`setgray`] - Set gray color
-* xref:../currentrgbcolor.adoc[`currentrgbcolor`] - Get RGB color
-* xref:../currentcmykcolor.adoc[`currentcmykcolor`] - Get CMYK color (Level 2)
-* xref:../currenthsbcolor.adoc[`currenthsbcolor`] - Get HSB color
+* link:/docs/commands/references/setgray/[`setgray`] - Set gray color
+* link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] - Get RGB color
+* link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] - Get CMYK color (Level 2)
+* link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] - Get HSB color
diff --git a/docs/commands/graphics-state/currentgstate.adoc b/docs/commands/references/currentgstate.adoc
similarity index 73%
rename from docs/commands/graphics-state/currentgstate.adoc
rename to docs/commands/references/currentgstate.adoc
index d6eb503..1736742 100644
--- a/docs/commands/graphics-state/currentgstate.adoc
+++ b/docs/commands/references/currentgstate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentgstate
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -38,11 +37,11 @@ gstate currentgstate → gstate
=== Description
-xref:../currentgstate.adoc[`currentgstate`] replaces the value of the gstate object by a copy of the current graphics state and pushes gstate back on the operand stack.
+link:/docs/commands/references/currentgstate/[`currentgstate`] replaces the value of the gstate object by a copy of the current graphics state and pushes gstate back on the operand stack.
-This is a **copying operation** that updates an existing gstate object rather than creating a new one. This is more efficient than creating a new gstate with xref:../gstate.adoc[`gstate`] when you already have a gstate object to reuse.
+This is a **copying operation** that updates an existing gstate object rather than creating a new one. This is more efficient than creating a new gstate with link:/docs/commands/references/gstate/[`gstate`] when you already have a gstate object to reuse.
-The gstate object must have been previously created by xref:../gstate.adoc[`gstate`]. After the operation, the gstate contains a snapshot of:
+The gstate object must have been previously created by link:/docs/commands/references/gstate/[`gstate`]. After the operation, the gstate contains a snapshot of:
* Current transformation matrix (CTM)
* Color space and color values
@@ -195,7 +194,7 @@ beforeState setgstate % Restore if needed
=== Common Pitfalls
-WARNING: *Global VM Restrictions* - If gstate is in global VM, xref:../currentgstate.adoc[`currentgstate`] fails if current state contains local VM objects.
+WARNING: *Global VM Restrictions* - If gstate is in global VM, link:/docs/commands/references/currentgstate/[`currentgstate`] fails if current state contains local VM objects.
[source,postscript]
----
@@ -207,7 +206,7 @@ false setglobal
globalState currentgstate pop % Error: invalidaccess
----
-WARNING: *Must Use Existing gstate* - xref:../currentgstate.adoc[`currentgstate`] requires a pre-existing gstate object.
+WARNING: *Must Use Existing gstate* - link:/docs/commands/references/currentgstate/[`currentgstate`] requires a pre-existing gstate object.
[source,postscript]
----
@@ -248,7 +247,7 @@ TIP: *Reuse gstate Objects* - More efficient than creating new ones repeatedly.
=== Implementation Notes
* Updates existing gstate object (doesn't create new one)
-* More efficient than xref:../gstate.adoc[`gstate`] when reusing objects
+* More efficient than link:/docs/commands/references/gstate/[`gstate`] when reusing objects
* Returns same gstate object (for convenience)
* Captures complete graphics state except current path
* Fast operation suitable for frequent use
@@ -260,25 +259,25 @@ TIP: *Reuse gstate Objects* - More efficient than creating new ones repeatedly.
|===
| Operator | Purpose
-| xref:../gstate.adoc[`gstate`]
+| link:/docs/commands/references/gstate/[`gstate`]
| Creates new gstate object with current state (allocates VM)
-| xref:../currentgstate.adoc[`currentgstate`]
+| link:/docs/commands/references/currentgstate/[`currentgstate`]
| Updates existing gstate with current state (no allocation)
-| xref:../setgstate.adoc[`setgstate`]
+| link:/docs/commands/references/setgstate/[`setgstate`]
| Replaces current state from gstate object
-| xref:../gsave.adoc[`gsave`]
+| link:/docs/commands/references/gsave/[`gsave`]
| Saves current state on graphics state stack
-| xref:../grestore.adoc[`grestore`]
+| link:/docs/commands/references/grestore/[`grestore`]
| Restores state from graphics state stack
|===
=== Graphics State Components
-xref:../currentgstate.adoc[`currentgstate`] captures:
+link:/docs/commands/references/currentgstate/[`currentgstate`] captures:
* ✓ Transformation matrix (CTM)
* ✓ Color space and color
@@ -291,8 +290,8 @@ xref:../currentgstate.adoc[`currentgstate`] captures:
=== See Also
-* xref:../gstate.adoc[`gstate`] - Create new graphics state object
-* xref:../setgstate.adoc[`setgstate`] - Replace graphics state from gstate
-* xref:../gsave.adoc[`gsave`] - Save state on graphics state stack
-* xref:../grestore.adoc[`grestore`] - Restore state from stack
-* xref:../grestoreall.adoc[`grestoreall`] - Restore all saved states
+* link:/docs/commands/references/gstate/[`gstate`] - Create new graphics state object
+* link:/docs/commands/references/setgstate/[`setgstate`] - Replace graphics state from gstate
+* link:/docs/commands/references/gsave/[`gsave`] - Save state on graphics state stack
+* link:/docs/commands/references/grestore/[`grestore`] - Restore state from stack
+* link:/docs/commands/references/grestoreall/[`grestoreall`] - Restore all saved states
diff --git a/docs/commands/graphics-state/currenthsbcolor.adoc b/docs/commands/references/currenthsbcolor.adoc
similarity index 81%
rename from docs/commands/graphics-state/currenthsbcolor.adoc
rename to docs/commands/references/currenthsbcolor.adoc
index 5738183..047bad1 100644
--- a/docs/commands/graphics-state/currenthsbcolor.adoc
+++ b/docs/commands/references/currenthsbcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currenthsbcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 23
---
@@ -44,11 +43,11 @@ Returns current color as HSB values.
=== Description
-xref:../currenthsbcolor.adoc[`currenthsbcolor`] returns the current color in the graphics state according to the hue-saturation-brightness model.
+link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] returns the current color in the graphics state according to the hue-saturation-brightness model.
-* If the current color space is **DeviceRGB**, xref:../currenthsbcolor.adoc[`currenthsbcolor`] returns the color values most recently specified by xref:../sethsbcolor.adoc[`sethsbcolor`], converting them from RGB to HSB coordinates if necessary.
-* If the current color space is **DeviceGray** or **DeviceCMYK**, xref:../currenthsbcolor.adoc[`currenthsbcolor`] first converts the current color to RGB, then to HSB.
-* For any other color space, xref:../currenthsbcolor.adoc[`currenthsbcolor`] returns **0.0 0.0 0.0** (black).
+* If the current color space is **DeviceRGB**, link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] returns the color values most recently specified by link:/docs/commands/references/sethsbcolor/[`sethsbcolor`], converting them from RGB to HSB coordinates if necessary.
+* If the current color space is **DeviceGray** or **DeviceCMYK**, link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] first converts the current color to RGB, then to HSB.
+* For any other color space, link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] returns **0.0 0.0 0.0** (black).
**HSB components:**
@@ -298,8 +297,8 @@ brightness dup dup setrgbcolor
=== See Also
-* xref:../sethsbcolor.adoc[`sethsbcolor`] - Set HSB color
-* xref:../currentrgbcolor.adoc[`currentrgbcolor`] - Get RGB color
-* xref:../setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../currentgray.adoc[`currentgray`] - Get gray value
-* xref:../currentcmykcolor.adoc[`currentcmykcolor`] - Get CMYK color
+* link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] - Set HSB color
+* link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] - Get RGB color
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/currentgray/[`currentgray`] - Get gray value
+* link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] - Get CMYK color
diff --git a/docs/commands/graphics-state/currentlinecap.adoc b/docs/commands/references/currentlinecap.adoc
similarity index 80%
rename from docs/commands/graphics-state/currentlinecap.adoc
rename to docs/commands/references/currentlinecap.adoc
index e9cf824..458437e 100644
--- a/docs/commands/graphics-state/currentlinecap.adoc
+++ b/docs/commands/references/currentlinecap.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentlinecap
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 17
---
@@ -38,7 +37,7 @@ Returns current line cap style.
=== Description
-xref:../currentlinecap.adoc[`currentlinecap`] returns the current line cap parameter from the graphics state. This is the value most recently set by xref:../setlinecap.adoc[`setlinecap`].
+link:/docs/commands/references/currentlinecap/[`currentlinecap`] returns the current line cap parameter from the graphics state. This is the value most recently set by link:/docs/commands/references/setlinecap/[`setlinecap`].
**Cap styles:**
@@ -178,7 +177,7 @@ Square (2): [─────]
=== See Also
-* xref:../setlinecap.adoc[`setlinecap`] - Set line cap style
-* xref:../currentlinejoin.adoc[`currentlinejoin`] - Get line join style
-* xref:../currentlinewidth.adoc[`currentlinewidth`] - Get line width
-* xref:../currentdash.adoc[`currentdash`] - Get dash pattern
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap style
+* link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] - Get line join style
+* link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] - Get line width
+* link:/docs/commands/references/currentdash/[`currentdash`] - Get dash pattern
diff --git a/docs/commands/graphics-state/currentlinejoin.adoc b/docs/commands/references/currentlinejoin.adoc
similarity index 78%
rename from docs/commands/graphics-state/currentlinejoin.adoc
rename to docs/commands/references/currentlinejoin.adoc
index 7612f5a..33f0bed 100644
--- a/docs/commands/graphics-state/currentlinejoin.adoc
+++ b/docs/commands/references/currentlinejoin.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentlinejoin
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 18
---
@@ -38,7 +37,7 @@ Returns current line join style.
=== Description
-xref:../currentlinejoin.adoc[`currentlinejoin`] returns the current line join parameter from the graphics state. This is the value most recently set by xref:../setlinejoin.adoc[`setlinejoin`].
+link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] returns the current line join parameter from the graphics state. This is the value most recently set by link:/docs/commands/references/setlinejoin/[`setlinejoin`].
**Join styles:**
@@ -181,8 +180,8 @@ Bevel (2): ╱─╲
=== See Also
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set line join style
-* xref:../currentlinecap.adoc[`currentlinecap`] - Get line cap style
-* xref:../currentlinewidth.adoc[`currentlinewidth`] - Get line width
-* xref:../currentmiterlimit.adoc[`currentmiterlimit`] - Get miter limit
-* xref:../setmiterlimit.adoc[`setmiterlimit`] - Set miter limit
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join style
+* link:/docs/commands/references/currentlinecap/[`currentlinecap`] - Get line cap style
+* link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] - Get line width
+* link:/docs/commands/references/currentmiterlimit/[`currentmiterlimit`] - Get miter limit
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Set miter limit
diff --git a/docs/commands/graphics-state/currentlinewidth.adoc b/docs/commands/references/currentlinewidth.adoc
similarity index 81%
rename from docs/commands/graphics-state/currentlinewidth.adoc
rename to docs/commands/references/currentlinewidth.adoc
index 9d6ec37..1af1f70 100644
--- a/docs/commands/graphics-state/currentlinewidth.adoc
+++ b/docs/commands/references/currentlinewidth.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentlinewidth
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 16
---
@@ -38,7 +37,7 @@ Returns current line width value.
=== Description
-xref:../currentlinewidth.adoc[`currentlinewidth`] returns the current line width parameter from the graphics state. This is the value most recently set by xref:../setlinewidth.adoc[`setlinewidth`].
+link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] returns the current line width parameter from the graphics state. This is the value most recently set by link:/docs/commands/references/setlinewidth/[`setlinewidth`].
The returned value is in **user space units**. The actual rendered width in device space depends on the current transformation matrix (CTM) at the time of stroking.
@@ -201,7 +200,7 @@ TIP: *Use for State Management* - Good for preserving/restoring line parameters.
* Very fast query operation
* No modification to graphics state
-* Returns exact value set by xref:../setlinewidth.adoc[`setlinewidth`]
+* Returns exact value set by link:/docs/commands/references/setlinewidth/[`setlinewidth`]
* Value is in user space coordinates
* Default value is typically 1.0
* Widely supported (Level 1)
@@ -224,8 +223,8 @@ currentlinewidth % Still 1.0
=== See Also
-* xref:../setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../currentlinecap.adoc[`currentlinecap`] - Get line cap style
-* xref:../currentlinejoin.adoc[`currentlinejoin`] - Get line join style
-* xref:../currentdash.adoc[`currentdash`] - Get dash pattern
-* xref:../currentmiterlimit.adoc[`currentmiterlimit`] - Get miter limit
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/currentlinecap/[`currentlinecap`] - Get line cap style
+* link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] - Get line join style
+* link:/docs/commands/references/currentdash/[`currentdash`] - Get dash pattern
+* link:/docs/commands/references/currentmiterlimit/[`currentmiterlimit`] - Get miter limit
diff --git a/docs/commands/transformations/currentmatrix.adoc b/docs/commands/references/currentmatrix.adoc
similarity index 68%
rename from docs/commands/transformations/currentmatrix.adoc
rename to docs/commands/references/currentmatrix.adoc
index 2c20f0b..d28f340 100644
--- a/docs/commands/transformations/currentmatrix.adoc
+++ b/docs/commands/references/currentmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -38,9 +37,9 @@ matrix currentmatrix → matrix
=== Description
-xref:../currentmatrix.adoc[`currentmatrix`] replaces the value of `matrix` with the current transformation matrix (CTM) from the graphics state and pushes the modified matrix back on the operand stack.
+link:/docs/commands/references/currentmatrix/[`currentmatrix`] replaces the value of `matrix` with the current transformation matrix (CTM) from the graphics state and pushes the modified matrix back on the operand stack.
-The CTM defines the transformation from user space coordinates to device space coordinates. It is modified by transformation operators like xref:../translate.adoc[`translate`], xref:../scale.adoc[`scale`], xref:../rotate.adoc[`rotate`], and xref:../concat.adoc[`concat`].
+The CTM defines the transformation from user space coordinates to device space coordinates. It is modified by transformation operators like link:/docs/commands/references/translate/[`translate`], link:/docs/commands/references/scale/[`scale`], link:/docs/commands/references/rotate/[`rotate`], and link:/docs/commands/references/concat/[`concat`].
=== PostScript Level
@@ -126,7 +125,7 @@ concat % Apply modified matrix
=== Common Pitfalls
-WARNING: *Modifies Input Array* - xref:../currentmatrix.adoc[`currentmatrix`] modifies the array you provide.
+WARNING: *Modifies Input Array* - link:/docs/commands/references/currentmatrix/[`currentmatrix`] modifies the array you provide.
[source,postscript]
----
@@ -144,7 +143,7 @@ dup setmatrix
% Both stack entries refer to same array
----
-TIP: *Use with gsave/grestore* - For complete state saving, use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`]:
+TIP: *Use with gsave/grestore* - For complete state saving, use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`]:
[source,postscript]
----
@@ -190,7 +189,7 @@ workMatrix currentmatrix ...
* The CTM is stored internally in device space
* Very large transformations may experience precision loss
* The CTM is part of the graphics state
-* Modified by xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`]
+* Modified by link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`]
* The array must have at least 6 elements
=== Matrix Interpretation
@@ -239,20 +238,20 @@ atan /angle exch def
The CTM is modified by:
-* xref:../translate.adoc[`translate`]
-* xref:../scale.adoc[`scale`]
-* xref:../rotate.adoc[`rotate`]
-* xref:../concat.adoc[`concat`]
-* xref:../setmatrix.adoc[`setmatrix`]
-* xref:../initmatrix.adoc[`initmatrix`]
-* xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`]
+* link:/docs/commands/references/translate/[`translate`]
+* link:/docs/commands/references/scale/[`scale`]
+* link:/docs/commands/references/rotate/[`rotate`]
+* link:/docs/commands/references/concat/[`concat`]
+* link:/docs/commands/references/setmatrix/[`setmatrix`]
+* link:/docs/commands/references/initmatrix/[`initmatrix`]
+* link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`]
=== See Also
-* xref:../setmatrix.adoc[`setmatrix`] - Set the CTM
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../initmatrix.adoc[`initmatrix`] - Reset CTM to default
-* xref:../concat.adoc[`concat`] - Concatenate matrix with CTM
-* xref:../transform.adoc[`transform`] - Transform coordinates by CTM
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Set the CTM
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/initmatrix/[`initmatrix`] - Reset CTM to default
+* link:/docs/commands/references/concat/[`concat`] - Concatenate matrix with CTM
+* link:/docs/commands/references/transform/[`transform`] - Transform coordinates by CTM
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/graphics-state/currentmiterlimit.adoc b/docs/commands/references/currentmiterlimit.adoc
similarity index 84%
rename from docs/commands/graphics-state/currentmiterlimit.adoc
rename to docs/commands/references/currentmiterlimit.adoc
index 44b4f8b..fe079dc 100644
--- a/docs/commands/graphics-state/currentmiterlimit.adoc
+++ b/docs/commands/references/currentmiterlimit.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentmiterlimit
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 19
---
@@ -38,7 +37,7 @@ Returns current miter limit value.
=== Description
-xref:../currentmiterlimit.adoc[`currentmiterlimit`] returns the current miter limit parameter from the graphics state. This is the value most recently set by xref:../setmiterlimit.adoc[`setmiterlimit`].
+link:/docs/commands/references/currentmiterlimit/[`currentmiterlimit`] returns the current miter limit parameter from the graphics state. This is the value most recently set by link:/docs/commands/references/setmiterlimit/[`setmiterlimit`].
The miter limit controls when sharp miter joins are converted to bevel joins. It is the ratio of miter length to line width. When this ratio exceeds the miter limit, a bevel join is used instead.
@@ -206,7 +205,7 @@ drawSharpCorners
=== See Also
-* xref:../setmiterlimit.adoc[`setmiterlimit`] - Set miter limit
-* xref:../currentlinejoin.adoc[`currentlinejoin`] - Get line join style
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set line join style
-* xref:../currentlinewidth.adoc[`currentlinewidth`] - Get line width
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Set miter limit
+* link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] - Get line join style
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join style
+* link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] - Get line width
diff --git a/docs/commands/path-construction/currentpoint.adoc b/docs/commands/references/currentpoint.adoc
similarity index 73%
rename from docs/commands/path-construction/currentpoint.adoc
rename to docs/commands/references/currentpoint.adoc
index 6207498..83a44eb 100644
--- a/docs/commands/path-construction/currentpoint.adoc
+++ b/docs/commands/references/currentpoint.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentpoint
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -41,11 +40,11 @@ Returns the x and y coordinates of the current point.
=== Description
-xref:../currentpoint.adoc[`currentpoint`] returns the x and y coordinates of the current point in the graphics state (i.e., the trailing endpoint of the current path).
+link:/docs/commands/references/currentpoint/[`currentpoint`] returns the x and y coordinates of the current point in the graphics state (i.e., the trailing endpoint of the current path).
-If the current point is undefined because the current path is empty, xref:../currentpoint.adoc[`currentpoint`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/currentpoint/[`currentpoint`] executes the [`nocurrentpoint`] error.
-The current point is reported in the **user coordinate system**. Points entered into a path are immediately converted to device coordinates by the current transformation matrix (CTM); existing points are not changed by subsequent modifications to the CTM. xref:../currentpoint.adoc[`currentpoint`] computes the user space coordinate that corresponds to the current point according to the current value of the CTM. If a current point is set and then the CTM is changed, xref:../currentpoint.adoc[`currentpoint`] will report a different position in user space than it did before.
+The current point is reported in the **user coordinate system**. Points entered into a path are immediately converted to device coordinates by the current transformation matrix (CTM); existing points are not changed by subsequent modifications to the CTM. link:/docs/commands/references/currentpoint/[`currentpoint`] computes the user space coordinate that corresponds to the current point according to the current value of the CTM. If a current point is set and then the CTM is changed, link:/docs/commands/references/currentpoint/[`currentpoint`] will report a different position in user space than it did before.
=== PostScript Level
@@ -176,7 +175,7 @@ drawArrowhead
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../currentpoint.adoc[`currentpoint`] fails if the path is empty or only contains xref:../moveto.adoc[`moveto`] operations that were superseded.
+WARNING: *Requires Current Point* - link:/docs/commands/references/currentpoint/[`currentpoint`] fails if the path is empty or only contains link:/docs/commands/references/moveto/[`moveto`] operations that were superseded.
[source,postscript]
----
@@ -207,7 +206,7 @@ grestore
currentpoint % Returns: 100 100 (restored)
----
-TIP: *Use for Position-Dependent Drawing* - xref:../currentpoint.adoc[`currentpoint`] is essential for drawing elements that depend on the current path position, like arrowheads or labels.
+TIP: *Use for Position-Dependent Drawing* - link:/docs/commands/references/currentpoint/[`currentpoint`] is essential for drawing elements that depend on the current path position, like arrowheads or labels.
=== Error Conditions
@@ -231,11 +230,11 @@ TIP: *Use for Position-Dependent Drawing* - xref:../currentpoint.adoc[`currentpo
* Coordinates are computed from device space using inverse CTM
* May have rounding errors due to coordinate transformations
* The current point exists only after path construction operations
-* Superseded xref:../moveto.adoc[`moveto`] operations don't leave a current point
+* Superseded link:/docs/commands/references/moveto/[`moveto`] operations don't leave a current point
=== Coordinate Transformation
-The current point is stored internally in device space. xref:../currentpoint.adoc[`currentpoint`] performs this transformation:
+The current point is stored internally in device space. link:/docs/commands/references/currentpoint/[`currentpoint`] performs this transformation:
----
device_point → CTM⁻¹ → user_point
@@ -260,7 +259,7 @@ currentpoint % Get it back
=== See Also
-* xref:../moveto.adoc[`moveto`] - Set current point (absolute)
-* xref:../rmoveto.adoc[`rmoveto`] - Set current point (relative)
-* xref:../lineto.adoc[`lineto`] - Add line to current point
-* xref:../newpath.adoc[`newpath`] - Clear current path
\ No newline at end of file
+* link:/docs/commands/references/moveto/[`moveto`] - Set current point (absolute)
+* link:/docs/commands/references/rmoveto/[`rmoveto`] - Set current point (relative)
+* link:/docs/commands/references/lineto/[`lineto`] - Add line to current point
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
\ No newline at end of file
diff --git a/docs/commands/graphics-state/currentrgbcolor.adoc b/docs/commands/references/currentrgbcolor.adoc
similarity index 78%
rename from docs/commands/graphics-state/currentrgbcolor.adoc
rename to docs/commands/references/currentrgbcolor.adoc
index 0c324c2..0bbc1a7 100644
--- a/docs/commands/graphics-state/currentrgbcolor.adoc
+++ b/docs/commands/references/currentrgbcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: currentrgbcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 21
---
@@ -44,15 +43,15 @@ Returns current color as RGB values.
=== Description
-xref:../currentrgbcolor.adoc[`currentrgbcolor`] returns the current color in the graphics state according to the red-green-blue color model.
+link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] returns the current color in the graphics state according to the red-green-blue color model.
* If the current color space is **DeviceRGB**,
-xref:../currentrgbcolor.adoc[`currentrgbcolor`] returns the color values most
-recently specified to xref:../setrgbcolor.adoc[`setrgbcolor`] or [`setcolor`]
-(or transformed values specified to xref:../sethsbcolor.adoc[`sethsbcolor`]) .
+link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] returns the color values most
+recently specified to link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] or [`setcolor`]
+(or transformed values specified to link:/docs/commands/references/sethsbcolor/[`sethsbcolor`]) .
-* If the current color space is **DeviceGray** or **DeviceCMYK**, xref:../currentrgbcolor.adoc[`currentrgbcolor`] converts the current color to RGB.
-* For any other color space, xref:../currentrgbcolor.adoc[`currentrgbcolor`] returns **0.0 0.0 0.0** (black).
+* If the current color space is **DeviceGray** or **DeviceCMYK**, link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] converts the current color to RGB.
+* For any other color space, link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] returns **0.0 0.0 0.0** (black).
Each returned value is in the range 0.0 (no intensity) to 1.0 (full intensity).
@@ -258,7 +257,7 @@ No components = Black
=== See Also
-* xref:../setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../currentgray.adoc[`currentgray`] - Get gray value
-* xref:../currentcmykcolor.adoc[`currentcmykcolor`] - Get CMYK color (Level 2)
-* xref:../currenthsbcolor.adoc[`currenthsbcolor`] - Get HSB color
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/currentgray/[`currentgray`] - Get gray value
+* link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] - Get CMYK color (Level 2)
+* link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] - Get HSB color
diff --git a/docs/commands/path-construction/curveto.adoc b/docs/commands/references/curveto.adoc
similarity index 75%
rename from docs/commands/path-construction/curveto.adoc
rename to docs/commands/references/curveto.adoc
index 376c032..7854c89 100644
--- a/docs/commands/path-construction/curveto.adoc
+++ b/docs/commands/references/curveto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: curveto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -53,9 +52,9 @@ x1 y1 x2 y2 x3 y3 curveto → -
=== Description
-xref:../curveto.adoc[`curveto`] adds a Bézier cubic section to the current path between the current point, referred to here as (x0, y0), and the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier cubic control points. After constructing the curve, xref:../curveto.adoc[`curveto`] makes (x3, y3) the new current point.
+link:/docs/commands/references/curveto/[`curveto`] adds a Bézier cubic section to the current path between the current point, referred to here as (x0, y0), and the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier cubic control points. After constructing the curve, link:/docs/commands/references/curveto/[`curveto`] makes (x3, y3) the new current point.
-If the current point is undefined because the current path is empty, xref:../curveto.adoc[`curveto`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/curveto/[`curveto`] executes the [`nocurrentpoint`] error.
The four points define the shape of the curve geometrically:
@@ -171,7 +170,7 @@ fill
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../curveto.adoc[`curveto`] needs a current point as the curve starting point. Use xref:../moveto.adoc[`moveto`] first.
+WARNING: *Requires Current Point* - link:/docs/commands/references/curveto/[`curveto`] needs a current point as the curve starting point. Use link:/docs/commands/references/moveto/[`moveto`] first.
[source,postscript]
----
@@ -181,9 +180,9 @@ newpath
WARNING: *Control Point Order Matters* - The first control point (x1, y1) affects the curve's start, the second (x2, y2) affects the end. Swapping them changes the curve shape significantly.
-WARNING: *Six Parameters Required* - xref:../curveto.adoc[`curveto`] requires all six parameters. Missing any causes [`stackunderflow`].
+WARNING: *Six Parameters Required* - link:/docs/commands/references/curveto/[`curveto`] requires all six parameters. Missing any causes [`stackunderflow`].
-TIP: *Use for Smooth Curves* - Bézier curves provide smooth, aesthetically pleasing curves. For circles and arcs, consider xref:../arc.adoc[`arc`] for mathematical precision.
+TIP: *Use for Smooth Curves* - Bézier curves provide smooth, aesthetically pleasing curves. For circles and arcs, consider link:/docs/commands/references/arc/[`arc`] for mathematical precision.
=== Mathematical Background
@@ -225,15 +224,15 @@ Where t ranges from 0 to 1, and (x0, y0) is the current point.
=== Performance Considerations
-* More computationally expensive than xref:../lineto.adoc[`lineto`]
+* More computationally expensive than link:/docs/commands/references/lineto/[`lineto`]
* Many curves can impact path complexity limits
* Flatness parameter affects rendering speed
* Simpler curves (fewer inflection points) render faster
=== See Also
-* xref:../rcurveto.adoc[`rcurveto`] - Relative curveto
-* xref:../arc.adoc[`arc`] - Draw circular arc
-* xref:../lineto.adoc[`lineto`] - Draw straight line
-* xref:../moveto.adoc[`moveto`] - Set current point
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/rcurveto/[`rcurveto`] - Relative curveto
+* link:/docs/commands/references/arc/[`arc`] - Draw circular arc
+* link:/docs/commands/references/lineto/[`lineto`] - Draw straight line
+* link:/docs/commands/references/moveto/[`moveto`] - Set current point
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/array-string/cvi.adoc b/docs/commands/references/cvi.adoc
similarity index 71%
rename from docs/commands/array-string/cvi.adoc
rename to docs/commands/references/cvi.adoc
index 0cf49e7..7bd88ad 100644
--- a/docs/commands/array-string/cvi.adoc
+++ b/docs/commands/references/cvi.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvi
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 19
---
@@ -39,7 +38,7 @@ string cvi → int
=== Description
-xref:../cvi.adoc[`cvi`] (convert to integer) converts an integer, real, or string to an integer result:
+link:/docs/commands/references/cvi/[`cvi`] (convert to integer) converts an integer, real, or string to an integer result:
* **Integer operand**: Returns it unchanged
* **Real operand**: Truncates fractional part (rounds toward 0) and converts to integer
@@ -101,7 +100,7 @@ position cellsize div cvi % Integer cell index
=== Common Pitfalls
-WARNING: *Truncation, Not Rounding* - xref:../cvi.adoc[`cvi`] truncates toward zero, not to nearest integer.
+WARNING: *Truncation, Not Rounding* - link:/docs/commands/references/cvi/[`cvi`] truncates toward zero, not to nearest integer.
[source,postscript]
----
@@ -124,7 +123,7 @@ WARNING: *String Syntax* - String must contain valid PostScript number syntax.
(12x) cvi % Error: syntaxerror
----
-TIP: *Use round/floor/ceiling* - For other rounding behavior, use xref:../arithmetic-math/round.adoc[`round`], xref:../arithmetic-math/floor.adoc[`floor`], or xref:../arithmetic-math/ceiling.adoc[`ceiling`] before xref:../cvi.adoc[`cvi`].
+TIP: *Use round/floor/ceiling* - For other rounding behavior, use link:/docs/commands/references/round/[`round`], link:/docs/commands/references/floor/[`floor`], or link:/docs/commands/references/ceiling/[`ceiling`] before link:/docs/commands/references/cvi/[`cvi`].
=== Error Conditions
@@ -164,30 +163,30 @@ TIP: *Use round/floor/ceiling* - For other rounding behavior, use xref:../arithm
|===
| Operator | Result
-| xref:../cvi.adoc[`cvi`]
+| link:/docs/commands/references/cvi/[`cvi`]
| Truncate toward 0, convert to integer
-| xref:../cvr.adoc[`cvr`]
+| link:/docs/commands/references/cvr/[`cvr`]
| Convert to real
-| xref:../arithmetic-math/round.adoc[`round`]
+| link:/docs/commands/references/round/[`round`]
| Round to nearest, keep type
-| xref:../arithmetic-math/floor.adoc[`floor`]
+| link:/docs/commands/references/floor/[`floor`]
| Round down, keep type
-| xref:../arithmetic-math/ceiling.adoc[`ceiling`]
+| link:/docs/commands/references/ceiling/[`ceiling`]
| Round up, keep type
-| xref:../arithmetic-math/truncate.adoc[`truncate`]
+| link:/docs/commands/references/truncate/[`truncate`]
| Round toward 0, keep type
|===
=== See Also
-* xref:../cvr.adoc[`cvr`] - Convert to real
-* xref:../cvs.adoc[`cvs`] - Convert to string
-* xref:../arithmetic-math/round.adoc[`round`] - Round to nearest
-* xref:../arithmetic-math/floor.adoc[`floor`] - Round down
-* xref:../arithmetic-math/ceiling.adoc[`ceiling`] - Round up
-* xref:../arithmetic-math/truncate.adoc[`truncate`] - Round toward zero
\ No newline at end of file
+* link:/docs/commands/references/cvr/[`cvr`] - Convert to real
+* link:/docs/commands/references/cvs/[`cvs`] - Convert to string
+* link:/docs/commands/references/round/[`round`] - Round to nearest
+* link:/docs/commands/references/floor/[`floor`] - Round down
+* link:/docs/commands/references/ceiling/[`ceiling`] - Round up
+* link:/docs/commands/references/truncate/[`truncate`] - Round toward zero
\ No newline at end of file
diff --git a/docs/commands/array-string/cvlit.adoc b/docs/commands/references/cvlit.adoc
similarity index 84%
rename from docs/commands/array-string/cvlit.adoc
rename to docs/commands/references/cvlit.adoc
index 3aa380d..5d2bcc0 100644
--- a/docs/commands/array-string/cvlit.adoc
+++ b/docs/commands/references/cvlit.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvlit
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 21
---
@@ -38,7 +37,7 @@ any cvlit → any
=== Description
-xref:../cvlit.adoc[`cvlit`] (convert to literal) changes the attribute of the object on top of the operand stack from executable to literal.
+link:/docs/commands/references/cvlit/[`cvlit`] (convert to literal) changes the attribute of the object on top of the operand stack from executable to literal.
The object itself is unchanged - only its executable/literal attribute is modified. This affects how the PostScript interpreter treats the object when it is encountered during execution.
@@ -128,7 +127,7 @@ TIP: *Most Objects Are Literal* - Numbers, strings, arrays created with `[ ]`, e
* Only changes the executable/literal attribute bit
* Does not create a new object (modifies in place)
* Works on any object type
-* Complementary to xref:../cvx.adoc[`cvx`]
+* Complementary to link:/docs/commands/references/cvx/[`cvx`]
=== Executable vs. Literal Comparison
@@ -155,6 +154,6 @@ TIP: *Most Objects Are Literal* - Numbers, strings, arrays created with `[ ]`, e
=== See Also
-* xref:../cvx.adoc[`cvx`] - Convert to executable
-* xref:../xcheck.adoc[`xcheck`] - Test if executable
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/cvx/[`cvx`] - Convert to executable
+* link:/docs/commands/references/xcheck/[`xcheck`] - Test if executable
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/array-string/cvn.adoc b/docs/commands/references/cvn.adoc
similarity index 86%
rename from docs/commands/array-string/cvn.adoc
rename to docs/commands/references/cvn.adoc
index 5c04088..b764e99 100644
--- a/docs/commands/array-string/cvn.adoc
+++ b/docs/commands/references/cvn.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvn
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 18
---
@@ -38,7 +37,7 @@ string cvn → name
=== Description
-xref:../cvn.adoc[`cvn`] (convert to name) converts the string operand to a name object that is lexically identical to the string.
+link:/docs/commands/references/cvn/[`cvn`] (convert to name) converts the string operand to a name object that is lexically identical to the string.
The resulting name:
* Has the same executable/literal attribute as the string
@@ -167,7 +166,7 @@ TIP: *Names vs. Strings as Keys* - Names are more efficient as dictionary keys t
=== See Also
-* xref:../cvs.adoc[`cvs`] - Convert to string
-* xref:../type.adoc[`type`] - Get object type
-* xref:../cvlit.adoc[`cvlit`] - Make literal
-* xref:../cvx.adoc[`cvx`] - Make executable
\ No newline at end of file
+* link:/docs/commands/references/cvs/[`cvs`] - Convert to string
+* link:/docs/commands/references/type/[`type`] - Get object type
+* link:/docs/commands/references/cvlit/[`cvlit`] - Make literal
+* link:/docs/commands/references/cvx/[`cvx`] - Make executable
\ No newline at end of file
diff --git a/docs/commands/array-string/cvr.adoc b/docs/commands/references/cvr.adoc
similarity index 84%
rename from docs/commands/array-string/cvr.adoc
rename to docs/commands/references/cvr.adoc
index b24643e..4da478c 100644
--- a/docs/commands/array-string/cvr.adoc
+++ b/docs/commands/references/cvr.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvr
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 20
---
@@ -39,7 +38,7 @@ string cvr → real
=== Description
-xref:../cvr.adoc[`cvr`] (convert to real) converts an integer, real, or string to a real number:
+link:/docs/commands/references/cvr/[`cvr`] (convert to real) converts an integer, real, or string to a real number:
* **Integer operand**: Converts to real
* **Real operand**: Returns it unchanged
@@ -128,6 +127,6 @@ TIP: *Use for Precision* - Convert integers to reals before division to avoid in
=== See Also
-* xref:../cvi.adoc[`cvi`] - Convert to integer
-* xref:../cvs.adoc[`cvs`] - Convert to string
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/cvi/[`cvi`] - Convert to integer
+* link:/docs/commands/references/cvs/[`cvs`] - Convert to string
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/array-string/cvs.adoc b/docs/commands/references/cvs.adoc
similarity index 83%
rename from docs/commands/array-string/cvs.adoc
rename to docs/commands/references/cvs.adoc
index 48ee5fa..0b0e1b7 100644
--- a/docs/commands/array-string/cvs.adoc
+++ b/docs/commands/references/cvs.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvs
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 17
---
@@ -41,7 +40,7 @@ any string cvs → substring
=== Description
-xref:../cvs.adoc[`cvs`] (convert to string) produces a text representation of an arbitrary object and stores it into the supplied _string_, overwriting an initial portion of its value. It returns a string object designating the substring actually used.
+link:/docs/commands/references/cvs/[`cvs`] (convert to string) produces a text representation of an arbitrary object and stores it into the supplied _string_, overwriting an initial portion of its value. It returns a string object designating the substring actually used.
Conversion rules:
* **Numbers**: Text representation (e.g., `123`, `3.14`)
@@ -200,8 +199,8 @@ TIP: *Use Ample Buffer Size* - Allocate at least 20-30 characters for number con
=== See Also
-* xref:../cvn.adoc[`cvn`] - Convert string to name
-* xref:../cvi.adoc[`cvi`] - Convert to integer
-* xref:../cvr.adoc[`cvr`] - Convert to real
-* xref:../string.adoc[`string`] - Create string buffer
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/cvn/[`cvn`] - Convert string to name
+* link:/docs/commands/references/cvi/[`cvi`] - Convert to integer
+* link:/docs/commands/references/cvr/[`cvr`] - Convert to real
+* link:/docs/commands/references/string/[`string`] - Create string buffer
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/array-string/cvx.adoc b/docs/commands/references/cvx.adoc
similarity index 81%
rename from docs/commands/array-string/cvx.adoc
rename to docs/commands/references/cvx.adoc
index cf62011..328ea79 100644
--- a/docs/commands/array-string/cvx.adoc
+++ b/docs/commands/references/cvx.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: cvx
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 22
---
@@ -38,7 +37,7 @@ any cvx → any
=== Description
-xref:../cvx.adoc[`cvx`] (convert to executable) changes the attribute of the object on top of the operand stack from literal to executable.
+link:/docs/commands/references/cvx/[`cvx`] (convert to executable) changes the attribute of the object on top of the operand stack from literal to executable.
The object itself is unchanged - only its executable/literal attribute is modified. This affects how the PostScript interpreter treats the object when it is encountered during execution.
@@ -122,10 +121,10 @@ TIP: *Most Procedures Already Executable* - Procedures created with `{ }` are al
* Only changes the executable/literal attribute bit
* Does not create a new object
* Works on any object type
-* Complementary to xref:../cvlit.adoc[`cvlit`]
+* Complementary to link:/docs/commands/references/cvlit/[`cvlit`]
=== See Also
-* xref:../cvlit.adoc[`cvlit`] - Convert to literal
-* xref:../xcheck.adoc[`xcheck`] - Test if executable
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/cvlit/[`cvlit`] - Convert to literal
+* link:/docs/commands/references/xcheck/[`xcheck`] - Test if executable
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/dictionary/def.adoc b/docs/commands/references/def.adoc
similarity index 77%
rename from docs/commands/dictionary/def.adoc
rename to docs/commands/references/def.adoc
index fd396bb..6a286b5 100644
--- a/docs/commands/dictionary/def.adoc
+++ b/docs/commands/references/def.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: def
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -41,7 +40,7 @@ key value def → –
=== Description
-xref:../def.adoc[`def`] associates _key_ with _value_ in the current dictionary (the one on top of the dictionary stack).
+link:/docs/commands/references/def/[`def`] associates _key_ with _value_ in the current dictionary (the one on top of the dictionary stack).
* If _key_ already exists: replaces its value
* If _key_ doesn't exist: creates new entry
@@ -114,7 +113,7 @@ end
=== Common Pitfalls
-WARNING: *Defines in Current Dictionary* - xref:../def.adoc[`def`] always uses the current dictionary (top of dict stack), not a specific dictionary.
+WARNING: *Defines in Current Dictionary* - link:/docs/commands/references/def/[`def`] always uses the current dictionary (top of dict stack), not a specific dictionary.
[source,postscript]
----
@@ -183,20 +182,20 @@ TIP: *Use Literal Names* - Always use literal names (starting with `/`) for keys
|===
| Operator | Behavior
-| xref:../def.adoc[`def`]
+| link:/docs/commands/references/def/[`def`]
| Define in **current** dictionary
-| xref:../store.adoc[`store`]
+| link:/docs/commands/references/store/[`store`]
| Define in **first** dictionary containing key, or current if not found
-| xref:../array-string/put.adoc[`put`]
+| link:/docs/commands/references/put/[`put`]
| Put into **specific** dictionary (requires dict on stack)
|===
=== See Also
-* xref:../load.adoc[`load`] - Look up value from dictionary stack
-* xref:../store.adoc[`store`] - Store with different semantics
-* xref:../array-string/put.adoc[`put`] - Put into specific dictionary
-* xref:../begin.adoc[`begin`] - Make dictionary current
-* xref:../where.adoc[`where`] - Find which dictionary contains key
\ No newline at end of file
+* link:/docs/commands/references/load/[`load`] - Look up value from dictionary stack
+* link:/docs/commands/references/store/[`store`] - Store with different semantics
+* link:/docs/commands/references/put/[`put`] - Put into specific dictionary
+* link:/docs/commands/references/begin/[`begin`] - Make dictionary current
+* link:/docs/commands/references/where/[`where`] - Find which dictionary contains key
\ No newline at end of file
diff --git a/docs/commands/transformations/defaultmatrix.adoc b/docs/commands/references/defaultmatrix.adoc
similarity index 85%
rename from docs/commands/transformations/defaultmatrix.adoc
rename to docs/commands/references/defaultmatrix.adoc
index a42b30e..0678fd1 100644
--- a/docs/commands/transformations/defaultmatrix.adoc
+++ b/docs/commands/references/defaultmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: defaultmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -38,7 +37,7 @@ matrix defaultmatrix → matrix
=== Description
-xref:../defaultmatrix.adoc[`defaultmatrix`] replaces the value of `matrix` with the default transformation matrix for the current output device and pushes the modified matrix back on the operand stack.
+link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] replaces the value of `matrix` with the default transformation matrix for the current output device and pushes the modified matrix back on the operand stack.
The default matrix establishes the standard mapping from the default user coordinate system to device space for the current device. This matrix is device-dependent and defines the initial state before any transformations are applied.
@@ -128,7 +127,7 @@ WARNING: *Not Always Identity* - The default matrix is rarely the identity matri
[72 0 0 -72 0 792] % Letter page at 72dpi
----
-TIP: *Use initmatrix Instead* - For resetting CTM, use xref:../initmatrix.adoc[`initmatrix`]:
+TIP: *Use initmatrix Instead* - For resetting CTM, use link:/docs/commands/references/initmatrix/[`initmatrix`]:
[source,postscript]
----
@@ -230,7 +229,7 @@ matrix defaultmatrix setmatrix
=== See Also
-* xref:../initmatrix.adoc[`initmatrix`] - Reset CTM to default
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current transformation
-* xref:../setmatrix.adoc[`setmatrix`] - Set transformation matrix
-* xref:../matrix.adoc[`matrix`] - Create identity matrix
\ No newline at end of file
+* link:/docs/commands/references/initmatrix/[`initmatrix`] - Reset CTM to default
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current transformation
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Set transformation matrix
+* link:/docs/commands/references/matrix/[`matrix`] - Create identity matrix
\ No newline at end of file
diff --git a/docs/commands/font-text/definefont.adoc b/docs/commands/references/definefont.adoc
similarity index 63%
rename from docs/commands/font-text/definefont.adoc
rename to docs/commands/references/definefont.adoc
index 933e4f7..14c35f3 100644
--- a/docs/commands/font-text/definefont.adoc
+++ b/docs/commands/references/definefont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: definefont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 6
---
@@ -30,15 +29,15 @@ font
=== Description
-xref:../definefont.adoc[`definefont`] registers `font` as a font dictionary associated with `key` (usually a name). xref:../definefont.adoc[`definefont`] first checks that `font` is a well-formed font dictionary—in other words, contains all required key-value pairs. It inserts an additional entry whose key is `FID` and whose value is an object of type `fontID`. The dictionary must be large enough to accommodate this additional entry. It makes the dictionary's access read-only. Finally, it associates `key` with `font` in the font directory.
+link:/docs/commands/references/definefont/[`definefont`] registers `font` as a font dictionary associated with `key` (usually a name). link:/docs/commands/references/definefont/[`definefont`] first checks that `font` is a well-formed font dictionary—in other words, contains all required key-value pairs. It inserts an additional entry whose key is `FID` and whose value is an object of type `fontID`. The dictionary must be large enough to accommodate this additional entry. It makes the dictionary's access read-only. Finally, it associates `key` with `font` in the font directory.
-In Level 2, it is permissible to associate a font dictionary with more than one key. If `font` has already been registered, xref:../definefont.adoc[`definefont`] does not alter it in any way.
+In Level 2, it is permissible to associate a font dictionary with more than one key. If `font` has already been registered, link:/docs/commands/references/definefont/[`definefont`] does not alter it in any way.
-If `font` is a composite font, xref:../definefont.adoc[`definefont`] also inserts the entries `MIDVector` and `CurMID`, and adds entries `PrefEnc`, `EscChar`, `ShiftIn`, and `ShiftOut` if they are required and are not already present. All the descendant fonts must have been registered by xref:../definefont.adoc[`definefont`] previously.
+If `font` is a composite font, link:/docs/commands/references/definefont/[`definefont`] also inserts the entries `MIDVector` and `CurMID`, and adds entries `PrefEnc`, `EscChar`, `ShiftIn`, and `ShiftOut` if they are required and are not already present. All the descendant fonts must have been registered by link:/docs/commands/references/definefont/[`definefont`] previously.
-Subsequent invocation of xref:../findfont.adoc[`findfont`] with `key` will return `font`. Font registration is subject to the normal semantics of VM. In particular, the lifetime of the definition depends on the VM allocation mode at the time xref:../definefont.adoc[`definefont`] is executed. A local definition can be undone by a subsequent `restore`.
+Subsequent invocation of link:/docs/commands/references/findfont/[`findfont`] with `key` will return `font`. Font registration is subject to the normal semantics of VM. In particular, the lifetime of the definition depends on the VM allocation mode at the time link:/docs/commands/references/definefont/[`definefont`] is executed. A local definition can be undone by a subsequent `restore`.
-xref:../definefont.adoc[`definefont`] is actually a special case of `defineresource` operating on the Font category.
+link:/docs/commands/references/definefont/[`definefont`] is actually a special case of `defineresource` operating on the Font category.
=== Parameters
@@ -192,7 +191,7 @@ GlobalFontDirectory /MyFont known {
=== Font Registration Process
-xref:../definefont.adoc[`definefont`] performs these steps:
+link:/docs/commands/references/definefont/[`definefont`] performs these steps:
1. Validates font dictionary structure
2. Checks required entries exist and are correct type
@@ -203,8 +202,8 @@ xref:../definefont.adoc[`definefont`] performs these steps:
=== See Also
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
-- xref:../undefinefont.adoc[`undefinefont`] - Remove font from font directory
-- xref:../scalefont.adoc[`scalefont`] - Scale font by uniform factor
-- xref:../makefont.adoc[`makefont`] - Transform font by matrix
-- xref:../setfont.adoc[`setfont`] - Establish current font
\ No newline at end of file
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/undefinefont/[`undefinefont`] - Remove font from font directory
+- link:/docs/commands/references/scalefont/[`scalefont`] - Scale font by uniform factor
+- link:/docs/commands/references/makefont/[`makefont`] - Transform font by matrix
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
\ No newline at end of file
diff --git a/docs/commands/dictionary/dict.adoc b/docs/commands/references/dict.adoc
similarity index 85%
rename from docs/commands/dictionary/dict.adoc
rename to docs/commands/references/dict.adoc
index b6ef997..eacea3e 100644
--- a/docs/commands/dictionary/dict.adoc
+++ b/docs/commands/references/dict.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: dict
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -38,7 +37,7 @@ int dict → dict
=== Description
-xref:../dict.adoc[`dict`] creates an empty dictionary with an initial capacity of _int_ elements and pushes it onto the operand stack.
+link:/docs/commands/references/dict/[`dict`] creates an empty dictionary with an initial capacity of _int_ elements and pushes it onto the operand stack.
**Level 1**: The dictionary has a fixed maximum capacity of _int_ elements. Attempting to exceed this causes [`dictfull`] error.
@@ -191,8 +190,8 @@ TIP: *Choose Appropriate Size* - Estimate needed size to avoid expensive expansi
=== See Also
-* xref:../begin.adoc[`begin`] - Push dict onto dict stack
-* xref:../end.adoc[`end`] - Pop dict from dict stack
-* xref:../def.adoc[`def`] - Define entry in current dict
-* xref:../maxlength.adoc[`maxlength`] - Get maximum capacity
-* xref:../array-string/length.adoc[`length`] - Get current entry count
\ No newline at end of file
+* link:/docs/commands/references/begin/[`begin`] - Push dict onto dict stack
+* link:/docs/commands/references/end/[`end`] - Pop dict from dict stack
+* link:/docs/commands/references/def/[`def`] - Define entry in current dict
+* link:/docs/commands/references/maxlength/[`maxlength`] - Get maximum capacity
+* link:/docs/commands/references/length/[`length`] - Get current entry count
\ No newline at end of file
diff --git a/docs/commands/dictionary/dictstack.adoc b/docs/commands/references/dictstack.adoc
similarity index 82%
rename from docs/commands/dictionary/dictstack.adoc
rename to docs/commands/references/dictstack.adoc
index 45b731c..bfdf9a9 100644
--- a/docs/commands/dictionary/dictstack.adoc
+++ b/docs/commands/references/dictstack.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: dictstack
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -38,7 +37,7 @@ array dictstack → subarray
=== Description
-xref:../dictstack.adoc[`dictstack`] stores all elements of the dictionary stack into _array_ and returns an object describing the initial n-element subarray, where n is the current depth of the dictionary stack.
+link:/docs/commands/references/dictstack/[`dictstack`] stores all elements of the dictionary stack into _array_ and returns an object describing the initial n-element subarray, where n is the current depth of the dictionary stack.
Dictionaries are copied in order:
* Element 0 ← bottommost dictionary (systemdict)
@@ -160,7 +159,7 @@ countdictstack array dictstack % Always correct size
=== See Also
-* xref:../countdictstack.adoc[`countdictstack`] - Get stack depth
-* xref:../begin.adoc[`begin`] - Push dictionary
-* xref:../end.adoc[`end`] - Pop dictionary
-* xref:../currentdict.adoc[`currentdict`] - Get current dictionary
\ No newline at end of file
+* link:/docs/commands/references/countdictstack/[`countdictstack`] - Get stack depth
+* link:/docs/commands/references/begin/[`begin`] - Push dictionary
+* link:/docs/commands/references/end/[`end`] - Pop dictionary
+* link:/docs/commands/references/currentdict/[`currentdict`] - Get current dictionary
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/div.adoc b/docs/commands/references/div.adoc
similarity index 91%
rename from docs/commands/arithmetic-math/div.adoc
rename to docs/commands/references/div.adoc
index 3a17c00..6fc9398 100644
--- a/docs/commands/arithmetic-math/div.adoc
+++ b/docs/commands/references/div.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: div
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
= div
@@ -11,7 +10,7 @@ Divides the first number by the second and returns a real number result.
== Description
-The `div` operator pops two numbers from the operand stack, divides num1 by num2, and pushes the result back onto the stack. The result is *always a real number*, even if both operands are integers. For integer division with truncation, use xref:../idiv.adoc[`idiv`] instead.
+The `div` operator pops two numbers from the operand stack, divides num1 by num2, and pushes the result back onto the stack. The result is *always a real number*, even if both operands are integers. For integer division with truncation, use link:/docs/commands/references/idiv/[`idiv`] instead.
This is a Level 1 operator, available in all PostScript implementations.
@@ -255,11 +254,11 @@ Both operands must be numeric (integer or real). The divisor (num2) must not be
== Related Commands
-* xref:../idiv.adoc[`idiv`] - Integer division (truncated result)
-* xref:../mod.adoc[`mod`] - Modulo (remainder of division)
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division (truncated result)
+* link:/docs/commands/references/mod/[`mod`] - Modulo (remainder of division)
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
== PostScript Level
@@ -335,5 +334,5 @@ totalItems 3 mod % How many items left over?
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/transformations/dtransform.adoc b/docs/commands/references/dtransform.adoc
similarity index 73%
rename from docs/commands/transformations/dtransform.adoc
rename to docs/commands/references/dtransform.adoc
index 3593185..3db504a 100644
--- a/docs/commands/transformations/dtransform.adoc
+++ b/docs/commands/references/dtransform.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: dtransform
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 15
---
@@ -45,11 +44,11 @@ dx dy matrix dtransform → dx' dy'
=== Description
-With no matrix operand, xref:../dtransform.adoc[`dtransform`] (delta transform) transforms the distance vector (dx, dy) by the CTM to produce the corresponding distance vector (dx', dy') in device space.
+With no matrix operand, link:/docs/commands/references/dtransform/[`dtransform`] (delta transform) transforms the distance vector (dx, dy) by the CTM to produce the corresponding distance vector (dx', dy') in device space.
-If the `matrix` operand is supplied, xref:../dtransform.adoc[`dtransform`] transforms the distance vector by `matrix` rather than by the CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/dtransform/[`dtransform`] transforms the distance vector by `matrix` rather than by the CTM.
-A delta transformation is similar to a normal transformation (xref:../transform.adoc[`transform`]), but the translation components (tx and ty) of the transformation matrix are not used. This makes distance vectors position-independent in both user space and device space.
+A delta transformation is similar to a normal transformation (link:/docs/commands/references/transform/[`transform`]), but the translation components (tx and ty) of the transformation matrix are not used. This makes distance vectors position-independent in both user space and device space.
This is useful for determining how distances map from user space to device space, such as for line widths, dash patterns, or measuring transformed lengths.
@@ -144,7 +143,7 @@ deviceWidth dup mul deviceHeight dup mul add sqrt
=== Common Pitfalls
-WARNING: *Position-Independent* - xref:../dtransform.adoc[`dtransform`] ignores translation. Use xref:../transform.adoc[`transform`] for points.
+WARNING: *Position-Independent* - link:/docs/commands/references/dtransform/[`dtransform`] ignores translation. Use link:/docs/commands/references/transform/[`transform`] for points.
[source,postscript]
----
@@ -214,9 +213,9 @@ TIP: *Direction Vectors* - Use for transforming directions without position:
* Translation components (tx, ty) are ignored
* Only the linear transformation part [a b c d] is used
-* Very fast operation (simpler than full xref:../transform.adoc[`transform`])
-* No risk of [`undefinedresult`] error (unlike xref:../itransform.adoc[`itransform`])
-* The inverse operation is xref:../idtransform.adoc[`idtransform`]
+* Very fast operation (simpler than full link:/docs/commands/references/transform/[`transform`])
+* No risk of [`undefinedresult`] error (unlike link:/docs/commands/references/itransform/[`itransform`])
+* The inverse operation is link:/docs/commands/references/idtransform/[`idtransform`]
=== Transformation Formula
@@ -244,19 +243,19 @@ dy' = 0×10 + 3×20 = 60
|===
| Operation | Use For | Example
-| xref:../transform.adoc[`transform`]
+| link:/docs/commands/references/transform/[`transform`]
| Absolute positions, points
| `100 100 moveto`
-| xref:../dtransform.adoc[`dtransform`]
+| link:/docs/commands/references/dtransform/[`dtransform`]
| Distances, vectors, offsets
| Line width, dash lengths
-| xref:../itransform.adoc[`itransform`]
+| link:/docs/commands/references/itransform/[`itransform`]
| Device to user positions
| Mouse coordinates
-| xref:../idtransform.adoc[`idtransform`]
+| link:/docs/commands/references/idtransform/[`idtransform`]
| Device to user distances
| Device pixel size
|===
@@ -311,15 +310,15 @@ dy' = 0×10 + 3×20 = 60
=== Performance Considerations
-* Faster than xref:../transform.adoc[`transform`] (no translation component)
+* Faster than link:/docs/commands/references/transform/[`transform`] (no translation component)
* Simple matrix multiplication
* Can be called frequently
* No memory allocation
=== See Also
-* xref:../idtransform.adoc[`idtransform`] - Inverse distance transformation
-* xref:../transform.adoc[`transform`] - Transform coordinates (includes translation)
-* xref:../itransform.adoc[`itransform`] - Inverse coordinate transformation
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
\ No newline at end of file
+* link:/docs/commands/references/idtransform/[`idtransform`] - Inverse distance transformation
+* link:/docs/commands/references/transform/[`transform`] - Transform coordinates (includes translation)
+* link:/docs/commands/references/itransform/[`itransform`] - Inverse coordinate transformation
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/dup.adoc b/docs/commands/references/dup.adoc
similarity index 85%
rename from docs/commands/stack-manipulation/dup.adoc
rename to docs/commands/references/dup.adoc
index fa57a99..cfdf3f3 100644
--- a/docs/commands/stack-manipulation/dup.adoc
+++ b/docs/commands/references/dup.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: dup
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
= dup
@@ -201,7 +200,7 @@ dup length array copy % True independent copy
0 99 put % Only one array modified
----
-TIP: Remember that `dup` creates a shallow copy. For composite objects (arrays, dictionaries, strings), use the xref:../copy.adoc[`copy`] operator when you need an independent copy of the value.
+TIP: Remember that `dup` creates a shallow copy. For composite objects (arrays, dictionaries, strings), use the link:/docs/commands/references/copy/[`copy`] operator when you need an independent copy of the value.
=== Dictionary Sharing
@@ -215,11 +214,11 @@ TIP: Remember that `dup` creates a shallow copy. For composite objects (arrays,
== Related Commands
-* xref:../exch.adoc[`exch`] - Exchange top two elements
-* xref:../copy.adoc[`copy`] - Copy multiple elements or create independent copies
-* xref:../index.adoc[`index`] - Duplicate nth element from top
-* xref:../roll.adoc[`roll`] - Rotate stack elements
-* xref:../pop.adoc[`pop`] - Remove top element
+* link:/docs/commands/references/exch/[`exch`] - Exchange top two elements
+* link:/docs/commands/references/copy/[`copy`] - Copy multiple elements or create independent copies
+* link:/docs/commands/[`index`] - Duplicate nth element from top
+* link:/docs/commands/references/roll/[`roll`] - Rotate stack elements
+* link:/docs/commands/references/pop/[`pop`] - Remove top element
== PostScript Level
@@ -258,7 +257,7 @@ For composite objects, `dup` only copies the reference, not the entire value, ma
1. **Use for calculations**: `dup` is essential when you need the same value multiple times in a calculation
2. **Understand object vs. value**: Remember that `dup` copies the object (reference), not the value for composite types
3. **Document stack effects**: Clearly document when procedures use `dup` to duplicate values
-4. **Consider copy for independence**: Use xref:../copy.adoc[`copy`] when you need an independent copy of a composite object
+4. **Consider copy for independence**: Use link:/docs/commands/references/copy/[`copy`] when you need an independent copy of a composite object
5. **Combine with conditionals**: The pattern `dup ... { ... } { ... } ifelse` is very common
=== Good Stack Management
@@ -285,7 +284,7 @@ For composite objects, `dup` only copies the reference, not the entire value, ma
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/basic/composite-objects.adoc[Composite Objects] - Understanding object vs. value copying
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/basic/composite-objects/[Composite Objects] - Understanding object vs. value copying
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/dictionary/end.adoc b/docs/commands/references/end.adoc
similarity index 70%
rename from docs/commands/dictionary/end.adoc
rename to docs/commands/references/end.adoc
index 953eabc..0ddf0ea 100644
--- a/docs/commands/dictionary/end.adoc
+++ b/docs/commands/references/end.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: end
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -38,9 +37,9 @@ Pops the current dictionary from the dictionary stack.
=== Description
-xref:../end.adoc[`end`] pops the current dictionary off the dictionary stack, making the dictionary below it the new current dictionary.
+link:/docs/commands/references/end/[`end`] pops the current dictionary off the dictionary stack, making the dictionary below it the new current dictionary.
-If xref:../end.adoc[`end`] attempts to pop the bottommost instance of `userdict`, it executes [`dictstackunderflow`] error. The permanent dictionaries (`systemdict`, `globaldict`, `userdict`) cannot be removed.
+If link:/docs/commands/references/end/[`end`] attempts to pop the bottommost instance of `userdict`, it executes [`dictstackunderflow`] error. The permanent dictionaries (`systemdict`, `globaldict`, `userdict`) cannot be removed.
=== PostScript Level
@@ -110,7 +109,7 @@ end
=== Common Pitfalls
-WARNING: *Unmatched end* - Executing xref:../end.adoc[`end`] without matching xref:../begin.adoc[`begin`] causes [`dictstackunderflow`].
+WARNING: *Unmatched end* - Executing link:/docs/commands/references/end/[`end`] without matching link:/docs/commands/references/begin/[`begin`] causes [`dictstackunderflow`].
[source,postscript]
----
@@ -166,7 +165,7 @@ end % Always match
=== See Also
-* xref:../begin.adoc[`begin`] - Push dictionary onto stack
-* xref:../currentdict.adoc[`currentdict`] - Get current dictionary
-* xref:../countdictstack.adoc[`countdictstack`] - Count stack depth
-* xref:../dictstack.adoc[`dictstack`] - Examine dictionary stack
\ No newline at end of file
+* link:/docs/commands/references/begin/[`begin`] - Push dictionary onto stack
+* link:/docs/commands/references/currentdict/[`currentdict`] - Get current dictionary
+* link:/docs/commands/references/countdictstack/[`countdictstack`] - Count stack depth
+* link:/docs/commands/references/dictstack/[`dictstack`] - Examine dictionary stack
\ No newline at end of file
diff --git a/docs/commands/painting/eoclip.adoc b/docs/commands/references/eoclip.adoc
similarity index 76%
rename from docs/commands/painting/eoclip.adoc
rename to docs/commands/references/eoclip.adoc
index 92dbdbd..b79a1e9 100644
--- a/docs/commands/painting/eoclip.adoc
+++ b/docs/commands/references/eoclip.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: eoclip
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -38,9 +37,9 @@ Intersects the current clipping path with the current path using the even-odd ru
=== Description
-xref:../eoclip.adoc[`eoclip`] intersects the inside of the current clipping path with the inside of the current path to produce a new, smaller current clipping path. The inside of the current path is determined by the even-odd rule, while the inside of the current clipping path is determined by whatever rule was used at the time that path was created.
+link:/docs/commands/references/eoclip/[`eoclip`] intersects the inside of the current clipping path with the inside of the current path to produce a new, smaller current clipping path. The inside of the current path is determined by the even-odd rule, while the inside of the current clipping path is determined by whatever rule was used at the time that path was created.
-Except for the choice of insideness rule, the behavior of xref:../eoclip.adoc[`eoclip`] is identical to that of xref:../clip.adoc[`clip`].
+Except for the choice of insideness rule, the behavior of link:/docs/commands/references/eoclip/[`eoclip`] is identical to that of link:/docs/commands/references/clip/[`clip`].
The even-odd rule determines whether a point is inside by counting path crossings: an odd number means inside, an even number means outside. This rule is particularly useful for creating clipping regions with holes.
@@ -210,7 +209,7 @@ grestore
=== Common Pitfalls
-WARNING: *Different Results from clip* - The even-odd rule produces different results than the non-zero winding number rule used by xref:../clip.adoc[`clip`].
+WARNING: *Different Results from clip* - The even-odd rule produces different results than the non-zero winding number rule used by link:/docs/commands/references/clip/[`clip`].
[source,postscript]
----
@@ -241,7 +240,7 @@ gsave
grestore
----
-WARNING: *Path Direction Irrelevant* - Unlike xref:../clip.adoc[`clip`], the direction paths are drawn doesn't matter with xref:../eoclip.adoc[`eoclip`].
+WARNING: *Path Direction Irrelevant* - Unlike link:/docs/commands/references/clip/[`clip`], the direction paths are drawn doesn't matter with link:/docs/commands/references/eoclip/[`eoclip`].
[source,postscript]
----
@@ -254,7 +253,7 @@ eoclip % Always creates hole regardless of direction
newpath
----
-WARNING: *Path Not Cleared* - Like xref:../clip.adoc[`clip`], xref:../eoclip.adoc[`eoclip`] does not clear the path.
+WARNING: *Path Not Cleared* - Like link:/docs/commands/references/clip/[`clip`], link:/docs/commands/references/eoclip/[`eoclip`] does not clear the path.
[source,postscript]
----
@@ -266,7 +265,7 @@ eoclip
newpath
----
-TIP: *Use for Predictable Holes* - xref:../eoclip.adoc[`eoclip`] is ideal for creating holes regardless of path direction:
+TIP: *Use for Predictable Holes* - link:/docs/commands/references/eoclip/[`eoclip`] is ideal for creating holes regardless of path direction:
[source,postscript]
----
@@ -304,7 +303,7 @@ grestore
=== Even-Odd Rule Details
-The even-odd rule for xref:../eoclip.adoc[`eoclip`]:
+The even-odd rule for link:/docs/commands/references/eoclip/[`eoclip`]:
. Draw a ray from the point in any direction
. Count the number of path segment crossings
@@ -365,12 +364,12 @@ newpath % Important!
gsave
newpath
% Border
- 0 0 200 200 xref:../path-construction/arc.adoc[`arc`] closepath
+ 0 0 200 200 link:/docs/commands/references/arc/[`arc`] closepath
% Holes (any direction works)
- 50 50 30 30 xref:../path-construction/arc.adoc[`arc`] closepath
- 150 50 30 30 xref:../path-construction/arc.adoc[`arc`] closepath
- 50 150 30 30 xref:../path-construction/arc.adoc[`arc`] closepath
- 150 150 30 30 xref:../path-construction/arc.adoc[`arc`] closepath
+ 50 50 30 30 link:/docs/commands/references/arc/[`arc`] closepath
+ 150 50 30 30 link:/docs/commands/references/arc/[`arc`] closepath
+ 50 150 30 30 link:/docs/commands/references/arc/[`arc`] closepath
+ 150 150 30 30 link:/docs/commands/references/arc/[`arc`] closepath
eoclip
newpath
@@ -382,14 +381,14 @@ grestore
=== Comparing Even-Odd vs Non-Zero Winding
-.Even-Odd Rule (xref:../eoclip.adoc[`eoclip`])
+.Even-Odd Rule (link:/docs/commands/references/eoclip/[`eoclip`])
* Counts crossings: odd = inside, even = outside
* Path direction doesn't matter
* Simple to understand and predict
* Natural for regions with holes
* Alternating pattern for overlapping paths
-.Non-Zero Winding Rule (xref:../clip.adoc[`clip`])
+.Non-Zero Winding Rule (link:/docs/commands/references/clip/[`clip`])
* Counts direction of crossings
* Path direction matters
* More complex but more flexible
@@ -463,12 +462,12 @@ grestore
=== See Also
-* xref:../clip.adoc[`clip`] - Clip using non-zero winding rule
-* xref:../clippath.adoc[`clippath`] - Get current clipping path
-* xref:../eofill.adoc[`eofill`] - Fill using even-odd rule
+* link:/docs/commands/references/clip/[`clip`] - Clip using non-zero winding rule
+* link:/docs/commands/references/clippath/[`clippath`] - Get current clipping path
+* link:/docs/commands/references/eofill/[`eofill`] - Fill using even-odd rule
* `rectclip` - Clip to rectangles (Level 2)
* `initclip` - Reset to device default
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../path-construction/closepath.adoc[`closepath`] - Close current subpath
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
\ No newline at end of file
diff --git a/docs/commands/painting/eofill.adoc b/docs/commands/references/eofill.adoc
similarity index 76%
rename from docs/commands/painting/eofill.adoc
rename to docs/commands/references/eofill.adoc
index 993ae19..529bc06 100644
--- a/docs/commands/painting/eofill.adoc
+++ b/docs/commands/references/eofill.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: eofill
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -38,11 +37,11 @@ Paints the area enclosed by the current path using the even-odd rule.
=== Description
-xref:../eofill.adoc[`eofill`] paints the inside of the current path with the current color, using the even-odd rule to determine what points are inside. Except for the choice of insideness rule, the behavior of xref:../eofill.adoc[`eofill`] is identical to that of xref:../fill.adoc[`fill`].
+link:/docs/commands/references/eofill/[`eofill`] paints the inside of the current path with the current color, using the even-odd rule to determine what points are inside. Except for the choice of insideness rule, the behavior of link:/docs/commands/references/eofill/[`eofill`] is identical to that of link:/docs/commands/references/fill/[`fill`].
The even-odd rule determines whether a point is inside a path by drawing a ray from that point in any direction and counting the number of path segments that the ray crosses. If this number is odd, the point is inside; if even, the point is outside. This rule is useful for creating shapes with holes.
-Like xref:../fill.adoc[`fill`], xref:../eofill.adoc[`eofill`] implicitly closes any open subpaths before painting and performs a xref:../path-construction/newpath.adoc[`newpath`] after completion.
+Like link:/docs/commands/references/fill/[`fill`], link:/docs/commands/references/eofill/[`eofill`] implicitly closes any open subpaths before painting and performs a link:/docs/commands/references/newpath/[`newpath`] after completion.
=== PostScript Level
@@ -148,7 +147,7 @@ eofill % Counter (hole) in 'O' is preserved
=== Common Pitfalls
-WARNING: *Different Results from fill* - The even-odd rule produces different results than the non-zero winding number rule used by xref:../fill.adoc[`fill`].
+WARNING: *Different Results from fill* - The even-odd rule produces different results than the non-zero winding number rule used by link:/docs/commands/references/fill/[`fill`].
[source,postscript]
----
@@ -171,7 +170,7 @@ grestore
eofill % Even-odd: inner rectangle is a hole
----
-WARNING: *Path Direction Irrelevant* - Unlike xref:../fill.adoc[`fill`], the direction paths are drawn doesn't matter with xref:../eofill.adoc[`eofill`].
+WARNING: *Path Direction Irrelevant* - Unlike link:/docs/commands/references/fill/[`fill`], the direction paths are drawn doesn't matter with link:/docs/commands/references/eofill/[`eofill`].
[source,postscript]
----
@@ -193,7 +192,7 @@ closepath
eofill % Same result regardless of direction
----
-TIP: *Use for Shapes with Holes* - xref:../eofill.adoc[`eofill`] is ideal for shapes with holes, regardless of path direction:
+TIP: *Use for Shapes with Holes* - link:/docs/commands/references/eofill/[`eofill`] is ideal for shapes with holes, regardless of path direction:
[source,postscript]
----
@@ -226,14 +225,14 @@ eofill % Creates ring pattern
=== Comparing Even-Odd vs Non-Zero Winding
-.Even-Odd Rule (xref:../eofill.adoc[`eofill`])
+.Even-Odd Rule (link:/docs/commands/references/eofill/[`eofill`])
* Counts crossings: odd = inside, even = outside
* Path direction doesn't matter
* Simple to understand and predict
* Natural for shapes with holes
* Alternating fill pattern for overlapping paths
-.Non-Zero Winding Rule (xref:../fill.adoc[`fill`])
+.Non-Zero Winding Rule (link:/docs/commands/references/fill/[`fill`])
* Counts direction of crossings
* Path direction matters
* More complex but more flexible
@@ -308,9 +307,9 @@ stroke % Then stroke the path
=== See Also
-* xref:../fill.adoc[`fill`] - Fill using non-zero winding rule
-* xref:../eoclip.adoc[`eoclip`] - Clip using even-odd rule
-* xref:../ueofill.adoc[`ueofill`] - Even-odd fill user path (Level 2)
-* xref:../stroke.adoc[`stroke`] - Paint path outline
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../path-construction/closepath.adoc[`closepath`] - Close current subpath
\ No newline at end of file
+* link:/docs/commands/references/fill/[`fill`] - Fill using non-zero winding rule
+* link:/docs/commands/references/eoclip/[`eoclip`] - Clip using even-odd rule
+* link:/docs/commands/references/ueofill/[`ueofill`] - Even-odd fill user path (Level 2)
+* link:/docs/commands/references/stroke/[`stroke`] - Paint path outline
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/exch.adoc b/docs/commands/references/exch.adoc
similarity index 88%
rename from docs/commands/stack-manipulation/exch.adoc
rename to docs/commands/references/exch.adoc
index 865e74d..0b10e54 100644
--- a/docs/commands/stack-manipulation/exch.adoc
+++ b/docs/commands/references/exch.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: exch
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
= exch
@@ -186,11 +185,11 @@ add % ERROR: typecheck (can't add string and number)
== Related Commands
-* xref:../dup.adoc[`dup`] - Duplicate top element before exchanging
-* xref:../roll.adoc[`roll`] - General stack rotation for multiple elements
-* xref:../index.adoc[`index`] - Access elements deeper in the stack
-* xref:../pop.adoc[`pop`] - Remove top element
-* xref:../copy.adoc[`copy`] - Copy multiple stack elements
+* link:/docs/commands/references/dup/[`dup`] - Duplicate top element before exchanging
+* link:/docs/commands/references/roll/[`roll`] - General stack rotation for multiple elements
+* link:/docs/commands/[`index`] - Access elements deeper in the stack
+* link:/docs/commands/references/pop/[`pop`] - Remove top element
+* link:/docs/commands/references/copy/[`copy`] - Copy multiple stack elements
== PostScript Level
@@ -237,6 +236,6 @@ The `exch` operator is extremely fast and has negligible performance impact. It'
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/control-flow/exec.adoc b/docs/commands/references/exec.adoc
similarity index 81%
rename from docs/commands/control-flow/exec.adoc
rename to docs/commands/references/exec.adoc
index 41f335f..40dc45b 100644
--- a/docs/commands/control-flow/exec.adoc
+++ b/docs/commands/references/exec.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: exec
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -38,7 +37,7 @@ any exec → –
=== Description
-xref:../exec.adoc[`exec`] pushes the operand on the execution stack, executing it immediately.
+link:/docs/commands/references/exec/[`exec`] pushes the operand on the execution stack, executing it immediately.
The effect depends on the object's type and literal/executable attribute:
@@ -133,7 +132,7 @@ WARNING: *Security Risk* - Executing arbitrary strings can be dangerous.
userInput cvx exec % Dangerous if userInput malicious!
----
-TIP: *Check Executable Attribute* - Use xref:../array-string/xcheck.adoc[`xcheck`] to verify before execution.
+TIP: *Check Executable Attribute* - Use link:/docs/commands/references/xcheck/[`xcheck`] to verify before execution.
=== Error Conditions
@@ -192,8 +191,8 @@ TIP: *Check Executable Attribute* - Use xref:../array-string/xcheck.adoc[`xcheck
=== See Also
-* xref:../array-string/cvx.adoc[`cvx`] - Convert to executable
-* xref:../array-string/cvlit.adoc[`cvlit`] - Convert to literal
-* xref:../array-string/xcheck.adoc[`xcheck`] - Check if executable
-* xref:../stopped.adoc[`stopped`] - Execute with error catching
-* xref:../if.adoc[`if`] / xref:../ifelse.adoc[`ifelse`] - Conditional execution
\ No newline at end of file
+* link:/docs/commands/references/cvx/[`cvx`] - Convert to executable
+* link:/docs/commands/references/cvlit/[`cvlit`] - Convert to literal
+* link:/docs/commands/references/xcheck/[`xcheck`] - Check if executable
+* link:/docs/commands/references/stopped/[`stopped`] - Execute with error catching
+* link:/docs/commands/references/if/[`if`] / link:/docs/commands/references/ifelse/[`ifelse`] - Conditional execution
\ No newline at end of file
diff --git a/docs/commands/control-flow/exit.adoc b/docs/commands/references/exit.adoc
similarity index 70%
rename from docs/commands/control-flow/exit.adoc
rename to docs/commands/references/exit.adoc
index 576ae84..1a81deb 100644
--- a/docs/commands/control-flow/exit.adoc
+++ b/docs/commands/references/exit.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: exit
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -29,17 +28,17 @@ Terminates the innermost enclosing loop.
=== Description
-xref:../exit.adoc[`exit`] terminates execution of the innermost, dynamically enclosing looping context, regardless of lexical relationship.
+link:/docs/commands/references/exit/[`exit`] terminates execution of the innermost, dynamically enclosing looping context, regardless of lexical relationship.
Valid looping contexts created by:
-* xref:../for.adoc[`for`]
-* xref:../repeat.adoc[`repeat`]
-* xref:../loop.adoc[`loop`]
-* xref:../../array-string/forall.adoc[`forall`]
+* link:/docs/commands/references/for/[`for`]
+* link:/docs/commands/references/repeat/[`repeat`]
+* link:/docs/commands/references/loop/[`loop`]
+* link:/docs/commands/references/../array-string/forall/[`forall`]
* `pathforall`, `kshow`, `cshow`, `filenameforall`, `resourceforall`
-xref:../exit.adoc[`exit`] pops the execution stack to the level of the loop operator, then resumes execution at the next object after that operator.
+link:/docs/commands/references/exit/[`exit`] pops the execution stack to the level of the loop operator, then resumes execution at the next object after that operator.
=== PostScript Level
@@ -134,7 +133,7 @@ xref:../exit.adoc[`exit`] pops the execution stack to the level of the loop oper
=== Common Pitfalls
-WARNING: *Must Be in Loop* - xref:../exit.adoc[`exit`] only works within a looping context.
+WARNING: *Must Be in Loop* - link:/docs/commands/references/exit/[`exit`] only works within a looping context.
[source,postscript]
----
@@ -180,8 +179,8 @@ TIP: *Use Flag for Outer Loop Exit* - Set a flag variable to exit multiple level
=== See Also
-* xref:../for.adoc[`for`] - Numeric loop
-* xref:../repeat.adoc[`repeat`] - Fixed repetition
-* xref:../loop.adoc[`loop`] - Indefinite loop
-* xref:../stop.adoc[`stop`] - Exit stopped context
-* xref:../array-string/forall.adoc[`forall`] - Collection iteration
\ No newline at end of file
+* link:/docs/commands/references/for/[`for`] - Numeric loop
+* link:/docs/commands/references/repeat/[`repeat`] - Fixed repetition
+* link:/docs/commands/references/loop/[`loop`] - Indefinite loop
+* link:/docs/commands/references/stop/[`stop`] - Exit stopped context
+* link:/docs/commands/references/forall/[`forall`] - Collection iteration
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/exp.adoc b/docs/commands/references/exp.adoc
similarity index 85%
rename from docs/commands/arithmetic-math/exp.adoc
rename to docs/commands/references/exp.adoc
index b44fa46..ba7616b 100644
--- a/docs/commands/arithmetic-math/exp.adoc
+++ b/docs/commands/references/exp.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: exp
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 14
---
= exp
@@ -88,10 +87,10 @@ base exponent exp real
== Related Commands
-* xref:../sqrt.adoc[`sqrt`] - Square root
-* xref:../ln.adoc[`ln`] - Natural logarithm
-* xref:../log.adoc[`log`] - Base-10 logarithm
-* xref:../mul.adoc[`mul`] - Multiplication
+* link:/docs/commands/references/sqrt/[`sqrt`] - Square root
+* link:/docs/commands/references/ln/[`ln`] - Natural logarithm
+* link:/docs/commands/references/log/[`log`] - Base-10 logarithm
+* link:/docs/commands/references/mul/[`mul`] - Multiplication
== PostScript Level
@@ -115,4 +114,4 @@ Negative base with fractional exponent, or result out of range.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/painting/fill.adoc b/docs/commands/references/fill.adoc
similarity index 70%
rename from docs/commands/painting/fill.adoc
rename to docs/commands/references/fill.adoc
index 678d0b3..d603e6c 100644
--- a/docs/commands/painting/fill.adoc
+++ b/docs/commands/references/fill.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: fill
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -38,11 +37,11 @@ Paints the area enclosed by the current path with the current color.
=== Description
-xref:../fill.adoc[`fill`] paints the area enclosed by the current path with the current color. Any previous contents of that area on the current page are obscured, so areas may be erased by filling with color set to white.
+link:/docs/commands/references/fill/[`fill`] paints the area enclosed by the current path with the current color. Any previous contents of that area on the current page are obscured, so areas may be erased by filling with color set to white.
-Before painting, xref:../fill.adoc[`fill`] implicitly closes any open subpaths of the current path. The inside of the current path is determined by the normal non-zero winding number rule.
+Before painting, link:/docs/commands/references/fill/[`fill`] implicitly closes any open subpaths of the current path. The inside of the current path is determined by the normal non-zero winding number rule.
-xref:../fill.adoc[`fill`] implicitly performs a xref:../path-construction/newpath.adoc[`newpath`] after it has finished filling the current path. To preserve the current path across a fill operation, use the sequence:
+link:/docs/commands/references/fill/[`fill`] implicitly performs a link:/docs/commands/references/newpath/[`newpath`] after it has finished filling the current path. To preserve the current path across a fill operation, use the sequence:
[source,postscript]
----
@@ -173,7 +172,7 @@ fill % Both rectangles filled (non-zero winding rule)
=== Common Pitfalls
-WARNING: *Path Consumed After Fill* - xref:../fill.adoc[`fill`] clears the current path after execution. Use xref:../graphics-state/gsave.adoc[`gsave`] and xref:../graphics-state/grestore.adoc[`grestore`] to preserve it.
+WARNING: *Path Consumed After Fill* - link:/docs/commands/references/fill/[`fill`] clears the current path after execution. Use link:/docs/commands/references/gsave/[`gsave`] and link:/docs/commands/references/grestore/[`grestore`] to preserve it.
[source,postscript]
----
@@ -224,7 +223,7 @@ stroke
=== Implementation Notes
-* xref:../fill.adoc[`fill`] uses the non-zero winding number rule to determine which areas are inside the path
+* link:/docs/commands/references/fill/[`fill`] uses the non-zero winding number rule to determine which areas are inside the path
* Overlapping subpaths may create holes or fills depending on their direction
* The current color and color space determine the fill color
* Clipping is applied after the fill area is determined
@@ -232,14 +231,14 @@ stroke
=== Interaction with Graphics State
-xref:../fill.adoc[`fill`] is affected by:
+link:/docs/commands/references/fill/[`fill`] is affected by:
* Current color and color space
* Current clipping path
* Current transformation matrix (CTM)
* Flatness parameter (for curved paths)
-xref:../fill.adoc[`fill`] does not affect:
+link:/docs/commands/references/fill/[`fill`] does not affect:
* Line width or line parameters
* Current point (path is cleared)
@@ -307,11 +306,11 @@ fill
=== See Also
-* xref:../eofill.adoc[`eofill`] - Fill using even-odd rule
-* xref:../stroke.adoc[`stroke`] - Paint path outline
-* xref:../clip.adoc[`clip`] - Clip to path interior
-* xref:../ufill.adoc[`ufill`] - Fill user path (Level 2)
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../path-construction/closepath.adoc[`closepath`] - Close current subpath
-* xref:../graphics-state/setgray.adoc[`setgray`] - Set gray color
-* xref:../graphics-state/setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
\ No newline at end of file
+* link:/docs/commands/references/eofill/[`eofill`] - Fill using even-odd rule
+* link:/docs/commands/references/stroke/[`stroke`] - Paint path outline
+* link:/docs/commands/references/clip/[`clip`] - Clip to path interior
+* link:/docs/commands/references/ufill/[`ufill`] - Fill user path (Level 2)
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
+* link:/docs/commands/references/setgray/[`setgray`] - Set gray color
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
\ No newline at end of file
diff --git a/docs/commands/references/findfont.adoc b/docs/commands/references/findfont.adoc
new file mode 100644
index 0000000..3dc6b4a
--- /dev/null
+++ b/docs/commands/references/findfont.adoc
@@ -0,0 +1,114 @@
+---
+layout: default
+title: findfont
+parent: Command Reference
+nav_order: 1
+---
+
+== findfont
+
+Obtain font dictionary by name.
+
+=== Syntax
+
+```
+key findfont font
+```
+
+=== Stack Effects
+
+**Before:**
+```
+key
+```
+
+**After:**
+```
+font
+```
+
+=== Description
+
+link:/docs/commands/references/findfont/[`findfont`] obtains a font dictionary identified by the specified `key` and pushes it on the operand stack. The `key` may be a key previously passed to link:/docs/commands/references/definefont/[`definefont`], in which case the font dictionary associated with `key` (in the font directory) is returned.
+
+If `key` is not registered as a font in VM, link:/docs/commands/references/findfont/[`findfont`] takes an action that varies according to the environment in which the PostScript interpreter is operating. In some environments, link:/docs/commands/references/findfont/[`findfont`] may attempt to read a font definition from an external source, such as a file. In other environments, link:/docs/commands/references/findfont/[`findfont`] substitutes a default font or executes the error `invalidfont`.
+
+link:/docs/commands/references/findfont/[`findfont`] is a special case of `findresource` applied to the Font category.
+
+link:/docs/commands/references/findfont/[`findfont`], like `findresource`, normally looks first for fonts defined in local VM, then for fonts defined in global VM. However, if the current VM allocation mode is global, link:/docs/commands/references/findfont/[`findfont`] considers only fonts defined in global VM. If link:/docs/commands/references/findfont/[`findfont`] needs to load a font into VM, it may use either local or global VM, depending on the font. Generally, Type 1 fonts are loaded into global VM; fonts of other types are loaded into local VM.
+
+link:/docs/commands/references/findfont/[`findfont`] is not an operator, but rather a built-in procedure. It may be redefined by a PostScript language program that requires different strategies for finding fonts.
+
+=== Parameters
+
+**key** (`name` or `string`)
+: The name of the font to find (e.g., `/Helvetica`, `/Times-Roman`)
+
+=== Returns
+
+**font** (`dictionary`)
+: The font dictionary associated with the specified key
+
+=== Examples
+
+==== Basic Font Loading
+
+```postscript
+/Helvetica findfont
+% Returns the Helvetica font dictionary
+```
+
+==== Loading and Using a Font
+
+```postscript
+/Times-Roman findfont % Get Times-Roman font
+12 scalefont % Scale to 12 points
+setfont % Set as current font
+```
+
+==== Font with Fallback
+
+```postscript
+{
+ /MyCustomFont findfont
+} stopped {
+ pop % Remove error
+ /Helvetica findfont % Use fallback font
+} if
+```
+
+=== Errors
+
+**invalidfont**
+: If the font name is not valid or the font dictionary is malformed
+
+**stackunderflow**
+: If the operand stack is empty
+
+**typecheck**
+: If `key` is not a name or string
+
+=== Font Discovery
+
+The font discovery mechanism varies by implementation:
+
+1. **Local VM fonts** - Defined by link:/docs/commands/references/definefont/[`definefont`] in local VM
+2. **Global VM fonts** - Defined by link:/docs/commands/references/definefont/[`definefont`] in global VM
+3. **External fonts** - Loaded from font files or other external sources
+4. **Substitution fonts** - Default fonts substituted when requested font not found
+
+=== VM Allocation
+
+When loading fonts from external sources:
+
+- **Type 1 fonts** are typically loaded into global VM
+- **Other font types** are typically loaded into local VM
+- The current VM allocation mode affects which fonts are visible
+
+=== See Also
+
+- link:/docs/commands/references/scalefont/[`scalefont`] - Scale font by uniform factor
+- link:/docs/commands/references/makefont/[`makefont`] - Transform font by matrix
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
+- link:/docs/commands/references/definefont/[`definefont`] - Register font in font directory
+- link:/docs/commands/references/currentfont/[`currentfont`] - Get current font dictionary
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/floor.adoc b/docs/commands/references/floor.adoc
similarity index 93%
rename from docs/commands/arithmetic-math/floor.adoc
rename to docs/commands/references/floor.adoc
index 975b8c7..fac2ed1 100644
--- a/docs/commands/arithmetic-math/floor.adoc
+++ b/docs/commands/references/floor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: floor
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
= floor
@@ -246,10 +245,10 @@ The operand must be numeric (integer or real). Other types will cause a `typeche
== Related Commands
-* xref:../ceiling.adoc[`ceiling`] - Round up to integer
-* xref:../round.adoc[`round`] - Round to nearest integer
-* xref:../truncate.adoc[`truncate`] - Truncate toward zero
-* xref:../div.adoc[`div`] - Division (returns real)
+* link:/docs/commands/references/ceiling/[`ceiling`] - Round up to integer
+* link:/docs/commands/references/round/[`round`] - Round to nearest integer
+* link:/docs/commands/references/truncate/[`truncate`] - Truncate toward zero
+* link:/docs/commands/references/div/[`div`] - Division (returns real)
== PostScript Level
@@ -332,5 +331,5 @@ The `floor` operator is fast:
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/control-flow/for.adoc b/docs/commands/references/for.adoc
similarity index 80%
rename from docs/commands/control-flow/for.adoc
rename to docs/commands/references/for.adoc
index d2b1ddc..bec043c 100644
--- a/docs/commands/control-flow/for.adoc
+++ b/docs/commands/references/for.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: for
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -47,7 +46,7 @@ initial increment limit proc for → –
=== Description
-xref:../for.adoc[`for`] executes _proc_ repeatedly, passing it a sequence of values from _initial_ by steps of _increment_ to _limit_.
+link:/docs/commands/references/for/[`for`] executes _proc_ repeatedly, passing it a sequence of values from _initial_ by steps of _increment_ to _limit_.
The operator maintains an internal control variable:
1. Sets control variable to _initial_
@@ -162,7 +161,7 @@ WARNING: *Increment Sign Matters* - Positive increment counts up, negative count
5 -1 1 { } for % Executes: 5, 4, 3, 2, 1
----
-TIP: *Early Exit* - Use xref:../exit.adoc[`exit`] to terminate loop early.
+TIP: *Early Exit* - Use link:/docs/commands/references/exit/[`exit`] to terminate loop early.
=== Error Conditions
@@ -193,19 +192,19 @@ TIP: *Early Exit* - Use xref:../exit.adoc[`exit`] to terminate loop early.
|===
| Loop | Best For | Control Variable
-| xref:../for.adoc[`for`]
+| link:/docs/commands/references/for/[`for`]
| Numeric sequences
| Yes
-| xref:../repeat.adoc[`repeat`]
+| link:/docs/commands/references/repeat/[`repeat`]
| Fixed count, no variable needed
| No
-| xref:../loop.adoc[`loop`]
+| link:/docs/commands/references/loop/[`loop`]
| Indefinite/conditional termination
| No
-| xref:../array-string/forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Collection iteration
| Yes (element)
|===
@@ -228,8 +227,8 @@ TIP: *Early Exit* - Use xref:../exit.adoc[`exit`] to terminate loop early.
=== See Also
-* xref:../repeat.adoc[`repeat`] - Fixed repetition
-* xref:../loop.adoc[`loop`] - Indefinite loop
-* xref:../exit.adoc[`exit`] - Exit loop early
-* xref:../array-string/forall.adoc[`forall`] - Iterate collections
-* xref:../if.adoc[`if`] / xref:../ifelse.adoc[`ifelse`] - Conditionals
\ No newline at end of file
+* link:/docs/commands/references/repeat/[`repeat`] - Fixed repetition
+* link:/docs/commands/references/loop/[`loop`] - Indefinite loop
+* link:/docs/commands/references/exit/[`exit`] - Exit loop early
+* link:/docs/commands/references/forall/[`forall`] - Iterate collections
+* link:/docs/commands/references/if/[`if`] / link:/docs/commands/references/ifelse/[`ifelse`] - Conditionals
\ No newline at end of file
diff --git a/docs/commands/array-string/forall.adoc b/docs/commands/references/forall.adoc
similarity index 84%
rename from docs/commands/array-string/forall.adoc
rename to docs/commands/references/forall.adoc
index f7464d4..6fd5edd 100644
--- a/docs/commands/array-string/forall.adoc
+++ b/docs/commands/references/forall.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: forall
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -44,7 +43,7 @@ string proc forall → –
=== Description
-xref:../forall.adoc[`forall`] enumerates elements of the first operand, executing _proc_ for each:
+link:/docs/commands/references/forall/[`forall`] enumerates elements of the first operand, executing _proc_ for each:
* **Arrays/packed arrays**: Pushes each element and executes _proc_
* **Strings**: Pushes each character code (0-255) and executes _proc_
@@ -52,7 +51,7 @@ xref:../forall.adoc[`forall`] enumerates elements of the first operand, executin
For arrays and strings, elements are processed in index order (0 to n-1). For dictionaries, the order is arbitrary.
-If the composite object is empty (length 0), xref:../forall.adoc[`forall`] does not execute _proc_ at all.
+If the composite object is empty (length 0), link:/docs/commands/references/forall/[`forall`] does not execute _proc_ at all.
=== PostScript Level
@@ -145,7 +144,7 @@ WARNING: *Dictionary Order is Arbitrary* - Dictionaries enumerate in unpredictab
mydict { } forall % Order not guaranteed
----
-WARNING: *Modifying During Iteration* - Adding/removing dictionary entries during xref:../forall.adoc[`forall`] may or may not affect iteration.
+WARNING: *Modifying During Iteration* - Adding/removing dictionary entries during link:/docs/commands/references/forall/[`forall`] may or may not affect iteration.
TIP: *Use exit for Early Termination* - Execute [`exit`] within _proc_ to stop iteration.
@@ -202,11 +201,11 @@ TIP: *Use exit for Early Termination* - Execute [`exit`] within _proc_ to stop i
} for
----
-xref:../forall.adoc[`forall`] is simpler and more efficient.
+link:/docs/commands/references/forall/[`forall`] is simpler and more efficient.
=== See Also
-* xref:../aload.adoc[`aload`] - Load all elements onto stack
-* xref:../get.adoc[`get`] - Get single element
-* xref:../length.adoc[`length`] - Get number of elements
+* link:/docs/commands/references/aload/[`aload`] - Load all elements onto stack
+* link:/docs/commands/references/get/[`get`] - Get single element
+* link:/docs/commands/references/length/[`length`] - Get number of elements
* Control Flow: `for`, `repeat`, `loop` - Other iteration constructs
\ No newline at end of file
diff --git a/docs/commands/array-string/get.adoc b/docs/commands/references/get.adoc
similarity index 78%
rename from docs/commands/array-string/get.adoc
rename to docs/commands/references/get.adoc
index 49fe3f7..f4878e4 100644
--- a/docs/commands/array-string/get.adoc
+++ b/docs/commands/references/get.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: get
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -65,7 +64,7 @@ string index get → int
=== Description
-xref:../get.adoc[`get`] retrieves a single element from a composite object:
+link:/docs/commands/references/get/[`get`] retrieves a single element from a composite object:
* For arrays and packed arrays: returns the element at the specified index
* For strings: returns the integer character code (0-255) at the specified index
@@ -135,7 +134,7 @@ configdict /PageSize get % Get page size setting
=== Common Pitfalls
-WARNING: *String Returns Integer* - xref:../get.adoc[`get`] on a string returns an integer (character code), not a one-character string.
+WARNING: *String Returns Integer* - link:/docs/commands/references/get/[`get`] on a string returns an integer (character code), not a one-character string.
[source,postscript]
----
@@ -156,7 +155,7 @@ WARNING: *Dictionary Key Not Found* - If the key doesn't exist in a dictionary,
5 dict /nokey get % Error: key not in dictionary
----
-TIP: *Use known/where First* - For dictionaries, use `where` or `known` to check if a key exists before using xref:../get.adoc[`get`].
+TIP: *Use known/where First* - For dictionaries, use `where` or `known` to check if a key exists before using link:/docs/commands/references/get/[`get`].
=== Error Conditions
@@ -192,12 +191,12 @@ TIP: *Use known/where First* - For dictionaries, use `where` or `known` to check
* Direct array indexing is very fast
* String character access is equally fast
* Dictionary lookup slightly slower but still efficient
-* For sequential access, xref:../forall.adoc[`forall`] may be more efficient than repeated xref:../get.adoc[`get`] calls
+* For sequential access, link:/docs/commands/references/forall/[`forall`] may be more efficient than repeated link:/docs/commands/references/get/[`get`] calls
=== See Also
-* xref:../put.adoc[`put`] - Store value in array/string/dictionary
-* xref:../getinterval.adoc[`getinterval`] - Get subarray or substring
-* xref:../length.adoc[`length`] - Get length of array/string
-* xref:../aload.adoc[`aload`] - Load all array elements
-* xref:../forall.adoc[`forall`] - Iterate over elements
\ No newline at end of file
+* link:/docs/commands/references/put/[`put`] - Store value in array/string/dictionary
+* link:/docs/commands/references/getinterval/[`getinterval`] - Get subarray or substring
+* link:/docs/commands/references/length/[`length`] - Get length of array/string
+* link:/docs/commands/references/aload/[`aload`] - Load all array elements
+* link:/docs/commands/references/forall/[`forall`] - Iterate over elements
\ No newline at end of file
diff --git a/docs/commands/array-string/getinterval.adoc b/docs/commands/references/getinterval.adoc
similarity index 85%
rename from docs/commands/array-string/getinterval.adoc
rename to docs/commands/references/getinterval.adoc
index 2cfd5ec..21a739b 100644
--- a/docs/commands/array-string/getinterval.adoc
+++ b/docs/commands/references/getinterval.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: getinterval
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -46,7 +45,7 @@ string index count getinterval → substring
=== Description
-xref:../getinterval.adoc[`getinterval`] creates a new array, packed array, or string object whose value consists of _count_ elements starting at position _index_ in the original object.
+link:/docs/commands/references/getinterval/[`getinterval`] creates a new array, packed array, or string object whose value consists of _count_ elements starting at position _index_ in the original object.
The elements in the subsequence are **shared** between the original and new objects - modifying one affects the other.
@@ -170,7 +169,7 @@ TIP: *Empty Intervals* - _count_ can be 0, which returns an empty array/string.
=== See Also
-* xref:../putinterval.adoc[`putinterval`] - Insert array/string into another
-* xref:../get.adoc[`get`] - Get single element
-* xref:../length.adoc[`length`] - Get length
-* xref:../aload.adoc[`aload`] - Load all elements onto stack
\ No newline at end of file
+* link:/docs/commands/references/putinterval/[`putinterval`] - Insert array/string into another
+* link:/docs/commands/references/get/[`get`] - Get single element
+* link:/docs/commands/references/length/[`length`] - Get length
+* link:/docs/commands/references/aload/[`aload`] - Load all elements onto stack
\ No newline at end of file
diff --git a/docs/commands/graphics-state/grestore.adoc b/docs/commands/references/grestore.adoc
similarity index 63%
rename from docs/commands/graphics-state/grestore.adoc
rename to docs/commands/references/grestore.adoc
index 3cbc22b..7d2e3ac 100644
--- a/docs/commands/graphics-state/grestore.adoc
+++ b/docs/commands/references/grestore.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: grestore
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -29,9 +28,9 @@ Restores the graphics state from the top of the graphics state stack.
=== Description
-xref:../grestore.adoc[`grestore`] resets the current graphics state from the one on top of the graphics state stack and pops that stack.
+link:/docs/commands/references/grestore/[`grestore`] resets the current graphics state from the one on top of the graphics state stack and pops that stack.
-If there is no matching xref:../gsave.adoc[`gsave`], or if the most recent xref:../gsave.adoc[`gsave`] preceded the most recent unmatched `save`, xref:../grestore.adoc[`grestore`] does not pop the stack, but still restores the state from the top.
+If there is no matching link:/docs/commands/references/gsave/[`gsave`], or if the most recent link:/docs/commands/references/gsave/[`gsave`] preceded the most recent unmatched `save`, link:/docs/commands/references/grestore/[`grestore`] does not pop the stack, but still restores the state from the top.
=== PostScript Level
@@ -110,7 +109,7 @@ grestore
=== Common Pitfalls
-WARNING: *Must Have Matching gsave* - Unmatched xref:../grestore.adoc[`grestore`] doesn't error but doesn't pop stack.
+WARNING: *Must Have Matching gsave* - Unmatched link:/docs/commands/references/grestore/[`grestore`] doesn't error but doesn't pop stack.
[source,postscript]
----
@@ -118,7 +117,7 @@ grestore % No matching gsave
% State restored from top but stack not popped
----
-WARNING: *save Intervenes* - xref:../grestore.adoc[`grestore`] after `save` doesn't pop stack.
+WARNING: *save Intervenes* - link:/docs/commands/references/grestore/[`grestore`] after `save` doesn't pop stack.
[source,postscript]
----
@@ -128,7 +127,7 @@ grestore % Doesn't pop due to save
restore % Pops graphics state stack
----
-TIP: *Always Pair with gsave* - Use xref:../gsave.adoc[`gsave`]/xref:../grestore.adoc[`grestore`] pairs consistently.
+TIP: *Always Pair with gsave* - Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] pairs consistently.
=== Error Conditions
@@ -149,7 +148,7 @@ TIP: *Always Pair with gsave* - Use xref:../gsave.adoc[`gsave`]/xref:../grestore
=== What Gets Restored
-All parameters saved by xref:../gsave.adoc[`gsave`]:
+All parameters saved by link:/docs/commands/references/gsave/[`gsave`]:
* CTM, path, current point
* Clipping path
* Color space and color
@@ -159,7 +158,7 @@ All parameters saved by xref:../gsave.adoc[`gsave`]:
=== See Also
-* xref:../gsave.adoc[`gsave`] - Save graphics state
-* xref:../grestoreall.adoc[`grestoreall`] - Restore all levels
-* xref:../setgstate.adoc[`setgstate`] - Set from gstate object
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestoreall/[`grestoreall`] - Restore all levels
+* link:/docs/commands/references/setgstate/[`setgstate`] - Set from gstate object
* `save`, `restore` - VM and graphics state
\ No newline at end of file
diff --git a/docs/commands/graphics-state/grestoreall.adoc b/docs/commands/references/grestoreall.adoc
similarity index 65%
rename from docs/commands/graphics-state/grestoreall.adoc
rename to docs/commands/references/grestoreall.adoc
index 5750dd4..6dd8389 100644
--- a/docs/commands/graphics-state/grestoreall.adoc
+++ b/docs/commands/references/grestoreall.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: grestoreall
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -38,7 +37,7 @@ Restores graphics state to bottommost saved level.
=== Description
-xref:../grestoreall.adoc[`grestoreall`] performs the equivalent of executing xref:../grestore.adoc[`grestore`] repeatedly until there are no saved graphics states remaining on the graphics state stack. After executing xref:../grestoreall.adoc[`grestoreall`], the current graphics state is the bottommost one that was saved by the first xref:../gsave.adoc[`gsave`] or by link:../resource-management/save.adoc[`save`].
+link:/docs/commands/references/grestoreall/[`grestoreall`] performs the equivalent of executing link:/docs/commands/references/grestore/[`grestore`] repeatedly until there are no saved graphics states remaining on the graphics state stack. After executing link:/docs/commands/references/grestoreall/[`grestoreall`], the current graphics state is the bottommost one that was saved by the first link:/docs/commands/references/gsave/[`gsave`] or by link:../resource-management/save/[`save`].
This operator:
@@ -47,7 +46,7 @@ This operator:
* Resets the current path to empty
* Does not affect the operand or dictionary stacks
-xref:../grestoreall.adoc[`grestoreall`] is particularly useful for error recovery and cleanup, ensuring a known graphics state regardless of how many xref:../gsave.adoc[`gsave`] operations have been performed.
+link:/docs/commands/references/grestoreall/[`grestoreall`] is particularly useful for error recovery and cleanup, ensuring a known graphics state regardless of how many link:/docs/commands/references/gsave/[`gsave`] operations have been performed.
=== PostScript Level
@@ -177,7 +176,7 @@ grestoreall % All undone at once
=== Common Pitfalls
-WARNING: *Clears ALL Saved States* - xref:../grestoreall.adoc[`grestoreall`] removes all graphics states, not just one.
+WARNING: *Clears ALL Saved States* - link:/docs/commands/references/grestoreall/[`grestoreall`] removes all graphics states, not just one.
[source,postscript]
----
@@ -199,7 +198,7 @@ grestoreall
% Stack: 1 2 3 4 5 6 (not 1 2 3)
----
-WARNING: *Current Path Reset* - Like xref:../grestore.adoc[`grestore`], the current path becomes empty.
+WARNING: *Current Path Reset* - Like link:/docs/commands/references/grestore/[`grestore`], the current path becomes empty.
[source,postscript]
----
@@ -213,11 +212,11 @@ TIP: *Use for Error Handling* - Ideal for ensuring clean state after errors.
=== Error Conditions
-No errors under normal operation. xref:../grestoreall.adoc[`grestoreall`] succeeds even if no graphics states were saved.
+No errors under normal operation. link:/docs/commands/references/grestoreall/[`grestoreall`] succeeds even if no graphics states were saved.
=== Implementation Notes
-* Equivalent to repeated xref:../grestore.adoc[`grestore`] until no saved states remain
+* Equivalent to repeated link:/docs/commands/references/grestore/[`grestore`] until no saved states remain
* Very fast operation
* Safe to call even if no states are saved
* Does not generate errors
@@ -244,7 +243,7 @@ Saved State 0 ← current (bottommost)
=== Interaction with save/restore
-xref:../grestoreall.adoc[`grestoreall`] restores graphics state to the bottommost level **within the current save context**. It does not cross link:../resource-management/save.adoc[`save`] boundaries:
+link:/docs/commands/references/grestoreall/[`grestoreall`] restores graphics state to the bottommost level **within the current save context**. It does not cross link:../resource-management/save/[`save`] boundaries:
[source,postscript]
----
@@ -259,8 +258,8 @@ restore % Returns to before save
=== See Also
-* xref:../gsave.adoc[`gsave`] - Save graphics state
-* xref:../grestore.adoc[`grestore`] - Restore one graphics state
-* xref:../gstate.adoc[`gstate`] - Create graphics state object
-* xref:../setgstate.adoc[`setgstate`] - Set graphics state from object
-* xref:../control-flow/stopped.adoc[`stopped`] - Error handling
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore one graphics state
+* link:/docs/commands/references/gstate/[`gstate`] - Create graphics state object
+* link:/docs/commands/references/setgstate/[`setgstate`] - Set graphics state from object
+* link:/docs/commands/references/stopped/[`stopped`] - Error handling
\ No newline at end of file
diff --git a/docs/commands/graphics-state/gsave.adoc b/docs/commands/references/gsave.adoc
similarity index 75%
rename from docs/commands/graphics-state/gsave.adoc
rename to docs/commands/references/gsave.adoc
index ad3fbbe..8f7bc4d 100644
--- a/docs/commands/graphics-state/gsave.adoc
+++ b/docs/commands/references/gsave.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: gsave
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -29,7 +28,7 @@ Pushes a copy of the current graphics state onto the graphics state stack.
=== Description
-xref:../gsave.adoc[`gsave`] pushes a copy of the current graphics state onto the graphics state stack. All elements of the graphics state are saved, including:
+link:/docs/commands/references/gsave/[`gsave`] pushes a copy of the current graphics state onto the graphics state stack. All elements of the graphics state are saved, including:
* Current transformation matrix (CTM)
* Current path
@@ -42,7 +41,7 @@ xref:../gsave.adoc[`gsave`] pushes a copy of the current graphics state onto the
Raster memory contents are NOT saved.
-The saved state can later be restored by xref:../grestore.adoc[`grestore`].
+The saved state can later be restored by link:/docs/commands/references/grestore/[`grestore`].
=== PostScript Level
@@ -137,7 +136,7 @@ elements {
=== Common Pitfalls
-WARNING: *Must Match with grestore* - Every xref:../gsave.adoc[`gsave`] must have matching xref:../grestore.adoc[`grestore`].
+WARNING: *Must Match with grestore* - Every link:/docs/commands/references/gsave/[`gsave`] must have matching link:/docs/commands/references/grestore/[`grestore`].
[source,postscript]
----
@@ -154,7 +153,7 @@ WARNING: *Limited Stack Depth* - Graphics state stack has implementation-depende
{ gsave } repeat % Eventually: limitcheck
----
-TIP: *Use for All Temporary Changes* - Always bracket temporary state changes with xref:../gsave.adoc[`gsave`]/xref:../grestore.adoc[`grestore`].
+TIP: *Use for All Temporary Changes* - Always bracket temporary state changes with link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`].
=== Error Conditions
@@ -194,8 +193,8 @@ TIP: *Use for All Temporary Changes* - Always bracket temporary state changes wi
=== See Also
-* xref:../grestore.adoc[`grestore`] - Restore graphics state
-* xref:../grestoreall.adoc[`grestoreall`] - Restore all levels
-* xref:../gstate.adoc[`gstate`] - Create gstate object (Level 2)
-* xref:../setgstate.adoc[`setgstate`] - Set from gstate (Level 2)
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
+* link:/docs/commands/references/grestoreall/[`grestoreall`] - Restore all levels
+* link:/docs/commands/references/gstate/[`gstate`] - Create gstate object (Level 2)
+* link:/docs/commands/references/setgstate/[`setgstate`] - Set from gstate (Level 2)
* VM operations: `save`, `restore` - Also save graphics state
\ No newline at end of file
diff --git a/docs/commands/graphics-state/gstate.adoc b/docs/commands/references/gstate.adoc
similarity index 71%
rename from docs/commands/graphics-state/gstate.adoc
rename to docs/commands/references/gstate.adoc
index 55db06c..f95b9cc 100644
--- a/docs/commands/graphics-state/gstate.adoc
+++ b/docs/commands/references/gstate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: gstate
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -38,7 +37,7 @@ Creates a graphics state object.
=== Description
-xref:../gstate.adoc[`gstate`] creates a new gstate (graphics state) object and pushes it on the operand stack. Its initial value is a copy of the current graphics state, including all graphics parameters such as:
+link:/docs/commands/references/gstate/[`gstate`] creates a new gstate (graphics state) object and pushes it on the operand stack. Its initial value is a copy of the current graphics state, including all graphics parameters such as:
* Current transformation matrix (CTM)
* Color space and color
@@ -50,7 +49,7 @@ xref:../gstate.adoc[`gstate`] creates a new gstate (graphics state) object and p
This operator consumes VM; it is the only graphics state operator that does. The gstate is allocated in either local or global VM according to the current VM allocation mode.
-The gstate object can later be used with xref:../setgstate.adoc[`setgstate`] to restore the graphics state to the captured values, or with xref:../currentgstate.adoc[`currentgstate`] to update the saved state.
+The gstate object can later be used with link:/docs/commands/references/setgstate/[`setgstate`] to restore the graphics state to the captured values, or with link:/docs/commands/references/currentgstate/[`currentgstate`] to update the saved state.
=== PostScript Level
@@ -165,7 +164,7 @@ StateLibrary /NormalState get setgstate
=== Common Pitfalls
-WARNING: *VM Consumption* - xref:../gstate.adoc[`gstate`] allocates memory; excessive use can exhaust VM.
+WARNING: *VM Consumption* - link:/docs/commands/references/gstate/[`gstate`] allocates memory; excessive use can exhaust VM.
[source,postscript]
----
@@ -184,7 +183,7 @@ true setglobal
gstate % Error: invalidaccess
----
-WARNING: *Not a Substitute for gsave* - Use xref:../gsave.adoc[`gsave`]/xref:../grestore.adoc[`grestore`] for simple state save/restore.
+WARNING: *Not a Substitute for gsave* - Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] for simple state save/restore.
[source,postscript]
----
@@ -199,7 +198,7 @@ drawShape
grestore
----
-TIP: *Use for Templates* - xref:../gstate.adoc[`gstate`] is ideal for creating reusable state configurations.
+TIP: *Use for Templates* - link:/docs/commands/references/gstate/[`gstate`] is ideal for creating reusable state configurations.
=== Error Conditions
@@ -222,8 +221,8 @@ TIP: *Use for Templates* - xref:../gstate.adoc[`gstate`] is ideal for creating r
* Only graphics state operator that consumes VM
* Allocated in local or global VM based on current allocation mode
* Contains complete copy of graphics state
-* Can be used repeatedly with xref:../setgstate.adoc[`setgstate`]
-* More expensive than xref:../gsave.adoc[`gsave`] but more flexible
+* Can be used repeatedly with link:/docs/commands/references/setgstate/[`setgstate`]
+* More expensive than link:/docs/commands/references/gsave/[`gsave`] but more flexible
* Best used for state templates, not simple save/restore
=== Graphics State Components
@@ -243,8 +242,8 @@ The gstate object captures all of the following:
=== See Also
-* xref:../setgstate.adoc[`setgstate`] - Replace graphics state from gstate
-* xref:../currentgstate.adoc[`currentgstate`] - Update gstate with current state
-* xref:../gsave.adoc[`gsave`] - Save graphics state on stack
-* xref:../grestore.adoc[`grestore`] - Restore graphics state from stack
-* xref:../grestoreall.adoc[`grestoreall`] - Restore all saved states
+* link:/docs/commands/references/setgstate/[`setgstate`] - Replace graphics state from gstate
+* link:/docs/commands/references/currentgstate/[`currentgstate`] - Update gstate with current state
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state on stack
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state from stack
+* link:/docs/commands/references/grestoreall/[`grestoreall`] - Restore all saved states
diff --git a/docs/commands/transformations/identmatrix.adoc b/docs/commands/references/identmatrix.adoc
similarity index 75%
rename from docs/commands/transformations/identmatrix.adoc
rename to docs/commands/references/identmatrix.adoc
index 945c1ea..cb3acbf 100644
--- a/docs/commands/transformations/identmatrix.adoc
+++ b/docs/commands/references/identmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: identmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -38,7 +37,7 @@ matrix identmatrix → matrix
=== Description
-xref:../identmatrix.adoc[`identmatrix`] replaces the value of `matrix` with the identity matrix [1.0 0.0 0.0 1.0 0.0 0.0] and pushes the modified matrix back on the operand stack.
+link:/docs/commands/references/identmatrix/[`identmatrix`] replaces the value of `matrix` with the identity matrix [1.0 0.0 0.0 1.0 0.0 0.0] and pushes the modified matrix back on the operand stack.
The identity matrix transforms any coordinate to itself without change.
@@ -115,7 +114,7 @@ WARNING: *Array Size* - The array must have at least 6 elements.
8 array identmatrix % OK (only first 6 modified)
----
-WARNING: *Modifies Existing Array* - Unlike xref:../matrix.adoc[`matrix`], xref:../identmatrix.adoc[`identmatrix`] modifies an existing array.
+WARNING: *Modifies Existing Array* - Unlike link:/docs/commands/references/matrix/[`matrix`], link:/docs/commands/references/identmatrix/[`identmatrix`] modifies an existing array.
[source,postscript]
----
@@ -123,7 +122,7 @@ matrix % Creates new array
6 array identmatrix % Uses existing array
----
-TIP: *Use with Preallocated Arrays* - xref:../identmatrix.adoc[`identmatrix`] is useful when you want to reuse arrays:
+TIP: *Use with Preallocated Arrays* - link:/docs/commands/references/identmatrix/[`identmatrix`] is useful when you want to reuse arrays:
[source,postscript]
----
@@ -184,7 +183,7 @@ Properties:
=== See Also
-* xref:../matrix.adoc[`matrix`] - Create new identity matrix array
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current transformation
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../initmatrix.adoc[`initmatrix`] - Reset CTM to identity
\ No newline at end of file
+* link:/docs/commands/references/matrix/[`matrix`] - Create new identity matrix array
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current transformation
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/initmatrix/[`initmatrix`] - Reset CTM to identity
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/idiv.adoc b/docs/commands/references/idiv.adoc
similarity index 88%
rename from docs/commands/arithmetic-math/idiv.adoc
rename to docs/commands/references/idiv.adoc
index 8cf3ecb..9e272d1 100644
--- a/docs/commands/arithmetic-math/idiv.adoc
+++ b/docs/commands/references/idiv.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: idiv
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
= idiv
@@ -13,7 +12,7 @@ Divides two integers and returns the integer quotient, discarding any fractional
The `idiv` operator pops two integers from the operand stack, divides int1 by int2, and pushes the integer part of the quotient back onto the stack. Any fractional part is discarded (truncated toward zero). Both operands *must be integers*, and the result is always an integer.
-For division that preserves fractional parts, use xref:../div.adoc[`div`]. For the remainder of integer division, use xref:../mod.adoc[`mod`].
+For division that preserves fractional parts, use link:/docs/commands/references/div/[`div`]. For the remainder of integer division, use link:/docs/commands/references/mod/[`mod`].
This is a Level 1 operator, available in all PostScript implementations.
@@ -240,13 +239,13 @@ Both operands *must* be integers. Real numbers will cause a `typecheck` error:
== Related Commands
-* xref:../div.adoc[`div`] - Division with real result
-* xref:../mod.adoc[`mod`] - Modulo (remainder)
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
-* xref:../truncate.adoc[`truncate`] - Truncate real to integer
-* xref:../floor.adoc[`floor`] - Round down to integer
+* link:/docs/commands/references/div/[`div`] - Division with real result
+* link:/docs/commands/references/mod/[`mod`] - Modulo (remainder)
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
+* link:/docs/commands/references/truncate/[`truncate`] - Truncate real to integer
+* link:/docs/commands/references/floor/[`floor`] - Round down to integer
== PostScript Level
@@ -291,5 +290,5 @@ currentIndex arraySize idiv % Which page of array?
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/transformations/idtransform.adoc b/docs/commands/references/idtransform.adoc
similarity index 76%
rename from docs/commands/transformations/idtransform.adoc
rename to docs/commands/references/idtransform.adoc
index 6fa8bb5..06ec90b 100644
--- a/docs/commands/transformations/idtransform.adoc
+++ b/docs/commands/references/idtransform.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: idtransform
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 16
---
@@ -45,13 +44,13 @@ dx' dy' matrix idtransform → dx dy
=== Description
-With no matrix operand, xref:../idtransform.adoc[`idtransform`] (inverse delta transform) transforms the device space distance vector (dx', dy') by the inverse of the CTM to produce the corresponding distance vector (dx, dy) in user space.
+With no matrix operand, link:/docs/commands/references/idtransform/[`idtransform`] (inverse delta transform) transforms the device space distance vector (dx', dy') by the inverse of the CTM to produce the corresponding distance vector (dx, dy) in user space.
-If the `matrix` operand is supplied, xref:../idtransform.adoc[`idtransform`] transforms the distance vector by the inverse of `matrix` rather than by the inverse of CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/idtransform/[`idtransform`] transforms the distance vector by the inverse of `matrix` rather than by the inverse of CTM.
A delta transformation is similar to a normal transformation, but the translation components (tx and ty) of the transformation matrix are not used, making the distance vectors position-independent in both user space and device space.
-xref:../idtransform.adoc[`idtransform`] is the inverse of xref:../dtransform.adoc[`dtransform`]. It is useful for determining how distances map from device space to user space.
+link:/docs/commands/references/idtransform/[`idtransform`] is the inverse of link:/docs/commands/references/dtransform/[`dtransform`]. It is useful for determining how distances map from device space to user space.
=== PostScript Level
@@ -139,7 +138,7 @@ minDeviceWidth lt {
=== Common Pitfalls
-WARNING: *For Distances Only* - xref:../idtransform.adoc[`idtransform`] is for distance vectors, not positions.
+WARNING: *For Distances Only* - link:/docs/commands/references/idtransform/[`idtransform`] is for distance vectors, not positions.
[source,postscript]
----
@@ -154,7 +153,7 @@ WARNING: *For Distances Only* - xref:../idtransform.adoc[`idtransform`] is for d
200 400 idtransform % → 100 200 (correct distance)
----
-WARNING: *Singular Matrices* - If CTM or matrix is singular, xref:../idtransform.adoc[`idtransform`] fails.
+WARNING: *Singular Matrices* - If CTM or matrix is singular, link:/docs/commands/references/idtransform/[`idtransform`] fails.
[source,postscript]
----
@@ -222,7 +221,7 @@ TIP: *Round-Trip Testing* - Verify inverse relationship:
=== Implementation Notes
-* More expensive than xref:../dtransform.adoc[`dtransform`] (requires inverse computation)
+* More expensive than link:/docs/commands/references/dtransform/[`dtransform`] (requires inverse computation)
* Translation components are explicitly ignored
* The inverse uses only [a b c d] components
* Precision depends on matrix condition number
@@ -258,19 +257,19 @@ dy = (2×60 - 0×20) / 6 = 120/6 = 20
|===
| Operation | Direction | Translation
-| xref:../dtransform.adoc[`dtransform`]
+| link:/docs/commands/references/dtransform/[`dtransform`]
| User → Device
| Ignored
-| xref:../idtransform.adoc[`idtransform`]
+| link:/docs/commands/references/idtransform/[`idtransform`]
| Device → User
| Ignored
-| xref:../transform.adoc[`transform`]
+| link:/docs/commands/references/transform/[`transform`]
| User → Device
| Included
-| xref:../itransform.adoc[`itransform`]
+| link:/docs/commands/references/itransform/[`itransform`]
| Device → User
| Included
|===
@@ -313,7 +312,7 @@ Many graphics parameters are affected by transformations:
=== Performance Considerations
* Requires matrix inversion computation
-* More expensive than xref:../dtransform.adoc[`dtransform`]
+* More expensive than link:/docs/commands/references/dtransform/[`dtransform`]
* Still very fast for occasional use
* Consider caching inverse matrix for repeated use:
@@ -336,9 +335,9 @@ matrix currentmatrix matrix invertmatrix
=== See Also
-* xref:../dtransform.adoc[`dtransform`] - Transform distance vector (forward)
-* xref:../transform.adoc[`transform`] - Transform coordinates (includes translation)
-* xref:../itransform.adoc[`itransform`] - Inverse coordinate transformation
-* xref:../invertmatrix.adoc[`invertmatrix`] - Invert transformation matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
\ No newline at end of file
+* link:/docs/commands/references/dtransform/[`dtransform`] - Transform distance vector (forward)
+* link:/docs/commands/references/transform/[`transform`] - Transform coordinates (includes translation)
+* link:/docs/commands/references/itransform/[`itransform`] - Inverse coordinate transformation
+* link:/docs/commands/references/invertmatrix/[`invertmatrix`] - Invert transformation matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
\ No newline at end of file
diff --git a/docs/commands/control-flow/if.adoc b/docs/commands/references/if.adoc
similarity index 85%
rename from docs/commands/control-flow/if.adoc
rename to docs/commands/references/if.adoc
index 9a6aa14..d1b2a61 100644
--- a/docs/commands/control-flow/if.adoc
+++ b/docs/commands/references/if.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: if
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -124,7 +123,7 @@ true [code] if % Error: literal array
true { code } if % Correct: executable array
----
-TIP: *Use ifelse for Two-Way* - For true/false cases, xref:../ifelse.adoc[`ifelse`] is more convenient than nested `if` statements.
+TIP: *Use ifelse for Two-Way* - For true/false cases, link:/docs/commands/references/ifelse/[`ifelse`] is more convenient than nested `if` statements.
=== Error Conditions
@@ -147,8 +146,8 @@ TIP: *Use ifelse for Two-Way* - For true/false cases, xref:../ifelse.adoc[`ifels
=== See Also
-* xref:../ifelse.adoc[`ifelse`] - Two-way conditional
-* xref:../loop.adoc[`loop`] - Indefinite repetition
-* xref:../stopped.adoc[`stopped`] - Error catching
+* link:/docs/commands/references/ifelse/[`ifelse`] - Two-way conditional
+* link:/docs/commands/references/loop/[`loop`] - Indefinite repetition
+* link:/docs/commands/references/stopped/[`stopped`] - Error catching
* Comparison operators: `eq`, `ne`, `lt`, `le`, `gt`, `ge`
* Boolean operators: `and`, `or`, `not`
\ No newline at end of file
diff --git a/docs/commands/control-flow/ifelse.adoc b/docs/commands/references/ifelse.adoc
similarity index 79%
rename from docs/commands/control-flow/ifelse.adoc
rename to docs/commands/references/ifelse.adoc
index f8c66e2..ee0d0f0 100644
--- a/docs/commands/control-flow/ifelse.adoc
+++ b/docs/commands/references/ifelse.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ifelse
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -44,9 +43,9 @@ bool proc1 proc2 ifelse → –
=== Description
-xref:../ifelse.adoc[`ifelse`] removes all three operands from the stack, then executes _proc1_ if _bool_ is `true`, or _proc2_ if _bool_ is `false`.
+link:/docs/commands/references/ifelse/[`ifelse`] removes all three operands from the stack, then executes _proc1_ if _bool_ is `true`, or _proc2_ if _bool_ is `false`.
-The xref:../ifelse.adoc[`ifelse`] operator itself pushes no results, but the executed procedure may push results.
+The link:/docs/commands/references/ifelse/[`ifelse`] operator itself pushes no results, but the executed procedure may push results.
=== PostScript Level
@@ -149,7 +148,7 @@ x 0 gt { x x mul } { } ifelse % Unbalanced
x 0 gt { x x mul } { 0 } ifelse
----
-TIP: *Use for Single Branch* - If you only need one branch, xref:../if.adoc[`if`] is simpler.
+TIP: *Use for Single Branch* - If you only need one branch, link:/docs/commands/references/if/[`if`] is simpler.
=== Error Conditions
@@ -173,7 +172,7 @@ TIP: *Use for Single Branch* - If you only need one branch, xref:../if.adoc[`if`
=== Pattern: Multi-Way Branch
-For multiple conditions, nest xref:../ifelse.adoc[`ifelse`] or use dictionary dispatch:
+For multiple conditions, nest link:/docs/commands/references/ifelse/[`ifelse`] or use dictionary dispatch:
[source,postscript]
----
@@ -203,8 +202,8 @@ end
=== See Also
-* xref:../if.adoc[`if`] - Single-branch conditional
-* xref:../loop.adoc[`loop`] - Indefinite repetition
-* xref:../repeat.adoc[`repeat`] - Fixed repetition
+* link:/docs/commands/references/if/[`if`] - Single-branch conditional
+* link:/docs/commands/references/loop/[`loop`] - Indefinite repetition
+* link:/docs/commands/references/repeat/[`repeat`] - Fixed repetition
* Comparison operators: `eq`, `ne`, `lt`, `le`, `gt`, `ge`
* Boolean operators: `and`, `or`, `not`
\ No newline at end of file
diff --git a/docs/commands/references/index.adoc b/docs/commands/references/index.adoc
new file mode 100644
index 0000000..f77c7da
--- /dev/null
+++ b/docs/commands/references/index.adoc
@@ -0,0 +1,49 @@
+---
+layout: default
+title: Command Reference
+parent: Commands
+nav_order: 1
+has_children: true
+---
+
+= Command Reference
+:toc:
+:toc-title: On This Page
+
+This section contains detailed reference documentation for all PostScript operators and commands, organized alphabetically.
+
+== About This Reference
+
+Each command page includes:
+
+* **Syntax**: The operator signature and stack effects
+* **Description**: What the operator does
+* **Examples**: Practical code examples
+* **Error Conditions**: Possible errors and their causes
+* **Related Commands**: Links to similar or related operators
+* **PostScript Level**: Which language level introduced the operator
+
+== Navigation
+
+Use the sidebar navigation to browse commands alphabetically, or visit the link:/docs/commands/by-category/[Commands by Category] page to find operators organized by functional area.
+
+== Command Categories
+
+For commands organized by functional area, see:
+
+* link:/docs/commands/arithmetic-math/[Arithmetic and Math]
+* link:/docs/commands/array-string/[Array and String Operations]
+* link:/docs/commands/control-flow/[Control Flow]
+* link:/docs/commands/dictionary/[Dictionary Operations]
+* link:/docs/commands/font-text/[Font and Text]
+* link:/docs/commands/graphics-state/[Graphics State]
+* link:/docs/commands/painting/[Painting]
+* link:/docs/commands/path-construction/[Path Construction]
+* link:/docs/commands/stack-manipulation/[Stack Manipulation]
+* link:/docs/commands/transformations/[Coordinate Transformations]
+* link:/docs/commands/color/[Color]
+* link:/docs/commands/image/[Image]
+* link:/docs/commands/device-output/[Device and Output]
+* link:/docs/commands/file-io/[File and I/O]
+* link:/docs/commands/error-handling/[Error Handling]
+* link:/docs/commands/resource-management/[Resource Management]
diff --git a/docs/commands/transformations/initmatrix.adoc b/docs/commands/references/initmatrix.adoc
similarity index 66%
rename from docs/commands/transformations/initmatrix.adoc
rename to docs/commands/references/initmatrix.adoc
index a6ef780..b1cf931 100644
--- a/docs/commands/transformations/initmatrix.adoc
+++ b/docs/commands/references/initmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: initmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -38,7 +37,7 @@ Resets the current transformation matrix to the device default.
=== Description
-xref:../initmatrix.adoc[`initmatrix`] sets the current transformation matrix (CTM) to the default matrix for the current output device. This matrix transforms the default user coordinate system to device space.
+link:/docs/commands/references/initmatrix/[`initmatrix`] sets the current transformation matrix (CTM) to the default matrix for the current output device. This matrix transforms the default user coordinate system to device space.
For page-oriented devices, the default matrix is initially established by the `setpagedevice` operator.
@@ -49,7 +48,7 @@ This is equivalent to:
matrix defaultmatrix setmatrix
----
-WARNING: There are few situations in which a PostScript program should execute xref:../initmatrix.adoc[`initmatrix`] explicitly. A page description that executes xref:../initmatrix.adoc[`initmatrix`] usually produces incorrect results if embedded within another, composite page.
+WARNING: There are few situations in which a PostScript program should execute link:/docs/commands/references/initmatrix/[`initmatrix`] explicitly. A page description that executes link:/docs/commands/references/initmatrix/[`initmatrix`] usually produces incorrect results if embedded within another, composite page.
=== PostScript Level
@@ -110,7 +109,7 @@ initgraphics % Reset other graphics parameters too
=== Common Pitfalls
-WARNING: *Breaks Nested Transformations* - xref:../initmatrix.adoc[`initmatrix`] ignores all previous transformations.
+WARNING: *Breaks Nested Transformations* - link:/docs/commands/references/initmatrix/[`initmatrix`] ignores all previous transformations.
[source,postscript]
----
@@ -125,7 +124,7 @@ initmatrix % Destroys the translate and scale!
drawBox % Box appears at device origin, normal size
----
-WARNING: *Not for Typical Programs* - Normal PostScript programs should not use xref:../initmatrix.adoc[`initmatrix`].
+WARNING: *Not for Typical Programs* - Normal PostScript programs should not use link:/docs/commands/references/initmatrix/[`initmatrix`].
[source,postscript]
----
@@ -138,7 +137,7 @@ gsave
grestore
----
-TIP: *Use gsave/grestore* - For temporary transformations, use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`]:
+TIP: *Use gsave/grestore* - For temporary transformations, use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`]:
[source,postscript]
----
@@ -150,7 +149,7 @@ grestore
% Original transformation restored
----
-TIP: *Part of initgraphics* - xref:../initmatrix.adoc[`initmatrix`] is one component of `initgraphics`:
+TIP: *Part of initgraphics* - link:/docs/commands/references/initmatrix/[`initmatrix`] is one component of `initgraphics`:
[source,postscript]
----
@@ -173,7 +172,7 @@ initclip
| Error | Condition
| (none)
-| xref:../initmatrix.adoc[`initmatrix`] cannot fail
+| link:/docs/commands/references/initmatrix/[`initmatrix`] cannot fail
|===
=== Implementation Notes
@@ -181,7 +180,7 @@ initclip
* The default matrix is device-dependent
* For page devices, it's established during page setup
* The transformation is instantaneous
-* No previous CTM state is preserved (unlike xref:../graphics-state/grestore.adoc[`grestore`])
+* No previous CTM state is preserved (unlike link:/docs/commands/references/grestore/[`grestore`])
=== Default Matrix Characteristics
@@ -214,7 +213,7 @@ initmatrix
matrix defaultmatrix setmatrix
----
-xref:../initmatrix.adoc[`initmatrix`] is part of:
+link:/docs/commands/references/initmatrix/[`initmatrix`] is part of:
[source,postscript]
----
@@ -231,8 +230,8 @@ Valid use cases (rare):
Invalid use cases (common mistakes):
-1. **Normal Drawing**: Use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`] instead
-2. **Resetting After Transform**: Use xref:../graphics-state/grestore.adoc[`grestore`] instead
+1. **Normal Drawing**: Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] instead
+2. **Resetting After Transform**: Use link:/docs/commands/references/grestore/[`grestore`] instead
3. **Embedded Pages**: Will break composition
=== Example of Proper Use
@@ -253,8 +252,8 @@ Invalid use cases (common mistakes):
=== See Also
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../setmatrix.adoc[`setmatrix`] - Set CTM explicitly
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Set CTM explicitly
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/transformations/invertmatrix.adoc b/docs/commands/references/invertmatrix.adoc
similarity index 84%
rename from docs/commands/transformations/invertmatrix.adoc
rename to docs/commands/references/invertmatrix.adoc
index 7a517d4..733c568 100644
--- a/docs/commands/transformations/invertmatrix.adoc
+++ b/docs/commands/references/invertmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: invertmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -41,13 +40,13 @@ matrix1 matrix2 invertmatrix → matrix2
=== Description
-xref:../invertmatrix.adoc[`invertmatrix`] replaces the value of `matrix2` with the inverse of `matrix1` and pushes the modified `matrix2` back on the operand stack.
+link:/docs/commands/references/invertmatrix/[`invertmatrix`] replaces the value of `matrix2` with the inverse of `matrix1` and pushes the modified `matrix2` back on the operand stack.
The inverse matrix has the property that if `matrix1` transforms a coordinate (x, y) to (x', y'), then `matrix2` transforms (x', y') back to (x, y).
Mathematically: M₁ × M₂ = M₂ × M₁ = I (identity matrix)
-If `matrix1` is singular (determinant = 0), xref:../invertmatrix.adoc[`invertmatrix`] executes an [`undefinedresult`] error because the inverse does not exist.
+If `matrix1` is singular (determinant = 0), link:/docs/commands/references/invertmatrix/[`invertmatrix`] executes an [`undefinedresult`] error because the inverse does not exist.
=== PostScript Level
@@ -183,7 +182,7 @@ myMatrix checkMatrix {
} if
----
-TIP: *Use for Coordinate Conversion* - Primary use is with xref:../itransform.adoc[`itransform`] and xref:../idtransform.adoc[`idtransform`]:
+TIP: *Use for Coordinate Conversion* - Primary use is with link:/docs/commands/references/itransform/[`itransform`] and link:/docs/commands/references/idtransform/[`idtransform`]:
[source,postscript]
----
@@ -309,7 +308,7 @@ myMatrix determinant 0 eq {
=== Relationship to Transform Operators
-xref:../invertmatrix.adoc[`invertmatrix`] is used with inverse transformation operators:
+link:/docs/commands/references/invertmatrix/[`invertmatrix`] is used with inverse transformation operators:
[source,postscript]
----
@@ -325,8 +324,8 @@ fwd inv invertmatrix
=== See Also
-* xref:../concatmatrix.adoc[`concatmatrix`] - Multiply two matrices
-* xref:../itransform.adoc[`itransform`] - Inverse coordinate transformation
-* xref:../idtransform.adoc[`idtransform`] - Inverse distance transformation
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../matrix.adoc[`matrix`] - Create identity matrix
\ No newline at end of file
+* link:/docs/commands/references/concatmatrix/[`concatmatrix`] - Multiply two matrices
+* link:/docs/commands/references/itransform/[`itransform`] - Inverse coordinate transformation
+* link:/docs/commands/references/idtransform/[`idtransform`] - Inverse distance transformation
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/matrix/[`matrix`] - Create identity matrix
\ No newline at end of file
diff --git a/docs/commands/transformations/itransform.adoc b/docs/commands/references/itransform.adoc
similarity index 78%
rename from docs/commands/transformations/itransform.adoc
rename to docs/commands/references/itransform.adoc
index fe4860b..c6387bc 100644
--- a/docs/commands/transformations/itransform.adoc
+++ b/docs/commands/references/itransform.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: itransform
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 14
---
@@ -45,11 +44,11 @@ x' y' matrix itransform → x y
=== Description
-With no matrix operand, xref:../itransform.adoc[`itransform`] (inverse transform) transforms the device space coordinate (x', y') by the inverse of the current transformation matrix (CTM) to produce the corresponding user space coordinate (x, y).
+With no matrix operand, link:/docs/commands/references/itransform/[`itransform`] (inverse transform) transforms the device space coordinate (x', y') by the inverse of the current transformation matrix (CTM) to produce the corresponding user space coordinate (x, y).
-If the `matrix` operand is supplied, xref:../itransform.adoc[`itransform`] transforms (x', y') by the inverse of `matrix` rather than by the inverse of CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/itransform/[`itransform`] transforms (x', y') by the inverse of `matrix` rather than by the inverse of CTM.
-This is the inverse operation of xref:../transform.adoc[`transform`]. It converts device coordinates (pixel positions) back to user coordinates (the coordinate system used for drawing).
+This is the inverse operation of link:/docs/commands/references/transform/[`transform`]. It converts device coordinates (pixel positions) back to user coordinates (the coordinate system used for drawing).
=== PostScript Level
@@ -158,7 +157,7 @@ grestore
=== Common Pitfalls
-WARNING: *Includes Translation* - xref:../itransform.adoc[`itransform`] uses the full inverse transformation including translation. Use xref:../idtransform.adoc[`idtransform`] for distance vectors.
+WARNING: *Includes Translation* - link:/docs/commands/references/itransform/[`itransform`] uses the full inverse transformation including translation. Use link:/docs/commands/references/idtransform/[`idtransform`] for distance vectors.
[source,postscript]
----
@@ -172,7 +171,7 @@ WARNING: *Includes Translation* - xref:../itransform.adoc[`itransform`] uses the
100 100 idtransform % → 100 100 (correct - distance)
----
-WARNING: *Singular Matrices* - If CTM or matrix is singular (determinant = 0), xref:../itransform.adoc[`itransform`] fails.
+WARNING: *Singular Matrices* - If CTM or matrix is singular (determinant = 0), link:/docs/commands/references/itransform/[`itransform`] fails.
[source,postscript]
----
@@ -251,7 +250,7 @@ TIP: *Verify Round-Trip* - Test that transform/itransform are inverses:
=== Implementation Notes
* Requires computing the matrix inverse
-* More expensive than xref:../transform.adoc[`transform`] (forward transformation)
+* More expensive than link:/docs/commands/references/transform/[`transform`] (forward transformation)
* The inverse CTM is not cached; computed each time
* Precision depends on CTM condition number
* Used automatically by many interactive operators
@@ -317,7 +316,7 @@ x y transform % Transform by inverse
=== Performance Considerations
-* Slightly slower than xref:../transform.adoc[`transform`] (requires matrix inversion)
+* Slightly slower than link:/docs/commands/references/transform/[`transform`] (requires matrix inversion)
* Still very fast for occasional use
* If called frequently with same matrix, consider precomputing inverse:
@@ -340,8 +339,8 @@ matrix currentmatrix matrix invertmatrix
=== See Also
-* xref:../transform.adoc[`transform`] - Transform user to device coordinates
-* xref:../dtransform.adoc[`dtransform`] - Transform distance vector
-* xref:../idtransform.adoc[`idtransform`] - Inverse transform distance vector
-* xref:../invertmatrix.adoc[`invertmatrix`] - Invert transformation matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
\ No newline at end of file
+* link:/docs/commands/references/transform/[`transform`] - Transform user to device coordinates
+* link:/docs/commands/references/dtransform/[`dtransform`] - Transform distance vector
+* link:/docs/commands/references/idtransform/[`idtransform`] - Inverse transform distance vector
+* link:/docs/commands/references/invertmatrix/[`invertmatrix`] - Invert transformation matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
\ No newline at end of file
diff --git a/docs/commands/dictionary/known.adoc b/docs/commands/references/known.adoc
similarity index 71%
rename from docs/commands/dictionary/known.adoc
rename to docs/commands/references/known.adoc
index 68ff34e..87950da 100644
--- a/docs/commands/dictionary/known.adoc
+++ b/docs/commands/references/known.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: known
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -41,7 +40,7 @@ dict key known → bool
=== Description
-xref:../known.adoc[`known`] returns `true` if there is an entry in dictionary _dict_ whose key is _key_. Otherwise, it returns `false`.
+link:/docs/commands/references/known/[`known`] returns `true` if there is an entry in dictionary _dict_ whose key is _key_. Otherwise, it returns `false`.
The dictionary does not need to be on the dictionary stack - it can be any dictionary object.
@@ -124,7 +123,7 @@ systemdict /setpagedevice known {
=== Common Pitfalls
-WARNING: *Checks Specific Dictionary Only* - xref:../known.adoc[`known`] does NOT search the dictionary stack, only the specified dictionary.
+WARNING: *Checks Specific Dictionary Only* - link:/docs/commands/references/known/[`known`] does NOT search the dictionary stack, only the specified dictionary.
[source,postscript]
----
@@ -134,9 +133,9 @@ WARNING: *Checks Specific Dictionary Only* - xref:../known.adoc[`known`] does NO
currentdict /x known % Returns true
----
-WARNING: *Different from where* - xref:../known.adoc[`known`] checks one dictionary; xref:../where.adoc[`where`] searches the entire dictionary stack.
+WARNING: *Different from where* - link:/docs/commands/references/known/[`known`] checks one dictionary; link:/docs/commands/references/where/[`where`] searches the entire dictionary stack.
-TIP: *Use for Validation* - Check before link:../array-string/get.adoc[`get`] to avoid [`undefined`] errors.
+TIP: *Use for Validation* - Check before link:../array-string/get/[`get`] to avoid [`undefined`] errors.
=== Error Conditions
@@ -163,7 +162,7 @@ TIP: *Use for Validation* - Check before link:../array-string/get.adoc[`get`] to
=== See Also
-* xref:../where.adoc[`where`] - Search dictionary stack for key
-* xref:../load.adoc[`load`] - Get value from dictionary stack
-* xref:../array-string/get.adoc[`get`] - Get value from specific dictionary
-* xref:../def.adoc[`def`] - Define key-value pair
\ No newline at end of file
+* link:/docs/commands/references/where/[`where`] - Search dictionary stack for key
+* link:/docs/commands/references/load/[`load`] - Get value from dictionary stack
+* link:/docs/commands/references/get/[`get`] - Get value from specific dictionary
+* link:/docs/commands/references/def/[`def`] - Define key-value pair
\ No newline at end of file
diff --git a/docs/commands/font-text/kshow.adoc b/docs/commands/references/kshow.adoc
similarity index 72%
rename from docs/commands/font-text/kshow.adoc
rename to docs/commands/references/kshow.adoc
index 16a1450..d055fe4 100644
--- a/docs/commands/font-text/kshow.adoc
+++ b/docs/commands/references/kshow.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: kshow
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 12
---
@@ -30,9 +29,9 @@ proc string
=== Description
-xref:../kshow.adoc[`kshow`] paints the characters of `string` in a manner similar to xref:../show.adoc[`show`], but allowing program intervention between characters.
+link:/docs/commands/references/kshow/[`kshow`] paints the characters of `string` in a manner similar to link:/docs/commands/references/show/[`show`], but allowing program intervention between characters.
-If the character codes in `string` are c₀, c₁, ... cₙ, xref:../kshow.adoc[`kshow`] proceeds as follows:
+If the character codes in `string` are c₀, c₁, ... cₙ, link:/docs/commands/references/kshow/[`kshow`] proceeds as follows:
1. Shows c₀ at the current point, updating the current point by c₀'s width
2. Pushes character codes c₀ and c₁ on the operand stack (as integers)
@@ -40,11 +39,11 @@ If the character codes in `string` are c₀, c₁, ... cₙ, xref:../kshow.adoc[
4. Continues by showing c₁, pushing c₁ and c₂, executing `proc`, and so on
5. Finishes by pushing cₙ₋₁ and cₙ, executing `proc`, and showing cₙ
-When `proc` is called for the first time, the graphics state (in particular, the CTM) is the same as it was at the time xref:../kshow.adoc[`kshow`] was invoked, except that the current point has been updated by the width of c₀. Execution of `proc` is permitted to have any side effects, including changes to the graphics state. Such changes persist from one call of `proc` to the next and may affect graphical output for the remainder of xref:../kshow.adoc[`kshow`]'s execution and afterward.
+When `proc` is called for the first time, the graphics state (in particular, the CTM) is the same as it was at the time link:/docs/commands/references/kshow/[`kshow`] was invoked, except that the current point has been updated by the width of c₀. Execution of `proc` is permitted to have any side effects, including changes to the graphics state. Such changes persist from one call of `proc` to the next and may affect graphical output for the remainder of link:/docs/commands/references/kshow/[`kshow`]'s execution and afterward.
-The name xref:../kshow.adoc[`kshow`] is derived from "kern-show." To kern characters is to adjust the spacing between adjacent pairs of characters in order to achieve a visually pleasing result. The xref:../kshow.adoc[`kshow`] operator enables user-defined kerning and other manipulations, because arbitrary computations can be performed between each pair of characters.
+The name link:/docs/commands/references/kshow/[`kshow`] is derived from "kern-show." To kern characters is to adjust the spacing between adjacent pairs of characters in order to achieve a visually pleasing result. The link:/docs/commands/references/kshow/[`kshow`] operator enables user-defined kerning and other manipulations, because arbitrary computations can be performed between each pair of characters.
-xref:../kshow.adoc[`kshow`] can be applied only to base fonts. If the current font is composite, xref:../kshow.adoc[`kshow`] issues an `invalidfont` error.
+link:/docs/commands/references/kshow/[`kshow`] can be applied only to base fonts. If the current font is composite, link:/docs/commands/references/kshow/[`kshow`] issues an `invalidfont` error.
=== Parameters
@@ -286,7 +285,7 @@ kshow - Slowest (procedure calls)
=== Limitations
**Composite fonts:**
-: xref:../kshow.adoc[`kshow`] cannot be used with composite fonts; use xref:../cshow.adoc[`cshow`] instead
+: link:/docs/commands/references/kshow/[`kshow`] cannot be used with composite fonts; use link:/docs/commands/references/cshow/[`cshow`] instead
**Character boundaries:**
: Procedure is called between characters, not within character rendering
@@ -296,9 +295,9 @@ kshow - Slowest (procedure calls)
=== See Also
-- xref:../show.adoc[`show`] - Basic text painting
-- xref:../ashow.adoc[`ashow`] - Uniform character spacing
-- xref:../widthshow.adoc[`widthshow`] - Selective character width adjustment
-- xref:../awidthshow.adoc[`awidthshow`] - Combine ashow and widthshow
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character (Level 2)
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
\ No newline at end of file
+- link:/docs/commands/references/show/[`show`] - Basic text painting
+- link:/docs/commands/references/ashow/[`ashow`] - Uniform character spacing
+- link:/docs/commands/references/widthshow/[`widthshow`] - Selective character width adjustment
+- link:/docs/commands/references/awidthshow/[`awidthshow`] - Combine ashow and widthshow
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character (Level 2)
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
\ No newline at end of file
diff --git a/docs/commands/array-string/length.adoc b/docs/commands/references/length.adoc
similarity index 71%
rename from docs/commands/array-string/length.adoc
rename to docs/commands/references/length.adoc
index 6696de6..d0807a2 100644
--- a/docs/commands/array-string/length.adoc
+++ b/docs/commands/references/length.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: length
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -42,14 +41,14 @@ name length → int
=== Description
-xref:../length.adoc[`length`] returns the length of its operand:
+link:/docs/commands/references/length/[`length`] returns the length of its operand:
* For arrays and packed arrays: number of elements
* For strings: number of characters (bytes)
* For dictionaries: current number of key-value pairs (not maximum capacity)
* For names: number of characters in the name
-For dictionaries, use xref:../dictionary/maxlength.adoc[`maxlength`] to get the maximum capacity.
+For dictionaries, use link:/docs/commands/references/maxlength/[`maxlength`] to get the maximum capacity.
=== PostScript Level
@@ -119,7 +118,7 @@ text length string % Allocate string of same length
=== Common Pitfalls
-WARNING: *Dictionary Length vs. Capacity* - xref:../length.adoc[`length`] returns the current number of entries, not the maximum capacity.
+WARNING: *Dictionary Length vs. Capacity* - link:/docs/commands/references/length/[`length`] returns the current number of entries, not the maximum capacity.
[source,postscript]
----
@@ -135,7 +134,7 @@ WARNING: *Name vs. String* - Name length counts characters in the name, not the
(abc) length % Also returns 3
----
-TIP: *Use with forall* - For iterating over all elements, xref:../forall.adoc[`forall`] is often more convenient than using xref:../length.adoc[`length`] with a loop.
+TIP: *Use with forall* - For iterating over all elements, link:/docs/commands/references/forall/[`forall`] is often more convenient than using link:/docs/commands/references/length/[`length`] with a loop.
=== Error Conditions
@@ -167,20 +166,20 @@ TIP: *Use with forall* - For iterating over all elements, xref:../forall.adoc[`f
|===
| Operator | Returns
-| xref:../length.adoc[`length`]
+| link:/docs/commands/references/length/[`length`]
| Current number of elements/entries
-| xref:../dictionary/maxlength.adoc[`maxlength`]
+| link:/docs/commands/references/maxlength/[`maxlength`]
| Maximum capacity (dictionaries only)
-| xref:../stack-manipulation/count.adoc[`count`]
+| link:/docs/commands/references/count/[`count`]
| Number of objects on operand stack
|===
=== See Also
-* xref:../get.adoc[`get`] - Get element at index
-* xref:../getinterval.adoc[`getinterval`] - Get subarray/substring
-* xref:../forall.adoc[`forall`] - Iterate over all elements
-* xref:../array.adoc[`array`] - Create array with specific length
-* xref:../string.adoc[`string`] - Create string with specific length
\ No newline at end of file
+* link:/docs/commands/references/get/[`get`] - Get element at index
+* link:/docs/commands/references/getinterval/[`getinterval`] - Get subarray/substring
+* link:/docs/commands/references/forall/[`forall`] - Iterate over all elements
+* link:/docs/commands/references/array/[`array`] - Create array with specific length
+* link:/docs/commands/references/string/[`string`] - Create string with specific length
\ No newline at end of file
diff --git a/docs/commands/path-construction/lineto.adoc b/docs/commands/references/lineto.adoc
similarity index 67%
rename from docs/commands/path-construction/lineto.adoc
rename to docs/commands/references/lineto.adoc
index 1e7ea72..eb50cb3 100644
--- a/docs/commands/path-construction/lineto.adoc
+++ b/docs/commands/references/lineto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: lineto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -41,9 +40,9 @@ x y lineto → -
=== Description
-xref:../lineto.adoc[`lineto`] appends a straight line segment to the current path. The line extends from the current point to the point (x, y) in user space; (x, y) then becomes the new current point.
+link:/docs/commands/references/lineto/[`lineto`] appends a straight line segment to the current path. The line extends from the current point to the point (x, y) in user space; (x, y) then becomes the new current point.
-If the current point is undefined because the current path is empty, xref:../lineto.adoc[`lineto`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/lineto/[`lineto`] executes the [`nocurrentpoint`] error.
The coordinates are interpreted as user space coordinates and are transformed by the current transformation matrix (CTM) when the path is constructed.
@@ -149,7 +148,7 @@ stroke
=== Common Pitfalls
-WARNING: *No Current Point* - xref:../lineto.adoc[`lineto`] requires an established current point. Always use xref:../moveto.adoc[`moveto`] first.
+WARNING: *No Current Point* - link:/docs/commands/references/lineto/[`lineto`] requires an established current point. Always use link:/docs/commands/references/moveto/[`moveto`] first.
[source,postscript]
----
@@ -157,7 +156,7 @@ newpath
200 200 lineto % Error: nocurrentpoint
----
-WARNING: *Coordinates Not Cumulative* - Unlike xref:../rlineto.adoc[`rlineto`], coordinates are absolute positions, not offsets.
+WARNING: *Coordinates Not Cumulative* - Unlike link:/docs/commands/references/rlineto/[`rlineto`], coordinates are absolute positions, not offsets.
[source,postscript]
----
@@ -165,7 +164,7 @@ WARNING: *Coordinates Not Cumulative* - Unlike xref:../rlineto.adoc[`rlineto`],
50 50 lineto % Goes to (50, 50), not (150, 150)
----
-TIP: *Use for Straight Segments* - For curved paths, use xref:../curveto.adoc[`curveto`] or xref:../arc.adoc[`arc`] instead of approximating with many short line segments.
+TIP: *Use for Straight Segments* - For curved paths, use link:/docs/commands/references/curveto/[`curveto`] or link:/docs/commands/references/arc/[`arc`] instead of approximating with many short line segments.
=== Error Conditions
@@ -191,7 +190,7 @@ TIP: *Use for Straight Segments* - For curved paths, use xref:../curveto.adoc[`c
* Creates a straight line segment in device space after CTM transformation
* The endpoint becomes the new current point
* Lines are not rendered until a painting operator is executed
-* Multiple consecutive xref:../lineto.adoc[`lineto`] operations create a polyline
+* Multiple consecutive link:/docs/commands/references/lineto/[`lineto`] operations create a polyline
* Line appearance depends on current line width, dash pattern, and line cap settings
=== Performance Considerations
@@ -203,9 +202,9 @@ TIP: *Use for Straight Segments* - For curved paths, use xref:../curveto.adoc[`c
=== See Also
-* xref:../rlineto.adoc[`rlineto`] - Relative lineto
-* xref:../moveto.adoc[`moveto`] - Move to point without drawing
-* xref:../curveto.adoc[`curveto`] - Draw curved segment
-* xref:../arc.adoc[`arc`] - Draw circular arc
-* xref:../closepath.adoc[`closepath`] - Close current subpath
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/rlineto/[`rlineto`] - Relative lineto
+* link:/docs/commands/references/moveto/[`moveto`] - Move to point without drawing
+* link:/docs/commands/references/curveto/[`curveto`] - Draw curved segment
+* link:/docs/commands/references/arc/[`arc`] - Draw circular arc
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/ln.adoc b/docs/commands/references/ln.adoc
similarity index 86%
rename from docs/commands/arithmetic-math/ln.adoc
rename to docs/commands/references/ln.adoc
index ba4a2e5..39bc56f 100644
--- a/docs/commands/arithmetic-math/ln.adoc
+++ b/docs/commands/references/ln.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ln
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 15
---
= ln
@@ -69,8 +68,8 @@ num ln real
== Related Commands
-* xref:../log.adoc[`log`] - Base-10 logarithm
-* xref:../exp.adoc[`exp`] - Exponentiation (inverse operation)
+* link:/docs/commands/references/log/[`log`] - Base-10 logarithm
+* link:/docs/commands/references/exp/[`exp`] - Exponentiation (inverse operation)
== PostScript Level
@@ -95,4 +94,4 @@ The operand is zero or negative.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/dictionary/load.adoc b/docs/commands/references/load.adoc
similarity index 71%
rename from docs/commands/dictionary/load.adoc
rename to docs/commands/references/load.adoc
index 47492a4..46d1e72 100644
--- a/docs/commands/dictionary/load.adoc
+++ b/docs/commands/references/load.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: load
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -38,12 +37,12 @@ key load → value
=== Description
-xref:../load.adoc[`load`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
+link:/docs/commands/references/load/[`load`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
* If found: pushes the associated value
* If not found: executes [`undefined`] error
-xref:../load.adoc[`load`] looks up keys the same way the interpreter looks up executable names, but always pushes the value (never executes it).
+link:/docs/commands/references/load/[`load`] looks up keys the same way the interpreter looks up executable names, but always pushes the value (never executes it).
=== PostScript Level
@@ -103,7 +102,7 @@ add % Executes add operator
=== Common Pitfalls
-WARNING: *Always Pushes Value* - xref:../load.adoc[`load`] never executes values, even executable ones.
+WARNING: *Always Pushes Value* - link:/docs/commands/references/load/[`load`] never executes values, even executable ones.
[source,postscript]
----
@@ -160,7 +159,7 @@ TIP: *Use where First* - Check if key exists before loading:
[cols="2,3,3"]
|===
-| Operation | xref:../load.adoc[`load`] | xref:../array-string/get.adoc[`get`]
+| Operation | link:/docs/commands/references/load/[`load`] | link:/docs/commands/references/get/[`get`]
| Search scope
| Entire dictionary stack
@@ -177,8 +176,8 @@ TIP: *Use where First* - Check if key exists before loading:
=== See Also
-* xref:../store.adoc[`store`] - Store value in dictionary stack
-* xref:../def.adoc[`def`] - Define in current dictionary
-* xref:../where.adoc[`where`] - Find which dictionary contains key
-* xref:../array-string/get.adoc[`get`] - Get from specific dictionary
-* xref:../known.adoc[`known`] - Check if key exists
\ No newline at end of file
+* link:/docs/commands/references/store/[`store`] - Store value in dictionary stack
+* link:/docs/commands/references/def/[`def`] - Define in current dictionary
+* link:/docs/commands/references/where/[`where`] - Find which dictionary contains key
+* link:/docs/commands/references/get/[`get`] - Get from specific dictionary
+* link:/docs/commands/references/known/[`known`] - Check if key exists
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/log.adoc b/docs/commands/references/log.adoc
similarity index 88%
rename from docs/commands/arithmetic-math/log.adoc
rename to docs/commands/references/log.adoc
index 2f036c0..08c83ac 100644
--- a/docs/commands/arithmetic-math/log.adoc
+++ b/docs/commands/references/log.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: log
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 16
---
= log
@@ -89,8 +88,8 @@ num log real
== Related Commands
-* xref:../ln.adoc[`ln`] - Natural logarithm (base e)
-* xref:../exp.adoc[`exp`] - Exponentiation
+* link:/docs/commands/references/ln/[`ln`] - Natural logarithm (base e)
+* link:/docs/commands/references/exp/[`exp`] - Exponentiation
== PostScript Level
@@ -115,4 +114,4 @@ The operand is zero or negative.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/control-flow/loop.adoc b/docs/commands/references/loop.adoc
similarity index 69%
rename from docs/commands/control-flow/loop.adoc
rename to docs/commands/references/loop.adoc
index b6b9dea..ef9d3b6 100644
--- a/docs/commands/control-flow/loop.adoc
+++ b/docs/commands/references/loop.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: loop
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -38,9 +37,9 @@ proc loop → –
=== Description
-xref:../loop.adoc[`loop`] repeatedly executes _proc_ until _proc_ executes xref:../exit.adoc[`exit`], at which point interpretation resumes after the loop.
+link:/docs/commands/references/loop/[`loop`] repeatedly executes _proc_ until _proc_ executes link:/docs/commands/references/exit/[`exit`], at which point interpretation resumes after the loop.
-Control also leaves _proc_ if xref:../stop.adoc[`stop`] is executed. If _proc_ never executes xref:../exit.adoc[`exit`] or xref:../stop.adoc[`stop`], an infinite loop results.
+Control also leaves _proc_ if link:/docs/commands/references/stop/[`stop`] is executed. If _proc_ never executes link:/docs/commands/references/exit/[`exit`] or link:/docs/commands/references/stop/[`stop`], an infinite loop results.
=== PostScript Level
@@ -119,7 +118,7 @@ file {
=== Common Pitfalls
-WARNING: *Infinite Loops* - Without xref:../exit.adoc[`exit`] or xref:../stop.adoc[`stop`], loop runs forever.
+WARNING: *Infinite Loops* - Without link:/docs/commands/references/exit/[`exit`] or link:/docs/commands/references/stop/[`stop`], loop runs forever.
[source,postscript]
----
@@ -175,8 +174,8 @@ TIP: *Use External Interrupt* - Infinite loops can be broken via implementation-
=== See Also
-* xref:../exit.adoc[`exit`] - Exit loop
-* xref:../for.adoc[`for`] - Numeric loop
-* xref:../repeat.adoc[`repeat`] - Fixed repetition
-* xref:../stop.adoc[`stop`] - Exit stopped context
-* xref:../array-string/forall.adoc[`forall`] - Iterate collections
\ No newline at end of file
+* link:/docs/commands/references/exit/[`exit`] - Exit loop
+* link:/docs/commands/references/for/[`for`] - Numeric loop
+* link:/docs/commands/references/repeat/[`repeat`] - Fixed repetition
+* link:/docs/commands/references/stop/[`stop`] - Exit stopped context
+* link:/docs/commands/references/forall/[`forall`] - Iterate collections
\ No newline at end of file
diff --git a/docs/commands/font-text/makefont.adoc b/docs/commands/references/makefont.adoc
similarity index 50%
rename from docs/commands/font-text/makefont.adoc
rename to docs/commands/references/makefont.adoc
index 6fb510e..e49cd82 100644
--- a/docs/commands/font-text/makefont.adoc
+++ b/docs/commands/references/makefont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: makefont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 3
---
@@ -30,17 +29,17 @@ font'
=== Description
-xref:../makefont.adoc[`makefont`] applies `matrix` to `font`, producing a new `font'` whose characters are transformed by `matrix` when they are shown. xref:../makefont.adoc[`makefont`] first creates a copy of `font`. Then it replaces the new font's `FontMatrix` entry with the result of concatenating the existing `FontMatrix` with `matrix`. It inserts two additional entries, `OrigFont` and `ScaleMatrix`, whose purpose is internal to the implementation. Finally, it returns the result as `font'`.
+link:/docs/commands/references/makefont/[`makefont`] applies `matrix` to `font`, producing a new `font'` whose characters are transformed by `matrix` when they are shown. link:/docs/commands/references/makefont/[`makefont`] first creates a copy of `font`. Then it replaces the new font's `FontMatrix` entry with the result of concatenating the existing `FontMatrix` with `matrix`. It inserts two additional entries, `OrigFont` and `ScaleMatrix`, whose purpose is internal to the implementation. Finally, it returns the result as `font'`.
-The xref:../makefont.adoc[`makefont`], xref:../scalefont.adoc[`scalefont`], and `selectfont` operators produce a font dictionary derived from an original font dictionary, but with the `FontMatrix` entry altered. The derived font dictionary is allocated in local or global VM according to whether the original font dictionary is in local or global VM. This is independent of the current VM allocation mode.
+The link:/docs/commands/references/makefont/[`makefont`], link:/docs/commands/references/scalefont/[`scalefont`], and `selectfont` operators produce a font dictionary derived from an original font dictionary, but with the `FontMatrix` entry altered. The derived font dictionary is allocated in local or global VM according to whether the original font dictionary is in local or global VM. This is independent of the current VM allocation mode.
-Normally, xref:../makefont.adoc[`makefont`] copies only the font dictionary. Subsidiary objects, such as the `CharStrings` and `FontInfo` dictionaries, are shared with the original font. However, if `font` is a composite font, xref:../makefont.adoc[`makefont`] also copies the font dictionaries of any descendant composite fonts. It does not copy descendant base fonts.
+Normally, link:/docs/commands/references/makefont/[`makefont`] copies only the font dictionary. Subsidiary objects, such as the `CharStrings` and `FontInfo` dictionaries, are shared with the original font. However, if `font` is a composite font, link:/docs/commands/references/makefont/[`makefont`] also copies the font dictionaries of any descendant composite fonts. It does not copy descendant base fonts.
-Showing characters from the transformed font produces the same results as showing from the original font after having transformed user space by the same matrix. xref:../makefont.adoc[`makefont`] is essentially a convenience operator that permits the desired transformation to be encapsulated in the font description.
+Showing characters from the transformed font produces the same results as showing from the original font after having transformed user space by the same matrix. link:/docs/commands/references/makefont/[`makefont`] is essentially a convenience operator that permits the desired transformation to be encapsulated in the font description.
-The most common transformation is to scale a font by a uniform factor in both x and y. xref:../scalefont.adoc[`scalefont`] is a special case of the more general xref:../makefont.adoc[`makefont`] and should be used for such uniform scaling.
+The most common transformation is to scale a font by a uniform factor in both x and y. link:/docs/commands/references/scalefont/[`scalefont`] is a special case of the more general link:/docs/commands/references/makefont/[`makefont`] and should be used for such uniform scaling.
-The interpreter keeps track of font dictionaries recently created by xref:../makefont.adoc[`makefont`]. Calling xref:../makefont.adoc[`makefont`] multiple times with the same font and matrix will usually return the same `font'` rather than create a new one. However, it is usually more efficient for a PostScript language program to apply xref:../makefont.adoc[`makefont`] only once for each font that it needs and to keep track of the resulting font dictionaries on its own.
+The interpreter keeps track of font dictionaries recently created by link:/docs/commands/references/makefont/[`makefont`]. Calling link:/docs/commands/references/makefont/[`makefont`] multiple times with the same font and matrix will usually return the same `font'` rather than create a new one. However, it is usually more efficient for a PostScript language program to apply link:/docs/commands/references/makefont/[`makefont`] only once for each font that it needs and to keep track of the resulting font dictionaries on its own.
=== Parameters
@@ -170,7 +169,7 @@ y' = b×x + d×y + ty
=== See Also
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
-- xref:../scalefont.adoc[`scalefont`] - Scale font by uniform factor (simpler)
-- xref:../setfont.adoc[`setfont`] - Establish current font
-- xref:../currentfont.adoc[`currentfont`] - Get current font dictionary
\ No newline at end of file
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/scalefont/[`scalefont`] - Scale font by uniform factor (simpler)
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
+- link:/docs/commands/references/currentfont/[`currentfont`] - Get current font dictionary
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/mark.adoc b/docs/commands/references/mark.adoc
similarity index 84%
rename from docs/commands/stack-manipulation/mark.adoc
rename to docs/commands/references/mark.adoc
index b6e85be..404f5e0 100644
--- a/docs/commands/stack-manipulation/mark.adoc
+++ b/docs/commands/references/mark.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: mark
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
= mark
@@ -11,7 +10,7 @@ Pushes a mark object onto the operand stack to serve as a delimiter or reference
== Description
-The `mark` operator pushes a special mark object onto the operand stack. This object has its own unique type (`marktype`) and serves as a stack delimiter that can be detected by operators like xref:../counttomark.adoc[`counttomark`] and xref:../cleartomark.adoc[`cleartomark`].
+The `mark` operator pushes a special mark object onto the operand stack. This object has its own unique type (`marktype`) and serves as a stack delimiter that can be detected by operators like link:/docs/commands/references/counttomark/[`counttomark`] and link:/docs/commands/references/cleartomark/[`cleartomark`].
Marks are commonly used to delimit variable-length argument lists, allowing operators to process all stack elements down to the mark. The most familiar use is in array construction, where `[` is a synonym for `mark` and `]` creates an array from all elements up to the mark.
@@ -253,7 +252,7 @@ count 0 gt {
} if
----
-TIP: Always ensure marks are properly matched with either xref:../cleartomark.adoc[`cleartomark`], `]`, or explicit removal. Unmatched marks can interfere with later operations.
+TIP: Always ensure marks are properly matched with either link:/docs/commands/references/cleartomark/[`cleartomark`], `]`, or explicit removal. Unmatched marks can interfere with later operations.
=== Multiple Marks
@@ -269,11 +268,11 @@ cleartomark % Stack: (empty)
== Related Commands
-* xref:../cleartomark.adoc[`cleartomark`] - Remove elements up to and including mark
-* xref:../counttomark.adoc[`counttomark`] - Count elements to nearest mark
+* link:/docs/commands/references/cleartomark/[`cleartomark`] - Remove elements up to and including mark
+* link:/docs/commands/references/counttomark/[`counttomark`] - Count elements to nearest mark
* `[` - Synonym for mark (used with `]`)
* `]` - Create array from elements after mark
-* xref:../pop.adoc[`pop`] - Remove single element (including marks)
+* link:/docs/commands/references/pop/[`pop`] - Remove single element (including marks)
== PostScript Level
@@ -295,11 +294,11 @@ The operand stack is full and cannot accommodate the mark object.
Pushing a mark is a very fast O(1) operation, identical in cost to pushing any other object.
-However, operations that search for marks (like xref:../counttomark.adoc[`counttomark`]) must scan the stack, which is O(n) where n is the distance to the mark.
+However, operations that search for marks (like link:/docs/commands/references/counttomark/[`counttomark`]) must scan the stack, which is O(n) where n is the distance to the mark.
== Best Practices
-1. **Use with paired operations**: Always pair `mark` with xref:../cleartomark.adoc[`cleartomark`] or `]`
+1. **Use with paired operations**: Always pair `mark` with link:/docs/commands/references/cleartomark/[`cleartomark`] or `]`
2. **Prefer [ ] for arrays**: Use `[` and `]` for array construction (more readable)
3. **Use mark for variable args**: Use `mark` when implementing variable-argument procedures
4. **Document mark usage**: Make it clear when procedures expect marks on the stack
@@ -342,7 +341,7 @@ cleartomark
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:../../usage/basic/arrays.adoc[Arrays] - Using marks for array construction
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/usage/basic/arrays/[Arrays] - Using marks for array construction
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/transformations/matrix.adoc b/docs/commands/references/matrix.adoc
similarity index 80%
rename from docs/commands/transformations/matrix.adoc
rename to docs/commands/references/matrix.adoc
index 7d56fe8..8ac28ee 100644
--- a/docs/commands/transformations/matrix.adoc
+++ b/docs/commands/references/matrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: matrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -38,7 +37,7 @@ Creates an identity transformation matrix.
=== Description
-xref:../matrix.adoc[`matrix`] creates a 6-element array object, fills it with the values of an identity matrix [1.0 0.0 0.0 1.0 0.0 0.0], and pushes this array on the operand stack.
+link:/docs/commands/references/matrix/[`matrix`] creates a 6-element array object, fills it with the values of an identity matrix [1.0 0.0 0.0 1.0 0.0 0.0], and pushes this array on the operand stack.
The array is allocated in local or global VM according to the current VM allocation mode.
@@ -123,7 +122,7 @@ savedCTM setmatrix % Restore CTM
=== Common Pitfalls
-WARNING: *Not Just Array Creation* - xref:../matrix.adoc[`matrix`] creates an array AND fills it with identity matrix values.
+WARNING: *Not Just Array Creation* - link:/docs/commands/references/matrix/[`matrix`] creates an array AND fills it with identity matrix values.
[source,postscript]
----
@@ -156,7 +155,7 @@ myMatrix currentmatrix pop
myMatrix 100 100 translate pop
----
-TIP: *Equivalent to Array Creation* - This is equivalent to xref:../matrix.adoc[`matrix`]:
+TIP: *Equivalent to Array Creation* - This is equivalent to link:/docs/commands/references/matrix/[`matrix`]:
[source,postscript]
----
@@ -254,10 +253,10 @@ matrix currentmatrix % Get CTM into new matrix
=== See Also
-* xref:../identmatrix.adoc[`identmatrix`] - Initialize array as identity matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current transformation matrix
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../setmatrix.adoc[`setmatrix`] - Set transformation matrix
-* xref:../concat.adoc[`concat`] - Concatenate matrix with CTM
-* xref:../concatmatrix.adoc[`concatmatrix`] - Multiply two matrices
-* xref:../array-string/array.adoc[`array`] - Create array
\ No newline at end of file
+* link:/docs/commands/references/identmatrix/[`identmatrix`] - Initialize array as identity matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current transformation matrix
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Set transformation matrix
+* link:/docs/commands/references/concat/[`concat`] - Concatenate matrix with CTM
+* link:/docs/commands/references/concatmatrix/[`concatmatrix`] - Multiply two matrices
+* link:/docs/commands/references/array/[`array`] - Create array
\ No newline at end of file
diff --git a/docs/commands/dictionary/maxlength.adoc b/docs/commands/references/maxlength.adoc
similarity index 73%
rename from docs/commands/dictionary/maxlength.adoc
rename to docs/commands/references/maxlength.adoc
index a81a1b1..37d2fc8 100644
--- a/docs/commands/dictionary/maxlength.adoc
+++ b/docs/commands/references/maxlength.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: maxlength
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -38,9 +37,9 @@ dict maxlength → int
=== Description
-xref:../maxlength.adoc[`maxlength`] returns the capacity of _dict_ - the maximum number of key-value pairs it can hold using the VM currently allocated to it.
+link:/docs/commands/references/maxlength/[`maxlength`] returns the capacity of _dict_ - the maximum number of key-value pairs it can hold using the VM currently allocated to it.
-**Level 1**: Returns the _int_ operand originally passed to xref:../dict.adoc[`dict`] - the dictionary's fixed maximum capacity.
+**Level 1**: Returns the _int_ operand originally passed to link:/docs/commands/references/dict/[`dict`] - the dictionary's fixed maximum capacity.
**Level 2**: Returns the current capacity, which may be larger than the original size if the dictionary has grown.
@@ -111,7 +110,7 @@ requiredSlots lt {
=== Common Pitfalls
-WARNING: *maxlength ≠ length* - xref:../maxlength.adoc[`maxlength`] is capacity, xref:../array-string/length.adoc[`length`] is current count.
+WARNING: *maxlength ≠ length* - link:/docs/commands/references/maxlength/[`maxlength`] is capacity, link:/docs/commands/references/length/[`length`] is current count.
[source,postscript]
----
@@ -165,11 +164,11 @@ TIP: *Don't Rely on Exact Values* - In Level 2, maxlength may increase unpredict
| Measurement | Operator | Meaning
| Current entries
-| xref:../array-string/length.adoc[`length`]
+| link:/docs/commands/references/length/[`length`]
| Number of key-value pairs
| Maximum capacity
-| xref:../maxlength.adoc[`maxlength`]
+| link:/docs/commands/references/maxlength/[`maxlength`]
| Slots available with current VM allocation
| Available space
@@ -179,7 +178,7 @@ TIP: *Don't Rely on Exact Values* - In Level 2, maxlength may increase unpredict
=== See Also
-* xref:../array-string/length.adoc[`length`] - Get current entry count
-* xref:../dict.adoc[`dict`] - Create dictionary with initial capacity
-* xref:../def.adoc[`def`] - Add entry to dictionary
-* xref:../known.adoc[`known`] - Check if key exists
\ No newline at end of file
+* link:/docs/commands/references/length/[`length`] - Get current entry count
+* link:/docs/commands/references/dict/[`dict`] - Create dictionary with initial capacity
+* link:/docs/commands/references/def/[`def`] - Add entry to dictionary
+* link:/docs/commands/references/known/[`known`] - Check if key exists
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/mod.adoc b/docs/commands/references/mod.adoc
similarity index 93%
rename from docs/commands/arithmetic-math/mod.adoc
rename to docs/commands/references/mod.adoc
index c3b010b..abae5ba 100644
--- a/docs/commands/arithmetic-math/mod.adoc
+++ b/docs/commands/references/mod.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: mod
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
= mod
@@ -280,11 +279,11 @@ Both operands *must* be integers. Real numbers or other types will cause a `type
== Related Commands
-* xref:../idiv.adoc[`idiv`] - Integer division (quotient)
-* xref:../div.adoc[`div`] - Division with real result
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division (quotient)
+* link:/docs/commands/references/div/[`div`] - Division with real result
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
== PostScript Level
@@ -359,5 +358,5 @@ The `mod` operator is fast, typically implemented as a single hardware instructi
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/path-construction/moveto.adoc b/docs/commands/references/moveto.adoc
similarity index 58%
rename from docs/commands/path-construction/moveto.adoc
rename to docs/commands/references/moveto.adoc
index 83dbf33..3183ff4 100644
--- a/docs/commands/path-construction/moveto.adoc
+++ b/docs/commands/references/moveto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: moveto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -41,9 +40,9 @@ x y moveto → -
=== Description
-xref:../moveto.adoc[`moveto`] starts a new subpath of the current path by setting the current point in the graphics state to the user space coordinate (x, y) without adding any line segments to the current path.
+link:/docs/commands/references/moveto/[`moveto`] starts a new subpath of the current path by setting the current point in the graphics state to the user space coordinate (x, y) without adding any line segments to the current path.
-If the previous path construction operation was also a xref:../moveto.adoc[`moveto`] or xref:../rmoveto.adoc[`rmoveto`], that point is deleted from the current path and the new xref:../moveto.adoc[`moveto`] point replaces it.
+If the previous path construction operation was also a link:/docs/commands/references/moveto/[`moveto`] or link:/docs/commands/references/rmoveto/[`rmoveto`], that point is deleted from the current path and the new link:/docs/commands/references/moveto/[`moveto`] point replaces it.
The coordinates are interpreted as user space coordinates and are transformed by the current transformation matrix (CTM) to device space when the path is constructed.
@@ -127,7 +126,7 @@ fill % Fill both squares
=== Common Pitfalls
-WARNING: *No Current Point Initially* - After xref:../newpath.adoc[`newpath`], there is no current point. Always use xref:../moveto.adoc[`moveto`] to establish one before operations like xref:../lineto.adoc[`lineto`] or xref:../curveto.adoc[`curveto`].
+WARNING: *No Current Point Initially* - After link:/docs/commands/references/newpath/[`newpath`], there is no current point. Always use link:/docs/commands/references/moveto/[`moveto`] to establish one before operations like link:/docs/commands/references/lineto/[`lineto`] or link:/docs/commands/references/curveto/[`curveto`].
[source,postscript]
----
@@ -135,7 +134,7 @@ newpath
200 200 lineto % Error: nocurrentpoint
----
-WARNING: *Consecutive moveto* - Multiple consecutive xref:../moveto.adoc[`moveto`] operations cause only the last one to be effective. The previous points are discarded.
+WARNING: *Consecutive moveto* - Multiple consecutive link:/docs/commands/references/moveto/[`moveto`] operations cause only the last one to be effective. The previous points are discarded.
[source,postscript]
----
@@ -146,7 +145,7 @@ newpath
40 40 lineto % Line starts from (30, 30)
----
-TIP: *Use for Positioning* - xref:../moveto.adoc[`moveto`] is essential for positioning before drawing or showing text. It doesn't consume the current point—it sets it.
+TIP: *Use for Positioning* - link:/docs/commands/references/moveto/[`moveto`] is essential for positioning before drawing or showing text. It doesn't consume the current point—it sets it.
=== Error Conditions
@@ -166,7 +165,7 @@ TIP: *Use for Positioning* - xref:../moveto.adoc[`moveto`] is essential for posi
=== Implementation Notes
-* xref:../moveto.adoc[`moveto`] does not add any segments to the path
+* link:/docs/commands/references/moveto/[`moveto`] does not add any segments to the path
* Coordinates are immediately transformed by CTM to device space
* The point becomes the start of a new subpath
* Subsequent path operations use this as the current point
@@ -177,14 +176,14 @@ TIP: *Use for Positioning* - xref:../moveto.adoc[`moveto`] is essential for posi
* Very lightweight operation
* No path segments are created
* Transformation happens immediately
-* Multiple consecutive xref:../moveto.adoc[`moveto`] operations have minimal overhead (only the last is retained)
+* Multiple consecutive link:/docs/commands/references/moveto/[`moveto`] operations have minimal overhead (only the last is retained)
=== See Also
-* xref:../rmoveto.adoc[`rmoveto`] - Relative moveto
-* xref:../lineto.adoc[`lineto`] - Draw line to point
-* xref:../curveto.adoc[`curveto`] - Draw curve to point
-* xref:../arc.adoc[`arc`] - Draw circular arc
-* xref:../closepath.adoc[`closepath`] - Close current subpath
-* xref:../newpath.adoc[`newpath`] - Initialize empty path
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point coordinates
\ No newline at end of file
+* link:/docs/commands/references/rmoveto/[`rmoveto`] - Relative moveto
+* link:/docs/commands/references/lineto/[`lineto`] - Draw line to point
+* link:/docs/commands/references/curveto/[`curveto`] - Draw curve to point
+* link:/docs/commands/references/arc/[`arc`] - Draw circular arc
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
+* link:/docs/commands/references/newpath/[`newpath`] - Initialize empty path
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point coordinates
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/mul.adoc b/docs/commands/references/mul.adoc
similarity index 91%
rename from docs/commands/arithmetic-math/mul.adoc
rename to docs/commands/references/mul.adoc
index 55ede06..0745a53 100644
--- a/docs/commands/arithmetic-math/mul.adoc
+++ b/docs/commands/references/mul.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: mul
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
= mul
@@ -241,13 +240,13 @@ Both operands must be numeric (integer or real). Other types will cause a `typec
== Related Commands
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../div.adoc[`div`] - Divide two numbers (real result)
-* xref:../idiv.adoc[`idiv`] - Integer division
-* xref:../mod.adoc[`mod`] - Modulo (remainder)
-* xref:../exp.adoc[`exp`] - Exponentiation
-* xref:../sqrt.adoc[`sqrt`] - Square root
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/div/[`div`] - Divide two numbers (real result)
+* link:/docs/commands/references/idiv/[`idiv`] - Integer division
+* link:/docs/commands/references/mod/[`mod`] - Modulo (remainder)
+* link:/docs/commands/references/exp/[`exp`] - Exponentiation
+* link:/docs/commands/references/sqrt/[`sqrt`] - Square root
== PostScript Level
@@ -319,5 +318,5 @@ price quantity mul % Less intuitive
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/neg.adoc b/docs/commands/references/neg.adoc
similarity index 94%
rename from docs/commands/arithmetic-math/neg.adoc
rename to docs/commands/references/neg.adoc
index da4baaa..e2f9dac 100644
--- a/docs/commands/arithmetic-math/neg.adoc
+++ b/docs/commands/references/neg.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: neg
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
= neg
@@ -241,9 +240,9 @@ true neg % ERROR: typecheck
== Related Commands
-* xref:../abs.adoc[`abs`] - Absolute value
-* xref:../sub.adoc[`sub`] - Subtract two numbers
-* xref:../add.adoc[`add`] - Add two numbers
+* link:/docs/commands/references/abs/[`abs`] - Absolute value
+* link:/docs/commands/references/sub/[`sub`] - Subtract two numbers
+* link:/docs/commands/references/add/[`add`] - Add two numbers
== PostScript Level
@@ -324,5 +323,5 @@ value neg neg % Same as abs for negative, but keeps positive positive
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/path-construction/newpath.adoc b/docs/commands/references/newpath.adoc
similarity index 71%
rename from docs/commands/path-construction/newpath.adoc
rename to docs/commands/references/newpath.adoc
index 6ccd60a..a895ed7 100644
--- a/docs/commands/path-construction/newpath.adoc
+++ b/docs/commands/references/newpath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: newpath
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -38,11 +37,11 @@ Initializes the current path to empty, making the current point undefined.
=== Description
-xref:../newpath.adoc[`newpath`] initializes the current path to be empty, causing the current point to become undefined.
+link:/docs/commands/references/newpath/[`newpath`] initializes the current path to be empty, causing the current point to become undefined.
This operator is typically used at the beginning of a path construction sequence to ensure that no leftover path segments from previous operations interfere with the new path being constructed.
-After xref:../newpath.adoc[`newpath`], the first path construction operation must be xref:../moveto.adoc[`moveto`] (or xref:../arc.adoc[`arc`], which can start without a current point) to establish a current point before using operations like xref:../lineto.adoc[`lineto`] or xref:../curveto.adoc[`curveto`].
+After link:/docs/commands/references/newpath/[`newpath`], the first path construction operation must be link:/docs/commands/references/moveto/[`moveto`] (or link:/docs/commands/references/arc/[`arc`], which can start without a current point) to establish a current point before using operations like link:/docs/commands/references/lineto/[`lineto`] or link:/docs/commands/references/curveto/[`curveto`].
=== PostScript Level
@@ -155,7 +154,7 @@ newpath
=== Common Pitfalls
-WARNING: *No Current Point After newpath* - After xref:../newpath.adoc[`newpath`], you must use xref:../moveto.adoc[`moveto`] before xref:../lineto.adoc[`lineto`], xref:../curveto.adoc[`curveto`], etc.
+WARNING: *No Current Point After newpath* - After link:/docs/commands/references/newpath/[`newpath`], you must use link:/docs/commands/references/moveto/[`moveto`] before link:/docs/commands/references/lineto/[`lineto`], link:/docs/commands/references/curveto/[`curveto`], etc.
[source,postscript]
----
@@ -163,7 +162,7 @@ newpath
200 200 lineto % Error: nocurrentpoint
----
-WARNING: *Painting Operators Don't Clear Path* - Unlike painting operators in some graphics systems, PostScript's `stroke` and `fill` do not automatically clear the path. Use xref:../newpath.adoc[`newpath`] explicitly.
+WARNING: *Painting Operators Don't Clear Path* - Unlike painting operators in some graphics systems, PostScript's `stroke` and `fill` do not automatically clear the path. Use link:/docs/commands/references/newpath/[`newpath`] explicitly.
[source,postscript]
----
@@ -182,11 +181,11 @@ stroke
newpath % Explicitly clear
----
-TIP: *Use at Start of Path Procedures* - Always begin path construction procedures with xref:../newpath.adoc[`newpath`] to ensure a clean slate.
+TIP: *Use at Start of Path Procedures* - Always begin path construction procedures with link:/docs/commands/references/newpath/[`newpath`] to ensure a clean slate.
=== Error Conditions
-None. xref:../newpath.adoc[`newpath`] cannot generate errors.
+None. link:/docs/commands/references/newpath/[`newpath`] cannot generate errors.
=== Implementation Notes
@@ -195,11 +194,11 @@ None. xref:../newpath.adoc[`newpath`] cannot generate errors.
* Does not affect the graphics state otherwise
* Very lightweight operation
* Does not consume or produce any stack values
-* Idempotent: calling xref:../newpath.adoc[`newpath`] multiple times has same effect as calling once
+* Idempotent: calling link:/docs/commands/references/newpath/[`newpath`] multiple times has same effect as calling once
=== Interaction with Graphics State
-xref:../newpath.adoc[`newpath`] only affects the current path. It does not change:
+link:/docs/commands/references/newpath/[`newpath`] only affects the current path. It does not change:
* Current transformation matrix (CTM)
* Current color
@@ -268,6 +267,6 @@ newpath % Start fresh
=== See Also
-* xref:../moveto.adoc[`moveto`] - Set current point
-* xref:../closepath.adoc[`closepath`] - Close current subpath
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/moveto/[`moveto`] - Set current point
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/array-string/packedarray.adoc b/docs/commands/references/packedarray.adoc
similarity index 76%
rename from docs/commands/array-string/packedarray.adoc
rename to docs/commands/references/packedarray.adoc
index 0229311..efecbe1 100644
--- a/docs/commands/array-string/packedarray.adoc
+++ b/docs/commands/references/packedarray.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: packedarray
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -47,7 +46,7 @@ any₀ ... anyₙ₋₁ n packedarray → packedarray
=== Description
-xref:../packedarray.adoc[`packedarray`] creates a packed array object of length _n_ containing the objects any₀ through anyₙ₋₁ as elements. It:
+link:/docs/commands/references/packedarray/[`packedarray`] creates a packed array object of length _n_ containing the objects any₀ through anyₙ₋₁ as elements. It:
1. Removes the integer _n_ from the stack
2. Removes _n_ objects from the stack
@@ -118,7 +117,7 @@ true setpacking
=== Common Pitfalls
-WARNING: *Cannot Modify Packed Arrays* - Packed arrays are read-only. Attempting to use xref:../put.adoc[`put`] or xref:../putinterval.adoc[`putinterval`] causes [`invalidaccess`] error.
+WARNING: *Cannot Modify Packed Arrays* - Packed arrays are read-only. Attempting to use link:/docs/commands/references/put/[`put`] or link:/docs/commands/references/putinterval/[`putinterval`] causes [`invalidaccess`] error.
[source,postscript]
----
@@ -137,7 +136,7 @@ true setpacking
false setpacking
----
-TIP: *Read Operations Work Normally* - Can use xref:../get.adoc[`get`], xref:../getinterval.adoc[`getinterval`], xref:../aload.adoc[`aload`], xref:../forall.adoc[`forall`], etc.
+TIP: *Read Operations Work Normally* - Can use link:/docs/commands/references/get/[`get`], link:/docs/commands/references/getinterval/[`getinterval`], link:/docs/commands/references/aload/[`aload`], link:/docs/commands/references/forall/[`forall`], etc.
=== Error Conditions
@@ -198,8 +197,8 @@ TIP: *Read Operations Work Normally* - Can use xref:../get.adoc[`get`], xref:../
=== See Also
-* xref:../array.adoc[`array`] - Create regular (modifiable) array
-* xref:left-bracket.adoc[`[`] / xref:right-bracket.adoc[`]`] - Array literal syntax
-* xref:../aload.adoc[`aload`] - Load packed array elements
-* xref:../get.adoc[`get`] - Get packed array element
-* xref:../forall.adoc[`forall`] - Iterate over packed array
\ No newline at end of file
+* link:/docs/commands/references/array/[`array`] - Create regular (modifiable) array
+* link:/docs/commands/references/brackets/[`[`] / link:/docs/commands/references/brackets/[`]`] - Array literal syntax
+* link:/docs/commands/references/aload/[`aload`] - Load packed array elements
+* link:/docs/commands/references/get/[`get`] - Get packed array element
+* link:/docs/commands/references/forall/[`forall`] - Iterate over packed array
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/pop.adoc b/docs/commands/references/pop.adoc
similarity index 87%
rename from docs/commands/stack-manipulation/pop.adoc
rename to docs/commands/references/pop.adoc
index 4bbe8c7..6175c98 100644
--- a/docs/commands/stack-manipulation/pop.adoc
+++ b/docs/commands/references/pop.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: pop
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
= pop
@@ -188,11 +187,11 @@ pop % Removes result if not needed
== Related Commands
-* xref:../exch.adoc[`exch`] - Exchange top two elements instead of removing
-* xref:../dup.adoc[`dup`] - Duplicate top element
-* xref:../clear.adoc[`clear`] - Remove all elements from stack
-* xref:../roll.adoc[`roll`] - Rotate elements (can achieve similar effects)
-* xref:../count.adoc[`count`] - Check stack depth before popping
+* link:/docs/commands/references/exch/[`exch`] - Exchange top two elements instead of removing
+* link:/docs/commands/references/dup/[`dup`] - Duplicate top element
+* link:/docs/commands/references/clear/[`clear`] - Remove all elements from stack
+* link:/docs/commands/references/roll/[`roll`] - Rotate elements (can achieve similar effects)
+* link:/docs/commands/references/count/[`count`] - Check stack depth before popping
== PostScript Level
@@ -236,6 +235,6 @@ The `pop` operator is extremely fast and has negligible performance impact. It's
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/stack-manipulation/psindex.adoc b/docs/commands/references/psindex.adoc
similarity index 88%
rename from docs/commands/stack-manipulation/psindex.adoc
rename to docs/commands/references/psindex.adoc
index 07f9fc9..8d99fce 100644
--- a/docs/commands/stack-manipulation/psindex.adoc
+++ b/docs/commands/references/psindex.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: index
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
= index
@@ -13,7 +12,7 @@ Duplicates the nth element from the top of the operand stack, where n is counted
The `index` operator removes a non-negative integer n from the operand stack, counts down to the nth element from the top (where the top is position 0), and pushes a copy of that element onto the stack.
-This operator is particularly useful for accessing elements deep in the stack without disturbing the intervening elements. It's essentially a generalized form of xref:../dup.adoc[`dup`], where `0 index` is equivalent to `dup`.
+This operator is particularly useful for accessing elements deep in the stack without disturbing the intervening elements. It's essentially a generalized form of link:/docs/commands/references/dup/[`dup`], where `0 index` is equivalent to `dup`.
This is a Level 1 operator, available in all PostScript implementations.
@@ -271,11 +270,11 @@ TIP: Remember that stack positions are counted from 0, where 0 is the topmost el
== Related Commands
-* xref:../dup.adoc[`dup`] - Equivalent to `0 index`
-* xref:../copy.adoc[`copy`] - Copy multiple top elements
-* xref:../roll.adoc[`roll`] - Rotate stack elements
-* xref:../exch.adoc[`exch`] - Exchange top two elements
-* xref:../count.adoc[`count`] - Get stack depth for bounds checking
+* link:/docs/commands/references/dup/[`dup`] - Equivalent to `0 index`
+* link:/docs/commands/references/copy/[`copy`] - Copy multiple top elements
+* link:/docs/commands/references/roll/[`roll`] - Rotate stack elements
+* link:/docs/commands/references/exch/[`exch`] - Exchange top two elements
+* link:/docs/commands/references/count/[`count`] - Get stack depth for bounds checking
== PostScript Level
@@ -326,9 +325,9 @@ However, frequently using large index values may indicate poor stack management.
1. **Use for deep access**: `index` is ideal when you need an element buried in the stack
2. **Prefer dup for top element**: Use `dup` rather than `0 index` for clarity
-3. **Check bounds**: Use xref:../count.adoc[`count`] to verify sufficient stack depth before large indices
+3. **Check bounds**: Use link:/docs/commands/references/count/[`count`] to verify sufficient stack depth before large indices
4. **Document stack layout**: When using `index`, clearly document which stack position contains what
-5. **Consider roll instead**: For repeated access to deep elements, xref:../roll.adoc[`roll`] might be more efficient
+5. **Consider roll instead**: For repeated access to deep elements, link:/docs/commands/references/roll/[`roll`] might be more efficient
=== Clear Documentation
@@ -358,6 +357,6 @@ However, frequently using large index values may indicate poor stack management.
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/array-string/put.adoc b/docs/commands/references/put.adoc
similarity index 80%
rename from docs/commands/array-string/put.adoc
rename to docs/commands/references/put.adoc
index 6ca1830..9e75141 100644
--- a/docs/commands/array-string/put.adoc
+++ b/docs/commands/references/put.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: put
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -61,7 +60,7 @@ string index int put → –
=== Description
-xref:../put.adoc[`put`] replaces a single element in a composite object:
+link:/docs/commands/references/put/[`put`] replaces a single element in a composite object:
* For arrays: stores _any_ at position _index_ (0 to n-1)
* For strings: stores integer _int_ (0-255) at position _index_
@@ -150,7 +149,7 @@ WARNING: *Index Range* - Array/string index must be 0 to length-1.
[1 2 3] 3 99 put % Error: index 3 out of range
----
-WARNING: *Packed Arrays are Read-Only* - Cannot use xref:../put.adoc[`put`] on packed arrays.
+WARNING: *Packed Arrays are Read-Only* - Cannot use link:/docs/commands/references/put/[`put`] on packed arrays.
[source,postscript]
----
@@ -193,14 +192,14 @@ TIP: *Dictionary Auto-Expands (Level 2)* - In Level 2, dictionaries automaticall
=== Performance Considerations
-* Array and string xref:../put.adoc[`put`] are very fast (direct indexing)
-* Dictionary xref:../put.adoc[`put`] slightly slower (hash table operation)
+* Array and string link:/docs/commands/references/put/[`put`] are very fast (direct indexing)
+* Dictionary link:/docs/commands/references/put/[`put`] slightly slower (hash table operation)
* Repeated dictionary puts in Level 1 may trigger slow rehashing if dictionary grows full
-* For bulk updates, consider xref:../putinterval.adoc[`putinterval`]
+* For bulk updates, consider link:/docs/commands/references/putinterval/[`putinterval`]
=== See Also
-* xref:../get.adoc[`get`] - Get element from array/string/dictionary
-* xref:../putinterval.adoc[`putinterval`] - Put subarray/substring
-* xref:../astore.adoc[`astore`] - Store multiple elements into array
-* xref:../length.adoc[`length`] - Get length of array/string
\ No newline at end of file
+* link:/docs/commands/references/get/[`get`] - Get element from array/string/dictionary
+* link:/docs/commands/references/putinterval/[`putinterval`] - Put subarray/substring
+* link:/docs/commands/references/astore/[`astore`] - Store multiple elements into array
+* link:/docs/commands/references/length/[`length`] - Get length of array/string
\ No newline at end of file
diff --git a/docs/commands/array-string/putinterval.adoc b/docs/commands/references/putinterval.adoc
similarity index 76%
rename from docs/commands/array-string/putinterval.adoc
rename to docs/commands/references/putinterval.adoc
index ffaba4d..7851c08 100644
--- a/docs/commands/array-string/putinterval.adoc
+++ b/docs/commands/references/putinterval.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: putinterval
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 10
---
@@ -46,9 +45,9 @@ string1 index string2 putinterval → –
=== Description
-xref:../putinterval.adoc[`putinterval`] replaces a subsequence of the first operand starting at _index_ with the entire contents of the third operand.
+link:/docs/commands/references/putinterval/[`putinterval`] replaces a subsequence of the first operand starting at _index_ with the entire contents of the third operand.
-The objects are copied from the source to the destination as if by a sequence of individual xref:../get.adoc[`get`] and xref:../put.adoc[`put`] operations. For arrays, if copied elements are composite objects, their values are shared between source and destination.
+The objects are copied from the source to the destination as if by a sequence of individual link:/docs/commands/references/get/[`get`] and link:/docs/commands/references/put/[`put`] operations. For arrays, if copied elements are composite objects, their values are shared between source and destination.
Requirements:
* _index_ must be valid (0 to length-1)
@@ -144,7 +143,7 @@ dest 0 get 0 99 put % Modifies BOTH arrays!
WARNING: *VM Restrictions* - If destination is in global VM and source contains local VM objects, [`invalidaccess`] error occurs.
-TIP: *Efficient Copying* - xref:../putinterval.adoc[`putinterval`] is more efficient than multiple xref:../put.adoc[`put`] operations for bulk copying.
+TIP: *Efficient Copying* - link:/docs/commands/references/putinterval/[`putinterval`] is more efficient than multiple link:/docs/commands/references/put/[`put`] operations for bulk copying.
=== Error Conditions
@@ -174,14 +173,14 @@ TIP: *Efficient Copying* - xref:../putinterval.adoc[`putinterval`] is more effic
=== Performance Considerations
-* Much faster than individual xref:../put.adoc[`put`] operations
+* Much faster than individual link:/docs/commands/references/put/[`put`] operations
* Efficient for bulk array/string operations
* No intermediate objects created
* Memory bandwidth limited for large copies
=== See Also
-* xref:../getinterval.adoc[`getinterval`] - Extract subarray/substring
-* xref:../put.adoc[`put`] - Store single element
-* xref:../get.adoc[`get`] - Get single element
-* xref:../astore.adoc[`astore`] - Store stack into array
\ No newline at end of file
+* link:/docs/commands/references/getinterval/[`getinterval`] - Extract subarray/substring
+* link:/docs/commands/references/put/[`put`] - Store single element
+* link:/docs/commands/references/get/[`get`] - Get single element
+* link:/docs/commands/references/astore/[`astore`] - Store stack into array
\ No newline at end of file
diff --git a/docs/commands/control-flow/quit.adoc b/docs/commands/references/quit.adoc
similarity index 71%
rename from docs/commands/control-flow/quit.adoc
rename to docs/commands/references/quit.adoc
index 0bf243f..4e29f42 100644
--- a/docs/commands/control-flow/quit.adoc
+++ b/docs/commands/references/quit.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: quit
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -29,13 +28,13 @@ Terminates operation of the PostScript interpreter.
=== Description
-xref:../quit.adoc[`quit`] terminates operation of the PostScript interpreter. The precise action depends on the environment:
+link:/docs/commands/references/quit/[`quit`] terminates operation of the PostScript interpreter. The precise action depends on the environment:
* May return control to operating system
* May halt or restart the machine
* In multi-context systems (DPS): terminates current context only
-In job server environments, xref:../quit.adoc[`quit`] in `userdict` is usually redefined to mean xref:../stop.adoc[`stop`] (terminate job, not interpreter).
+In job server environments, link:/docs/commands/references/quit/[`quit`] in `userdict` is usually redefined to mean link:/docs/commands/references/stop/[`stop`] (terminate job, not interpreter).
=== PostScript Level
@@ -97,7 +96,7 @@ quit % Usually stops job, not interpreter
systemdict /quit get exec % Actually quits
----
-WARNING: *Immediate Termination* - xref:../quit.adoc[`quit`] terminates immediately, no cleanup.
+WARNING: *Immediate Termination* - link:/docs/commands/references/quit/[`quit`] terminates immediately, no cleanup.
[source,postscript]
----
@@ -109,7 +108,7 @@ WARNING: *Immediate Termination* - xref:../quit.adoc[`quit`] terminates immediat
} if
----
-TIP: *Use stop in Jobs* - In encapsulated jobs, use xref:../stop.adoc[`stop`] instead of xref:../quit.adoc[`quit`].
+TIP: *Use stop in Jobs* - In encapsulated jobs, use link:/docs/commands/references/stop/[`stop`] instead of link:/docs/commands/references/quit/[`quit`].
=== Error Conditions
@@ -146,6 +145,6 @@ end
=== See Also
-* xref:../stop.adoc[`stop`] - Terminate stopped context
-* xref:../exit.adoc[`exit`] - Exit loop
-* xref:../stopped.adoc[`stopped`] - Error catching
\ No newline at end of file
+* link:/docs/commands/references/stop/[`stop`] - Terminate stopped context
+* link:/docs/commands/references/exit/[`exit`] - Exit loop
+* link:/docs/commands/references/stopped/[`stopped`] - Error catching
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/rand.adoc b/docs/commands/references/rand.adoc
similarity index 85%
rename from docs/commands/arithmetic-math/rand.adoc
rename to docs/commands/references/rand.adoc
index 3118c45..58ab73e 100644
--- a/docs/commands/arithmetic-math/rand.adoc
+++ b/docs/commands/references/rand.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rand
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 21
---
= rand
@@ -11,7 +10,7 @@ Generates a pseudo-random integer.
== Description
-The `rand` operator generates and returns a pseudo-random integer in the range 0 to 2³¹ - 1 (2147483647). The sequence is deterministic and can be controlled using xref:../srand.adoc[`srand`] to set the seed and xref:../rrand.adoc[`rrand`] to get/restore the generator state.
+The `rand` operator generates and returns a pseudo-random integer in the range 0 to 2³¹ - 1 (2147483647). The sequence is deterministic and can be controlled using link:/docs/commands/references/srand/[`srand`] to set the seed and link:/docs/commands/references/rrand/[`rrand`] to get/restore the generator state.
This is a Level 1 operator, available in all PostScript implementations.
@@ -135,8 +134,8 @@ rand % → 1804289383 (same sequence)
== Related Commands
-* xref:../srand.adoc[`srand`] - Seed random generator
-* xref:../rrand.adoc[`rrand`] - Get/set random seed
+* link:/docs/commands/references/srand/[`srand`] - Seed random generator
+* link:/docs/commands/references/rrand/[`rrand`] - Get/set random seed
== PostScript Level
@@ -149,4 +148,4 @@ The operand stack is full (cannot push result).
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/array-string/rcheck.adoc b/docs/commands/references/rcheck.adoc
similarity index 77%
rename from docs/commands/array-string/rcheck.adoc
rename to docs/commands/references/rcheck.adoc
index 26d30c2..3e75bbe 100644
--- a/docs/commands/array-string/rcheck.adoc
+++ b/docs/commands/references/rcheck.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rcheck
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 25
---
@@ -42,7 +41,7 @@ string rcheck → bool
=== Description
-xref:../rcheck.adoc[`rcheck`] tests whether the operand's access attribute permits its value to be read explicitly by PostScript operators.
+link:/docs/commands/references/rcheck/[`rcheck`] tests whether the operand's access attribute permits its value to be read explicitly by PostScript operators.
Returns:
* `true` if access is **unlimited** or **readonly**
@@ -125,9 +124,9 @@ dup rcheck % false (cannot read)
dup exec % Works! (can execute)
----
-WARNING: *Confusing rcheck with xcheck* - xref:../rcheck.adoc[`rcheck`] tests read access, xref:../xcheck.adoc[`xcheck`] tests executable attribute.
+WARNING: *Confusing rcheck with xcheck* - link:/docs/commands/references/rcheck/[`rcheck`] tests read access, link:/docs/commands/references/xcheck/[`xcheck`] tests executable attribute.
-TIP: *Check Before Reading* - Use xref:../rcheck.adoc[`rcheck`] before operations that read object values.
+TIP: *Check Before Reading* - Use link:/docs/commands/references/rcheck/[`rcheck`] before operations that read object values.
=== Error Conditions
@@ -178,7 +177,7 @@ TIP: *Check Before Reading* - Use xref:../rcheck.adoc[`rcheck`] before operation
=== See Also
-* xref:../wcheck.adoc[`wcheck`] - Test if writable
-* xref:../xcheck.adoc[`xcheck`] - Test if executable
+* link:/docs/commands/references/wcheck/[`wcheck`] - Test if writable
+* link:/docs/commands/references/xcheck/[`xcheck`] - Test if executable
* Access operators: `readonly`, `executeonly`, `noaccess`
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/path-construction/rcurveto.adoc b/docs/commands/references/rcurveto.adoc
similarity index 68%
rename from docs/commands/path-construction/rcurveto.adoc
rename to docs/commands/references/rcurveto.adoc
index c5d965b..a64e14a 100644
--- a/docs/commands/path-construction/rcurveto.adoc
+++ b/docs/commands/references/rcurveto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rcurveto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -53,11 +52,11 @@ dx1 dy1 dx2 dy2 dx3 dy3 rcurveto → -
=== Description
-xref:../rcurveto.adoc[`rcurveto`] (relative curveto) adds a Bézier cubic section to the current path in the same manner as xref:../curveto.adoc[`curveto`]. However, the three number pairs are interpreted as displacements relative to the current point (x0, y0) rather than as absolute coordinates.
+link:/docs/commands/references/rcurveto/[`rcurveto`] (relative curveto) adds a Bézier cubic section to the current path in the same manner as link:/docs/commands/references/curveto/[`curveto`]. However, the three number pairs are interpreted as displacements relative to the current point (x0, y0) rather than as absolute coordinates.
-That is, xref:../rcurveto.adoc[`rcurveto`] constructs a curve from (x0, y0) to (x0+dx3, y0+dy3), using (x0+dx1, y0+dy1) and (x0+dx2, y0+dy2) as Bézier control points.
+That is, link:/docs/commands/references/rcurveto/[`rcurveto`] constructs a curve from (x0, y0) to (x0+dx3, y0+dy3), using (x0+dx1, y0+dy1) and (x0+dx2, y0+dy2) as Bézier control points.
-If the current point is undefined because the current path is empty, xref:../rcurveto.adoc[`rcurveto`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/rcurveto/[`rcurveto`] executes the [`nocurrentpoint`] error.
=== PostScript Level
@@ -171,7 +170,7 @@ fill
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../rcurveto.adoc[`rcurveto`] needs a current point. Use xref:../moveto.adoc[`moveto`] first.
+WARNING: *Requires Current Point* - link:/docs/commands/references/rcurveto/[`rcurveto`] needs a current point. Use link:/docs/commands/references/moveto/[`moveto`] first.
[source,postscript]
----
@@ -179,7 +178,7 @@ newpath
50 50 100 50 150 0 rcurveto % Error: nocurrentpoint
----
-WARNING: *All Coordinates Are Relative* - Unlike xref:../curveto.adoc[`curveto`], all six parameters are displacements from the current point, not absolute positions.
+WARNING: *All Coordinates Are Relative* - Unlike link:/docs/commands/references/curveto/[`curveto`], all six parameters are displacements from the current point, not absolute positions.
[source,postscript]
----
@@ -188,7 +187,7 @@ WARNING: *All Coordinates Are Relative* - Unlike xref:../curveto.adoc[`curveto`]
% Actually draws to (250, 250), not (150, 150)
----
-TIP: *Ideal for Patterns* - xref:../rcurveto.adoc[`rcurveto`] excels at creating repeating curved patterns where each curve relates to the previous position.
+TIP: *Ideal for Patterns* - link:/docs/commands/references/rcurveto/[`rcurveto`] excels at creating repeating curved patterns where each curve relates to the previous position.
=== Error Conditions
@@ -222,15 +221,15 @@ TIP: *Ideal for Patterns* - xref:../rcurveto.adoc[`rcurveto`] excels at creating
=== Performance Considerations
-* No performance difference from xref:../curveto.adoc[`curveto`]
+* No performance difference from link:/docs/commands/references/curveto/[`curveto`]
* Reduces coordinate calculation in code
* More maintainable for relative patterns
* Can accumulate rounding errors in long sequences
=== See Also
-* xref:../curveto.adoc[`curveto`] - Absolute curveto
-* xref:../rlineto.adoc[`rlineto`] - Relative lineto
-* xref:../rmoveto.adoc[`rmoveto`] - Relative moveto
-* xref:../arc.adoc[`arc`] - Draw circular arc
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
\ No newline at end of file
+* link:/docs/commands/references/curveto/[`curveto`] - Absolute curveto
+* link:/docs/commands/references/rlineto/[`rlineto`] - Relative lineto
+* link:/docs/commands/references/rmoveto/[`rmoveto`] - Relative moveto
+* link:/docs/commands/references/arc/[`arc`] - Draw circular arc
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
\ No newline at end of file
diff --git a/docs/commands/painting/rectclip.adoc b/docs/commands/references/rectclip.adoc
similarity index 77%
rename from docs/commands/painting/rectclip.adoc
rename to docs/commands/references/rectclip.adoc
index c60378a..a6865e2 100644
--- a/docs/commands/painting/rectclip.adoc
+++ b/docs/commands/references/rectclip.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rectclip
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 14
---
@@ -67,11 +66,11 @@ numstring rectclip → -
=== Description
-xref:../rectclip.adoc[`rectclip`] intersects the inside of the current clipping path with a rectangular path the operands describe. In the first form, the operands are four numbers that describe a single rectangle. In the other two forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
+link:/docs/commands/references/rectclip/[`rectclip`] intersects the inside of the current clipping path with a rectangular path the operands describe. In the first form, the operands are four numbers that describe a single rectangle. In the other two forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
-After computing the new clipping path, xref:../rectclip.adoc[`rectclip`] resets the current path to empty, as if by xref:../path-construction/newpath.adoc[`newpath`].
+After computing the new clipping path, link:/docs/commands/references/rectclip/[`rectclip`] resets the current path to empty, as if by link:/docs/commands/references/newpath/[`newpath`].
-In the first form, assuming width and height are positive, xref:../rectclip.adoc[`rectclip`] is equivalent to:
+In the first form, assuming width and height are positive, link:/docs/commands/references/rectclip/[`rectclip`] is equivalent to:
[source,postscript]
----
@@ -249,7 +248,7 @@ grestore
=== Common Pitfalls
-WARNING: *Clipping Can Only Shrink* - Like xref:../clip.adoc[`clip`], you cannot enlarge the clipping region.
+WARNING: *Clipping Can Only Shrink* - Like link:/docs/commands/references/clip/[`clip`], you cannot enlarge the clipping region.
[source,postscript]
----
@@ -260,7 +259,7 @@ WARNING: *Clipping Can Only Shrink* - Like xref:../clip.adoc[`clip`], you cannot
0 0 300 300 rectclip % Still limited to intersection
----
-WARNING: *Path Is Cleared* - Unlike xref:../clip.adoc[`clip`], xref:../rectclip.adoc[`rectclip`] automatically clears the current path.
+WARNING: *Path Is Cleared* - Unlike link:/docs/commands/references/clip/[`clip`], link:/docs/commands/references/rectclip/[`rectclip`] automatically clears the current path.
[source,postscript]
----
@@ -319,26 +318,26 @@ grestore
=== Implementation Notes
-* xref:../rectclip.adoc[`rectclip`] is optimized for rectangular clipping regions
+* link:/docs/commands/references/rectclip/[`rectclip`] is optimized for rectangular clipping regions
* Multiple rectangles create a union clip region
-* Much faster than constructing paths with xref:../clip.adoc[`clip`]
+* Much faster than constructing paths with link:/docs/commands/references/clip/[`clip`]
* The current path is automatically cleared after operation
* All rectangles use non-zero winding number rule
* Very efficient for simple rectangular masking
=== Graphics State Interaction
-xref:../rectclip.adoc[`rectclip`] affects:
+link:/docs/commands/references/rectclip/[`rectclip`] affects:
* Current clipping path - Intersected with rectangles
* Current path - Cleared to empty
-xref:../rectclip.adoc[`rectclip`] does not affect other graphics state parameters.
+link:/docs/commands/references/rectclip/[`rectclip`] does not affect other graphics state parameters.
The new clipping path is part of the graphics state and is affected by:
-* xref:../graphics-state/gsave.adoc[`gsave`] - Saves clipping path
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restores saved clipping path
+* link:/docs/commands/references/gsave/[`gsave`] - Saves clipping path
+* link:/docs/commands/references/grestore/[`grestore`] - Restores saved clipping path
* `save`/`restore` - Saves/restores with VM state
=== Best Practices
@@ -425,8 +424,8 @@ grestore
=== Performance Considerations
-* xref:../rectclip.adoc[`rectclip`] is highly optimized for rectangular regions
-* Much faster than equivalent xref:../clip.adoc[`clip`] with constructed paths
+* link:/docs/commands/references/rectclip/[`rectclip`] is highly optimized for rectangular regions
+* Much faster than equivalent link:/docs/commands/references/clip/[`clip`] with constructed paths
* Multiple rectangles in one operation are efficient
* Simple rectangular clips have minimal performance impact
* More efficient than complex path-based clipping
@@ -453,7 +452,7 @@ newpath
100 100 80 60 rectclip
----
-Benefits of xref:../rectclip.adoc[`rectclip`]:
+Benefits of link:/docs/commands/references/rectclip/[`rectclip`]:
* More concise syntax
* Faster execution
@@ -566,12 +565,12 @@ drawWindows
=== See Also
-* xref:../clip.adoc[`clip`] - Clip to arbitrary path (non-zero winding)
-* xref:../eoclip.adoc[`eoclip`] - Clip to path (even-odd rule)
-* xref:../clippath.adoc[`clippath`] - Get current clipping path
-* xref:../rectfill.adoc[`rectfill`] - Fill rectangles (Level 2)
-* xref:../rectstroke.adoc[`rectstroke`] - Stroke rectangles (Level 2)
+* link:/docs/commands/references/clip/[`clip`] - Clip to arbitrary path (non-zero winding)
+* link:/docs/commands/references/eoclip/[`eoclip`] - Clip to path (even-odd rule)
+* link:/docs/commands/references/clippath/[`clippath`] - Get current clipping path
+* link:/docs/commands/references/rectfill/[`rectfill`] - Fill rectangles (Level 2)
+* link:/docs/commands/references/rectstroke/[`rectstroke`] - Stroke rectangles (Level 2)
* `initclip` - Reset to device default clip
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
\ No newline at end of file
diff --git a/docs/commands/painting/rectfill.adoc b/docs/commands/references/rectfill.adoc
similarity index 79%
rename from docs/commands/painting/rectfill.adoc
rename to docs/commands/references/rectfill.adoc
index a76e768..14c28e7 100644
--- a/docs/commands/painting/rectfill.adoc
+++ b/docs/commands/references/rectfill.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rectfill
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
@@ -67,11 +66,11 @@ numstring rectfill → -
=== Description
-xref:../rectfill.adoc[`rectfill`] fills a path consisting of one or more rectangles the operands describe. In the first form, the operands are four numbers that describe a single rectangle. In the other two forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
+link:/docs/commands/references/rectfill/[`rectfill`] fills a path consisting of one or more rectangles the operands describe. In the first form, the operands are four numbers that describe a single rectangle. In the other two forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
-xref:../rectfill.adoc[`rectfill`] neither reads nor alters the current path in the graphics state.
+link:/docs/commands/references/rectfill/[`rectfill`] neither reads nor alters the current path in the graphics state.
-In the first form, assuming width and height are positive, xref:../rectfill.adoc[`rectfill`] is equivalent to:
+In the first form, assuming width and height are positive, link:/docs/commands/references/rectfill/[`rectfill`] is equivalent to:
[source,postscript]
----
@@ -223,7 +222,7 @@ drawWindows
=== Common Pitfalls
-WARNING: *Current Path Unaffected* - xref:../rectfill.adoc[`rectfill`] does not modify the current path.
+WARNING: *Current Path Unaffected* - link:/docs/commands/references/rectfill/[`rectfill`] does not modify the current path.
[source,postscript]
----
@@ -255,7 +254,7 @@ WARNING: *Array Must Have Quadruples* - Array length must be a multiple of 4.
[100 100 50 50] rectfill
----
-TIP: *More Efficient Than Manual Construction* - xref:../rectfill.adoc[`rectfill`] is optimized and faster than constructing paths manually:
+TIP: *More Efficient Than Manual Construction* - link:/docs/commands/references/rectfill/[`rectfill`] is optimized and faster than constructing paths manually:
[source,postscript]
----
@@ -292,7 +291,7 @@ grestore
=== Implementation Notes
-* xref:../rectfill.adoc[`rectfill`] is optimized for efficiency
+* link:/docs/commands/references/rectfill/[`rectfill`] is optimized for efficiency
* Multiple rectangles are filled as a single operation
* The operation is enclosed in implicit gsave/grestore
* Rectangles can overlap without issue
@@ -301,13 +300,13 @@ grestore
=== Graphics State Interaction
-xref:../rectfill.adoc[`rectfill`] uses these graphics state parameters:
+link:/docs/commands/references/rectfill/[`rectfill`] uses these graphics state parameters:
* Current color and color space
* Current clipping path
* Current transformation matrix (CTM)
-xref:../rectfill.adoc[`rectfill`] does not affect:
+link:/docs/commands/references/rectfill/[`rectfill`] does not affect:
* Current path - Completely isolated
* Any graphics state parameters
@@ -392,7 +391,7 @@ rectangles rectfill
=== Performance Considerations
-* xref:../rectfill.adoc[`rectfill`] is highly optimized for rectangular regions
+* link:/docs/commands/references/rectfill/[`rectfill`] is highly optimized for rectangular regions
* Significantly faster than equivalent path construction and fill
* Multiple rectangles in one operation are more efficient than separate operations
* Encoded number strings provide maximum efficiency
@@ -421,7 +420,7 @@ grestore
100 100 50 50 rectfill
----
-Benefits of xref:../rectfill.adoc[`rectfill`]:
+Benefits of link:/docs/commands/references/rectfill/[`rectfill`]:
* More concise syntax
* Faster execution
@@ -497,12 +496,12 @@ Benefits of xref:../rectfill.adoc[`rectfill`]:
=== See Also
-* xref:../fill.adoc[`fill`] - Fill arbitrary path
-* xref:../rectstroke.adoc[`rectstroke`] - Stroke rectangles (Level 2)
-* xref:../rectclip.adoc[`rectclip`] - Clip to rectangles (Level 2)
-* xref:../stroke.adoc[`stroke`] - Stroke path
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../graphics-state/setgray.adoc[`setgray`] - Set gray color
-* xref:../graphics-state/setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/fill/[`fill`] - Fill arbitrary path
+* link:/docs/commands/references/rectstroke/[`rectstroke`] - Stroke rectangles (Level 2)
+* link:/docs/commands/references/rectclip/[`rectclip`] - Clip to rectangles (Level 2)
+* link:/docs/commands/references/stroke/[`stroke`] - Stroke path
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/setgray/[`setgray`] - Set gray color
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/painting/rectstroke.adoc b/docs/commands/references/rectstroke.adoc
similarity index 81%
rename from docs/commands/painting/rectstroke.adoc
rename to docs/commands/references/rectstroke.adoc
index 37f7a85..e232178 100644
--- a/docs/commands/painting/rectstroke.adoc
+++ b/docs/commands/references/rectstroke.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rectstroke
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -94,13 +93,13 @@ numstring matrix rectstroke → -
=== Description
-xref:../rectstroke.adoc[`rectstroke`] strokes a path consisting of one or more rectangles the operands describe. In the first two forms, the operands are four numbers that describe a single rectangle. In the remaining forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
+link:/docs/commands/references/rectstroke/[`rectstroke`] strokes a path consisting of one or more rectangles the operands describe. In the first two forms, the operands are four numbers that describe a single rectangle. In the remaining forms, the operand is an array or an encoded number string that describes an arbitrary number of rectangles.
-xref:../rectstroke.adoc[`rectstroke`] neither reads nor alters the current path in the graphics state.
+link:/docs/commands/references/rectstroke/[`rectstroke`] neither reads nor alters the current path in the graphics state.
-If the matrix operand is present, xref:../rectstroke.adoc[`rectstroke`] concatenates matrix to the CTM after defining the path, but before stroking it. The matrix applies to the line width and dash pattern, if any, but not to the path itself.
+If the matrix operand is present, link:/docs/commands/references/rectstroke/[`rectstroke`] concatenates matrix to the CTM after defining the path, but before stroking it. The matrix applies to the line width and dash pattern, if any, but not to the path itself.
-In the first two forms, assuming width and height are positive, xref:../rectstroke.adoc[`rectstroke`] is equivalent to:
+In the first two forms, assuming width and height are positive, link:/docs/commands/references/rectstroke/[`rectstroke`] is equivalent to:
[source,postscript]
----
@@ -244,7 +243,7 @@ drawBorders
=== Common Pitfalls
-WARNING: *Current Path Unaffected* - xref:../rectstroke.adoc[`rectstroke`] does not modify the current path.
+WARNING: *Current Path Unaffected* - link:/docs/commands/references/rectstroke/[`rectstroke`] does not modify the current path.
[source,postscript]
----
@@ -316,7 +315,7 @@ rectstroke % Uniform 2-point line
=== Implementation Notes
-* xref:../rectstroke.adoc[`rectstroke`] is optimized for efficiency
+* link:/docs/commands/references/rectstroke/[`rectstroke`] is optimized for efficiency
* Multiple rectangles are stroked as a single operation
* The operation is enclosed in implicit gsave/grestore
* Rectangles can overlap without issue
@@ -325,18 +324,18 @@ rectstroke % Uniform 2-point line
=== Graphics State Parameters
-xref:../rectstroke.adoc[`rectstroke`] uses these parameters:
+link:/docs/commands/references/rectstroke/[`rectstroke`] uses these parameters:
-* Line width - from xref:../graphics-state/setlinewidth.adoc[`setlinewidth`]
-* Line cap - from xref:../graphics-state/setlinecap.adoc[`setlinecap`]
-* Line join - from xref:../graphics-state/setlinejoin.adoc[`setlinejoin`]
-* Miter limit - from xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`]
-* Dash pattern - from xref:../graphics-state/setdash.adoc[`setdash`]
+* Line width - from link:/docs/commands/references/setlinewidth/[`setlinewidth`]
+* Line cap - from link:/docs/commands/references/setlinecap/[`setlinecap`]
+* Line join - from link:/docs/commands/references/setlinejoin/[`setlinejoin`]
+* Miter limit - from link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]
+* Dash pattern - from link:/docs/commands/references/setdash/[`setdash`]
* Current color and color space
* Current clipping path
* Current transformation matrix (CTM)
-xref:../rectstroke.adoc[`rectstroke`] does not affect:
+link:/docs/commands/references/rectstroke/[`rectstroke`] does not affect:
* Current path - Completely isolated
* Any graphics state parameters
@@ -460,7 +459,7 @@ origMatrix setmatrix
=== Performance Considerations
-* xref:../rectstroke.adoc[`rectstroke`] is highly optimized
+* link:/docs/commands/references/rectstroke/[`rectstroke`] is highly optimized
* Significantly faster than manual path construction
* Multiple rectangles in one operation are more efficient
* Matrix parameter adds minimal overhead
@@ -492,7 +491,7 @@ grestore
100 100 50 50 rectstroke
----
-Benefits of xref:../rectstroke.adoc[`rectstroke`]:
+Benefits of link:/docs/commands/references/rectstroke/[`rectstroke`]:
* More concise syntax
* Faster execution
@@ -609,7 +608,7 @@ Benefits of xref:../rectstroke.adoc[`rectstroke`]:
=== Common Pitfalls
-WARNING: *Current Path Unaffected* - xref:../rectstroke.adoc[`rectstroke`] does not modify the current path.
+WARNING: *Current Path Unaffected* - link:/docs/commands/references/rectstroke/[`rectstroke`] does not modify the current path.
[source,postscript]
----
@@ -631,7 +630,7 @@ WARNING: *Matrix Parameter Affects Stroke, Not Coordinates* - The matrix affects
rectstroke % Rectangle at same position
----
-WARNING: *Graphics State Must Be Set First* - Set line parameters before calling xref:../rectstroke.adoc[`rectstroke`].
+WARNING: *Graphics State Must Be Set First* - Set line parameters before calling link:/docs/commands/references/rectstroke/[`rectstroke`].
[source,postscript]
----
@@ -677,7 +676,7 @@ rectstroke % Uniform 2-point line
=== Implementation Notes
-* xref:../rectstroke.adoc[`rectstroke`] is optimized for efficiency
+* link:/docs/commands/references/rectstroke/[`rectstroke`] is optimized for efficiency
* Multiple rectangles are stroked as a single operation
* The operation is enclosed in implicit gsave/grestore
* All current line parameters are applied
@@ -686,7 +685,7 @@ rectstroke % Uniform 2-point line
=== Graphics State Parameters
-All stroke-related parameters affect xref:../rectstroke.adoc[`rectstroke`]:
+All stroke-related parameters affect link:/docs/commands/references/rectstroke/[`rectstroke`]:
* **Line width** - Thickness of stroked lines
* **Line cap** - Appearance of rectangle corners (with line join)
@@ -790,7 +789,7 @@ rects rectstroke
=== Performance Considerations
-* xref:../rectstroke.adoc[`rectstroke`] is highly optimized
+* link:/docs/commands/references/rectstroke/[`rectstroke`] is highly optimized
* Much faster than manual path construction
* Multiple rectangles are more efficient than separate operations
* Matrix parameter adds minimal overhead
@@ -867,13 +866,13 @@ rects rectstroke
=== See Also
-* xref:../stroke.adoc[`stroke`] - Stroke arbitrary path
-* xref:../rectfill.adoc[`rectfill`] - Fill rectangles (Level 2)
-* xref:../rectclip.adoc[`rectclip`] - Clip to rectangles (Level 2)
-* xref:../ustroke.adoc[`ustroke`] - Stroke user path (Level 2)
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/setlinecap.adoc[`setlinecap`] - Set line cap
-* xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] - Set line join
-* xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`] - Set miter limit
-* xref:../graphics-state/setdash.adoc[`setdash`] - Set dash pattern
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
\ No newline at end of file
+* link:/docs/commands/references/stroke/[`stroke`] - Stroke arbitrary path
+* link:/docs/commands/references/rectfill/[`rectfill`] - Fill rectangles (Level 2)
+* link:/docs/commands/references/rectclip/[`rectclip`] - Clip to rectangles (Level 2)
+* link:/docs/commands/references/ustroke/[`ustroke`] - Stroke user path (Level 2)
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Set miter limit
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
\ No newline at end of file
diff --git a/docs/commands/control-flow/repeat.adoc b/docs/commands/references/repeat.adoc
similarity index 72%
rename from docs/commands/control-flow/repeat.adoc
rename to docs/commands/references/repeat.adoc
index 50ca406..3c92af7 100644
--- a/docs/commands/control-flow/repeat.adoc
+++ b/docs/commands/references/repeat.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: repeat
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -41,11 +40,11 @@ int proc repeat → –
=== Description
-xref:../repeat.adoc[`repeat`] executes _proc_ exactly _int_ times, where _int_ must be a non-negative integer.
+link:/docs/commands/references/repeat/[`repeat`] executes _proc_ exactly _int_ times, where _int_ must be a non-negative integer.
The operator removes both operands before executing _proc_ for the first time. If _int_ is 0, _proc_ is not executed at all.
-If _proc_ executes xref:../exit.adoc[`exit`], the loop terminates prematurely.
+If _proc_ executes link:/docs/commands/references/exit/[`exit`], the loop terminates prematurely.
=== PostScript Level
@@ -128,14 +127,14 @@ WARNING: *Stack Accumulation* - If _proc_ pushes values without consuming them,
% Stack has 10 copies of 42!
----
-WARNING: *No Control Variable* - Unlike xref:../for.adoc[`for`], xref:../repeat.adoc[`repeat`] doesn't provide iteration index.
+WARNING: *No Control Variable* - Unlike link:/docs/commands/references/for/[`for`], link:/docs/commands/references/repeat/[`repeat`] doesn't provide iteration index.
[source,postscript]
----
5 { % No way to know which iteration } repeat
----
-TIP: *Use for if Index Needed* - If you need to know the iteration number, use xref:../for.adoc[`for`] instead:
+TIP: *Use for if Index Needed* - If you need to know the iteration number, use link:/docs/commands/references/for/[`for`] instead:
[source,postscript]
----
@@ -172,25 +171,25 @@ TIP: *Use for if Index Needed* - If you need to know the iteration number, use x
| Use Case | Operator | Reason
| Need iteration index
-| xref:../for.adoc[`for`]
+| link:/docs/commands/references/for/[`for`]
| Provides control variable
| Fixed count, no index
-| xref:../repeat.adoc[`repeat`]
+| link:/docs/commands/references/repeat/[`repeat`]
| Simpler, faster
| Conditional termination
-| xref:../loop.adoc[`loop`]
+| link:/docs/commands/references/loop/[`loop`]
| Exit when condition met
| Iterate collection
-| xref:../array-string/forall.adoc[`forall`]
+| link:/docs/commands/references/forall/[`forall`]
| Works with arrays/strings
|===
=== See Also
-* xref:../for.adoc[`for`] - Loop with control variable
-* xref:../loop.adoc[`loop`] - Indefinite loop
-* xref:../exit.adoc[`exit`] - Exit loop early
-* xref:../array-string/forall.adoc[`forall`] - Iterate collections
\ No newline at end of file
+* link:/docs/commands/references/for/[`for`] - Loop with control variable
+* link:/docs/commands/references/loop/[`loop`] - Indefinite loop
+* link:/docs/commands/references/exit/[`exit`] - Exit loop early
+* link:/docs/commands/references/forall/[`forall`] - Iterate collections
\ No newline at end of file
diff --git a/docs/commands/path-construction/rlineto.adoc b/docs/commands/references/rlineto.adoc
similarity index 67%
rename from docs/commands/path-construction/rlineto.adoc
rename to docs/commands/references/rlineto.adoc
index 729a45d..ed4a0e1 100644
--- a/docs/commands/path-construction/rlineto.adoc
+++ b/docs/commands/references/rlineto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rlineto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -41,9 +40,9 @@ dx dy rlineto → -
=== Description
-xref:../rlineto.adoc[`rlineto`] (relative lineto) appends a straight line segment to the current path in the same manner as xref:../lineto.adoc[`lineto`]. However, the number pair is interpreted as a displacement relative to the current point (x, y) rather than as an absolute coordinate. That is, xref:../rlineto.adoc[`rlineto`] constructs a line from (x, y) to (x + dx, y + dy) and makes (x + dx, y + dy) the new current point.
+link:/docs/commands/references/rlineto/[`rlineto`] (relative lineto) appends a straight line segment to the current path in the same manner as link:/docs/commands/references/lineto/[`lineto`]. However, the number pair is interpreted as a displacement relative to the current point (x, y) rather than as an absolute coordinate. That is, link:/docs/commands/references/rlineto/[`rlineto`] constructs a line from (x, y) to (x + dx, y + dy) and makes (x + dx, y + dy) the new current point.
-If the current point is undefined because the current path is empty, xref:../rlineto.adoc[`rlineto`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/rlineto/[`rlineto`] executes the [`nocurrentpoint`] error.
=== PostScript Level
@@ -153,7 +152,7 @@ stroke
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../rlineto.adoc[`rlineto`] requires an established current point. Use xref:../moveto.adoc[`moveto`] first.
+WARNING: *Requires Current Point* - link:/docs/commands/references/rlineto/[`rlineto`] requires an established current point. Use link:/docs/commands/references/moveto/[`moveto`] first.
[source,postscript]
----
@@ -170,7 +169,7 @@ WARNING: *Displacements Not Absolute* - The arguments are relative displacements
-25 0 rlineto % Moves to (125, 100), not (-25, 100)
----
-TIP: *Ideal for Regular Patterns* - xref:../rlineto.adoc[`rlineto`] excels at creating regular, repeating patterns where each segment relates to the previous one.
+TIP: *Ideal for Regular Patterns* - link:/docs/commands/references/rlineto/[`rlineto`] excels at creating regular, repeating patterns where each segment relates to the previous one.
=== Error Conditions
@@ -196,20 +195,20 @@ TIP: *Ideal for Regular Patterns* - xref:../rlineto.adoc[`rlineto`] excels at cr
* Displacements are in user space, transformed by CTM
* More convenient than calculating absolute coordinates
* Equivalent to: `currentpoint transform dx dy add transform lineto`
-* Successive xref:../rlineto.adoc[`rlineto`] calls build polylines efficiently
+* Successive link:/docs/commands/references/rlineto/[`rlineto`] calls build polylines efficiently
* Negative displacements move backward or downward
=== Performance Considerations
-* No performance difference from xref:../lineto.adoc[`lineto`]
+* No performance difference from link:/docs/commands/references/lineto/[`lineto`]
* Reduces calculation overhead in code
* More maintainable for relative patterns
* Can reduce rounding errors in repetitive patterns
=== See Also
-* xref:../lineto.adoc[`lineto`] - Absolute lineto
-* xref:../rmoveto.adoc[`rmoveto`] - Relative moveto
-* xref:../rcurveto.adoc[`rcurveto`] - Relative curveto
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point
-* xref:../closepath.adoc[`closepath`] - Close current subpath
\ No newline at end of file
+* link:/docs/commands/references/lineto/[`lineto`] - Absolute lineto
+* link:/docs/commands/references/rmoveto/[`rmoveto`] - Relative moveto
+* link:/docs/commands/references/rcurveto/[`rcurveto`] - Relative curveto
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point
+* link:/docs/commands/references/closepath/[`closepath`] - Close current subpath
\ No newline at end of file
diff --git a/docs/commands/path-construction/rmoveto.adoc b/docs/commands/references/rmoveto.adoc
similarity index 67%
rename from docs/commands/path-construction/rmoveto.adoc
rename to docs/commands/references/rmoveto.adoc
index 1a7d49a..23d3e21 100644
--- a/docs/commands/path-construction/rmoveto.adoc
+++ b/docs/commands/references/rmoveto.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rmoveto
-parent: Path Construction
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -41,9 +40,9 @@ dx dy rmoveto → -
=== Description
-xref:../rmoveto.adoc[`rmoveto`] (relative moveto) starts a new subpath of the current path in the same manner as xref:../moveto.adoc[`moveto`]. However, the number pair is interpreted as a displacement relative to the current point (x, y) rather than as an absolute coordinate. That is, xref:../rmoveto.adoc[`rmoveto`] makes (x + dx, y + dy) the new current point, without connecting it to the previous point.
+link:/docs/commands/references/rmoveto/[`rmoveto`] (relative moveto) starts a new subpath of the current path in the same manner as link:/docs/commands/references/moveto/[`moveto`]. However, the number pair is interpreted as a displacement relative to the current point (x, y) rather than as an absolute coordinate. That is, link:/docs/commands/references/rmoveto/[`rmoveto`] makes (x + dx, y + dy) the new current point, without connecting it to the previous point.
-If the current point is undefined because the current path is empty, xref:../rmoveto.adoc[`rmoveto`] executes the [`nocurrentpoint`] error.
+If the current point is undefined because the current path is empty, link:/docs/commands/references/rmoveto/[`rmoveto`] executes the [`nocurrentpoint`] error.
=== PostScript Level
@@ -138,7 +137,7 @@ newpath
=== Common Pitfalls
-WARNING: *Requires Current Point* - xref:../rmoveto.adoc[`rmoveto`] requires a current point. Use xref:../moveto.adoc[`moveto`] first to establish one.
+WARNING: *Requires Current Point* - link:/docs/commands/references/rmoveto/[`rmoveto`] requires a current point. Use link:/docs/commands/references/moveto/[`moveto`] first to establish one.
[source,postscript]
----
@@ -154,7 +153,7 @@ WARNING: *Displacement Not Position* - The arguments are displacements (dx, dy),
-50 -50 rmoveto % Moves to (50, 50), not (-50, -50)
----
-TIP: *Use for Relative Layouts* - xref:../rmoveto.adoc[`rmoveto`] is ideal for creating shapes or text layouts where elements are positioned relative to each other.
+TIP: *Use for Relative Layouts* - link:/docs/commands/references/rmoveto/[`rmoveto`] is ideal for creating shapes or text layouts where elements are positioned relative to each other.
=== Error Conditions
@@ -185,14 +184,14 @@ TIP: *Use for Relative Layouts* - xref:../rmoveto.adoc[`rmoveto`] is ideal for c
=== Performance Considerations
-* Slightly faster than computing absolute coordinates and using xref:../moveto.adoc[`moveto`]
+* Slightly faster than computing absolute coordinates and using link:/docs/commands/references/moveto/[`moveto`]
* Useful for patterns and repeated structures
-* No performance difference from xref:../moveto.adoc[`moveto`] in terms of path complexity
+* No performance difference from link:/docs/commands/references/moveto/[`moveto`] in terms of path complexity
=== See Also
-* xref:../moveto.adoc[`moveto`] - Absolute moveto
-* xref:../rlineto.adoc[`rlineto`] - Relative lineto
-* xref:../rcurveto.adoc[`rcurveto`] - Relative curveto
-* xref:../currentpoint.adoc[`currentpoint`] - Get current point coordinates
-* xref:../newpath.adoc[`newpath`] - Initialize empty path
\ No newline at end of file
+* link:/docs/commands/references/moveto/[`moveto`] - Absolute moveto
+* link:/docs/commands/references/rlineto/[`rlineto`] - Relative lineto
+* link:/docs/commands/references/rcurveto/[`rcurveto`] - Relative curveto
+* link:/docs/commands/references/currentpoint/[`currentpoint`] - Get current point coordinates
+* link:/docs/commands/references/newpath/[`newpath`] - Initialize empty path
\ No newline at end of file
diff --git a/docs/commands/stack-manipulation/roll.adoc b/docs/commands/references/roll.adoc
similarity index 89%
rename from docs/commands/stack-manipulation/roll.adoc
rename to docs/commands/references/roll.adoc
index 0a9e254..e5085f7 100644
--- a/docs/commands/stack-manipulation/roll.adoc
+++ b/docs/commands/references/roll.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: roll
-parent: Stack Manipulation
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
= roll
@@ -240,10 +239,10 @@ TIP: The actual rotation is j mod n. Rolling by j and j+n produces identical res
== Related Commands
-* xref:../exch.adoc[`exch`] - Equivalent to `2 1 roll` or `2 -1 roll`
-* xref:../index.adoc[`index`] - Access element without reordering
-* xref:../copy.adoc[`copy`] - Duplicate elements
-* xref:../pop.adoc[`pop`] - Remove elements
+* link:/docs/commands/references/exch/[`exch`] - Equivalent to `2 1 roll` or `2 -1 roll`
+* link:/docs/commands/[`index`] - Access element without reordering
+* link:/docs/commands/references/copy/[`copy`] - Duplicate elements
+* link:/docs/commands/references/pop/[`pop`] - Remove elements
== PostScript Level
@@ -290,9 +289,9 @@ Frequently rotating large numbers of elements may indicate poor stack management
== Best Practices
-1. **Use exch for two elements**: `2 1 roll` and `2 -1 roll` both work, but xref:../exch.adoc[`exch`] is clearer
+1. **Use exch for two elements**: `2 1 roll` and `2 -1 roll` both work, but link:/docs/commands/references/exch/[`exch`] is clearer
2. **Document rotations**: Always comment what `roll` is doing, as it's not immediately obvious
-3. **Consider index instead**: Sometimes xref:../psindex.adoc[`psindex`] is clearer than `roll` for accessing buried elements
+3. **Consider index instead**: Sometimes link:/docs/commands/references/psindex/[`psindex`] is clearer than `roll` for accessing buried elements
4. **Keep n small**: Large rotations suggest stack management issues
5. **Use standard patterns**: Establish conventions like `3 1 roll` for rotating three elements
@@ -333,6 +332,6 @@ Frequently rotating large numbers of elements may indicate poor stack management
== See Also
-* xref:../../syntax/operators.adoc[Operators Overview] - Understanding PostScript operators
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide] - Stack manipulation tutorial
-* xref:index.adoc[Stack Manipulation] - All stack operators
+* link:/docs/syntax/operators/[Operators Overview] - Understanding PostScript operators
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide] - Stack manipulation tutorial
+* link:/docs/commands/references/[Stack Manipulation] - All stack operators
diff --git a/docs/commands/transformations/rotate.adoc b/docs/commands/references/rotate.adoc
similarity index 82%
rename from docs/commands/transformations/rotate.adoc
rename to docs/commands/references/rotate.adoc
index 32af613..2bb54ac 100644
--- a/docs/commands/transformations/rotate.adoc
+++ b/docs/commands/references/rotate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rotate
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -48,11 +47,11 @@ angle matrix rotate → matrix
=== Description
-With no matrix operand, xref:../rotate.adoc[`rotate`] builds a temporary transformation matrix R and concatenates it with the current transformation matrix (CTM). Precisely, xref:../rotate.adoc[`rotate`] replaces the CTM by R × CTM.
+With no matrix operand, link:/docs/commands/references/rotate/[`rotate`] builds a temporary transformation matrix R and concatenates it with the current transformation matrix (CTM). Precisely, link:/docs/commands/references/rotate/[`rotate`] replaces the CTM by R × CTM.
The effect is to rotate the user coordinate system axes about their origin by `angle` degrees. Positive angles rotate counterclockwise; negative angles rotate clockwise. The position of the user coordinate origin and the sizes of the x and y units are unchanged.
-If the `matrix` operand is supplied, xref:../rotate.adoc[`rotate`] replaces the value of `matrix` by R and pushes the modified matrix back on the operand stack. In this case, xref:../rotate.adoc[`rotate`] does not affect the CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/rotate/[`rotate`] replaces the value of `matrix` by R and pushes the modified matrix back on the operand stack. In this case, link:/docs/commands/references/rotate/[`rotate`] does not affect the CTM.
The rotation matrix R for angle θ (in degrees) has the form:
@@ -176,7 +175,7 @@ grestore
=== Common Pitfalls
-WARNING: *Rotation Center* - xref:../rotate.adoc[`rotate`] always rotates around the current origin, not around drawn content.
+WARNING: *Rotation Center* - link:/docs/commands/references/rotate/[`rotate`] always rotates around the current origin, not around drawn content.
[source,postscript]
----
@@ -263,7 +262,7 @@ TIP: *Order Matters* - Rotation before translation is different from translation
=== Matrix Mathematics
-The rotation matrix for xref:../rotate.adoc[`rotate`] by angle θ is:
+The rotation matrix for link:/docs/commands/references/rotate/[`rotate`] by angle θ is:
----
R = [cos(θ) sin(θ) -sin(θ) cos(θ) 0 0]
@@ -346,10 +345,10 @@ concat
=== See Also
-* xref:../translate.adoc[`translate`] - Move origin
-* xref:../scale.adoc[`scale`] - Change unit size
-* xref:../concat.adoc[`concat`] - Concatenate arbitrary matrix
-* xref:../setmatrix.adoc[`setmatrix`] - Replace CTM directly
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/translate/[`translate`] - Move origin
+* link:/docs/commands/references/scale/[`scale`] - Change unit size
+* link:/docs/commands/references/concat/[`concat`] - Concatenate arbitrary matrix
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Replace CTM directly
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/round.adoc b/docs/commands/references/round.adoc
similarity index 86%
rename from docs/commands/arithmetic-math/round.adoc
rename to docs/commands/references/round.adoc
index c7c9fd2..024fa86 100644
--- a/docs/commands/arithmetic-math/round.adoc
+++ b/docs/commands/references/round.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: round
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
= round
@@ -94,9 +93,9 @@ WARNING: Ties (0.5) always round toward the greater value.
== Related Commands
-* xref:../ceiling.adoc[`ceiling`] - Round up
-* xref:../floor.adoc[`floor`] - Round down
-* xref:../truncate.adoc[`truncate`] - Truncate toward zero
+* link:/docs/commands/references/ceiling/[`ceiling`] - Round up
+* link:/docs/commands/references/floor/[`floor`] - Round down
+* link:/docs/commands/references/truncate/[`truncate`] - Truncate toward zero
== PostScript Level
@@ -112,4 +111,4 @@ The operand is not a number.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/rrand.adoc b/docs/commands/references/rrand.adoc
similarity index 76%
rename from docs/commands/arithmetic-math/rrand.adoc
rename to docs/commands/references/rrand.adoc
index ddf4801..1a65d0e 100644
--- a/docs/commands/arithmetic-math/rrand.adoc
+++ b/docs/commands/references/rrand.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: rrand
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 23
---
= rrand
@@ -11,7 +10,7 @@ Returns the current state of the random number generator.
== Description
-The `rrand` operator returns an integer representing the current state of the random number generator used by xref:../rand.adoc[`rand`]. This state value can later be passed to xref:../srand.adoc[`srand`] to restore the generator to this exact position in its sequence, allowing you to reproduce or continue a specific random sequence.
+The `rrand` operator returns an integer representing the current state of the random number generator used by link:/docs/commands/references/rand/[`rand`]. This state value can later be passed to link:/docs/commands/references/srand/[`srand`] to restore the generator to this exact position in its sequence, allowing you to reproduce or continue a specific random sequence.
This is a Level 1 operator, available in all PostScript implementations.
@@ -90,8 +89,8 @@ rand % Same sequence as after saved state
== Related Commands
-* xref:../rand.adoc[`rand`] - Generate random integer
-* xref:../srand.adoc[`srand`] - Seed random generator
+* link:/docs/commands/references/rand/[`rand`] - Generate random integer
+* link:/docs/commands/references/srand/[`srand`] - Seed random generator
== PostScript Level
@@ -110,4 +109,4 @@ The operand stack is full (cannot push result).
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/transformations/scale.adoc b/docs/commands/references/scale.adoc
similarity index 80%
rename from docs/commands/transformations/scale.adoc
rename to docs/commands/references/scale.adoc
index bade7a2..5eb1014 100644
--- a/docs/commands/transformations/scale.adoc
+++ b/docs/commands/references/scale.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: scale
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -51,11 +50,11 @@ sx sy matrix scale → matrix
=== Description
-With no matrix operand, xref:../scale.adoc[`scale`] builds a temporary transformation matrix S and concatenates it with the current transformation matrix (CTM). Precisely, xref:../scale.adoc[`scale`] replaces the CTM by S × CTM.
+With no matrix operand, link:/docs/commands/references/scale/[`scale`] builds a temporary transformation matrix S and concatenates it with the current transformation matrix (CTM). Precisely, link:/docs/commands/references/scale/[`scale`] replaces the CTM by S × CTM.
The effect is to make the x and y units in the user coordinate system the size of `sx` and `sy` units in the former user coordinate system. The position of the user coordinate origin and the orientation of the axes are unchanged.
-If the `matrix` operand is supplied, xref:../scale.adoc[`scale`] replaces the value of `matrix` by S and pushes the modified matrix back on the operand stack. In this case, xref:../scale.adoc[`scale`] does not affect the CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/scale/[`scale`] replaces the value of `matrix` by S and pushes the modified matrix back on the operand stack. In this case, link:/docs/commands/references/scale/[`scale`] does not affect the CTM.
The scaling matrix S has the form:
@@ -233,7 +232,7 @@ TIP: *Preserve Aspect Ratio* - For proportional scaling, use the same value for
=== Matrix Mathematics
-The scaling matrix for xref:../scale.adoc[`scale`] by (`sx`, `sy`) is:
+The scaling matrix for link:/docs/commands/references/scale/[`scale`] by (`sx`, `sy`) is:
----
S = [sx 0 0 sy 0 0]
@@ -282,11 +281,11 @@ grestore
=== See Also
-* xref:../translate.adoc[`translate`] - Move origin
-* xref:../rotate.adoc[`rotate`] - Rotate axes
-* xref:../concat.adoc[`concat`] - Concatenate arbitrary matrix
-* xref:../setmatrix.adoc[`setmatrix`] - Replace CTM directly
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/translate/[`translate`] - Move origin
+* link:/docs/commands/references/rotate/[`rotate`] - Rotate axes
+* link:/docs/commands/references/concat/[`concat`] - Concatenate arbitrary matrix
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Replace CTM directly
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/font-text/scalefont.adoc b/docs/commands/references/scalefont.adoc
similarity index 50%
rename from docs/commands/font-text/scalefont.adoc
rename to docs/commands/references/scalefont.adoc
index 9c785ae..805544f 100644
--- a/docs/commands/font-text/scalefont.adoc
+++ b/docs/commands/references/scalefont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: scalefont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 2
---
@@ -30,19 +29,19 @@ font'
=== Description
-xref:../scalefont.adoc[`scalefont`] applies the scale factor `scale` to `font`, producing a new `font'` whose characters are scaled by `scale` (in both x and y) when they are shown. xref:../scalefont.adoc[`scalefont`] first creates a copy of `font`, then replaces the new font's `FontMatrix` entry with the result of scaling the existing `FontMatrix` by `scale`.
+link:/docs/commands/references/scalefont/[`scalefont`] applies the scale factor `scale` to `font`, producing a new `font'` whose characters are scaled by `scale` (in both x and y) when they are shown. link:/docs/commands/references/scalefont/[`scalefont`] first creates a copy of `font`, then replaces the new font's `FontMatrix` entry with the result of scaling the existing `FontMatrix` by `scale`.
It inserts two additional entries, `OrigFont` and `ScaleMatrix`, whose purpose is internal to the implementation. Finally, it returns the result as `font'`.
-Showing characters from the transformed font produces the same results as showing from the original font after having scaled user space by the factor `scale` in both x and y by means of the link:../transformations/scale.adoc[`scale`] operator.
+Showing characters from the transformed font produces the same results as showing from the original font after having scaled user space by the factor `scale` in both x and y by means of the link:../transformations/scale/[`scale`] operator.
-xref:../scalefont.adoc[`scalefont`] is essentially a convenience operator that enables the desired scale factor to be encapsulated in the font description. Another operator, xref:../makefont.adoc[`makefont`], performs more general transformations than simple scaling.
+link:/docs/commands/references/scalefont/[`scalefont`] is essentially a convenience operator that enables the desired scale factor to be encapsulated in the font description. Another operator, link:/docs/commands/references/makefont/[`makefont`], performs more general transformations than simple scaling.
-The interpreter keeps track of font dictionaries recently created by xref:../scalefont.adoc[`scalefont`]. Calling xref:../scalefont.adoc[`scalefont`] multiple times with the same font and scale will usually return the same `font'` rather than create a new one each time. However, it is usually more efficient for a PostScript language program to apply xref:../scalefont.adoc[`scalefont`] only once for each font that it needs and to keep track of the resulting font dictionaries on its own.
+The interpreter keeps track of font dictionaries recently created by link:/docs/commands/references/scalefont/[`scalefont`]. Calling link:/docs/commands/references/scalefont/[`scalefont`] multiple times with the same font and scale will usually return the same `font'` rather than create a new one each time. However, it is usually more efficient for a PostScript language program to apply link:/docs/commands/references/scalefont/[`scalefont`] only once for each font that it needs and to keep track of the resulting font dictionaries on its own.
=== VM Allocation
-The xref:../makefont.adoc[`makefont`], xref:../scalefont.adoc[`scalefont`], and link:../graphics-state/selectfont.adoc[`selectfont`] operators produce a font dictionary derived from an original font dictionary, but with the `FontMatrix` entry altered. The derived font dictionary is allocated in local or global VM according to whether the original font dictionary is in local or global VM. This is independent of the current VM allocation mode.
+The link:/docs/commands/references/makefont/[`makefont`], link:/docs/commands/references/scalefont/[`scalefont`], and link:../graphics-state/selectfont/[`selectfont`] operators produce a font dictionary derived from an original font dictionary, but with the `FontMatrix` entry altered. The derived font dictionary is allocated in local or global VM according to whether the original font dictionary is in local or global VM. This is independent of the current VM allocation mode.
=== Parameters
@@ -117,7 +116,7 @@ FontMatrix' = [scale 0 0 scale 0 0] × FontMatrix
=== See Also
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
-- xref:../makefont.adoc[`makefont`] - Transform font by matrix (for non-uniform scaling)
-- xref:../setfont.adoc[`setfont`] - Establish current font
-- xref:../currentfont.adoc[`currentfont`] - Get current font dictionary
\ No newline at end of file
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/makefont/[`makefont`] - Transform font by matrix (for non-uniform scaling)
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
+- link:/docs/commands/references/currentfont/[`currentfont`] - Get current font dictionary
\ No newline at end of file
diff --git a/docs/commands/array-string/search.adoc b/docs/commands/references/search.adoc
similarity index 90%
rename from docs/commands/array-string/search.adoc
rename to docs/commands/references/search.adoc
index 6da9ac1..fdabe8a 100644
--- a/docs/commands/array-string/search.adoc
+++ b/docs/commands/references/search.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: search
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 15
---
@@ -63,7 +62,7 @@ string seek search → post match pre true (if found)
=== Description
-xref:../search.adoc[`search`] looks for the first occurrence of _seek_ within _string_.
+link:/docs/commands/references/search/[`search`] looks for the first occurrence of _seek_ within _string_.
If found, it splits _string_ into three segments:
* _pre_: portion before the match
@@ -173,7 +172,7 @@ WARNING: *Stack Order* - Results are post, match, pre (reversed from read order)
% Actually: true (he) (ll) (o)
----
-TIP: *Use anchorsearch for Prefixes* - If you only need to check the start of a string, xref:../anchorsearch.adoc[`anchorsearch`] is simpler.
+TIP: *Use anchorsearch for Prefixes* - If you only need to check the start of a string, link:/docs/commands/references/anchorsearch/[`anchorsearch`] is simpler.
=== Error Conditions
@@ -240,6 +239,6 @@ TIP: *Use anchorsearch for Prefixes* - If you only need to check the start of a
=== See Also
-* xref:../anchorsearch.adoc[`anchorsearch`] - Test for prefix match
-* xref:../token.adoc[`token`] - Parse token from string
-* xref:../getinterval.adoc[`getinterval`] - Extract substring
\ No newline at end of file
+* link:/docs/commands/references/anchorsearch/[`anchorsearch`] - Test for prefix match
+* link:/docs/commands/references/token/[`token`] - Parse token from string
+* link:/docs/commands/references/getinterval/[`getinterval`] - Extract substring
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setcmykcolor.adoc b/docs/commands/references/setcmykcolor.adoc
similarity index 84%
rename from docs/commands/graphics-state/setcmykcolor.adoc
rename to docs/commands/references/setcmykcolor.adoc
index c125564..935e464 100644
--- a/docs/commands/graphics-state/setcmykcolor.adoc
+++ b/docs/commands/references/setcmykcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setcmykcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -47,7 +46,7 @@ cyan magenta yellow black setcmykcolor → –
=== Description
-xref:../setcmykcolor.adoc[`setcmykcolor`] sets the color space to DeviceCMYK and sets the current color using cyan, magenta, yellow, and black components.
+link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] sets the color space to DeviceCMYK and sets the current color using cyan, magenta, yellow, and black components.
Each component must be in range 0.0 to 1.0:
@@ -57,7 +56,7 @@ Each component must be in range 0.0 to 1.0:
This establishes the color for subsequent painting operations (lines, fills, text). CMYK is a **subtractive** color model primarily used for printing.
-**Important:** Color values set by xref:../setcmykcolor.adoc[`setcmykcolor`] are **not** affected by black generation and undercolor removal operations.
+**Important:** Color values set by link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] are **not** affected by black generation and undercolor removal operations.
=== PostScript Level
@@ -160,7 +159,7 @@ This establishes the color for subsequent painting operations (lines, fills, tex
=== Common Pitfalls
-WARNING: *Changes Color Space* - xref:../setcmykcolor.adoc[`setcmykcolor`] changes color space to DeviceCMYK.
+WARNING: *Changes Color Space* - link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] changes color space to DeviceCMYK.
[source,postscript]
----
@@ -288,7 +287,7 @@ Manually implement UCR:
=== See Also
-* xref:../setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../setgray.adoc[`setgray`] - Set grayscale
-* xref:../sethsbcolor.adoc[`sethsbcolor`] - Set HSB color
-* xref:../currentcmykcolor.adoc[`currentcmykcolor`] - Get CMYK color (Level 2)
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/setgray/[`setgray`] - Set grayscale
+* link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] - Set HSB color
+* link:/docs/commands/references/currentcmykcolor/[`currentcmykcolor`] - Get CMYK color (Level 2)
diff --git a/docs/commands/graphics-state/setdash.adoc b/docs/commands/references/setdash.adoc
similarity index 88%
rename from docs/commands/graphics-state/setdash.adoc
rename to docs/commands/references/setdash.adoc
index f4c055c..ff3bf7e 100644
--- a/docs/commands/graphics-state/setdash.adoc
+++ b/docs/commands/references/setdash.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setdash
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -41,7 +40,7 @@ array offset setdash → –
=== Description
-xref:../setdash.adoc[`setdash`] sets the dash pattern parameter in the graphics state. This controls the pattern of dashes and gaps used by subsequent [`stroke`] operations.
+link:/docs/commands/references/setdash/[`setdash`] sets the dash pattern parameter in the graphics state. This controls the pattern of dashes and gaps used by subsequent [`stroke`] operations.
The **array** specifies the pattern:
@@ -52,7 +51,7 @@ The **array** specifies the pattern:
The **offset** specifies how far into the pattern to start (in user space units).
-The dash pattern is interpreted in user space and is unaffected by transformations applied after xref:../setdash.adoc[`setdash`] is called.
+The dash pattern is interpreted in user space and is unaffected by transformations applied after link:/docs/commands/references/setdash/[`setdash`] is called.
=== PostScript Level
@@ -286,7 +285,7 @@ stroke
=== See Also
-* xref:../currentdash.adoc[`currentdash`] - Get current dash pattern
-* xref:../setlinecap.adoc[`setlinecap`] - Set line end style
-* xref:../setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set corner style
+* link:/docs/commands/references/currentdash/[`currentdash`] - Get current dash pattern
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line end style
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set corner style
diff --git a/docs/commands/font-text/setfont.adoc b/docs/commands/references/setfont.adoc
similarity index 64%
rename from docs/commands/font-text/setfont.adoc
rename to docs/commands/references/setfont.adoc
index dba2a1f..54b8679 100644
--- a/docs/commands/font-text/setfont.adoc
+++ b/docs/commands/references/setfont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setfont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 4
---
@@ -30,9 +29,9 @@ font
=== Description
-xref:../setfont.adoc[`setfont`] establishes the font dictionary parameter in the graphics state. This specifies the font to be used by subsequent character operators, such as xref:../show.adoc[`show`] and xref:../stringwidth.adoc[`stringwidth`]. The `font` must be a valid font dictionary previously returned by xref:../findfont.adoc[`findfont`], xref:../scalefont.adoc[`scalefont`], or xref:../makefont.adoc[`makefont`].
+link:/docs/commands/references/setfont/[`setfont`] establishes the font dictionary parameter in the graphics state. This specifies the font to be used by subsequent character operators, such as link:/docs/commands/references/show/[`show`] and link:/docs/commands/references/stringwidth/[`stringwidth`]. The `font` must be a valid font dictionary previously returned by link:/docs/commands/references/findfont/[`findfont`], link:/docs/commands/references/scalefont/[`scalefont`], or link:/docs/commands/references/makefont/[`makefont`].
-The font remains current until changed by another xref:../setfont.adoc[`setfont`] or `selectfont` operation, or until the graphics state is restored by `grestore` or `grestoreall`.
+The font remains current until changed by another link:/docs/commands/references/setfont/[`setfont`] or `selectfont` operation, or until the graphics state is restored by `grestore` or `grestoreall`.
=== Parameters
@@ -113,7 +112,7 @@ For Type 3 fonts:
=== Graphics State Impact
-xref:../setfont.adoc[`setfont`] only modifies the font parameter of the graphics state. It does not affect:
+link:/docs/commands/references/setfont/[`setfont`] only modifies the font parameter of the graphics state. It does not affect:
- Current transformation matrix
- Current path
@@ -141,9 +140,9 @@ newpath
=== See Also
-- xref:../currentfont.adoc[`currentfont`] - Get current font dictionary
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
-- xref:../scalefont.adoc[`scalefont`] - Scale font by uniform factor
-- xref:../makefont.adoc[`makefont`] - Transform font by matrix
-- xref:../show.adoc[`show`] - Paint text string at current point
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
\ No newline at end of file
+- link:/docs/commands/references/currentfont/[`currentfont`] - Get current font dictionary
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/scalefont/[`scalefont`] - Scale font by uniform factor
+- link:/docs/commands/references/makefont/[`makefont`] - Transform font by matrix
+- link:/docs/commands/references/show/[`show`] - Paint text string at current point
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setgray.adoc b/docs/commands/references/setgray.adoc
similarity index 80%
rename from docs/commands/graphics-state/setgray.adoc
rename to docs/commands/references/setgray.adoc
index 41ad220..d465b70 100644
--- a/docs/commands/graphics-state/setgray.adoc
+++ b/docs/commands/references/setgray.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setgray
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -38,7 +37,7 @@ num setgray → –
=== Description
-xref:../setgray.adoc[`setgray`] sets the color space to DeviceGray and sets the current color to a gray shade corresponding to _num_.
+link:/docs/commands/references/setgray/[`setgray`] sets the color space to DeviceGray and sets the current color to a gray shade corresponding to _num_.
* **0** = black
* **1** = white
@@ -127,7 +126,7 @@ Values outside 0-1 are clamped to nearest legal value (no error).
=== Common Pitfalls
-WARNING: *Changes Color Space* - xref:../setgray.adoc[`setgray`] changes color space to DeviceGray.
+WARNING: *Changes Color Space* - link:/docs/commands/references/setgray/[`setgray`] changes color space to DeviceGray.
[source,postscript]
----
@@ -170,8 +169,8 @@ TIP: *Use for Monochrome* - Most efficient color operation for monochrome output
=== See Also
-* xref:../setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../setcmykcolor.adoc[`setcmykcolor`] - Set CMYK color (Level 2)
-* xref:../sethsbcolor.adoc[`sethsbcolor`] - Set HSB color
-* xref:../currentgray.adoc[`currentgray`] - Get current gray value
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] - Set CMYK color (Level 2)
+* link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] - Set HSB color
+* link:/docs/commands/references/currentgray/[`currentgray`] - Get current gray value
* Color operations (to be documented) - Advanced color spaces
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setgstate.adoc b/docs/commands/references/setgstate.adoc
similarity index 81%
rename from docs/commands/graphics-state/setgstate.adoc
rename to docs/commands/references/setgstate.adoc
index e276da8..1478455 100644
--- a/docs/commands/graphics-state/setgstate.adoc
+++ b/docs/commands/references/setgstate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setgstate
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 11
---
@@ -38,7 +37,7 @@ gstate setgstate → –
=== Description
-xref:../setgstate.adoc[`setgstate`] replaces the current graphics state by the value of the gstate object. This is a **copying operation**, so subsequent modifications to the value of gstate will not affect the current graphics state or vice versa.
+link:/docs/commands/references/setgstate/[`setgstate`] replaces the current graphics state by the value of the gstate object. This is a **copying operation**, so subsequent modifications to the value of gstate will not affect the current graphics state or vice versa.
This is a **wholesale replacement** of all components of the graphics state. In particular:
@@ -211,7 +210,7 @@ items {
=== Common Pitfalls
-WARNING: *Clipping Path Replaced* - xref:../setgstate.adoc[`setgstate`] replaces the clipping path, not intersects.
+WARNING: *Clipping Path Replaced* - link:/docs/commands/references/setgstate/[`setgstate`] replaces the clipping path, not intersects.
[source,postscript]
----
@@ -237,7 +236,7 @@ temp setgstate
% Path is still empty, not restored
----
-WARNING: *Not for Simple Save/Restore* - Use xref:../gsave.adoc[`gsave`]/xref:../grestore.adoc[`grestore`] for temporary changes.
+WARNING: *Not for Simple Save/Restore* - Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] for temporary changes.
[source,postscript]
----
@@ -279,7 +278,7 @@ TIP: *Reusable Templates* - Create gstate objects once, reuse many times.
=== Graphics State Replacement
-xref:../setgstate.adoc[`setgstate`] replaces:
+link:/docs/commands/references/setgstate/[`setgstate`] replaces:
* ✓ Transformation matrix (CTM)
* ✓ Color space and color
@@ -292,8 +291,8 @@ xref:../setgstate.adoc[`setgstate`] replaces:
=== See Also
-* xref:../gstate.adoc[`gstate`] - Create graphics state object
-* xref:../currentgstate.adoc[`currentgstate`] - Update gstate with current state
-* xref:../gsave.adoc[`gsave`] - Save state on graphics state stack
-* xref:../grestore.adoc[`grestore`] - Restore state from stack
-* xref:../grestoreall.adoc[`grestoreall`] - Restore all saved states
+* link:/docs/commands/references/gstate/[`gstate`] - Create graphics state object
+* link:/docs/commands/references/currentgstate/[`currentgstate`] - Update gstate with current state
+* link:/docs/commands/references/gsave/[`gsave`] - Save state on graphics state stack
+* link:/docs/commands/references/grestore/[`grestore`] - Restore state from stack
+* link:/docs/commands/references/grestoreall/[`grestoreall`] - Restore all saved states
diff --git a/docs/commands/graphics-state/sethsbcolor.adoc b/docs/commands/references/sethsbcolor.adoc
similarity index 85%
rename from docs/commands/graphics-state/sethsbcolor.adoc
rename to docs/commands/references/sethsbcolor.adoc
index a1489a5..60b71fe 100644
--- a/docs/commands/graphics-state/sethsbcolor.adoc
+++ b/docs/commands/references/sethsbcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: sethsbcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
@@ -44,7 +43,7 @@ hue saturation brightness sethsbcolor → –
=== Description
-xref:../sethsbcolor.adoc[`sethsbcolor`] sets the color space to DeviceRGB and sets the current color using hue, saturation, and brightness components.
+link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] sets the color space to DeviceRGB and sets the current color using hue, saturation, and brightness components.
**HSB components:**
@@ -55,9 +54,9 @@ xref:../sethsbcolor.adoc[`sethsbcolor`] sets the color space to DeviceRGB and se
* **Brightness** (0.0 to 1.0): Color intensity
- 0.0 = black, 1.0 = maximum brightness
-NOTE: HSB is **not a color space** in its own right, merely a means for entering RGB color values in a different coordinate system. The color value entered by xref:../sethsbcolor.adoc[`sethsbcolor`] is immediately converted into the RGB model and used with the DeviceRGB color space.
+NOTE: HSB is **not a color space** in its own right, merely a means for entering RGB color values in a different coordinate system. The color value entered by link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] is immediately converted into the RGB model and used with the DeviceRGB color space.
-xref:../sethsbcolor.adoc[`sethsbcolor`] does not give a rangecheck error for values outside the range 0 to 1; it substitutes the nearest legal value.
+link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] does not give a rangecheck error for values outside the range 0 to 1; it substitutes the nearest legal value.
=== PostScript Level
@@ -311,7 +310,7 @@ Green-+-Red
=== See Also
-* xref:../setrgbcolor.adoc[`setrgbcolor`] - Set RGB color
-* xref:../setgray.adoc[`setgray`] - Set grayscale
-* xref:../setcmykcolor.adoc[`setcmykcolor`] - Set CMYK color (Level 2)
-* xref:../currenthsbcolor.adoc[`currenthsbcolor`] - Get HSB color
+* link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] - Set RGB color
+* link:/docs/commands/references/setgray/[`setgray`] - Set grayscale
+* link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] - Set CMYK color (Level 2)
+* link:/docs/commands/references/currenthsbcolor/[`currenthsbcolor`] - Get HSB color
diff --git a/docs/commands/graphics-state/setlinecap.adoc b/docs/commands/references/setlinecap.adoc
similarity index 84%
rename from docs/commands/graphics-state/setlinecap.adoc
rename to docs/commands/references/setlinecap.adoc
index dd956e3..bb423a7 100644
--- a/docs/commands/graphics-state/setlinecap.adoc
+++ b/docs/commands/references/setlinecap.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setlinecap
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -38,7 +37,7 @@ int setlinecap → –
=== Description
-xref:../setlinecap.adoc[`setlinecap`] sets the line cap parameter to _int_, which must be 0, 1, or 2. This controls the shape of line ends for open subpaths painted by [`stroke`].
+link:/docs/commands/references/setlinecap/[`setlinecap`] sets the line cap parameter to _int_, which must be 0, 1, or 2. This controls the shape of line ends for open subpaths painted by [`stroke`].
**Cap styles:**
* **0** = Butt cap: squared off at endpoint (no projection)
@@ -164,7 +163,7 @@ Square (2): [──────────]
=== See Also
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set corner style
-* xref:../setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../currentlinecap.adoc[`currentlinecap`] - Get current cap
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set corner style
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/currentlinecap/[`currentlinecap`] - Get current cap
* Stroke operations (to be documented)
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setlinejoin.adoc b/docs/commands/references/setlinejoin.adoc
similarity index 79%
rename from docs/commands/graphics-state/setlinejoin.adoc
rename to docs/commands/references/setlinejoin.adoc
index ed6a6c8..df23507 100644
--- a/docs/commands/graphics-state/setlinejoin.adoc
+++ b/docs/commands/references/setlinejoin.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setlinejoin
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -38,7 +37,7 @@ int setlinejoin → –
=== Description
-xref:../setlinejoin.adoc[`setlinejoin`] sets the line join parameter to _int_, which must be 0, 1, or 2. This controls how corners are rendered when path segments meet at an angle during [`stroke`].
+link:/docs/commands/references/setlinejoin/[`setlinejoin`] sets the line join parameter to _int_, which must be 0, 1, or 2. This controls how corners are rendered when path segments meet at an angle during [`stroke`].
**Join styles:**
* **0** = Miter join: outer edges extended until they meet
@@ -107,7 +106,7 @@ drawMechanicalParts
=== Common Pitfalls
-WARNING: *Miter Limit* - Very sharp miters may be converted to bevels (see xref:../setmiterlimit.adoc[`setmiterlimit`]).
+WARNING: *Miter Limit* - Very sharp miters may be converted to bevels (see link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]).
[source,postscript]
----
@@ -165,7 +164,7 @@ Bevel (2): ╱─╲
=== See Also
-* xref:../setmiterlimit.adoc[`setmiterlimit`] - Control miter join behavior
-* xref:../setlinecap.adoc[`setlinecap`] - Set line end style
-* xref:../setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../currentlinejoin.adoc[`currentlinejoin`] - Get current join
\ No newline at end of file
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Control miter join behavior
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line end style
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/currentlinejoin/[`currentlinejoin`] - Get current join
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setlinewidth.adoc b/docs/commands/references/setlinewidth.adoc
similarity index 84%
rename from docs/commands/graphics-state/setlinewidth.adoc
rename to docs/commands/references/setlinewidth.adoc
index 4f833a5..c706387 100644
--- a/docs/commands/graphics-state/setlinewidth.adoc
+++ b/docs/commands/references/setlinewidth.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setlinewidth
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -38,7 +37,7 @@ num setlinewidth → –
=== Description
-xref:../setlinewidth.adoc[`setlinewidth`] sets the line width parameter in the graphics state to _num_. This controls the thickness of lines rendered by subsequent [`stroke`] operations.
+link:/docs/commands/references/setlinewidth/[`setlinewidth`] sets the line width parameter in the graphics state to _num_. This controls the thickness of lines rendered by subsequent [`stroke`] operations.
The line width is measured in user space units. The actual rendered width in device space depends on the current transformation matrix (CTM).
@@ -180,8 +179,8 @@ Width 5: ▓▓▓▓▓▓▓▓▓
=== See Also
-* xref:../setlinecap.adoc[`setlinecap`] - Set line end style
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set corner style
-* xref:../setdash.adoc[`setdash`] - Set dash pattern
-* xref:../currentlinewidth.adoc[`currentlinewidth`] - Get current width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line end style
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set corner style
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
+* link:/docs/commands/references/currentlinewidth/[`currentlinewidth`] - Get current width
* Stroke operations (to be documented)
\ No newline at end of file
diff --git a/docs/commands/transformations/setmatrix.adoc b/docs/commands/references/setmatrix.adoc
similarity index 64%
rename from docs/commands/transformations/setmatrix.adoc
rename to docs/commands/references/setmatrix.adoc
index b930d86..514e2b2 100644
--- a/docs/commands/transformations/setmatrix.adoc
+++ b/docs/commands/references/setmatrix.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setmatrix
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -38,11 +37,11 @@ matrix setmatrix → -
=== Description
-xref:../setmatrix.adoc[`setmatrix`] replaces the current transformation matrix (CTM) in the graphics state with the value of `matrix`.
+link:/docs/commands/references/setmatrix/[`setmatrix`] replaces the current transformation matrix (CTM) in the graphics state with the value of `matrix`.
This establishes an arbitrary transformation from user space to device space without reference to the former CTM. The `matrix` operand must be a 6-element array of numbers representing a transformation matrix.
-WARNING: Except in device setup procedures, use of xref:../setmatrix.adoc[`setmatrix`] should be very rare. PostScript programs should ordinarily modify the CTM using xref:../translate.adoc[`translate`], xref:../scale.adoc[`scale`], xref:../rotate.adoc[`rotate`], and xref:../concat.adoc[`concat`] rather than replace it.
+WARNING: Except in device setup procedures, use of link:/docs/commands/references/setmatrix/[`setmatrix`] should be very rare. PostScript programs should ordinarily modify the CTM using link:/docs/commands/references/translate/[`translate`], link:/docs/commands/references/scale/[`scale`], link:/docs/commands/references/rotate/[`rotate`], and link:/docs/commands/references/concat/[`concat`] rather than replace it.
=== PostScript Level
@@ -115,7 +114,7 @@ myDeviceMatrix setmatrix
=== Common Pitfalls
-WARNING: *Breaks Encapsulation* - xref:../setmatrix.adoc[`setmatrix`] can break assumptions about coordinate system.
+WARNING: *Breaks Encapsulation* - link:/docs/commands/references/setmatrix/[`setmatrix`] can break assumptions about coordinate system.
[source,postscript]
----
@@ -154,7 +153,7 @@ grestore
% Transformation undone - setmatrix changes are saved/restored
----
-TIP: *Prefer Transform Operators* - Use transformation operators instead of xref:../setmatrix.adoc[`setmatrix`]:
+TIP: *Prefer Transform Operators* - Use transformation operators instead of link:/docs/commands/references/setmatrix/[`setmatrix`]:
[source,postscript]
----
@@ -198,7 +197,7 @@ saved setmatrix % Restore
* Very large or very small matrix values may cause precision issues
* Degenerate matrices (determinant = 0) create non-invertible transformations
* The matrix operand is not modified
-* Unlike xref:../concat.adoc[`concat`], xref:../setmatrix.adoc[`setmatrix`] completely replaces the CTM
+* Unlike link:/docs/commands/references/concat/[`concat`], link:/docs/commands/references/setmatrix/[`setmatrix`] completely replaces the CTM
=== Matrix Format
@@ -219,10 +218,10 @@ Where:
In well-structured PostScript programs:
-1. **Initialization**: Device setup uses xref:../initmatrix.adoc[`initmatrix`]
-2. **Modifications**: Use xref:../translate.adoc[`translate`], xref:../scale.adoc[`scale`], xref:../rotate.adoc[`rotate`], xref:../concat.adoc[`concat`]
-3. **State Management**: Use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`]
-4. **Restoration**: Use xref:../graphics-state/grestore.adoc[`grestore`] or saved matrix with xref:../setmatrix.adoc[`setmatrix`]
+1. **Initialization**: Device setup uses link:/docs/commands/references/initmatrix/[`initmatrix`]
+2. **Modifications**: Use link:/docs/commands/references/translate/[`translate`], link:/docs/commands/references/scale/[`scale`], link:/docs/commands/references/rotate/[`rotate`], link:/docs/commands/references/concat/[`concat`]
+3. **State Management**: Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`]
+4. **Restoration**: Use link:/docs/commands/references/grestore/[`grestore`] or saved matrix with link:/docs/commands/references/setmatrix/[`setmatrix`]
=== Comparison with Other Operators
@@ -246,16 +245,16 @@ matrix currentmatrix % Assume [1 0 0 1 0 0]
* Very fast operation
* No matrix computation required
* Just replaces 6 values in graphics state
-* No different in performance from xref:../concat.adoc[`concat`]
+* No different in performance from link:/docs/commands/references/concat/[`concat`]
=== See Also
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../initmatrix.adoc[`initmatrix`] - Reset CTM to default
-* xref:../concat.adoc[`concat`] - Concatenate matrix with CTM
-* xref:../translate.adoc[`translate`] - Move origin
-* xref:../scale.adoc[`scale`] - Change unit size
-* xref:../rotate.adoc[`rotate`] - Rotate axes
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/initmatrix/[`initmatrix`] - Reset CTM to default
+* link:/docs/commands/references/concat/[`concat`] - Concatenate matrix with CTM
+* link:/docs/commands/references/translate/[`translate`] - Move origin
+* link:/docs/commands/references/scale/[`scale`] - Change unit size
+* link:/docs/commands/references/rotate/[`rotate`] - Rotate axes
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/graphics-state/setmiterlimit.adoc b/docs/commands/references/setmiterlimit.adoc
similarity index 88%
rename from docs/commands/graphics-state/setmiterlimit.adoc
rename to docs/commands/references/setmiterlimit.adoc
index db5b058..fb3b64b 100644
--- a/docs/commands/graphics-state/setmiterlimit.adoc
+++ b/docs/commands/references/setmiterlimit.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setmiterlimit
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 15
---
@@ -38,7 +37,7 @@ num setmiterlimit → –
=== Description
-xref:../setmiterlimit.adoc[`setmiterlimit`] sets the miter limit parameter in the graphics state to _num_. This parameter controls when sharp miter joins are converted to bevel joins during stroking operations.
+link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] sets the miter limit parameter in the graphics state to _num_. This parameter controls when sharp miter joins are converted to bevel joins during stroking operations.
The miter limit is the **maximum ratio** of miter length to line width. When the ratio exceeds this limit (at very sharp angles), a bevel join is used instead of a miter join.
@@ -277,7 +276,7 @@ Else:
=== See Also
-* xref:../setlinejoin.adoc[`setlinejoin`] - Set line join style
-* xref:../currentmiterlimit.adoc[`currentmiterlimit`] - Get current miter limit
-* xref:../setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../setlinecap.adoc[`setlinecap`] - Set line cap style
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join style
+* link:/docs/commands/references/currentmiterlimit/[`currentmiterlimit`] - Get current miter limit
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap style
diff --git a/docs/commands/graphics-state/setrgbcolor.adoc b/docs/commands/references/setrgbcolor.adoc
similarity index 83%
rename from docs/commands/graphics-state/setrgbcolor.adoc
rename to docs/commands/references/setrgbcolor.adoc
index 2a30361..298014e 100644
--- a/docs/commands/graphics-state/setrgbcolor.adoc
+++ b/docs/commands/references/setrgbcolor.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: setrgbcolor
-parent: Graphics State
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -44,7 +43,7 @@ red green blue setrgbcolor → –
=== Description
-xref:../setrgbcolor.adoc[`setrgbcolor`] sets the color space to DeviceRGB and sets the current color using red, green, and blue components.
+link:/docs/commands/references/setrgbcolor/[`setrgbcolor`] sets the color space to DeviceRGB and sets the current color using red, green, and blue components.
Each component must be in range 0.0 to 1.0:
* **0.0** = none of that color
@@ -178,7 +177,7 @@ R + G + B = White
=== See Also
-* xref:../setgray.adoc[`setgray`] - Set grayscale
-* xref:../setcmykcolor.adoc[`setcmykcolor`] - Set CMYK (Level 2)
-* xref:../sethsbcolor.adoc[`sethsbcolor`] - Set HSB
-* xref:../currentrgbcolor.adoc[`currentrgbcolor`] - Get RGB color
\ No newline at end of file
+* link:/docs/commands/references/setgray/[`setgray`] - Set grayscale
+* link:/docs/commands/references/setcmykcolor/[`setcmykcolor`] - Set CMYK (Level 2)
+* link:/docs/commands/references/sethsbcolor/[`sethsbcolor`] - Set HSB
+* link:/docs/commands/references/currentrgbcolor/[`currentrgbcolor`] - Get RGB color
\ No newline at end of file
diff --git a/docs/commands/font-text/show.adoc b/docs/commands/references/show.adoc
similarity index 65%
rename from docs/commands/font-text/show.adoc
rename to docs/commands/references/show.adoc
index 369b66f..3038a07 100644
--- a/docs/commands/font-text/show.adoc
+++ b/docs/commands/references/show.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: show
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 8
---
@@ -30,11 +29,11 @@ string
=== Description
-xref:../show.adoc[`show`] paints the characters identified by the elements of `string` on the current page starting at the current point, using the font face, size, and orientation specified by the most recent xref:../setfont.adoc[`setfont`] or `selectfont`.
+link:/docs/commands/references/show/[`show`] paints the characters identified by the elements of `string` on the current page starting at the current point, using the font face, size, and orientation specified by the most recent link:/docs/commands/references/setfont/[`setfont`] or `selectfont`.
-The spacing from each character of the string to the next is determined by the character's width, which is an (x, y) displacement that is part of the character's definition. When it is finished, xref:../show.adoc[`show`] adjusts the current point in the graphics state by the sum of the widths of all the characters shown.
+The spacing from each character of the string to the next is determined by the character's width, which is an (x, y) displacement that is part of the character's definition. When it is finished, link:/docs/commands/references/show/[`show`] adjusts the current point in the graphics state by the sum of the widths of all the characters shown.
-xref:../show.adoc[`show`] requires that the current point initially be defined (for example, by `moveto`); otherwise, it executes the error `nocurrentpoint`.
+link:/docs/commands/references/show/[`show`] requires that the current point initially be defined (for example, by `moveto`); otherwise, it executes the error `nocurrentpoint`.
If a character code would index beyond the end of the font's Encoding, or the character mapping algorithm goes out of bounds in other ways, a `rangecheck` error occurs.
@@ -199,10 +198,10 @@ grestore
=== Performance Considerations
-- xref:../show.adoc[`show`] is the fastest text rendering operator
+- link:/docs/commands/references/show/[`show`] is the fastest text rendering operator
- Characters are cached for efficiency
- Font cache improves performance for repeated characters
-- Use xref:../show.adoc[`show`] over xref:../charpath.adoc[`charpath`] when possible
+- Use link:/docs/commands/references/show/[`show`] over link:/docs/commands/references/charpath/[`charpath`] when possible
=== Comparison with Other Text Operators
@@ -210,36 +209,36 @@ grestore
|===
| Operator | Purpose
-| xref:../show.adoc[`show`]
+| link:/docs/commands/references/show/[`show`]
| Basic text painting (fastest)
-| xref:../ashow.adoc[`ashow`]
+| link:/docs/commands/references/ashow/[`ashow`]
| Add uniform spacing to all characters
-| xref:../widthshow.adoc[`widthshow`]
+| link:/docs/commands/references/widthshow/[`widthshow`]
| Adjust width of specific character
-| xref:../awidthshow.adoc[`awidthshow`]
-| Combine xref:../ashow.adoc[`ashow`] and xref:../widthshow.adoc[`widthshow`]
+| link:/docs/commands/references/awidthshow/[`awidthshow`]
+| Combine link:/docs/commands/references/ashow/[`ashow`] and link:/docs/commands/references/widthshow/[`widthshow`]
-| xref:../kshow.adoc[`kshow`]
+| link:/docs/commands/references/kshow/[`kshow`]
| Execute procedure between characters (kerning)
-| xref:../cshow.adoc[`cshow`]
+| link:/docs/commands/references/cshow/[`cshow`]
| Execute procedure for each character (Level 2)
-| xref:../charpath.adoc[`charpath`]
+| link:/docs/commands/references/charpath/[`charpath`]
| Get character outlines as path
|===
=== See Also
-- xref:../ashow.adoc[`ashow`] - Show with character spacing adjustment
-- xref:../widthshow.adoc[`widthshow`] - Show with selective character width adjustment
-- xref:../awidthshow.adoc[`awidthshow`] - Combine ashow and widthshow
-- xref:../kshow.adoc[`kshow`] - Show with kerning procedure
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character (Level 2)
-- xref:../charpath.adoc[`charpath`] - Get character outlines as path
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
-- xref:../setfont.adoc[`setfont`] - Establish current font
+- link:/docs/commands/references/ashow/[`ashow`] - Show with character spacing adjustment
+- link:/docs/commands/references/widthshow/[`widthshow`] - Show with selective character width adjustment
+- link:/docs/commands/references/awidthshow/[`awidthshow`] - Combine ashow and widthshow
+- link:/docs/commands/references/kshow/[`kshow`] - Show with kerning procedure
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character (Level 2)
+- link:/docs/commands/references/charpath/[`charpath`] - Get character outlines as path
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
- `moveto` - Set current point
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/sin.adoc b/docs/commands/references/sin.adoc
similarity index 84%
rename from docs/commands/arithmetic-math/sin.adoc
rename to docs/commands/references/sin.adoc
index d1b9c37..58f1238 100644
--- a/docs/commands/arithmetic-math/sin.adoc
+++ b/docs/commands/references/sin.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: sin
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 17
---
= sin
@@ -68,8 +67,8 @@ WARNING: PostScript uses *degrees*, not radians!
== Related Commands
-* xref:../cos.adoc[`cos`] - Cosine (degrees)
-* xref:../atan.adoc[`atan`] - Arctangent (returns degrees)
+* link:/docs/commands/references/cos/[`cos`] - Cosine (degrees)
+* link:/docs/commands/references/atan/[`atan`] - Arctangent (returns degrees)
== PostScript Level
@@ -85,4 +84,4 @@ The operand is not a number.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/sqrt.adoc b/docs/commands/references/sqrt.adoc
similarity index 93%
rename from docs/commands/arithmetic-math/sqrt.adoc
rename to docs/commands/references/sqrt.adoc
index 336d521..d370985 100644
--- a/docs/commands/arithmetic-math/sqrt.adoc
+++ b/docs/commands/references/sqrt.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: sqrt
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
= sqrt
@@ -179,8 +178,8 @@ WARNING: Negative arguments cause `rangecheck` error.
== Related Commands
-* xref:../exp.adoc[`exp`] - Exponentiation
-* xref:../mul.adoc[`mul`] - Multiplication
+* link:/docs/commands/references/exp/[`exp`] - Exponentiation
+* link:/docs/commands/references/mul/[`mul`] - Multiplication
== PostScript Level
@@ -204,4 +203,4 @@ The operand is negative.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/srand.adoc b/docs/commands/references/srand.adoc
similarity index 84%
rename from docs/commands/arithmetic-math/srand.adoc
rename to docs/commands/references/srand.adoc
index 01d30aa..5c0c55b 100644
--- a/docs/commands/arithmetic-math/srand.adoc
+++ b/docs/commands/references/srand.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: srand
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 22
---
= srand
@@ -11,7 +10,7 @@ Seeds the random number generator with a specific value.
== Description
-The `srand` operator pops an integer from the operand stack and uses it to initialize (seed) the random number generator. Executing `srand` with a particular seed value causes subsequent calls to xref:../rand.adoc[`rand`] to generate a reproducible, deterministic sequence of pseudo-random numbers.
+The `srand` operator pops an integer from the operand stack and uses it to initialize (seed) the random number generator. Executing `srand` with a particular seed value causes subsequent calls to link:/docs/commands/references/rand/[`rand`] to generate a reproducible, deterministic sequence of pseudo-random numbers.
This is a Level 1 operator, available in all PostScript implementations.
@@ -92,8 +91,8 @@ rand % Different each run
== Related Commands
-* xref:../rand.adoc[`rand`] - Generate random integer
-* xref:../rrand.adoc[`rrand`] - Get/set random seed
+* link:/docs/commands/references/rand/[`rand`] - Generate random integer
+* link:/docs/commands/references/rrand/[`rrand`] - Get/set random seed
== PostScript Level
@@ -121,4 +120,4 @@ The operand is not an integer.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/control-flow/stop.adoc b/docs/commands/references/stop.adoc
similarity index 74%
rename from docs/commands/control-flow/stop.adoc
rename to docs/commands/references/stop.adoc
index 7803888..44317b1 100644
--- a/docs/commands/control-flow/stop.adoc
+++ b/docs/commands/references/stop.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: stop
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -29,12 +28,12 @@ Terminates execution of the innermost stopped context.
=== Description
-xref:../stop.adoc[`stop`] terminates execution of the innermost, dynamically enclosing instance of a xref:../stopped.adoc[`stopped`] context, without regard to lexical relationship.
+link:/docs/commands/references/stop/[`stop`] terminates execution of the innermost, dynamically enclosing instance of a link:/docs/commands/references/stopped/[`stopped`] context, without regard to lexical relationship.
-When xref:../stop.adoc[`stop`] executes:
-1. Pops execution stack down to the xref:../stopped.adoc[`stopped`] operator level
+When link:/docs/commands/references/stop/[`stop`] executes:
+1. Pops execution stack down to the link:/docs/commands/references/stopped/[`stopped`] operator level
2. Pushes `true` on the operand stack
-3. Resumes execution after the xref:../stopped.adoc[`stopped`] operator
+3. Resumes execution after the link:/docs/commands/references/stopped/[`stopped`] operator
The operand and dictionary stacks are not affected - any objects pushed during stopped context execution remain.
@@ -133,7 +132,7 @@ The operand and dictionary stacks are not affected - any objects pushed during s
=== Common Pitfalls
-WARNING: *Requires stopped Context* - Without enclosing xref:../stopped.adoc[`stopped`], prints error and calls xref:../quit.adoc[`quit`].
+WARNING: *Requires stopped Context* - Without enclosing link:/docs/commands/references/stopped/[`stopped`], prints error and calls link:/docs/commands/references/quit/[`quit`].
[source,postscript]
----
@@ -194,7 +193,7 @@ TIP: *Use for Error Signaling* - Preferred way to signal errors in custom operat
=== See Also
-* xref:../stopped.adoc[`stopped`] - Create stopped context
-* xref:../exit.adoc[`exit`] - Exit loop
-* xref:../quit.adoc[`quit`] - Terminate interpreter
+* link:/docs/commands/references/stopped/[`stopped`] - Create stopped context
+* link:/docs/commands/references/exit/[`exit`] - Exit loop
+* link:/docs/commands/references/quit/[`quit`] - Terminate interpreter
* Error Handling (to be documented)
\ No newline at end of file
diff --git a/docs/commands/control-flow/stopped.adoc b/docs/commands/references/stopped.adoc
similarity index 81%
rename from docs/commands/control-flow/stopped.adoc
rename to docs/commands/references/stopped.adoc
index ec7affa..57ea596 100644
--- a/docs/commands/control-flow/stopped.adoc
+++ b/docs/commands/references/stopped.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: stopped
-parent: Control Flow
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -53,12 +52,12 @@ any stopped → bool
=== Description
-xref:../stopped.adoc[`stopped`] executes _any_ (typically a procedure).
+link:/docs/commands/references/stopped/[`stopped`] executes _any_ (typically a procedure).
* If _any_ runs to completion normally: returns `false`
-* If _any_ terminates via xref:../stop.adoc[`stop`]: returns `true`
+* If _any_ terminates via link:/docs/commands/references/stop/[`stop`]: returns `true`
-Regardless of outcome, execution resumes at the next object after xref:../stopped.adoc[`stopped`].
+Regardless of outcome, execution resumes at the next object after link:/docs/commands/references/stopped/[`stopped`].
This provides PostScript's primary error-catching mechanism.
@@ -150,7 +149,7 @@ file closefile % Always close
=== Common Pitfalls
-WARNING: *Catches All Errors* - xref:../stopped.adoc[`stopped`] catches ALL errors, including those you might not expect.
+WARNING: *Catches All Errors* - link:/docs/commands/references/stopped/[`stopped`] catches ALL errors, including those you might not expect.
[source,postscript]
----
@@ -195,7 +194,7 @@ TIP: *Standard Error Pattern* - Default PostScript error handlers use this patte
=== Standard Error Handler
-The default error handler uses xref:../stopped.adoc[`stopped`]:
+The default error handler uses link:/docs/commands/references/stopped/[`stopped`]:
[source,postscript]
----
@@ -232,7 +231,7 @@ The default error handler uses xref:../stopped.adoc[`stopped`]:
=== See Also
-* xref:../stop.adoc[`stop`] - Terminate stopped context
-* xref:../exit.adoc[`exit`] - Exit loop
-* xref:../exec.adoc[`exec`] - Execute object
+* link:/docs/commands/references/stop/[`stop`] - Terminate stopped context
+* link:/docs/commands/references/exit/[`exit`] - Exit loop
+* link:/docs/commands/references/exec/[`exec`] - Execute object
* Error Handling (to be documented)
\ No newline at end of file
diff --git a/docs/commands/dictionary/store.adoc b/docs/commands/references/store.adoc
similarity index 65%
rename from docs/commands/dictionary/store.adoc
rename to docs/commands/references/store.adoc
index 1dcc607..fa49ce1 100644
--- a/docs/commands/dictionary/store.adoc
+++ b/docs/commands/references/store.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: store
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -41,12 +40,12 @@ key value store → –
=== Description
-xref:../store.adoc[`store`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
+link:/docs/commands/references/store/[`store`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
* If found: replaces the value in that dictionary
* If not found: creates new entry in current dictionary
-This differs from xref:../def.adoc[`def`], which always uses the current dictionary.
+This differs from link:/docs/commands/references/def/[`def`], which always uses the current dictionary.
=== PostScript Level
@@ -106,7 +105,7 @@ end
=== Common Pitfalls
-WARNING: *Searches Dictionary Stack* - xref:../store.adoc[`store`] may modify a dictionary other than the current one!
+WARNING: *Searches Dictionary Stack* - link:/docs/commands/references/store/[`store`] may modify a dictionary other than the current one!
[source,postscript]
----
@@ -117,11 +116,11 @@ WARNING: *Searches Dictionary Stack* - xref:../store.adoc[`store`] may modify a
end
----
-WARNING: *Global/Local VM Restrictions* - Same VM rules as xref:../def.adoc[`def`] apply.
+WARNING: *Global/Local VM Restrictions* - Same VM rules as link:/docs/commands/references/def/[`def`] apply.
-TIP: *Use def for New Definitions* - Use xref:../def.adoc[`def`] when you want to ensure definition goes in current dictionary.
+TIP: *Use def for New Definitions* - Use link:/docs/commands/references/def/[`def`] when you want to ensure definition goes in current dictionary.
-TIP: *Use store for Updates* - Use xref:../store.adoc[`store`] when you want to update an existing definition regardless of where it is.
+TIP: *Use store for Updates* - Use link:/docs/commands/references/store/[`store`] when you want to update an existing definition regardless of where it is.
=== Error Conditions
@@ -153,7 +152,7 @@ TIP: *Use store for Updates* - Use xref:../store.adoc[`store`] when you want to
[cols="2,3,3"]
|===
-| Aspect | xref:../def.adoc[`def`] | xref:../store.adoc[`store`]
+| Aspect | link:/docs/commands/references/def/[`def`] | link:/docs/commands/references/store/[`store`]
| Target
| Always current dictionary
@@ -174,7 +173,7 @@ TIP: *Use store for Updates* - Use xref:../store.adoc[`store`] when you want to
=== See Also
-* xref:../def.adoc[`def`] - Define in current dictionary
-* xref:../load.adoc[`load`] - Load from dictionary stack
-* xref:../where.adoc[`where`] - Find which dictionary contains key
-* xref:../array-string/put.adoc[`put`] - Put into specific dictionary
\ No newline at end of file
+* link:/docs/commands/references/def/[`def`] - Define in current dictionary
+* link:/docs/commands/references/load/[`load`] - Load from dictionary stack
+* link:/docs/commands/references/where/[`where`] - Find which dictionary contains key
+* link:/docs/commands/references/put/[`put`] - Put into specific dictionary
\ No newline at end of file
diff --git a/docs/commands/array-string/string.adoc b/docs/commands/references/string.adoc
similarity index 74%
rename from docs/commands/array-string/string.adoc
rename to docs/commands/references/string.adoc
index 4be141c..11faa92 100644
--- a/docs/commands/array-string/string.adoc
+++ b/docs/commands/references/string.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: string
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -38,7 +37,7 @@ int string → string
=== Description
-xref:../string.adoc[`string`] creates a string object of length _int_, with each element initialized to the integer 0 (null character). The string is allocated in local or global VM according to the current VM allocation mode.
+link:/docs/commands/references/string/[`string`] creates a string object of length _int_, with each element initialized to the integer 0 (null character). The string is allocated in local or global VM according to the current VM allocation mode.
The _int_ operand must be:
* A non-negative integer
@@ -111,7 +110,7 @@ WARNING: *All Elements Initialized to Zero* - The string contains null character
5 string % Not empty, contains 5 null chars
----
-WARNING: *String Literals vs. string Operator* - For known text, use string literals `(...)`. Use xref:../string.adoc[`string`] for dynamic buffers.
+WARNING: *String Literals vs. string Operator* - For known text, use string literals `(...)`. Use link:/docs/commands/references/string/[`string`] for dynamic buffers.
[source,postscript]
----
@@ -119,7 +118,7 @@ WARNING: *String Literals vs. string Operator* - For known text, use string lite
5 string % Dynamic allocation (for buffers)
----
-TIP: *Calculate Size Dynamically* - Use xref:../length.adoc[`length`] to determine buffer sizes.
+TIP: *Calculate Size Dynamically* - Use link:/docs/commands/references/length/[`length`] to determine buffer sizes.
[source,postscript]
----
@@ -164,9 +163,9 @@ original length string % Same size as original
=== See Also
-* xref:../length.adoc[`length`] - Get string length
-* xref:../get.adoc[`get`] - Get character code
-* xref:../put.adoc[`put`] - Put character code
-* xref:../getinterval.adoc[`getinterval`] - Get substring
-* xref:../putinterval.adoc[`putinterval`] - Put substring
-* xref:../cvs.adoc[`cvs`] - Convert object to string
\ No newline at end of file
+* link:/docs/commands/references/length/[`length`] - Get string length
+* link:/docs/commands/references/get/[`get`] - Get character code
+* link:/docs/commands/references/put/[`put`] - Put character code
+* link:/docs/commands/references/getinterval/[`getinterval`] - Get substring
+* link:/docs/commands/references/putinterval/[`putinterval`] - Put substring
+* link:/docs/commands/references/cvs/[`cvs`] - Convert object to string
\ No newline at end of file
diff --git a/docs/commands/font-text/stringwidth.adoc b/docs/commands/references/stringwidth.adoc
similarity index 79%
rename from docs/commands/font-text/stringwidth.adoc
rename to docs/commands/references/stringwidth.adoc
index b4eca30..f94936f 100644
--- a/docs/commands/font-text/stringwidth.adoc
+++ b/docs/commands/references/stringwidth.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: stringwidth
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 14
---
@@ -30,13 +29,13 @@ wx wy
=== Description
-xref:../stringwidth.adoc[`stringwidth`] calculates the change in the current point that would occur if `string` were given as the operand to xref:../show.adoc[`show`] with the current font. `wx` and `wy` are computed by adding together the width vectors of all the individual characters in `string` and converting the result to user space.
+link:/docs/commands/references/stringwidth/[`stringwidth`] calculates the change in the current point that would occur if `string` were given as the operand to link:/docs/commands/references/show/[`show`] with the current font. `wx` and `wy` are computed by adding together the width vectors of all the individual characters in `string` and converting the result to user space.
-They form a distance vector in x and y describing the width of the entire string in user space. To obtain the character widths, xref:../stringwidth.adoc[`stringwidth`] may execute the descriptions of one or more of the characters in the current font and may cause the results to be placed in the font cache.
+They form a distance vector in x and y describing the width of the entire string in user space. To obtain the character widths, link:/docs/commands/references/stringwidth/[`stringwidth`] may execute the descriptions of one or more of the characters in the current font and may cause the results to be placed in the font cache.
-However, xref:../stringwidth.adoc[`stringwidth`] prevents the graphics operators that are executed from painting anything into the current page.
+However, link:/docs/commands/references/stringwidth/[`stringwidth`] prevents the graphics operators that are executed from painting anything into the current page.
-Note that the "width" of a string is defined as movement of the current point. It has nothing to do with the dimensions of the character outlines (see xref:../charpath.adoc[`charpath`]) and `pathbbox`.
+Note that the "width" of a string is defined as movement of the current point. It has nothing to do with the dimensions of the character outlines (see link:/docs/commands/references/charpath/[`charpath`]) and `pathbbox`.
=== Parameters
@@ -269,7 +268,7 @@ pop exch pop sub % e.g., 115 units (tighter)
=== Performance Considerations
-- Fast operation (similar cost to xref:../show.adoc[`show`])
+- Fast operation (similar cost to link:/docs/commands/references/show/[`show`])
- May trigger character caching
- Does not paint (no output overhead)
- Can be called repeatedly without side effects
@@ -290,9 +289,9 @@ For vertical writing fonts, `wy` may be non-zero:
=== See Also
-- xref:../show.adoc[`show`] - Paint text string
-- xref:../charpath.adoc[`charpath`] - Get character outlines as path
+- link:/docs/commands/references/show/[`show`] - Paint text string
+- link:/docs/commands/references/charpath/[`charpath`] - Get character outlines as path
- `pathbbox` - Get path bounding box
-- xref:../setfont.adoc[`setfont`] - Establish current font
-- xref:../ashow.adoc[`ashow`] - Show with spacing adjustment
-- xref:../widthshow.adoc[`widthshow`] - Show with selective adjustment
\ No newline at end of file
+- link:/docs/commands/references/setfont/[`setfont`] - Establish current font
+- link:/docs/commands/references/ashow/[`ashow`] - Show with spacing adjustment
+- link:/docs/commands/references/widthshow/[`widthshow`] - Show with selective adjustment
\ No newline at end of file
diff --git a/docs/commands/painting/stroke.adoc b/docs/commands/references/stroke.adoc
similarity index 71%
rename from docs/commands/painting/stroke.adoc
rename to docs/commands/references/stroke.adoc
index 50b56ab..2f86d07 100644
--- a/docs/commands/painting/stroke.adoc
+++ b/docs/commands/references/stroke.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: stroke
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 5
---
@@ -38,13 +37,13 @@ Paints a line following the current path using current line parameters.
=== Description
-xref:../stroke.adoc[`stroke`] paints a line following the current path using the current color. This line is centered on the path, has sides parallel to the path segments, and has a width (thickness) given by the current line width parameter in the graphics state.
+link:/docs/commands/references/stroke/[`stroke`] paints a line following the current path using the current color. This line is centered on the path, has sides parallel to the path segments, and has a width (thickness) given by the current line width parameter in the graphics state.
-xref:../stroke.adoc[`stroke`] paints the joints between connected path segments with the current line join and the ends of open subpaths with the current line cap. The line is either solid or broken according to the dash pattern established by xref:../graphics-state/setdash.adoc[`setdash`].
+link:/docs/commands/references/stroke/[`stroke`] paints the joints between connected path segments with the current line join and the ends of open subpaths with the current line cap. The line is either solid or broken according to the dash pattern established by link:/docs/commands/references/setdash/[`setdash`].
-The parameters in the graphics state controlling line rendition (line width, line join, line cap, dash pattern, etc.) are consulted at the time xref:../stroke.adoc[`stroke`] is executed. Their values during path construction are irrelevant.
+The parameters in the graphics state controlling line rendition (line width, line join, line cap, dash pattern, etc.) are consulted at the time link:/docs/commands/references/stroke/[`stroke`] is executed. Their values during path construction are irrelevant.
-xref:../stroke.adoc[`stroke`] implicitly performs a xref:../path-construction/newpath.adoc[`newpath`] after it has finished painting the current path.
+link:/docs/commands/references/stroke/[`stroke`] implicitly performs a link:/docs/commands/references/newpath/[`newpath`] after it has finished painting the current path.
=== PostScript Level
@@ -172,7 +171,7 @@ stroke
=== Common Pitfalls
-WARNING: *Path Consumed After Stroke* - xref:../stroke.adoc[`stroke`] clears the current path. Use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`] to preserve it.
+WARNING: *Path Consumed After Stroke* - link:/docs/commands/references/stroke/[`stroke`] clears the current path. Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] to preserve it.
[source,postscript]
----
@@ -257,13 +256,13 @@ stroke
=== Graphics State Parameters
-xref:../stroke.adoc[`stroke`] is affected by:
+link:/docs/commands/references/stroke/[`stroke`] is affected by:
-* **Line width** - Set by xref:../graphics-state/setlinewidth.adoc[`setlinewidth`]
-* **Line cap** - Set by xref:../graphics-state/setlinecap.adoc[`setlinecap`] (0=butt, 1=round, 2=square)
-* **Line join** - Set by xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] (0=miter, 1=round, 2=bevel)
-* **Miter limit** - Set by xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`]
-* **Dash pattern** - Set by xref:../graphics-state/setdash.adoc[`setdash`]
+* **Line width** - Set by link:/docs/commands/references/setlinewidth/[`setlinewidth`]
+* **Line cap** - Set by link:/docs/commands/references/setlinecap/[`setlinecap`] (0=butt, 1=round, 2=square)
+* **Line join** - Set by link:/docs/commands/references/setlinejoin/[`setlinejoin`] (0=miter, 1=round, 2=bevel)
+* **Miter limit** - Set by link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]
+* **Dash pattern** - Set by link:/docs/commands/references/setdash/[`setdash`]
* **Stroke adjustment** - Set by `setstrokeadjust` (Level 2)
* **Current color** - Set by color operators
* **Current transformation matrix (CTM)** - Affects line width and dash pattern
@@ -404,15 +403,15 @@ stroke
=== See Also
-* xref:../fill.adoc[`fill`] - Fill path interior
-* xref:../strokepath.adoc[`strokepath`] - Convert stroke to outline path
-* xref:../ustroke.adoc[`ustroke`] - Stroke user path (Level 2)
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/setlinecap.adoc[`setlinecap`] - Set line cap style
-* xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] - Set line join style
-* xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`] - Set miter limit
-* xref:../graphics-state/setdash.adoc[`setdash`] - Set dash pattern
+* link:/docs/commands/references/fill/[`fill`] - Fill path interior
+* link:/docs/commands/references/strokepath/[`strokepath`] - Convert stroke to outline path
+* link:/docs/commands/references/ustroke/[`ustroke`] - Stroke user path (Level 2)
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap style
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join style
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Set miter limit
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
* `setstrokeadjust` - Enable stroke adjustment (Level 2)
-* xref:../path-construction/newpath.adoc[`newpath`] - Clear current path
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/newpath/[`newpath`] - Clear current path
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/painting/strokepath.adoc b/docs/commands/references/strokepath.adoc
similarity index 73%
rename from docs/commands/painting/strokepath.adoc
rename to docs/commands/references/strokepath.adoc
index 158edf7..ef8c9f6 100644
--- a/docs/commands/painting/strokepath.adoc
+++ b/docs/commands/references/strokepath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: strokepath
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 6
---
@@ -38,11 +37,11 @@ Converts the stroke of the current path to an outline path.
=== Description
-xref:../strokepath.adoc[`strokepath`] replaces the current path with one enclosing the shape that would result if the xref:../stroke.adoc[`stroke`] operator were applied to the current path. The path resulting from xref:../strokepath.adoc[`strokepath`] is suitable as the implicit operand to xref:../fill.adoc[`fill`], xref:../clip.adoc[`clip`], or `pathbbox`.
+link:/docs/commands/references/strokepath/[`strokepath`] replaces the current path with one enclosing the shape that would result if the link:/docs/commands/references/stroke/[`stroke`] operator were applied to the current path. The path resulting from link:/docs/commands/references/strokepath/[`strokepath`] is suitable as the implicit operand to link:/docs/commands/references/fill/[`fill`], link:/docs/commands/references/clip/[`clip`], or `pathbbox`.
-In general, this path is not suitable for xref:../stroke.adoc[`stroke`], as it may contain interior segments or disconnected subpaths produced by xref:../strokepath.adoc[`strokepath`]'s stroke-to-outline conversion process.
+In general, this path is not suitable for link:/docs/commands/references/stroke/[`stroke`], as it may contain interior segments or disconnected subpaths produced by link:/docs/commands/references/strokepath/[`strokepath`]'s stroke-to-outline conversion process.
-xref:../strokepath.adoc[`strokepath`] uses the current line width, line cap, line join, miter limit, and dash pattern to determine the outline. Unlike xref:../stroke.adoc[`stroke`], xref:../strokepath.adoc[`strokepath`] does not consume the path—it modifies it in place.
+link:/docs/commands/references/strokepath/[`strokepath`] uses the current line width, line cap, line join, miter limit, and dash pattern to determine the outline. Unlike link:/docs/commands/references/stroke/[`stroke`], link:/docs/commands/references/strokepath/[`strokepath`] does not consume the path—it modifies it in place.
=== PostScript Level
@@ -184,7 +183,7 @@ stroke % May show interior segments
fill % Correct usage
----
-WARNING: *Path Not Consumed* - Unlike xref:../stroke.adoc[`stroke`], xref:../strokepath.adoc[`strokepath`] modifies the path in place.
+WARNING: *Path Not Consumed* - Unlike link:/docs/commands/references/stroke/[`stroke`], link:/docs/commands/references/strokepath/[`strokepath`] modifies the path in place.
[source,postscript]
----
@@ -215,7 +214,7 @@ newpath
strokepath % Outline includes all effects
----
-TIP: *Use for Path Inspection* - xref:../strokepath.adoc[`strokepath`] makes the stroke boundary explicit:
+TIP: *Use for Path Inspection* - link:/docs/commands/references/strokepath/[`strokepath`] makes the stroke boundary explicit:
[source,postscript]
----
@@ -353,7 +352,7 @@ newpath
=== Performance Considerations
-* More complex than simple xref:../stroke.adoc[`stroke`]
+* More complex than simple link:/docs/commands/references/stroke/[`stroke`]
* Dash patterns significantly increase complexity
* Round caps/joins create more path segments than butt/miter
* Very wide lines create large outlines
@@ -404,14 +403,14 @@ fill
=== See Also
-* xref:../stroke.adoc[`stroke`] - Paint stroke directly
-* xref:../fill.adoc[`fill`] - Fill path interior
-* xref:../clip.adoc[`clip`] - Use path for clipping
-* xref:../ustrokepath.adoc[`ustrokepath`] - Stroke path for user path (Level 2)
+* link:/docs/commands/references/stroke/[`stroke`] - Paint stroke directly
+* link:/docs/commands/references/fill/[`fill`] - Fill path interior
+* link:/docs/commands/references/clip/[`clip`] - Use path for clipping
+* link:/docs/commands/references/ustrokepath/[`ustrokepath`] - Stroke path for user path (Level 2)
* `pathbbox` - Get path bounding box
* `flattenpath` - Convert curves to lines
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/setlinecap.adoc[`setlinecap`] - Set line cap style
-* xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] - Set line join style
-* xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`] - Set miter limit
-* xref:../graphics-state/setdash.adoc[`setdash`] - Set dash pattern
\ No newline at end of file
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap style
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join style
+* link:/docs/commands/references/setmiterlimit/[`setmiterlimit`] - Set miter limit
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/sub.adoc b/docs/commands/references/sub.adoc
similarity index 92%
rename from docs/commands/arithmetic-math/sub.adoc
rename to docs/commands/references/sub.adoc
index 222e2a1..ba73fe4 100644
--- a/docs/commands/arithmetic-math/sub.adoc
+++ b/docs/commands/references/sub.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: sub
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 2
---
= sub
@@ -228,11 +227,11 @@ Both operands must be numeric (integer or real). Other types will cause a `typec
== Related Commands
-* xref:../add.adoc[`add`] - Add two numbers
-* xref:../mul.adoc[`mul`] - Multiply two numbers
-* xref:../div.adoc[`div`] - Divide two numbers (real result)
-* xref:../neg.adoc[`neg`] - Negate a number
-* xref:../abs.adoc[`abs`] - Absolute value
+* link:/docs/commands/references/add/[`add`] - Add two numbers
+* link:/docs/commands/references/mul/[`mul`] - Multiply two numbers
+* link:/docs/commands/references/div/[`div`] - Divide two numbers (real result)
+* link:/docs/commands/references/neg/[`neg`] - Negate a number
+* link:/docs/commands/references/abs/[`abs`] - Absolute value
== PostScript Level
@@ -292,5 +291,5 @@ The `sub` operator is a primitive operation with O(1) constant time complexity.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
-* xref:../../levels/index.adoc[PostScript Language Levels]
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
+* link:/docs/levels/[PostScript Language Levels]
\ No newline at end of file
diff --git a/docs/commands/array-string/token.adoc b/docs/commands/references/token.adoc
similarity index 79%
rename from docs/commands/array-string/token.adoc
rename to docs/commands/references/token.adoc
index 69be5bc..a69f419 100644
--- a/docs/commands/array-string/token.adoc
+++ b/docs/commands/references/token.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: token
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 16
---
@@ -68,7 +67,7 @@ string token → post any true (if token found)
=== Description
-xref:../token.adoc[`token`] reads characters from _file_ or _string_, interpreting them according to PostScript syntax rules until a complete object is scanned.
+link:/docs/commands/references/token/[`token`] reads characters from _file_ or _string_, interpreting them according to PostScript syntax rules until a complete object is scanned.
**File case:**
* Returns the scanned object and `true` if successful
@@ -155,7 +154,7 @@ line token {
=== Common Pitfalls
-WARNING: *Consumes Whitespace* - xref:../token.adoc[`token`] consumes trailing whitespace after names/numbers.
+WARNING: *Consumes Whitespace* - link:/docs/commands/references/token/[`token`] consumes trailing whitespace after names/numbers.
[source,postscript]
----
@@ -173,7 +172,7 @@ WARNING: *Evaluates Syntax* - Returns actual objects, not string representations
WARNING: *Special Character Handling* - Different characters consumed differently after tokens.
-TIP: *Binary Token Support* - xref:../token.adoc[`token`] also handles binary tokens and binary object sequences.
+TIP: *Binary Token Support* - link:/docs/commands/references/token/[`token`] also handles binary tokens and binary object sequences.
=== Error Conditions
@@ -211,7 +210,7 @@ TIP: *Binary Token Support* - xref:../token.adoc[`token`] also handles binary to
=== Token Consumption Rules
-xref:../token.adoc[`token`] consumes characters differently based on token type:
+link:/docs/commands/references/token/[`token`] consumes characters differently based on token type:
[cols="2,3"]
|===
@@ -239,7 +238,7 @@ xref:../token.adoc[`token`] consumes characters differently based on token type:
=== Implementation Notes
* Same parsing logic as the PostScript interpreter
-* Returns literal objects (use xref:../cvx.adoc[`cvx`]) if execution needed
+* Returns literal objects (use link:/docs/commands/references/cvx/[`cvx`]) if execution needed
* File position updated past consumed characters
* For strings, _post_ points into original string (shared value)
@@ -262,8 +261,8 @@ xref:../token.adoc[`token`] consumes characters differently based on token type:
=== See Also
-* xref:../search.adoc[`search`] - Find substring
-* xref:../anchorsearch.adoc[`anchorsearch`] - Test for prefix
-* xref:../cvs.adoc[`cvs`] - Convert to string
-* xref:../cvn.adoc[`cvn`] - Convert to name
-* xref:../cvx.adoc[`cvx`] - Make executable
\ No newline at end of file
+* link:/docs/commands/references/search/[`search`] - Find substring
+* link:/docs/commands/references/anchorsearch/[`anchorsearch`] - Test for prefix
+* link:/docs/commands/references/cvs/[`cvs`] - Convert to string
+* link:/docs/commands/references/cvn/[`cvn`] - Convert to name
+* link:/docs/commands/references/cvx/[`cvx`] - Make executable
\ No newline at end of file
diff --git a/docs/commands/transformations/transform.adoc b/docs/commands/references/transform.adoc
similarity index 79%
rename from docs/commands/transformations/transform.adoc
rename to docs/commands/references/transform.adoc
index c4629f0..f7aec17 100644
--- a/docs/commands/transformations/transform.adoc
+++ b/docs/commands/references/transform.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: transform
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 13
---
@@ -45,9 +44,9 @@ x y matrix transform → x' y'
=== Description
-With no matrix operand, xref:../transform.adoc[`transform`] transforms the user space coordinate (x, y) by the current transformation matrix (CTM) to produce the corresponding device space coordinate (x', y').
+With no matrix operand, link:/docs/commands/references/transform/[`transform`] transforms the user space coordinate (x, y) by the current transformation matrix (CTM) to produce the corresponding device space coordinate (x', y').
-If the `matrix` operand is supplied, xref:../transform.adoc[`transform`] transforms (x, y) by `matrix` rather than by the CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/transform/[`transform`] transforms (x, y) by `matrix` rather than by the CTM.
This operator is useful for converting user space coordinates (the ones used in path construction) to device space coordinates (actual pixel positions).
@@ -154,7 +153,7 @@ userY 0 ge userY 100 le and
=== Common Pitfalls
-WARNING: *Position-Dependent* - xref:../transform.adoc[`transform`] includes translation. Use xref:../dtransform.adoc[`dtransform`] for distances.
+WARNING: *Position-Dependent* - link:/docs/commands/references/transform/[`transform`] includes translation. Use link:/docs/commands/references/dtransform/[`dtransform`] for distances.
[source,postscript]
----
@@ -176,7 +175,7 @@ WARNING: *CTM Changes* - The result depends on the current CTM at the time of ex
100 100 transform % Result B (different from A)
----
-TIP: *Use for Debugging* - xref:../transform.adoc[`transform`] helps understand coordinate mappings:
+TIP: *Use for Debugging* - link:/docs/commands/references/transform/[`transform`] helps understand coordinate mappings:
[source,postscript]
----
@@ -213,7 +212,7 @@ TIP: *Use for Debugging* - xref:../transform.adoc[`transform`] helps understand
* Transformation is a simple matrix multiplication
* Very fast operation
* No rounding or approximation (exact computation)
-* The inverse operation is xref:../itransform.adoc[`itransform`]
+* The inverse operation is link:/docs/commands/references/itransform/[`itransform`]
=== Transformation Formula
@@ -286,8 +285,8 @@ transform
=== See Also
-* xref:../itransform.adoc[`itransform`] - Inverse coordinate transformation (device to user)
-* xref:../dtransform.adoc[`dtransform`] - Distance vector transformation
-* xref:../idtransform.adoc[`idtransform`] - Inverse distance transformation
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../concat.adoc[`concat`] - Modify CTM
\ No newline at end of file
+* link:/docs/commands/references/itransform/[`itransform`] - Inverse coordinate transformation (device to user)
+* link:/docs/commands/references/dtransform/[`dtransform`] - Distance vector transformation
+* link:/docs/commands/references/idtransform/[`idtransform`] - Inverse distance transformation
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/concat/[`concat`] - Modify CTM
\ No newline at end of file
diff --git a/docs/commands/transformations/translate.adoc b/docs/commands/references/translate.adoc
similarity index 72%
rename from docs/commands/transformations/translate.adoc
rename to docs/commands/references/translate.adoc
index 09dc45b..557b880 100644
--- a/docs/commands/transformations/translate.adoc
+++ b/docs/commands/references/translate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: translate
-parent: Coordinate Transformations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 1
---
@@ -51,11 +50,11 @@ tx ty matrix translate → matrix
=== Description
-With no matrix operand, xref:../translate.adoc[`translate`] builds a temporary transformation matrix T and concatenates it with the current transformation matrix (CTM). Precisely, xref:../translate.adoc[`translate`] replaces the CTM by T × CTM.
+With no matrix operand, link:/docs/commands/references/translate/[`translate`] builds a temporary transformation matrix T and concatenates it with the current transformation matrix (CTM). Precisely, link:/docs/commands/references/translate/[`translate`] replaces the CTM by T × CTM.
The effect is to move the origin of the user coordinate system by `tx` units in the x direction and `ty` units in the y direction relative to the former user coordinate system. The sizes of the x and y units and the orientation of the axes are unchanged.
-If the `matrix` operand is supplied, xref:../translate.adoc[`translate`] replaces the value of `matrix` by T and pushes the modified matrix back on the operand stack. In this case, xref:../translate.adoc[`translate`] does not affect the CTM.
+If the `matrix` operand is supplied, link:/docs/commands/references/translate/[`translate`] replaces the value of `matrix` by T and pushes the modified matrix back on the operand stack. In this case, link:/docs/commands/references/translate/[`translate`] does not affect the CTM.
The translation matrix T has the form:
@@ -152,7 +151,7 @@ matrix % Get identity matrix
=== Common Pitfalls
-WARNING: *Coordinate System, Not Content* - xref:../translate.adoc[`translate`] moves the coordinate system, not the content. Drawing at (0, 0) after translation draws at the new origin location.
+WARNING: *Coordinate System, Not Content* - link:/docs/commands/references/translate/[`translate`] moves the coordinate system, not the content. Drawing at (0, 0) after translation draws at the new origin location.
[source,postscript]
----
@@ -166,7 +165,7 @@ stroke
stroke
----
-WARNING: *Transformations Accumulate* - Multiple translations add together. Use xref:../graphics-state/gsave.adoc[`gsave`]/xref:../graphics-state/grestore.adoc[`grestore`] to isolate transformations.
+WARNING: *Transformations Accumulate* - Multiple translations add together. Use link:/docs/commands/references/gsave/[`gsave`]/link:/docs/commands/references/grestore/[`grestore`] to isolate transformations.
[source,postscript]
----
@@ -181,7 +180,7 @@ grestore
% Original coordinate system restored
----
-TIP: *Readable Layout Code* - Use xref:../translate.adoc[`translate`] to establish drawing origins, making code more readable:
+TIP: *Readable Layout Code* - Use link:/docs/commands/references/translate/[`translate`] to establish drawing origins, making code more readable:
[source,postscript]
----
@@ -218,7 +217,7 @@ TIP: *Readable Layout Code* - Use xref:../translate.adoc[`translate`] to establi
=== Matrix Mathematics
-The translation matrix for xref:../translate.adoc[`translate`] by (`tx`, `ty`) is:
+The translation matrix for link:/docs/commands/references/translate/[`translate`] by (`tx`, `ty`) is:
----
T = [1 0 0 1 tx ty]
@@ -253,10 +252,10 @@ This is because each transformation modifies the CTM by left-multiplication.
=== See Also
-* xref:../scale.adoc[`scale`] - Change unit size
-* xref:../rotate.adoc[`rotate`] - Rotate coordinate axes
-* xref:../concat.adoc[`concat`] - Concatenate arbitrary matrix
-* xref:../setmatrix.adoc[`setmatrix`] - Replace CTM directly
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current CTM
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/scale/[`scale`] - Change unit size
+* link:/docs/commands/references/rotate/[`rotate`] - Rotate coordinate axes
+* link:/docs/commands/references/concat/[`concat`] - Concatenate arbitrary matrix
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Replace CTM directly
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current CTM
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/arithmetic-math/truncate.adoc b/docs/commands/references/truncate.adoc
similarity index 85%
rename from docs/commands/arithmetic-math/truncate.adoc
rename to docs/commands/references/truncate.adoc
index 120b272..6aee7cc 100644
--- a/docs/commands/arithmetic-math/truncate.adoc
+++ b/docs/commands/references/truncate.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: truncate
-parent: Arithmetic and Math
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 12
---
= truncate
@@ -85,9 +84,9 @@ num1 truncate num2
== Related Commands
-* xref:../ceiling.adoc[`ceiling`] - Round up
-* xref:../floor.adoc[`floor`] - Round down
-* xref:../round.adoc[`round`] - Round to nearest
+* link:/docs/commands/references/ceiling/[`ceiling`] - Round up
+* link:/docs/commands/references/floor/[`floor`] - Round down
+* link:/docs/commands/references/round/[`round`] - Round to nearest
== PostScript Level
@@ -103,4 +102,4 @@ The operand is not a number.
== See Also
-* xref:index.adoc[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
+* link:/docs/commands/references/[Arithmetic and Math] - All arithmetic operators
\ No newline at end of file
diff --git a/docs/commands/array-string/type.adoc b/docs/commands/references/type.adoc
similarity index 84%
rename from docs/commands/array-string/type.adoc
rename to docs/commands/references/type.adoc
index 840a826..3c96ec6 100644
--- a/docs/commands/array-string/type.adoc
+++ b/docs/commands/references/type.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: type
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 23
---
@@ -38,7 +37,7 @@ any type → name
=== Description
-xref:../type.adoc[`type`] returns a name object that identifies the type of its operand. The returned name has the **executable** attribute, making it convenient for type-dependent processing via dictionary lookup.
+link:/docs/commands/references/type/[`type`] returns a name object that identifies the type of its operand. The returned name has the **executable** attribute, making it convenient for type-dependent processing via dictionary lookup.
=== PostScript Level
@@ -221,8 +220,8 @@ PostScript has no formal inheritance, but types can be categorized:
=== See Also
-* xref:../cvlit.adoc[`cvlit`] - Convert to literal
-* xref:../cvx.adoc[`cvx`] - Convert to executable
-* xref:../xcheck.adoc[`xcheck`] - Test if executable
-* xref:../rcheck.adoc[`rcheck`] - Test if readable
-* xref:../wcheck.adoc[`wcheck`] - Test if writable
\ No newline at end of file
+* link:/docs/commands/references/cvlit/[`cvlit`] - Convert to literal
+* link:/docs/commands/references/cvx/[`cvx`] - Convert to executable
+* link:/docs/commands/references/xcheck/[`xcheck`] - Test if executable
+* link:/docs/commands/references/rcheck/[`rcheck`] - Test if readable
+* link:/docs/commands/references/wcheck/[`wcheck`] - Test if writable
\ No newline at end of file
diff --git a/docs/commands/painting/ueofill.adoc b/docs/commands/references/ueofill.adoc
similarity index 78%
rename from docs/commands/painting/ueofill.adoc
rename to docs/commands/references/ueofill.adoc
index 9e69d32..b614d68 100644
--- a/docs/commands/painting/ueofill.adoc
+++ b/docs/commands/references/ueofill.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ueofill
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 4
---
@@ -38,9 +37,9 @@ userpath ueofill → -
=== Description
-xref:../ueofill.adoc[`ueofill`] is similar to xref:../ufill.adoc[`ufill`], but uses the even-odd rule instead of the non-zero winding number rule to determine which areas are inside the path. The entire operation is effectively enclosed by xref:../graphics-state/gsave.adoc[`gsave`] and xref:../graphics-state/grestore.adoc[`grestore`], so xref:../ueofill.adoc[`ueofill`] has no lasting effect on the graphics state.
+link:/docs/commands/references/ueofill/[`ueofill`] is similar to link:/docs/commands/references/ufill/[`ufill`], but uses the even-odd rule instead of the non-zero winding number rule to determine which areas are inside the path. The entire operation is effectively enclosed by link:/docs/commands/references/gsave/[`gsave`] and link:/docs/commands/references/grestore/[`grestore`], so link:/docs/commands/references/ueofill/[`ueofill`] has no lasting effect on the graphics state.
-xref:../ueofill.adoc[`ueofill`] is equivalent to:
+link:/docs/commands/references/ueofill/[`ueofill`] is equivalent to:
[source,postscript]
----
@@ -183,7 +182,7 @@ grestore
samePath ueofill % Inner is a hole
----
-WARNING: *Path Direction Irrelevant* - Unlike xref:../ufill.adoc[`ufill`], path direction doesn't affect the result with xref:../ueofill.adoc[`ueofill`].
+WARNING: *Path Direction Irrelevant* - Unlike link:/docs/commands/references/ufill/[`ufill`], path direction doesn't affect the result with link:/docs/commands/references/ueofill/[`ueofill`].
[source,postscript]
----
@@ -195,7 +194,7 @@ WARNING: *Path Direction Irrelevant* - Unlike xref:../ufill.adoc[`ufill`], path
] ueofill % Always creates hole regardless of arc direction
----
-TIP: *Ideal for Shapes with Holes* - Use xref:../ueofill.adoc[`ueofill`] when you need predictable holes regardless of path direction:
+TIP: *Ideal for Shapes with Holes* - Use link:/docs/commands/references/ueofill/[`ueofill`] when you need predictable holes regardless of path direction:
[source,postscript]
----
@@ -250,23 +249,23 @@ windowFrame ueofill
=== Comparison with Other Fill Operators
-.Standard fill (xref:../fill.adoc[`fill`])
+.Standard fill (link:/docs/commands/references/fill/[`fill`])
* Uses non-zero winding number rule
* Path direction matters
* No graphics state isolation
-.Even-odd fill (xref:../eofill.adoc[`eofill`])
+.Even-odd fill (link:/docs/commands/references/eofill/[`eofill`])
* Uses even-odd rule
* Path direction doesn't matter
* No graphics state isolation
-.User path fill (xref:../ufill.adoc[`ufill`])
+.User path fill (link:/docs/commands/references/ufill/[`ufill`])
* Uses non-zero winding number rule
* Efficient user path format
* Automatic graphics state save/restore
* Can be cached
-.User path even-odd fill (xref:../ueofill.adoc[`ueofill`])
+.User path even-odd fill (link:/docs/commands/references/ueofill/[`ueofill`])
* Uses even-odd rule
* Efficient user path format
* Automatic graphics state save/restore
@@ -356,12 +355,12 @@ ringPath ustroke
=== See Also
-* xref:../eofill.adoc[`eofill`] - Even-odd fill traditional path
-* xref:../ufill.adoc[`ufill`] - Fill user path with non-zero winding rule
-* xref:../ustroke.adoc[`ustroke`] - Stroke user path
-* xref:../eoclip.adoc[`eoclip`] - Clip using even-odd rule
+* link:/docs/commands/references/eofill/[`eofill`] - Even-odd fill traditional path
+* link:/docs/commands/references/ufill/[`ufill`] - Fill user path with non-zero winding rule
+* link:/docs/commands/references/ustroke/[`ustroke`] - Stroke user path
+* link:/docs/commands/references/eoclip/[`eoclip`] - Clip using even-odd rule
* `setbbox` - Set bounding box
* `ucache` - Enable user path caching
* `uappend` - Append user path to current path
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/painting/ufill.adoc b/docs/commands/references/ufill.adoc
similarity index 84%
rename from docs/commands/painting/ufill.adoc
rename to docs/commands/references/ufill.adoc
index 5c02e91..280a692 100644
--- a/docs/commands/painting/ufill.adoc
+++ b/docs/commands/references/ufill.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ufill
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 3
---
@@ -38,9 +37,9 @@ userpath ufill → -
=== Description
-xref:../ufill.adoc[`ufill`] interprets a user path definition and fills the resulting path as if by xref:../fill.adoc[`fill`]. The entire operation is effectively enclosed by xref:../graphics-state/gsave.adoc[`gsave`] and xref:../graphics-state/grestore.adoc[`grestore`], so xref:../ufill.adoc[`ufill`] has no lasting effect on the graphics state.
+link:/docs/commands/references/ufill/[`ufill`] interprets a user path definition and fills the resulting path as if by link:/docs/commands/references/fill/[`fill`]. The entire operation is effectively enclosed by link:/docs/commands/references/gsave/[`gsave`] and link:/docs/commands/references/grestore/[`grestore`], so link:/docs/commands/references/ufill/[`ufill`] has no lasting effect on the graphics state.
-xref:../ufill.adoc[`ufill`] is equivalent to:
+link:/docs/commands/references/ufill/[`ufill`] is equivalent to:
[source,postscript]
----
@@ -189,7 +188,7 @@ WARNING: *Must Include setbbox* - User paths must begin with `setbbox` (optional
] ufill
----
-WARNING: *Graphics State Not Modified* - xref:../ufill.adoc[`ufill`] automatically saves and restores the graphics state.
+WARNING: *Graphics State Not Modified* - link:/docs/commands/references/ufill/[`ufill`] automatically saves and restores the graphics state.
[source,postscript]
----
@@ -283,7 +282,7 @@ fill
grestore
----
-.User path approach (xref:../ufill.adoc[`ufill`])
+.User path approach (link:/docs/commands/references/ufill/[`ufill`])
[source,postscript]
----
[
@@ -378,11 +377,11 @@ myPath ustroke
=== See Also
-* xref:../fill.adoc[`fill`] - Traditional fill operator
-* xref:../ueofill.adoc[`ueofill`] - Even-odd fill user path
-* xref:../ustroke.adoc[`ustroke`] - Stroke user path
+* link:/docs/commands/references/fill/[`fill`] - Traditional fill operator
+* link:/docs/commands/references/ueofill/[`ueofill`] - Even-odd fill user path
+* link:/docs/commands/references/ustroke/[`ustroke`] - Stroke user path
* `setbbox` - Set bounding box
* `ucache` - Enable user path caching
* `uappend` - Append user path to current path
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/dictionary/undef.adoc b/docs/commands/references/undef.adoc
similarity index 78%
rename from docs/commands/dictionary/undef.adoc
rename to docs/commands/references/undef.adoc
index cdb99ca..66d1d8e 100644
--- a/docs/commands/dictionary/undef.adoc
+++ b/docs/commands/references/undef.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: undef
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 9
---
@@ -41,7 +40,7 @@ dict key undef → –
=== Description
-xref:../undef.adoc[`undef`] removes _key_ and its associated value from dictionary _dict_. The dictionary does not need to be on the dictionary stack.
+link:/docs/commands/references/undef/[`undef`] removes _key_ and its associated value from dictionary _dict_. The dictionary does not need to be on the dictionary stack.
**No error occurs** if _key_ is not present in _dict_ - the operation is simply ignored.
@@ -109,14 +108,14 @@ config /feature known {
=== Common Pitfalls
-WARNING: *Level 2 Only* - xref:../undef.adoc[`undef`] is not available in Level 1 implementations.
+WARNING: *Level 2 Only* - link:/docs/commands/references/undef/[`undef`] is not available in Level 1 implementations.
[source,postscript]
----
% Level 1 workaround: none (can't remove entries)
----
-WARNING: *Silent on Missing Keys* - No error if key doesn't exist. Use xref:../known.adoc[`known`] first if you need to know.
+WARNING: *Silent on Missing Keys* - No error if key doesn't exist. Use link:/docs/commands/references/known/[`known`] first if you need to know.
[source,postscript]
----
@@ -173,7 +172,7 @@ dict key known {
=== See Also
-* xref:../def.adoc[`def`] - Define key-value pair
-* xref:../known.adoc[`known`] - Check if key exists
-* xref:../array-string/put.adoc[`put`] - Add/modify dictionary entry
-* xref:../where.adoc[`where`] - Find dictionary containing key
\ No newline at end of file
+* link:/docs/commands/references/def/[`def`] - Define key-value pair
+* link:/docs/commands/references/known/[`known`] - Check if key exists
+* link:/docs/commands/references/put/[`put`] - Add/modify dictionary entry
+* link:/docs/commands/references/where/[`where`] - Find dictionary containing key
\ No newline at end of file
diff --git a/docs/commands/font-text/undefinefont.adoc b/docs/commands/references/undefinefont.adoc
similarity index 79%
rename from docs/commands/font-text/undefinefont.adoc
rename to docs/commands/references/undefinefont.adoc
index a8a5b4a..20fc4bc 100644
--- a/docs/commands/font-text/undefinefont.adoc
+++ b/docs/commands/references/undefinefont.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: undefinefont
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 7
---
@@ -34,9 +33,9 @@ key
=== Description
-xref:../undefinefont.adoc[`undefinefont`] removes `key` and its associated value (a font dictionary) from the font directory, reversing the effect of a previous xref:../definefont.adoc[`definefont`]. xref:../undefinefont.adoc[`undefinefont`] is a special case of the `undefineresource` operator applied to the Font category.
+link:/docs/commands/references/undefinefont/[`undefinefont`] removes `key` and its associated value (a font dictionary) from the font directory, reversing the effect of a previous link:/docs/commands/references/definefont/[`definefont`]. link:/docs/commands/references/undefinefont/[`undefinefont`] is a special case of the `undefineresource` operator applied to the Font category.
-If the specified `key` does not exist in the font directory, xref:../undefinefont.adoc[`undefinefont`] does nothing—no error occurs.
+If the specified `key` does not exist in the font directory, link:/docs/commands/references/undefinefont/[`undefinefont`] does nothing—no error occurs.
=== Parameters
@@ -138,12 +137,12 @@ false setglobal
- Font becomes eligible for garbage collection only when no longer accessible
**Current Font:**
-- If the removed font is currently set via xref:../setfont.adoc[`setfont`], it remains current
+- If the removed font is currently set via link:/docs/commands/references/setfont/[`setfont`], it remains current
- The current font in graphics state is unaffected
-- Only future xref:../findfont.adoc[`findfont`] calls are affected
+- Only future link:/docs/commands/references/findfont/[`findfont`] calls are affected
**Restore Interaction:**
-- Effect of xref:../undefinefont.adoc[`undefinefont`] on local VM subject to `restore`
+- Effect of link:/docs/commands/references/undefinefont/[`undefinefont`] on local VM subject to `restore`
- Removing local font can be undone by `restore`
- Removing global font is permanent (until restored at job end)
@@ -221,7 +220,7 @@ FontDirectory {
=== Relationship to Other Resource Operators
-xref:../undefinefont.adoc[`undefinefont`] is equivalent to:
+link:/docs/commands/references/undefinefont/[`undefinefont`] is equivalent to:
[source,postscript]
----
@@ -236,8 +235,8 @@ For generic resource manipulation, use the resource operators:
=== See Also
-- xref:../definefont.adoc[`definefont`] - Register font in font directory
-- xref:../findfont.adoc[`findfont`] - Obtain font dictionary by name
+- link:/docs/commands/references/definefont/[`definefont`] - Register font in font directory
+- link:/docs/commands/references/findfont/[`findfont`] - Obtain font dictionary by name
- `undefineresource` - Remove resource from category
- `FontDirectory` - Dictionary of local fonts
- `GlobalFontDirectory` - Dictionary of global fonts
\ No newline at end of file
diff --git a/docs/commands/painting/ustroke.adoc b/docs/commands/references/ustroke.adoc
similarity index 74%
rename from docs/commands/painting/ustroke.adoc
rename to docs/commands/references/ustroke.adoc
index 95e38b4..27aa726 100644
--- a/docs/commands/painting/ustroke.adoc
+++ b/docs/commands/references/ustroke.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ustroke
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 7
---
@@ -51,16 +50,16 @@ userpath matrix ustroke → -
=== Description
-xref:../ustroke.adoc[`ustroke`] interprets a user path definition and strokes the resulting path as if by xref:../stroke.adoc[`stroke`]. The entire operation is effectively enclosed by xref:../graphics-state/gsave.adoc[`gsave`] and xref:../graphics-state/grestore.adoc[`grestore`], so xref:../ustroke.adoc[`ustroke`] has no lasting effect on the graphics state.
+link:/docs/commands/references/ustroke/[`ustroke`] interprets a user path definition and strokes the resulting path as if by link:/docs/commands/references/stroke/[`stroke`]. The entire operation is effectively enclosed by link:/docs/commands/references/gsave/[`gsave`] and link:/docs/commands/references/grestore/[`grestore`], so link:/docs/commands/references/ustroke/[`ustroke`] has no lasting effect on the graphics state.
-In the first form (with no matrix operand), xref:../ustroke.adoc[`ustroke`] is equivalent to:
+In the first form (with no matrix operand), link:/docs/commands/references/ustroke/[`ustroke`] is equivalent to:
[source,postscript]
----
gsave newpath uappend stroke grestore
----
-In the second form, xref:../ustroke.adoc[`ustroke`] concatenates `matrix` to the CTM after interpreting `userpath`, but before executing xref:../stroke.adoc[`stroke`]. The matrix applies to the line width and the dash pattern, if any, but not to the path itself. This form is equivalent to:
+In the second form, link:/docs/commands/references/ustroke/[`ustroke`] concatenates `matrix` to the CTM after interpreting `userpath`, but before executing link:/docs/commands/references/stroke/[`stroke`]. The matrix applies to the line width and the dash pattern, if any, but not to the path itself. This form is equivalent to:
[source,postscript]
----
@@ -194,7 +193,7 @@ ustroke
=== Common Pitfalls
-WARNING: *Graphics State Not Modified* - xref:../ustroke.adoc[`ustroke`] automatically saves and restores graphics state.
+WARNING: *Graphics State Not Modified* - link:/docs/commands/references/ustroke/[`ustroke`] automatically saves and restores graphics state.
[source,postscript]
----
@@ -293,13 +292,13 @@ myPath 2 1 uniformStroke % Compensates for scale
=== Graphics State Interaction
-xref:../ustroke.adoc[`ustroke`] uses these graphics state parameters:
+link:/docs/commands/references/ustroke/[`ustroke`] uses these graphics state parameters:
-* Line width - from xref:../graphics-state/setlinewidth.adoc[`setlinewidth`]
-* Line cap - from xref:../graphics-state/setlinecap.adoc[`setlinecap`]
-* Line join - from xref:../graphics-state/setlinejoin.adoc[`setlinejoin`]
-* Miter limit - from xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`]
-* Dash pattern - from xref:../graphics-state/setdash.adoc[`setdash`]
+* Line width - from link:/docs/commands/references/setlinewidth/[`setlinewidth`]
+* Line cap - from link:/docs/commands/references/setlinecap/[`setlinecap`]
+* Line join - from link:/docs/commands/references/setlinejoin/[`setlinejoin`]
+* Miter limit - from link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]
+* Dash pattern - from link:/docs/commands/references/setdash/[`setdash`]
* Current color
* Current clipping path
* Current transformation matrix (CTM)
@@ -323,7 +322,7 @@ stroke
grestore
----
-.User path approach (xref:../ustroke.adoc[`ustroke`])
+.User path approach (link:/docs/commands/references/ustroke/[`ustroke`])
[source,postscript]
----
2 setlinewidth
@@ -438,16 +437,16 @@ shapePath ustroke
=== See Also
-* xref:../stroke.adoc[`stroke`] - Traditional stroke operator
-* xref:../ufill.adoc[`ufill`] - Fill user path
-* xref:../ustrokepath.adoc[`ustrokepath`] - Convert user path stroke to outline
-* xref:../strokepath.adoc[`strokepath`] - Convert stroke to outline path
+* link:/docs/commands/references/stroke/[`stroke`] - Traditional stroke operator
+* link:/docs/commands/references/ufill/[`ufill`] - Fill user path
+* link:/docs/commands/references/ustrokepath/[`ustrokepath`] - Convert user path stroke to outline
+* link:/docs/commands/references/strokepath/[`strokepath`] - Convert stroke to outline path
* `setbbox` - Set bounding box
* `ucache` - Enable user path caching
* `uappend` - Append user path to current path
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/setlinecap.adoc[`setlinecap`] - Set line cap
-* xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] - Set line join
-* xref:../graphics-state/setdash.adoc[`setdash`] - Set dash pattern
-* xref:../graphics-state/gsave.adoc[`gsave`] - Save graphics state
-* xref:../graphics-state/grestore.adoc[`grestore`] - Restore graphics state
\ No newline at end of file
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
+* link:/docs/commands/references/gsave/[`gsave`] - Save graphics state
+* link:/docs/commands/references/grestore/[`grestore`] - Restore graphics state
\ No newline at end of file
diff --git a/docs/commands/painting/ustrokepath.adoc b/docs/commands/references/ustrokepath.adoc
similarity index 74%
rename from docs/commands/painting/ustrokepath.adoc
rename to docs/commands/references/ustrokepath.adoc
index 96d0e95..ece0a8a 100644
--- a/docs/commands/painting/ustrokepath.adoc
+++ b/docs/commands/references/ustrokepath.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: ustrokepath
-parent: Painting
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -51,18 +50,18 @@ userpath matrix ustrokepath → -
=== Description
-xref:../ustrokepath.adoc[`ustrokepath`] replaces the current path with one enclosing the shape that would result if the xref:../ustroke.adoc[`ustroke`] operator were applied to the same operands. The path resulting from xref:../ustrokepath.adoc[`ustrokepath`] is suitable as the implicit operand to a subsequent xref:../fill.adoc[`fill`], xref:../clip.adoc[`clip`], or `pathbbox`.
+link:/docs/commands/references/ustrokepath/[`ustrokepath`] replaces the current path with one enclosing the shape that would result if the link:/docs/commands/references/ustroke/[`ustroke`] operator were applied to the same operands. The path resulting from link:/docs/commands/references/ustrokepath/[`ustrokepath`] is suitable as the implicit operand to a subsequent link:/docs/commands/references/fill/[`fill`], link:/docs/commands/references/clip/[`clip`], or `pathbbox`.
-In general, this path is not suitable for xref:../stroke.adoc[`stroke`], as it may contain interior segments or disconnected subpaths produced by xref:../ustrokepath.adoc[`ustrokepath`]'s stroke-to-outline conversion process.
+In general, this path is not suitable for link:/docs/commands/references/stroke/[`stroke`], as it may contain interior segments or disconnected subpaths produced by link:/docs/commands/references/ustrokepath/[`ustrokepath`]'s stroke-to-outline conversion process.
-In the first form, xref:../ustrokepath.adoc[`ustrokepath`] is equivalent to:
+In the first form, link:/docs/commands/references/ustrokepath/[`ustrokepath`] is equivalent to:
[source,postscript]
----
newpath uappend strokepath
----
-In the second form, xref:../ustrokepath.adoc[`ustrokepath`] is equivalent to:
+In the second form, link:/docs/commands/references/ustrokepath/[`ustrokepath`] is equivalent to:
[source,postscript]
----
@@ -236,7 +235,7 @@ stroke % Unpredictable results
fill % Correct usage
----
-WARNING: *Current Path Is Modified* - Unlike xref:../ustroke.adoc[`ustroke`], the current path is replaced with the outline.
+WARNING: *Current Path Is Modified* - Unlike link:/docs/commands/references/ustroke/[`ustroke`], the current path is replaced with the outline.
[source,postscript]
----
@@ -263,7 +262,7 @@ WARNING: *Matrix Affects Stroke, Not Path Coordinates* - The optional matrix onl
ustrokepath % Only affects line width calculation
----
-TIP: *Use for Path Analysis* - xref:../ustrokepath.adoc[`ustrokepath`] makes stroke boundaries explicit for analysis:
+TIP: *Use for Path Analysis* - link:/docs/commands/references/ustrokepath/[`ustrokepath`] makes stroke boundaries explicit for analysis:
[source,postscript]
----
@@ -312,16 +311,16 @@ pathbbox % Returns bbox of stroke outline
=== Graphics State Parameters
-xref:../ustrokepath.adoc[`ustrokepath`] uses these parameters to create the outline:
+link:/docs/commands/references/ustrokepath/[`ustrokepath`] uses these parameters to create the outline:
-* Line width - from xref:../graphics-state/setlinewidth.adoc[`setlinewidth`]
-* Line cap - from xref:../graphics-state/setlinecap.adoc[`setlinecap`]
-* Line join - from xref:../graphics-state/setlinejoin.adoc[`setlinejoin`]
-* Miter limit - from xref:../graphics-state/setmiterlimit.adoc[`setmiterlimit`]
-* Dash pattern - from xref:../graphics-state/setdash.adoc[`setdash`]
+* Line width - from link:/docs/commands/references/setlinewidth/[`setlinewidth`]
+* Line cap - from link:/docs/commands/references/setlinecap/[`setlinecap`]
+* Line join - from link:/docs/commands/references/setlinejoin/[`setlinejoin`]
+* Miter limit - from link:/docs/commands/references/setmiterlimit/[`setmiterlimit`]
+* Dash pattern - from link:/docs/commands/references/setdash/[`setdash`]
* Current transformation matrix (CTM)
-The graphics state is not automatically saved/restored (unlike xref:../ustroke.adoc[`ustroke`]).
+The graphics state is not automatically saved/restored (unlike link:/docs/commands/references/ustroke/[`ustroke`]).
=== Comparison with Other Stroke Operators
@@ -495,7 +494,7 @@ fill
=== Performance Considerations
-* More complex than simple xref:../ustroke.adoc[`ustroke`]
+* More complex than simple link:/docs/commands/references/ustroke/[`ustroke`]
* User path format provides some efficiency
* Dash patterns significantly increase complexity
* Round caps/joins create more segments
@@ -504,16 +503,16 @@ fill
=== See Also
-* xref:../ustroke.adoc[`ustroke`] - Stroke user path
-* xref:../strokepath.adoc[`strokepath`] - Convert stroke to outline (traditional path)
-* xref:../ufill.adoc[`ufill`] - Fill user path
-* xref:../fill.adoc[`fill`] - Fill path interior
-* xref:../clip.adoc[`clip`] - Use path for clipping
+* link:/docs/commands/references/ustroke/[`ustroke`] - Stroke user path
+* link:/docs/commands/references/strokepath/[`strokepath`] - Convert stroke to outline (traditional path)
+* link:/docs/commands/references/ufill/[`ufill`] - Fill user path
+* link:/docs/commands/references/fill/[`fill`] - Fill path interior
+* link:/docs/commands/references/clip/[`clip`] - Use path for clipping
* `setbbox` - Set bounding box
* `ucache` - Enable user path caching
* `uappend` - Append user path to current path
* `pathbbox` - Get path bounding box
-* xref:../graphics-state/setlinewidth.adoc[`setlinewidth`] - Set line width
-* xref:../graphics-state/setlinecap.adoc[`setlinecap`] - Set line cap
-* xref:../graphics-state/setlinejoin.adoc[`setlinejoin`] - Set line join
-* xref:../graphics-state/setdash.adoc[`setdash`] - Set dash pattern
\ No newline at end of file
+* link:/docs/commands/references/setlinewidth/[`setlinewidth`] - Set line width
+* link:/docs/commands/references/setlinecap/[`setlinecap`] - Set line cap
+* link:/docs/commands/references/setlinejoin/[`setlinejoin`] - Set line join
+* link:/docs/commands/references/setdash/[`setdash`] - Set dash pattern
\ No newline at end of file
diff --git a/docs/commands/array-string/wcheck.adoc b/docs/commands/references/wcheck.adoc
similarity index 73%
rename from docs/commands/array-string/wcheck.adoc
rename to docs/commands/references/wcheck.adoc
index c164a04..cbfb4ca 100644
--- a/docs/commands/array-string/wcheck.adoc
+++ b/docs/commands/references/wcheck.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: wcheck
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 26
---
@@ -41,7 +40,7 @@ string wcheck → bool
=== Description
-xref:../wcheck.adoc[`wcheck`] tests whether the operand's access attribute permits its value to be written (modified) by PostScript operators.
+link:/docs/commands/references/wcheck/[`wcheck`] tests whether the operand's access attribute permits its value to be written (modified) by PostScript operators.
Returns:
* `true` if access is **unlimited**
@@ -121,7 +120,7 @@ dict wcheck {
=== Common Pitfalls
-WARNING: *Packed Arrays Always Read-Only* - Packed arrays created with xref:../packedarray.adoc[`packedarray`] always return `false` for xref:../wcheck.adoc[`wcheck`].
+WARNING: *Packed Arrays Always Read-Only* - Packed arrays created with link:/docs/commands/references/packedarray/[`packedarray`] always return `false` for link:/docs/commands/references/wcheck/[`wcheck`].
[source,postscript]
----
@@ -136,9 +135,9 @@ WARNING: *Readonly is Permanent* - Once an object is made readonly, it cannot be
% No way to restore unlimited access
----
-WARNING: *Confusing wcheck with xcheck* - xref:../wcheck.adoc[`wcheck`] tests write access, xref:../xcheck.adoc[`xcheck`] tests executable attribute.
+WARNING: *Confusing wcheck with xcheck* - link:/docs/commands/references/wcheck/[`wcheck`] tests write access, link:/docs/commands/references/xcheck/[`xcheck`] tests executable attribute.
-TIP: *Check Before Modifying* - Use xref:../wcheck.adoc[`wcheck`] before operations like xref:../put.adoc[`put`] or xref:../putinterval.adoc[`putinterval`] on untrusted objects.
+TIP: *Check Before Modifying* - Use link:/docs/commands/references/wcheck/[`wcheck`] before operations like link:/docs/commands/references/put/[`put`] or link:/docs/commands/references/putinterval/[`putinterval`] on untrusted objects.
=== Error Conditions
@@ -199,8 +198,8 @@ object wcheck {
=== See Also
-* xref:../rcheck.adoc[`rcheck`] - Test if readable
-* xref:../xcheck.adoc[`xcheck`] - Test if executable
+* link:/docs/commands/references/rcheck/[`rcheck`] - Test if readable
+* link:/docs/commands/references/xcheck/[`xcheck`] - Test if executable
* Access operators: `readonly`, `executeonly`, `noaccess`
-* xref:../put.adoc[`put`] - Modify array/string/dict
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/put/[`put`] - Modify array/string/dict
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/dictionary/where.adoc b/docs/commands/references/where.adoc
similarity index 78%
rename from docs/commands/dictionary/where.adoc
rename to docs/commands/references/where.adoc
index cfb5e4e..6f6d794 100644
--- a/docs/commands/dictionary/where.adoc
+++ b/docs/commands/references/where.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: where
-parent: Dictionary Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 8
---
@@ -51,7 +50,7 @@ key where → dict true (if found)
=== Description
-xref:../where.adoc[`where`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
+link:/docs/commands/references/where/[`where`] searches for _key_ in each dictionary on the dictionary stack, starting with the topmost (current) dictionary.
* If found: returns the dictionary object and `true`
* If not found: returns `false`
@@ -142,7 +141,7 @@ end
=== Common Pitfalls
-WARNING: *Returns Dictionary, Not Value* - xref:../where.adoc[`where`] returns the dictionary itself, not the value.
+WARNING: *Returns Dictionary, Not Value* - link:/docs/commands/references/where/[`where`] returns the dictionary itself, not the value.
[source,postscript]
----
@@ -198,7 +197,7 @@ TIP: *Idiom for Getting Value* - Common pattern to get value:
[cols="2,3,3"]
|===
-| Aspect | xref:../known.adoc[`known`] | xref:../where.adoc[`where`]
+| Aspect | link:/docs/commands/references/known/[`known`] | link:/docs/commands/references/where/[`where`]
| Search scope
| Specific dictionary
@@ -219,8 +218,8 @@ TIP: *Idiom for Getting Value* - Common pattern to get value:
=== See Also
-* xref:../known.adoc[`known`] - Check specific dictionary
-* xref:../load.adoc[`load`] - Get value from dictionary stack
-* xref:../def.adoc[`def`] - Define in current dictionary
-* xref:../store.adoc[`store`] - Store in dictionary stack
-* xref:../array-string/get.adoc[`get`] - Get from specific dictionary
\ No newline at end of file
+* link:/docs/commands/references/known/[`known`] - Check specific dictionary
+* link:/docs/commands/references/load/[`load`] - Get value from dictionary stack
+* link:/docs/commands/references/def/[`def`] - Define in current dictionary
+* link:/docs/commands/references/store/[`store`] - Store in dictionary stack
+* link:/docs/commands/references/get/[`get`] - Get from specific dictionary
\ No newline at end of file
diff --git a/docs/commands/font-text/widthshow.adoc b/docs/commands/references/widthshow.adoc
similarity index 79%
rename from docs/commands/font-text/widthshow.adoc
rename to docs/commands/references/widthshow.adoc
index 5b200a7..b91b313 100644
--- a/docs/commands/font-text/widthshow.adoc
+++ b/docs/commands/references/widthshow.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: widthshow
-parent: "Font and Text"
-grand_parent: "Command Reference"
+parent: Command Reference
nav_order: 10
---
@@ -30,7 +29,7 @@ cx cy char string
=== Description
-xref:../widthshow.adoc[`widthshow`] paints the characters of `string` in a manner similar to xref:../show.adoc[`show`]. But while doing so, xref:../widthshow.adoc[`widthshow`] adjusts the width of each occurrence of the character `char` by adding `cx` to its x width and `cy` to its y width, thus modifying the spacing between it and the next character.
+link:/docs/commands/references/widthshow/[`widthshow`] paints the characters of `string` in a manner similar to link:/docs/commands/references/show/[`show`]. But while doing so, link:/docs/commands/references/widthshow/[`widthshow`] adjusts the width of each occurrence of the character `char` by adding `cx` to its x width and `cy` to its y width, thus modifying the spacing between it and the next character.
The `char` parameter is an integer used as a character code. This operator enables fitting a string of text to a specific width by adjusting the width of all occurrences of some specific character, such as the space character.
@@ -258,9 +257,9 @@ else:
=== Performance Considerations
-- Slightly slower than xref:../show.adoc[`show`] due to conditional width adjustment
+- Slightly slower than link:/docs/commands/references/show/[`show`] due to conditional width adjustment
- Still benefits from font caching
-- More efficient than xref:../kshow.adoc[`kshow`] for simple spacing needs
+- More efficient than link:/docs/commands/references/kshow/[`kshow`] for simple spacing needs
- Character matching is done by simple integer comparison (fast)
=== Comparison with Other Spacing Operators
@@ -269,27 +268,27 @@ else:
|===
| Operator | Spacing Adjustment
-| xref:../show.adoc[`show`]
+| link:/docs/commands/references/show/[`show`]
| None (uses character widths as-is)
-| xref:../ashow.adoc[`ashow`]
+| link:/docs/commands/references/ashow/[`ashow`]
| Uniform adjustment to all characters
-| xref:../widthshow.adoc[`widthshow`]
+| link:/docs/commands/references/widthshow/[`widthshow`]
| Adjustment to specific character only
-| xref:../awidthshow.adoc[`awidthshow`]
+| link:/docs/commands/references/awidthshow/[`awidthshow`]
| Both uniform and character-specific
-| xref:../kshow.adoc[`kshow`]
+| link:/docs/commands/references/kshow/[`kshow`]
| Procedural control between each pair
|===
=== See Also
-- xref:../show.adoc[`show`] - Basic text painting
-- xref:../ashow.adoc[`ashow`] - Show with uniform character spacing
-- xref:../awidthshow.adoc[`awidthshow`] - Combine ashow and widthshow
-- xref:../kshow.adoc[`kshow`] - Show with kerning procedure
-- xref:../cshow.adoc[`cshow`] - Show with procedure per character
-- xref:../stringwidth.adoc[`stringwidth`] - Calculate text width
\ No newline at end of file
+- link:/docs/commands/references/show/[`show`] - Basic text painting
+- link:/docs/commands/references/ashow/[`ashow`] - Show with uniform character spacing
+- link:/docs/commands/references/awidthshow/[`awidthshow`] - Combine ashow and widthshow
+- link:/docs/commands/references/kshow/[`kshow`] - Show with kerning procedure
+- link:/docs/commands/references/cshow/[`cshow`] - Show with procedure per character
+- link:/docs/commands/references/stringwidth/[`stringwidth`] - Calculate text width
\ No newline at end of file
diff --git a/docs/commands/array-string/xcheck.adoc b/docs/commands/references/xcheck.adoc
similarity index 76%
rename from docs/commands/array-string/xcheck.adoc
rename to docs/commands/references/xcheck.adoc
index 0740a02..3d26673 100644
--- a/docs/commands/array-string/xcheck.adoc
+++ b/docs/commands/references/xcheck.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: xcheck
-parent: Array and String Operations
-grand_parent: Command Reference
+parent: Command Reference
nav_order: 24
---
@@ -38,7 +37,7 @@ any xcheck → bool
=== Description
-xref:../xcheck.adoc[`xcheck`] tests whether the operand has the executable or literal attribute:
+link:/docs/commands/references/xcheck/[`xcheck`] tests whether the operand has the executable or literal attribute:
* Returns `true` if the object is executable
* Returns `false` if the object is literal
@@ -113,7 +112,7 @@ abc xcheck % true (executable name) - if abc is defined
=== Common Pitfalls
-WARNING: *Tests Attribute, Not Access* - xref:../xcheck.adoc[`xcheck`] does not test access permissions like execute-only.
+WARNING: *Tests Attribute, Not Access* - link:/docs/commands/references/xcheck/[`xcheck`] does not test access permissions like execute-only.
[source,postscript]
----
@@ -123,7 +122,7 @@ proc executeonly xcheck % true
WARNING: *Most Objects Are Literal* - Numbers, strings, and array literals are all literal by default.
-TIP: *Combine with type* - Use xref:../type.adoc[`type`] to check object type along with executability.
+TIP: *Combine with type* - Use link:/docs/commands/references/type/[`type`] to check object type along with executability.
=== Error Conditions
@@ -191,8 +190,8 @@ TIP: *Combine with type* - Use xref:../type.adoc[`type`] to check object type al
=== See Also
-* xref:../cvlit.adoc[`cvlit`] - Convert to literal attribute
-* xref:../cvx.adoc[`cvx`] - Convert to executable attribute
-* xref:../rcheck.adoc[`rcheck`] - Test if readable
-* xref:../wcheck.adoc[`wcheck`] - Test if writable
-* xref:../type.adoc[`type`] - Get object type
\ No newline at end of file
+* link:/docs/commands/references/cvlit/[`cvlit`] - Convert to literal attribute
+* link:/docs/commands/references/cvx/[`cvx`] - Convert to executable attribute
+* link:/docs/commands/references/rcheck/[`rcheck`] - Test if readable
+* link:/docs/commands/references/wcheck/[`wcheck`] - Test if writable
+* link:/docs/commands/references/type/[`type`] - Get object type
\ No newline at end of file
diff --git a/docs/commands/resource-management/index.adoc b/docs/commands/resource-management/index.adoc
index 0688b02..0c6f180 100644
--- a/docs/commands/resource-management/index.adoc
+++ b/docs/commands/resource-management/index.adoc
@@ -1,8 +1,7 @@
---
layout: default
title: Resource Management
-parent: Command Reference
-has_children: true
+parent: Commands
---
== Resource Management
@@ -18,12 +17,12 @@ This category contains PostScript operators for resource management.
This category is ready for command documentation to be added. Commands in this category include operators from the PostScript Language Reference Manual.
See other completed categories for documentation examples:
-* xref:../path-construction/index.adoc[Path Construction]
-* xref:../painting/index.adoc[Painting]
-* xref:../transformations/index.adoc[Transformations]
-* xref:../font-text/index.adoc[Font & Text]
+* link:/docs/commands/references/[Path Construction]
+* link:/docs/commands/references/[Painting]
+* link:/docs/commands/references/[Transformations]
+* link:/docs/commands/references/[Font & Text]
== See Also
-* xref:../index.adoc[Command Reference Overview]
-* xref:../../syntax/index.adoc[Language Syntax]
+* link:/docs/commands/[Command Reference Overview]
+* link:/docs/syntax/[Language Syntax]
diff --git a/docs/commands/stack-manipulation/index.adoc b/docs/commands/stack-manipulation/index.adoc
index efa9f22..b247d4c 100644
--- a/docs/commands/stack-manipulation/index.adoc
+++ b/docs/commands/stack-manipulation/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Stack Manipulation
-parent: Command Reference
+parent: Commands
nav_order: 1
---
= Stack Manipulation
@@ -18,37 +18,37 @@ The operand stack is fundamental to PostScript execution. These operators provid
|===
|Command |Description
-|xref:../pop.adoc[`pop`]
+|link:/docs/commands/references/pop/[`pop`]
|Remove the top element from the stack
-|xref:../exch.adoc[`exch`]
+|link:/docs/commands/references/exch/[`exch`]
|Exchange the top two stack elements
-|xref:../dup.adoc[`dup`]
+|link:/docs/commands/references/dup/[`dup`]
|Duplicate the top element
-|xref:../copy.adoc[`copy`]
+|link:/docs/commands/references/copy/[`copy`]
|Copy top n elements or duplicate composite object values
-|xref:../psindex.adoc[`psindex`]
+|link:/docs/commands/references/psindex/[`psindex`]
|Duplicate the nth element from the top
-|xref:../roll.adoc[`roll`]
+|link:/docs/commands/references/roll/[`roll`]
|Roll n elements j times
-|xref:../count.adoc[`count`]
+|link:/docs/commands/references/count/[`count`]
|Count elements on the stack
-|xref:../clear.adoc[`clear`]
+|link:/docs/commands/references/clear/[`clear`]
|Remove all elements from the stack
-|xref:../mark.adoc[`mark`]
+|link:/docs/commands/references/mark/[`mark`]
|Push a mark object onto the stack
-|xref:../cleartomark.adoc[`cleartomark`]
+|link:/docs/commands/references/cleartomark/[`cleartomark`]
|Pop elements down to and including a mark
-|xref:../counttomark.adoc[`counttomark`]
+|link:/docs/commands/references/counttomark/[`counttomark`]
|Count elements down to a mark
|===
@@ -70,6 +70,6 @@ a b c d 3 index % Copy element 3 positions down
== See Also
-* xref:../index.adoc[Command Reference] - All PostScript commands
-* xref:../../syntax/operators.adoc[Operators Overview]
-* xref:../../usage/basic/stack-operations.adoc[Stack Operations Guide]
\ No newline at end of file
+* link:/docs/commands/[Command Reference] - All PostScript commands
+* link:/docs/syntax/operators/[Operators Overview]
+* link:/docs/usage/basic/stack-operations/[Stack Operations Guide]
\ No newline at end of file
diff --git a/docs/commands/transformations/index.adoc b/docs/commands/transformations/index.adoc
index 82dcd04..79020a8 100644
--- a/docs/commands/transformations/index.adoc
+++ b/docs/commands/transformations/index.adoc
@@ -1,7 +1,7 @@
---
layout: default
title: Coordinate Transformations
-parent: Command Reference
+parent: Commands
---
== Coordinate Transformations
@@ -14,28 +14,28 @@ The PostScript coordinate transformation system provides powerful tools for mani
==== Basic Transformations
-* xref:../translate.adoc[`translate`] - Move the origin
-* xref:../scale.adoc[`scale`] - Change unit size
-* xref:../rotate.adoc[`rotate`] - Rotate axes
-* xref:../concat.adoc[`concat`] - Concatenate matrix with CTM
+* link:/docs/commands/references/translate/[`translate`] - Move the origin
+* link:/docs/commands/references/scale/[`scale`] - Change unit size
+* link:/docs/commands/references/rotate/[`rotate`] - Rotate axes
+* link:/docs/commands/references/concat/[`concat`] - Concatenate matrix with CTM
==== Matrix Operations
-* xref:../matrix.adoc[`matrix`] - Create identity matrix
-* xref:../identmatrix.adoc[`identmatrix`] - Replace matrix with identity
-* xref:../defaultmatrix.adoc[`defaultmatrix`] - Get device default matrix
-* xref:../currentmatrix.adoc[`currentmatrix`] - Get current transformation matrix
-* xref:../setmatrix.adoc[`setmatrix`] - Replace CTM with matrix
-* xref:../initmatrix.adoc[`initmatrix`] - Reset CTM to default
-* xref:../concatmatrix.adoc[`concatmatrix`] - Multiply two matrices
-* xref:../invertmatrix.adoc[`invertmatrix`] - Invert a matrix
+* link:/docs/commands/references/matrix/[`matrix`] - Create identity matrix
+* link:/docs/commands/references/identmatrix/[`identmatrix`] - Replace matrix with identity
+* link:/docs/commands/references/defaultmatrix/[`defaultmatrix`] - Get device default matrix
+* link:/docs/commands/references/currentmatrix/[`currentmatrix`] - Get current transformation matrix
+* link:/docs/commands/references/setmatrix/[`setmatrix`] - Replace CTM with matrix
+* link:/docs/commands/references/initmatrix/[`initmatrix`] - Reset CTM to default
+* link:/docs/commands/references/concatmatrix/[`concatmatrix`] - Multiply two matrices
+* link:/docs/commands/references/invertmatrix/[`invertmatrix`] - Invert a matrix
==== Coordinate Transformations
-* xref:../transform.adoc[`transform`] - Transform user→device coordinates
-* xref:../itransform.adoc[`itransform`] - Transform device→user coordinates
-* xref:../dtransform.adoc[`dtransform`] - Transform distance vector
-* xref:../idtransform.adoc[`idtransform`] - Inverse transform distance vector
+* link:/docs/commands/references/transform/[`transform`] - Transform user→device coordinates
+* link:/docs/commands/references/itransform/[`itransform`] - Transform device→user coordinates
+* link:/docs/commands/references/dtransform/[`dtransform`] - Transform distance vector
+* link:/docs/commands/references/idtransform/[`idtransform`] - Inverse transform distance vector
=== Transformation Matrix
@@ -64,9 +64,9 @@ The identity matrix is `[1 0 0 1 0 0]`.
The CTM maps user space coordinates to device space coordinates. It is part of the graphics state and is affected by:
-* xref:../graphics-state/gsave.adoc[`gsave`] and xref:../graphics-state/grestore.adoc[`grestore`]
+* link:/docs/commands/references/gsave/[`gsave`] and link:/docs/commands/references/grestore/[`grestore`]
* Basic transformation commands
-* xref:../setmatrix.adoc[`setmatrix`]
+* link:/docs/commands/references/setmatrix/[`setmatrix`]
=== Common Operations
diff --git a/docs/examples/color-gradients.adoc b/docs/examples/color-gradients.adoc
index b6d2e39..ebf4407 100644
--- a/docs/examples/color-gradients.adoc
+++ b/docs/examples/color-gradients.adoc
@@ -192,10 +192,10 @@ Understanding RGB, CMYK, HSB, and grayscale color models.
showpage
----
<1> Loop to create grayscale spectrum
-<2> Use link:../commands/graphics-state/setgray.adoc[`setgray`] for grayscale (0=black, 1=white)
-<3> Use link:../commands/graphics-state/setrgbcolor.adoc[`setrgbcolor`] for red, green, blue (0.0-1.0 each)
-<4> Use link:../commands/graphics-state/setcmykcolor.adoc[`setcmykcolor`] for cyan, magenta, yellow, black
-<5> Use link:../commands/graphics-state/sethsbcolor.adoc[`sethsbcolor`] for hue (0-1 = 0-360°), saturation, brightness
+<2> Use link:../commands/graphics-state/setgray/[`setgray`] for grayscale (0=black, 1=white)
+<3> Use link:../commands/graphics-state/setrgbcolor/[`setrgbcolor`] for red, green, blue (0.0-1.0 each)
+<4> Use link:../commands/graphics-state/setcmykcolor/[`setcmykcolor`] for cyan, magenta, yellow, black
+<5> Use link:../commands/graphics-state/sethsbcolor/[`sethsbcolor`] for hue (0-1 = 0-360°), saturation, brightness
==== Expected Output
@@ -617,8 +617,8 @@ showpage
<17> ShadingType 6 = Coons patch mesh (Level 3)
<18> Define patch corner coordinates
<19> Define colors at each corner
-<20> Use link:../commands/painting/clip.adoc[`clip`] to restrict gradient to shape
-<21> Use link:../commands/font-text/charpath.adoc[`charpath`] to convert text to path
+<20> Use link:../commands/painting/clip/[`clip`] to restrict gradient to shape
+<21> Use link:../commands/font-text/charpath/[`charpath`] to convert text to path
==== Expected Output
@@ -1130,13 +1130,13 @@ Transparency demonstrations:
=== See Also
-* xref:drawing-shapes.adoc[Drawing Shapes] - Shapes to fill with gradients
-* xref:text-layout.adoc[Text Layout] - Gradient text effects
-* xref:image-manipulation.adoc[Image Manipulation] - Color in images
-* xref:../levels/level-2.adoc[Level 2] - Shading functions
-* xref:../levels/level-3.adoc[Level 3] - Transparency
-* xref:../commands/graphics-state/setrgbcolor.adoc[setrgbcolor] - RGB colors
-* xref:../commands/graphics-state/setcmykcolor.adoc[setcmykcolor] - CMYK colors
-* xref:../commands/graphics-state/sethsbcolor.adoc[sethsbcolor] - HSB colors
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/drawing-shapes/[Drawing Shapes] - Shapes to fill with gradients
+* link:/docs/examples/text-layout/[Text Layout] - Gradient text effects
+* link:/docs/examples/image-manipulation/[Image Manipulation] - Color in images
+* link:/docs/levels/level-2/[Level 2] - Shading functions
+* link:/docs/levels/level-3/[Level 3] - Transparency
+* link:/docs/commands/references/setrgbcolor/[setrgbcolor] - RGB colors
+* link:/docs/commands/references/setcmykcolor/[setcmykcolor] - CMYK colors
+* link:/docs/commands/references/sethsbcolor/[sethsbcolor] - HSB colors
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/examples/drawing-shapes.adoc b/docs/examples/drawing-shapes.adoc
index 83337c3..94bec76 100644
--- a/docs/examples/drawing-shapes.adoc
+++ b/docs/examples/drawing-shapes.adoc
@@ -44,12 +44,12 @@ stroke % Draw the outline <7>
showpage
----
<1> Define position and size as variables for easy modification
-<2> Use link:../commands/path-construction/newpath.adoc[`newpath`] to start a new path
-<3> Use link:../commands/path-construction/moveto.adoc[`moveto`] to position at starting point
-<4> Use link:../commands/path-construction/rlineto.adoc[`rlineto`] for relative line drawing
-<5> Use link:../commands/path-construction/closepath.adoc[`closepath`] to complete the shape
-<6> Use link:../commands/graphics-state/setlinewidth.adoc[`setlinewidth`] to control line thickness
-<7> Use link:../commands/painting/stroke.adoc[`stroke`] to draw the outlined path
+<2> Use link:../commands/path-construction/newpath/[`newpath`] to start a new path
+<3> Use link:../commands/path-construction/moveto/[`moveto`] to position at starting point
+<4> Use link:../commands/path-construction/rlineto/[`rlineto`] for relative line drawing
+<5> Use link:../commands/path-construction/closepath/[`closepath`] to complete the shape
+<6> Use link:../commands/graphics-state/setlinewidth/[`setlinewidth`] to control line thickness
+<7> Use link:../commands/painting/stroke/[`stroke`] to draw the outlined path
==== Expected Output
@@ -71,8 +71,8 @@ PostScript provides convenience operators for rectangles:
showpage
----
-<1> Use link:../commands/painting/rectstroke.adoc[`rectstroke`] to draw rectangle outline
-<2> Use link:../commands/painting/rectfill.adoc[`rectfill`] to draw filled rectangle
+<1> Use link:../commands/painting/rectstroke/[`rectstroke`] to draw rectangle outline
+<2> Use link:../commands/painting/rectfill/[`rectfill`] to draw filled rectangle
=== Circle and Ellipse
@@ -139,11 +139,11 @@ grestore
showpage
----
-<1> Use link:../commands/path-construction/arc.adoc[`arc`] with center, radius, and angle range (degrees)
-<2> Use link:../commands/graphics-state/setgray.adoc[`setgray`] to set fill color (0=black, 1=white)
-<3> Use link:../commands/painting/fill.adoc[`fill`] to paint the interior
-<4> Use link:../commands/transformations/translate.adoc[`translate`] to move coordinate origin
-<5> Use link:../commands/transformations/scale.adoc[`scale`] to create ellipse from circle
+<1> Use link:../commands/path-construction/arc/[`arc`] with center, radius, and angle range (degrees)
+<2> Use link:../commands/graphics-state/setgray/[`setgray`] to set fill color (0=black, 1=white)
+<3> Use link:../commands/painting/fill/[`fill`] to paint the interior
+<4> Use link:../commands/transformations/translate/[`translate`] to move coordinate origin
+<5> Use link:../commands/transformations/scale/[`scale`] to create ellipse from circle
<6> Partial arc from 45° to 225° (180° arc)
<7> Line to center point (0,0 after translation) for pie slice
@@ -159,7 +159,7 @@ showpage
==== Arc Direction
* `arc` draws counter-clockwise from start angle to end angle
-* Use link:../commands/path-construction/arcn.adoc[`arcn`] for clockwise arcs
+* Use link:../commands/path-construction/arcn/[`arcn`] for clockwise arcs
* Angles are measured from the positive X-axis
=== Triangles and Polygons
@@ -301,8 +301,8 @@ showpage
----
<1> Use trigonometry: height = base × tan(60°) ≈ base × 0.866
<2> Start at top point (0, 60) from translated origin
-<3> Use link:../commands/control-flow/for.adoc[`for`] loop to repeat vertices
-<4> Use link:../commands/transformations/rotate.adoc[`rotate`] to position for next vertex
+<3> Use link:../commands/control-flow/for/[`for`] loop to repeat vertices
+<4> Use link:../commands/transformations/rotate/[`rotate`] to position for next vertex
<5> Starting at (radius, 0) simplifies the math
<6> Fill first, then stroke to get outline on top of fill
<7> 144° rotation creates star points (alternate vertices)
@@ -438,11 +438,11 @@ grestore
showpage
----
-<1> Use link:../commands/path-construction/curveto.adoc[`curveto`] with two control points and end point
+<1> Use link:../commands/path-construction/curveto/[`curveto`] with two control points and end point
<2> Chain multiple curves for smooth continuous paths
-<3> Use link:../commands/graphics-state/setrgbcolor.adoc[`setrgbcolor`] for red, green, blue colors
+<3> Use link:../commands/graphics-state/setrgbcolor/[`setrgbcolor`] for red, green, blue colors
<4> RGB values: (0, 0.5, 0) for green
-<5> Use link:../commands/path-construction/arcn.adoc[`arcn`] for clockwise arcs
+<5> Use link:../commands/path-construction/arcn/[`arcn`] for clockwise arcs
==== Expected Output
@@ -597,8 +597,8 @@ grestore
showpage
----
-<1> link:../commands/painting/stroke.adoc[`stroke`] draws only the path outline
-<2> link:../commands/painting/fill.adoc[`fill`] paints only the interior
+<1> link:../commands/painting/stroke/[`stroke`] draws only the path outline
+<2> link:../commands/painting/fill/[`fill`] paints only the interior
<3> Fill first to keep it under the stroke
<4> Stroke second to draw outline on top
<5> Both `fill` and `stroke` consume the path
@@ -608,9 +608,9 @@ showpage
<9> `[5 5]` means 5-point dash, 5-point gap
<10> `[10 5 2 5]` means 10-point dash, 5-point gap, 2-point dash, 5-point gap
<11> Loop through each style pattern
-<12> Use link:../commands/graphics-state/setdash.adoc[`setdash`] to apply dash pattern
-<13> Use link:../commands/graphics-state/setlinecap.adoc[`setlinecap`]: 0=butt, 1=round, 2=square
-<14> Use link:../commands/graphics-state/setlinejoin.adoc[`setlinejoin`]: 0=miter, 1=round, 2=bevel
+<12> Use link:../commands/graphics-state/setdash/[`setdash`] to apply dash pattern
+<13> Use link:../commands/graphics-state/setlinecap/[`setlinecap`]: 0=butt, 1=round, 2=square
+<14> Use link:../commands/graphics-state/setlinejoin/[`setlinejoin`]: 0=miter, 1=round, 2=bevel
==== Expected Output
@@ -1000,9 +1000,9 @@ grestore
showpage
----
-<1> link:../commands/transformations/translate.adoc[`translate`] moves the origin
-<2> link:../commands/transformations/rotate.adoc[`rotate`] rotates subsequent drawings
-<3> link:../commands/transformations/scale.adoc[`scale`] changes size (x-scale y-scale)
+<1> link:../commands/transformations/translate/[`translate`] moves the origin
+<2> link:../commands/transformations/rotate/[`rotate`] rotates subsequent drawings
+<3> link:../commands/transformations/scale/[`scale`] changes size (x-scale y-scale)
<4> Gradual scaling creates spiral effect
==== Expected Output
@@ -1275,12 +1275,12 @@ Shapes filled with various patterns:
=== See Also
-* xref:hello-world.adoc[Hello World] - Basic PostScript structure
-* xref:text-layout.adoc[Text Layout] - Combining text with shapes
-* xref:color-gradients.adoc[Color Gradients] - Advanced coloring
-* xref:../commands/path-construction/index.adoc[Path Construction] - Path building commands
-* xref:../commands/painting/index.adoc[Painting] - Fill and stroke operations
-* xref:../commands/transformations/index.adoc[Transformations] - Geometric transforms
-* xref:../levels/level-2.adoc[Level 2] - Pattern fills and advanced features
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/hello-world/[Hello World] - Basic PostScript structure
+* link:/docs/examples/text-layout/[Text Layout] - Combining text with shapes
+* link:/docs/examples/color-gradients/[Color Gradients] - Advanced coloring
+* link:/docs/commands/references/[Path Construction] - Path building commands
+* link:/docs/commands/references/[Painting] - Fill and stroke operations
+* link:/docs/commands/references/[Transformations] - Geometric transforms
+* link:/docs/levels/level-2/[Level 2] - Pattern fills and advanced features
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/examples/hello-world.adoc b/docs/examples/hello-world.adoc
index 06501c2..e8d2f97 100644
--- a/docs/examples/hello-world.adoc
+++ b/docs/examples/hello-world.adoc
@@ -29,11 +29,11 @@ setfont % Make it the current font <3>
(Hello, World!) show % Display the text <5>
showpage % Output the page <6>
----
-<1> Use link:../commands/font-text/findfont.adoc[`findfont`] to locate the Courier font
-<2> Use link:../commands/font-text/scalefont.adoc[`scalefont`] to set the size to 12 points
-<3> Use link:../commands/font-text/setfont.adoc[`setfont`] to activate the font
-<4> Use link:../commands/path-construction/moveto.adoc[`moveto`] to position the cursor (72 points = 1 inch)
-<5> Use link:../commands/font-text/show.adoc[`show`] to render the text
+<1> Use link:../commands/font-text/findfont/[`findfont`] to locate the Courier font
+<2> Use link:../commands/font-text/scalefont/[`scalefont`] to set the size to 12 points
+<3> Use link:../commands/font-text/setfont/[`setfont`] to activate the font
+<4> Use link:../commands/path-construction/moveto/[`moveto`] to position the cursor (72 points = 1 inch)
+<5> Use link:../commands/font-text/show/[`show`] to render the text
<6> Use `showpage` to output the page to the device
==== Expected Output
@@ -176,9 +176,9 @@ Demonstrating different text styles, sizes, and alignments.
showpage
----
<1> Define a procedure to center text at the current position
-<2> Use link:../commands/font-text/stringwidth.adoc[`stringwidth`] to measure text width
-<3> Use link:../commands/path-construction/rmoveto.adoc[`rmoveto`] to move back half the width
-<4> Use link:../commands/font-text/show.adoc[`show`] to display the centered text
+<2> Use link:../commands/font-text/stringwidth/[`stringwidth`] to measure text width
+<3> Use link:../commands/path-construction/rmoveto/[`rmoveto`] to move back half the width
+<4> Use link:../commands/font-text/show/[`show`] to display the centered text
<5> Apply centershow to title at horizontal center (4.25 inches = half of 8.5")
<6> Left alignment is the default behavior of show
<7> Right-align by moving left by the text width before showing
@@ -335,20 +335,20 @@ grestore
showpage
----
-<1> Use link:../commands/graphics-state/gsave.adoc[`gsave`] to save current graphics state
-<2> Use link:../commands/graphics-state/setlinewidth.adoc[`setlinewidth`] to set line thickness
-<3> Use link:../commands/path-construction/lineto.adoc[`lineto`] to draw line segments
-<4> Use link:../commands/path-construction/closepath.adoc[`closepath`] to complete the shape
-<5> Use link:../commands/painting/stroke.adoc[`stroke`] to draw the outlined path
-<6> Use link:../commands/graphics-state/grestore.adoc[`grestore`] to restore previous state
-<7> Use link:../commands/graphics-state/setgray.adoc[`setgray`] to set gray level (0=black, 1=white)
-<8> Use link:../commands/path-construction/rlineto.adoc[`rlineto`] for relative line drawing
-<9> Use link:../commands/painting/fill.adoc[`fill`] to fill the enclosed area
+<1> Use link:../commands/graphics-state/gsave/[`gsave`] to save current graphics state
+<2> Use link:../commands/graphics-state/setlinewidth/[`setlinewidth`] to set line thickness
+<3> Use link:../commands/path-construction/lineto/[`lineto`] to draw line segments
+<4> Use link:../commands/path-construction/closepath/[`closepath`] to complete the shape
+<5> Use link:../commands/painting/stroke/[`stroke`] to draw the outlined path
+<6> Use link:../commands/graphics-state/grestore/[`grestore`] to restore previous state
+<7> Use link:../commands/graphics-state/setgray/[`setgray`] to set gray level (0=black, 1=white)
+<8> Use link:../commands/path-construction/rlineto/[`rlineto`] for relative line drawing
+<9> Use link:../commands/painting/fill/[`fill`] to fill the enclosed area
<10> Set color back to black (0 gray) for text
<11> Define reusable procedure for drawing bullets
-<12> Use link:../commands/path-construction/arc.adoc[`arc`] to draw circular shape
+<12> Use link:../commands/path-construction/arc/[`arc`] to draw circular shape
<13> Call the bullet procedure to draw each bullet point
-<14> Use link:../commands/transformations/translate.adoc[`translate`] to change coordinate origin
+<14> Use link:../commands/transformations/translate/[`translate`] to change coordinate origin
==== Expected Output
@@ -748,13 +748,13 @@ A complete professional page with:
=== See Also
-* xref:drawing-shapes.adoc[Drawing Shapes] - Creating geometric graphics
-* xref:text-layout.adoc[Text Layout] - Advanced typography techniques
-* xref:../commands/font-text/show.adoc[show command] - Display text
-* xref:../commands/font-text/findfont.adoc[findfont command] - Locate fonts
-* xref:../commands/font-text/scalefont.adoc[scalefont command] - Size fonts
-* xref:../commands/graphics-state/gsave.adoc[gsave command] - Save graphics state
-* xref:../commands/painting/stroke.adoc[stroke command] - Draw paths
-* xref:../commands/painting/fill.adoc[fill command] - Fill shapes
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/drawing-shapes/[Drawing Shapes] - Creating geometric graphics
+* link:/docs/examples/text-layout/[Text Layout] - Advanced typography techniques
+* link:/docs/commands/references/show/[show command] - Display text
+* link:/docs/commands/references/findfont/[findfont command] - Locate fonts
+* link:/docs/commands/references/scalefont/[scalefont command] - Size fonts
+* link:/docs/commands/references/gsave/[gsave command] - Save graphics state
+* link:/docs/commands/references/stroke/[stroke command] - Draw paths
+* link:/docs/commands/references/fill/[fill command] - Fill shapes
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/examples/image-manipulation.adoc b/docs/examples/image-manipulation.adoc
index 4844f58..53f1338 100644
--- a/docs/examples/image-manipulation.adoc
+++ b/docs/examples/image-manipulation.adoc
@@ -99,8 +99,8 @@ grestore
showpage
----
<1> Image data in hexadecimal format (00=black, FF=white)
-<2> Use link:../commands/transformations/translate.adoc[`translate`] to position image
-<3> Use link:../commands/transformations/scale.adoc[`scale`] to size image in points
+<2> Use link:../commands/transformations/translate/[`translate`] to position image
+<3> Use link:../commands/transformations/scale/[`scale`] to size image in points
<4> Image dimensions in pixels (width height)
<5> Bits per color component (typically 8 for 256 levels)
<6> Image transformation matrix [a b c d tx ty]
@@ -257,7 +257,7 @@ showpage
<1> Larger scale increases image size
<2> Different X and Y scales change aspect ratio
<3> Rotate coordinate system before scaling
-<4> Use link:../commands/transformations/concat.adoc[`concat`] to apply custom matrix
+<4> Use link:../commands/transformations/concat/[`concat`] to apply custom matrix
<5> Negative scale values flip/mirror the image
<6> Shear matrix creates pseudo-perspective
@@ -495,7 +495,7 @@ grestore
showpage
----
-<1> Use link:../commands/painting/clip.adoc[`clip`] to restrict image to shape
+<1> Use link:../commands/painting/clip/[`clip`] to restrict image to shape
<2> Decode specifies how to interpret pixel values
<3> Use `imagemask` to render 1-bit images as masks
<4> `.setshapealpha` applies soft mask (Level 3)
@@ -1280,10 +1280,10 @@ showpage
=== See Also
-* xref:drawing-shapes.adoc[Drawing Shapes] - Clipping paths for images
-* xref:color-gradients.adoc[Color Gradients] - Color manipulation
-* xref:pdf-generation.adoc[PDF Generation] - Images in PDF
-* xref:../levels/level-2.adoc[Level 2] - Advanced image features
-* xref:../levels/level-3.adoc[Level 3] - Transparency and soft masks
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/drawing-shapes/[Drawing Shapes] - Clipping paths for images
+* link:/docs/examples/color-gradients/[Color Gradients] - Color manipulation
+* link:/docs/examples/pdf-generation/[PDF Generation] - Images in PDF
+* link:/docs/levels/level-2/[Level 2] - Advanced image features
+* link:/docs/levels/level-3/[Level 3] - Transparency and soft masks
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/examples/index.adoc b/docs/examples/index.adoc
index ce480ac..4a82fbc 100644
--- a/docs/examples/index.adoc
+++ b/docs/examples/index.adoc
@@ -154,6 +154,6 @@ grestore
== See Also
-* xref:../commands/index.adoc[Command Reference] - Complete operator documentation
-* xref:../usage/basic/index.adoc[Basic Usage] - Fundamental concepts
-* xref:../usage/advanced/index.adoc[Advanced Usage] - Advanced techniques
\ No newline at end of file
+* link:/docs/commands/[Command Reference] - Complete operator documentation
+* link:/docs/usage/basic/[Basic Usage] - Fundamental concepts
+* link:/docs/usage/advanced/[Advanced Usage] - Advanced techniques
\ No newline at end of file
diff --git a/docs/examples/pdf-generation.adoc b/docs/examples/pdf-generation.adoc
index 938dae3..b4e6665 100644
--- a/docs/examples/pdf-generation.adoc
+++ b/docs/examples/pdf-generation.adoc
@@ -990,10 +990,10 @@ PDF with comprehensive metadata:
=== See Also
-* xref:hello-world.adoc[Hello World] - Basic PostScript structure
-* xref:image-manipulation.adoc[Image Manipulation] - Working with images
-* xref:text-layout.adoc[Text Layout] - Document formatting
-* xref:../levels/level-2.adoc[Level 2] - Advanced features
-* xref:../levels/level-3.adoc[Level 3] - Latest capabilities
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/hello-world/[Hello World] - Basic PostScript structure
+* link:/docs/examples/image-manipulation/[Image Manipulation] - Working with images
+* link:/docs/examples/text-layout/[Text Layout] - Document formatting
+* link:/docs/levels/level-2/[Level 2] - Advanced features
+* link:/docs/levels/level-3/[Level 3] - Latest capabilities
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/examples/text-layout.adoc b/docs/examples/text-layout.adoc
index 4ad9302..c9e101e 100644
--- a/docs/examples/text-layout.adoc
+++ b/docs/examples/text-layout.adoc
@@ -71,14 +71,14 @@ textwidth 20 string cvs show % Convert number to string <6>
showpage
----
-<1> Use link:../commands/font-text/findfont.adoc[`findfont`], link:../commands/font-text/scalefont.adoc[`scalefont`], link:../commands/font-text/setfont.adoc[`setfont`] to prepare font
-<2> Use link:../commands/path-construction/moveto.adoc[`moveto`] to position text cursor
-<3> Use link:../commands/font-text/show.adoc[`show`] to display the text
+<1> Use link:../commands/font-text/findfont/[`findfont`], link:../commands/font-text/scalefont/[`scalefont`], link:../commands/font-text/setfont/[`setfont`] to prepare font
+<2> Use link:../commands/path-construction/moveto/[`moveto`] to position text cursor
+<3> Use link:../commands/font-text/show/[`show`] to display the text
<4> Use `dup` to duplicate string for width measurement
-<5> Use link:../commands/font-text/stringwidth.adoc[`stringwidth`] to measure text dimensions
-<6> Use link:../commands/array-string/cvs.adoc[`cvs`] to convert value to string
+<5> Use link:../commands/font-text/stringwidth/[`stringwidth`] to measure text dimensions
+<6> Use link:../commands/array-string/cvs/[`cvs`] to convert value to string
<7> Define reusable procedure for right alignment
-<8> Use link:../commands/path-construction/rmoveto.adoc[`rmoveto`] to move cursor relatively
+<8> Use link:../commands/path-construction/rmoveto/[`rmoveto`] to move cursor relatively
<9> Divide by 2 for centering calculation
==== Expected Output
@@ -243,10 +243,10 @@ showpage
<3> Subtract line height to move down
<4> Define procedure to advance to next line
<5> Define procedure to display array of lines
-<6> Use link:../commands/array-string/forall.adoc[`forall`] to iterate array
+<6> Use link:../commands/array-string/forall/[`forall`] to iterate array
<7> Justified text adjusts word spacing to fill line width
<8> Check if character code is 32 (space character)
-<9> Use link:../commands/array-string/getinterval.adoc[`getinterval`] to extract substring
+<9> Use link:../commands/array-string/getinterval/[`getinterval`] to extract substring
<10> Add extra space after each space character
==== Expected Output
@@ -617,7 +617,7 @@ showpage
----
<1> Define procedure for text in box with word wrap
<2> Position each line with offset
-<3> Use link:../commands/array-string/get.adoc[`get`] to retrieve array element
+<3> Use link:../commands/array-string/get/[`get`] to retrieve array element
<4> Define procedure for circular text
<5> Calculate rotation angle per character
<6> Rotate coordinate system for each character
@@ -827,7 +827,7 @@ showpage
<6> Move down 2 points for subscript
<7> Display large decorative first letter
<8> Use `currentpoint` to get position after drop cap
-<9> Use link:../commands/graphics-state/setrgbcolor.adoc[`setrgbcolor`] for colored text
+<9> Use link:../commands/graphics-state/setrgbcolor/[`setrgbcolor`] for colored text
<10> Adjust spacing based on font size
==== Expected Output
@@ -1056,7 +1056,7 @@ grestore
showpage
----
<1> Define outlined (hollow) text procedure
-<2> Use link:../commands/font-text/charpath.adoc[`charpath`] to convert text to path
+<2> Use link:../commands/font-text/charpath/[`charpath`] to convert text to path
<3> Fill first, then stroke for dual effect
<4> Define shadow text with offset and gray level
<5> Shadow offset: (dx, dy), shadow darkness
@@ -1067,7 +1067,7 @@ showpage
<10> Scale Y-axis to compress text vertically
<11> Embossed effect with highlight and shadow
<12> Gradient fill requires clipping to text shape
-<13> Use link:../commands/painting/clip.adoc[`clip`] to restrict drawing to text outline
+<13> Use link:../commands/painting/clip/[`clip`] to restrict drawing to text outline
==== Expected Output
@@ -1148,12 +1148,12 @@ Various text effects:
=== See Also
-* xref:hello-world.adoc[Hello World] - Basic text display
-* xref:drawing-shapes.adoc[Drawing Shapes] - Paths for text effects
-* xref:color-gradients.adoc[Color Gradients] - Advanced coloring
-* xref:../commands/font-text/show.adoc[show command] - Display text
-* xref:../commands/font-text/charpath.adoc[charpath command] - Text to path
-* xref:../commands/font-text/stringwidth.adoc[stringwidth command] - Measure text
-* xref:../commands/painting/clip.adoc[clip command] - Clipping paths
-* xref:index.adoc[More Examples]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/examples/hello-world/[Hello World] - Basic text display
+* link:/docs/examples/drawing-shapes/[Drawing Shapes] - Paths for text effects
+* link:/docs/examples/color-gradients/[Color Gradients] - Advanced coloring
+* link:/docs/commands/references/show/[show command] - Display text
+* link:/docs/commands/references/charpath/[charpath command] - Text to path
+* link:/docs/commands/references/stringwidth/[stringwidth command] - Measure text
+* link:/docs/commands/references/clip/[clip command] - Clipping paths
+* link:/docs/examples/[More Examples]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/glossary.adoc b/docs/glossary.adoc
index 50c22c6..b5fac91 100644
--- a/docs/glossary.adoc
+++ b/docs/glossary.adoc
@@ -60,5 +60,5 @@ Definitions of PostScript-specific terminology.
=== See Also
-* xref:syntax/index.adoc[Language Syntax]
-* xref:commands/index.adoc[Command Reference]
\ No newline at end of file
+* link:/docs/syntax/[Language Syntax]
+* link:/docs/commands/[Command Reference]
\ No newline at end of file
diff --git a/docs/index.adoc b/docs/index.adoc
index 1d651fb..f1fc047 100644
--- a/docs/index.adoc
+++ b/docs/index.adoc
@@ -51,89 +51,89 @@ PostScript is a stack-based, interpreted programming language created by Adobe S
== Documentation Sections
-=== xref:docs/levels/index.adoc[PostScript Levels]
+=== link:/docs/levels/[PostScript Levels]
Learn about the evolution of PostScript through its three major versions:
-* xref:docs/levels/level-1.adoc[PostScript Level 1] - The original specification
-* xref:docs/levels/level-2.adoc[PostScript Level 2] - Color and composite fonts
-* xref:docs/levels/level-3.adoc[PostScript Level 3] - Advanced imaging features
-* xref:docs/levels/comparison.adoc[Version Comparison] - Feature comparison across levels
+* link:/docs/levels/level-1/[PostScript Level 1] - The original specification
+* link:/docs/levels/level-2/[PostScript Level 2] - Color and composite fonts
+* link:/docs/levels/level-3/[PostScript Level 3] - Advanced imaging features
+* link:/docs/levels/comparison/[Version Comparison] - Feature comparison across levels
-=== xref:docs/syntax/index.adoc[Language Syntax]
+=== link:/docs/syntax/[Language Syntax]
Understanding PostScript's unique syntax and data structures:
-* xref:docs/syntax/tokens.adoc[Tokens] - Basic lexical elements
-* xref:docs/syntax/objects.adoc[Objects] - Data types and object model
-* xref:docs/syntax/operators.adoc[Operators] - Built-in operations
-* xref:docs/syntax/procedures.adoc[Procedures] - Executable arrays and user-defined functions
-* xref:docs/syntax/arrays.adoc[Arrays] - Ordered collections
-* xref:docs/syntax/dictionaries.adoc[Dictionaries] - Key-value associations
-* xref:docs/syntax/strings.adoc[Strings] - Text and binary data
-* xref:docs/syntax/data-types.adoc[Data Types] - Complete type system
+* link:/docs/syntax/tokens/[Tokens] - Basic lexical elements
+* link:/docs/syntax/objects/[Objects] - Data types and object model
+* link:/docs/syntax/operators/[Operators] - Built-in operations
+* link:/docs/syntax/procedures/[Procedures] - Executable arrays and user-defined functions
+* link:/docs/syntax/arrays/[Arrays] - Ordered collections
+* link:/docs/syntax/dictionaries/[Dictionaries] - Key-value associations
+* link:/docs/syntax/strings/[Strings] - Text and binary data
+* link:/docs/syntax/data-types/[Data Types] - Complete type system
-=== xref:docs/usage/index.adoc[Usage Guides]
+=== link:/docs/usage/[Usage Guides]
-==== xref:docs/usage/basic/index.adoc[Basic Usage]
+==== link:/docs/usage/basic/[Basic Usage]
Essential concepts for PostScript programming:
-* xref:docs/usage/basic/stack-operations.adoc[Stack Operations] - Working with the operand stack
-* xref:docs/usage/basic/coordinate-systems.adoc[Coordinate Systems] - User space and device space
-* xref:docs/usage/basic/graphics-state.adoc[Graphics State] - Managing rendering parameters
-* xref:docs/usage/basic/path-construction.adoc[Path Construction] - Building vector shapes
-* xref:docs/usage/basic/painting.adoc[Painting Operations] - Filling and stroking paths
+* link:/docs/usage/basic/stack-operations/[Stack Operations] - Working with the operand stack
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - User space and device space
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Managing rendering parameters
+* link:/docs/usage/basic/path-construction/[Path Construction] - Building vector shapes
+* link:/docs/usage/basic/painting/[Painting Operations] - Filling and stroking paths
-==== xref:docs/usage/advanced/index.adoc[Advanced Usage]
+==== link:/docs/usage/advanced/[Advanced Usage]
Advanced features and techniques:
-* xref:docs/usage/advanced/fonts-text.adoc[Fonts and Text] - Typography and text rendering
-* xref:docs/usage/advanced/color-spaces.adoc[Color Spaces] - Color models and management
-* xref:docs/usage/advanced/patterns.adoc[Patterns] - Tiling patterns and textures
-* xref:docs/usage/advanced/forms.adoc[Forms] - Cached graphical objects
-* xref:docs/usage/advanced/images.adoc[Images] - Raster image handling
-* xref:docs/usage/advanced/device-control.adoc[Device Control] - Output device management
-* xref:docs/usage/advanced/file-operations.adoc[File Operations] - File I/O and streams
-* xref:docs/usage/advanced/error-handling.adoc[Error Handling] - Exception management
-* xref:docs/usage/advanced/resource-management.adoc[Resource Management] - Memory and resources
+* link:/docs/usage/advanced/fonts-text/[Fonts and Text] - Typography and text rendering
+* link:/docs/usage/advanced/color-spaces/[Color Spaces] - Color models and management
+* link:/docs/usage/advanced/patterns/[Patterns] - Tiling patterns and textures
+* link:/docs/usage/advanced/forms/[Forms] - Cached graphical objects
+* link:/docs/usage/advanced/images/[Images] - Raster image handling
+* link:/docs/usage/advanced/device-control/[Device Control] - Output device management
+* link:/docs/usage/advanced/file-operations/[File Operations] - File I/O and streams
+* link:/docs/usage/advanced/error-handling/[Error Handling] - Exception management
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Memory and resources
-=== xref:docs/commands/index.adoc[Command Reference]
+=== link:/docs/commands/[Command Reference]
Complete reference for all PostScript operators, organized by category:
-* xref:docs/commands/stack-manipulation/index.adoc[Stack Manipulation] - Stack operations
-* xref:docs/commands/arithmetic-math/index.adoc[Arithmetic and Math] - Mathematical operations
-* xref:docs/commands/array-string/index.adoc[Array and String Operations] - Collection manipulation
-* xref:docs/commands/dictionary/index.adoc[Dictionary Operations] - Key-value store operations
-* xref:docs/commands/graphics-state/index.adoc[Graphics State] - Graphics parameters
-* xref:docs/commands/path-construction/index.adoc[Path Construction] - Path building
-* xref:docs/commands/painting/index.adoc[Painting] - Rendering operations
-* xref:docs/commands/transformations/index.adoc[Coordinate Transformations] - CTM operations
-* xref:docs/commands/font-text/index.adoc[Font and Text] - Typography operators
-* xref:docs/commands/color/index.adoc[Color] - Color operations
-* xref:docs/commands/image/index.adoc[Image] - Image rendering
-* xref:docs/commands/device-output/index.adoc[Device and Output] - Device control
-* xref:docs/commands/file-io/index.adoc[File and I/O] - File operations
-* xref:docs/commands/control-flow/index.adoc[Control Flow] - Program flow control
-* xref:docs/commands/resource-management/index.adoc[Resource Management] - VM and resources
-* xref:docs/commands/error-handling/index.adoc[Error Handling] - Error management
-
-Or browse xref:docs/commands/by-category.adoc[by category] or xref:docs/commands/index.adoc[alphabetically].
-
-=== xref:docs/examples/index.adoc[Practical Examples]
+* link:/docs/commands/references/[Stack Manipulation] - Stack operations
+* link:/docs/commands/references/[Arithmetic and Math] - Mathematical operations
+* link:/docs/commands/references/[Array and String Operations] - Collection manipulation
+* link:/docs/commands/references/[Dictionary Operations] - Key-value store operations
+* link:/docs/commands/references/[Graphics State] - Graphics parameters
+* link:/docs/commands/references/[Path Construction] - Path building
+* link:/docs/commands/references/[Painting] - Rendering operations
+* link:/docs/commands/references/[Coordinate Transformations] - CTM operations
+* link:/docs/commands/references/[Font and Text] - Typography operators
+* link:/docs/commands/references/[Color] - Color operations
+* link:/docs/commands/references/[Image] - Image rendering
+* link:/docs/commands/references/[Device and Output] - Device control
+* link:/docs/commands/references/[File and I/O] - File operations
+* link:/docs/commands/references/[Control Flow] - Program flow control
+* link:/docs/commands/references/[Resource Management] - VM and resources
+* link:/docs/commands/references/[Error Handling] - Error management
+
+Or browse link:/docs/commands/by-category/[by category] or link:/docs/commands/[alphabetically].
+
+=== link:/docs/examples/[Practical Examples]
Real-world code examples and use cases:
-* xref:docs/examples/hello-world.adoc[Hello World] - Your first PostScript program
-* xref:docs/examples/drawing-shapes.adoc[Drawing Shapes] - Creating vector graphics
-* xref:docs/examples/text-layout.adoc[Text Layout] - Working with fonts and text
-* xref:docs/examples/color-gradients.adoc[Color and Gradients] - Advanced color techniques
-* xref:docs/examples/image-manipulation.adoc[Image Manipulation] - Working with raster images
-* xref:docs/examples/pdf-generation.adoc[PDF Generation] - Creating PDF documents
+* link:/docs/examples/hello-world/[Hello World] - Your first PostScript program
+* link:/docs/examples/drawing-shapes/[Drawing Shapes] - Creating vector graphics
+* link:/docs/examples/text-layout/[Text Layout] - Working with fonts and text
+* link:/docs/examples/color-gradients/[Color and Gradients] - Advanced color techniques
+* link:/docs/examples/image-manipulation/[Image Manipulation] - Working with raster images
+* link:/docs/examples/pdf-generation/[PDF Generation] - Creating PDF documents
-=== xref:docs/glossary.adoc[Glossary]
+=== link:/docs/glossary/[Glossary]
Definitions of PostScript-specific terminology and concepts.
@@ -199,7 +199,7 @@ showpage % Output the page
== Contributing
-This documentation is open source and welcomes contributions. See our https://github.com/metanorma/postscript-guide[GitHub repository] for:
+This documentation is open source and welcomes contributions. See our https://github.com/claricle/postscript-guide[GitHub repository] for:
* Reporting errors or omissions
* Suggesting improvements
@@ -209,4 +209,4 @@ This documentation is open source and welcomes contributions. See our https://gi
---
[.text-center]
-_This reference guide is maintained by the Metanorma community._
\ No newline at end of file
+_This reference guide is maintained by the Claricle community._
\ No newline at end of file
diff --git a/docs/introduction.adoc b/docs/introduction.adoc
index de26593..73f3140 100644
--- a/docs/introduction.adoc
+++ b/docs/introduction.adoc
@@ -130,12 +130,12 @@ showpage
=== Learning Path
-1. **Start with basics** - xref:commands/stack-manipulation/index.adoc[Stack Operations]
-2. **Learn arithmetic** - xref:commands/arithmetic-math/index.adoc[Math Commands]
-3. **Understand data** - xref:commands/array-string/index.adoc[Arrays and Strings]
-4. **Master dictionaries** - xref:commands/dictionary/index.adoc[Dictionary Operations]
-5. **Control flow** - xref:commands/control-flow/index.adoc[Conditionals and Loops]
-6. **Graphics** - xref:commands/graphics-state/index.adoc[Graphics State] and Path Construction
+1. **Start with basics** - link:/docs/commands/references/[Stack Operations]
+2. **Learn arithmetic** - link:/docs/commands/references/[Math Commands]
+3. **Understand data** - link:/docs/commands/references/[Arrays and Strings]
+4. **Master dictionaries** - link:/docs/commands/references/[Dictionary Operations]
+5. **Control flow** - link:/docs/commands/references/[Conditionals and Loops]
+6. **Graphics** - link:/docs/commands/references/[Graphics State] and Path Construction
== About This Guide
@@ -156,7 +156,7 @@ This reference provides:
== See Also
-* xref:levels/index.adoc[PostScript Levels] - Version history and features
-* xref:commands/index.adoc[Command Reference] - Complete operator reference
-* xref:syntax/index.adoc[Language Syntax] - Grammar and structure
-* xref:examples/index.adoc[Examples] - Practical code samples
\ No newline at end of file
+* link:/docs/levels/[PostScript Levels] - Version history and features
+* link:/docs/commands/[Command Reference] - Complete operator reference
+* link:/docs/syntax/[Language Syntax] - Grammar and structure
+* link:/docs/examples/[Examples] - Practical code samples
\ No newline at end of file
diff --git a/docs/levels/comparison.adoc b/docs/levels/comparison.adoc
index 7136c8c..f440a77 100644
--- a/docs/levels/comparison.adoc
+++ b/docs/levels/comparison.adoc
@@ -73,7 +73,7 @@ Comprehensive comparison of features across PostScript Levels 1, 2, and 3.
== See Also
-* xref:level-1.adoc[PostScript Level 1]
-* xref:level-2.adoc[PostScript Level 2]
-* xref:level-3.adoc[PostScript Level 3]
-* xref:index.adoc[PostScript Levels Overview]
\ No newline at end of file
+* link:/docs/levels/level-1/[PostScript Level 1]
+* link:/docs/levels/level-2/[PostScript Level 2]
+* link:/docs/levels/level-3/[PostScript Level 3]
+* link:/docs/levels/[PostScript Levels Overview]
\ No newline at end of file
diff --git a/docs/levels/index.adoc b/docs/levels/index.adoc
index 5914fd4..7b56735 100644
--- a/docs/levels/index.adoc
+++ b/docs/levels/index.adoc
@@ -21,22 +21,22 @@ PostScript was developed by Adobe Systems and released in three major levels, ea
|===
|Level |Release Year |Key Features
-|xref:level-1.adoc[Level 1]
+|link:/docs/levels/level-1/[Level 1]
|1984
|Original specification with basic imaging model, stack-based execution, vector graphics, and font handling
-|xref:level-2.adoc[Level 2]
+|link:/docs/levels/level-2/[Level 2]
|1990
|Added color extensions, composite fonts, filters, forms, patterns, file system, and performance improvements
-|xref:level-3.adoc[Level 3]
+|link:/docs/levels/level-3/[Level 3]
|1996
|Introduced smooth shading, better color management, improved PDF integration, and additional imaging features
|===
== Version Documentation
-=== xref:level-1.adoc[PostScript Level 1]
+=== link:/docs/levels/level-1/[PostScript Level 1]
The original PostScript specification introduced:
@@ -47,9 +47,9 @@ The original PostScript specification introduced:
* Device independence
* Coordinate transformations
-xref:level-1.adoc[Read more about Level 1 →]
+link:/docs/levels/level-1/[Read more about Level 1 →]
-=== xref:level-2.adoc[PostScript Level 2]
+=== link:/docs/levels/level-2/[PostScript Level 2]
Level 2 extended PostScript with:
@@ -63,9 +63,9 @@ Level 2 extended PostScript with:
* File system and named resources
* Better memory management
-xref:level-2.adoc[Read more about Level 2 →]
+link:/docs/levels/level-2/[Read more about Level 2 →]
-=== xref:level-3.adoc[PostScript Level 3]
+=== link:/docs/levels/level-3/[PostScript Level 3]
Level 3 added advanced features:
@@ -77,11 +77,11 @@ Level 3 added advanced features:
* Better device control
* Enhanced font support
-xref:level-3.adoc[Read more about Level 3 →]
+link:/docs/levels/level-3/[Read more about Level 3 →]
-== xref:comparison.adoc[Feature Comparison]
+== link:/docs/levels/comparison/[Feature Comparison]
-For a detailed comparison of features across all three levels, see the xref:comparison.adoc[version comparison table].
+For a detailed comparison of features across all three levels, see the link:/docs/levels/comparison/[version comparison table].
== Compatibility
@@ -136,6 +136,6 @@ Declare the PostScript level in your document header:
== See Also
-* xref:../commands/index.adoc[Command Reference] - Lists which commands are available in each level
-* xref:../syntax/index.adoc[Language Syntax] - Core syntax applicable to all levels
+* link:/docs/commands/[Command Reference] - Lists which commands are available in each level
+* link:/docs/syntax/[Language Syntax] - Core syntax applicable to all levels
* https://www.adobe.com/content/dam/acom/en/devnet/actionscript/articles/PLRM.pdf[PostScript Language Reference Manual] - Official specification
\ No newline at end of file
diff --git a/docs/levels/level-1.adoc b/docs/levels/level-1.adoc
index 0623cd6..94bf9df 100644
--- a/docs/levels/level-1.adoc
+++ b/docs/levels/level-1.adoc
@@ -63,7 +63,7 @@ Level 1 implementations provide approximately 250 operators covering:
== See Also
-* xref:level-2.adoc[PostScript Level 2] - Enhanced version
-* xref:level-3.adoc[PostScript Level 3] - Latest specification
-* xref:comparison.adoc[Version Comparison] - Feature comparison
-* xref:index.adoc[PostScript Levels Overview]
\ No newline at end of file
+* link:/docs/levels/level-2/[PostScript Level 2] - Enhanced version
+* link:/docs/levels/level-3/[PostScript Level 3] - Latest specification
+* link:/docs/levels/comparison/[Version Comparison] - Feature comparison
+* link:/docs/levels/[PostScript Levels Overview]
\ No newline at end of file
diff --git a/docs/levels/level-2.adoc b/docs/levels/level-2.adoc
index b0c5d7a..752944c 100644
--- a/docs/levels/level-2.adoc
+++ b/docs/levels/level-2.adoc
@@ -17,7 +17,7 @@ PostScript Level 2 added significant capabilities while maintaining backward com
=== Color Support
-* **RGB Color**: link:../commands/graphics-state/setrgbcolor.adoc[`setrgbcolor`], `currentrgbcolor`
+* **RGB Color**: link:../commands/graphics-state/setrgbcolor/[`setrgbcolor`], `currentrgbcolor`
* **CMYK Color**: `setcmykcolor`, `currentcmykcolor`
* **HSB Color**: `sethsbcolor`, `currenthsbcolor`
* **Color Spaces**: `setcolorspace`, `setcolor`
@@ -75,7 +75,7 @@ Level 2 maintains full backward compatibility:
== See Also
-* xref:level-1.adoc[PostScript Level 1] - Original specification
-* xref:level-3.adoc[PostScript Level 3] - Latest features
-* xref:comparison.adoc[Version Comparison] - Detailed feature comparison
-* xref:index.adoc[PostScript Levels Overview]
\ No newline at end of file
+* link:/docs/levels/level-1/[PostScript Level 1] - Original specification
+* link:/docs/levels/level-3/[PostScript Level 3] - Latest features
+* link:/docs/levels/comparison/[Version Comparison] - Detailed feature comparison
+* link:/docs/levels/[PostScript Levels Overview]
\ No newline at end of file
diff --git a/docs/levels/level-3.adoc b/docs/levels/level-3.adoc
index b8f5c37..32e64e4 100644
--- a/docs/levels/level-3.adoc
+++ b/docs/levels/level-3.adoc
@@ -53,7 +53,7 @@ Level 3 maintains full compatibility with Level 1 and Level 2:
== See Also
-* xref:level-1.adoc[PostScript Level 1] - Original specification
-* xref:level-2.adoc[PostScript Level 2] - Color and fonts
-* xref:comparison.adoc[Version Comparison] - Feature comparison
-* xref:index.adoc[PostScript Levels Overview]
\ No newline at end of file
+* link:/docs/levels/level-1/[PostScript Level 1] - Original specification
+* link:/docs/levels/level-2/[PostScript Level 2] - Color and fonts
+* link:/docs/levels/comparison/[Version Comparison] - Feature comparison
+* link:/docs/levels/[PostScript Levels Overview]
\ No newline at end of file
diff --git a/docs/syntax/arrays.adoc b/docs/syntax/arrays.adoc
index a350893..acfb28e 100644
--- a/docs/syntax/arrays.adoc
+++ b/docs/syntax/arrays.adoc
@@ -891,15 +891,15 @@ idx 0 ge idx arr length lt and {
=== See Also
-* xref:procedures.adoc[Procedures] - Executable arrays
-* xref:objects.adoc[Objects] - Composite object model
-* xref:strings.adoc[Strings] - Similar indexed structure
-* xref:data-types.adoc[Data Types] - Array type details
-* xref:../commands/array-string/array.adoc[array] - Create arrays
-* xref:../commands/array-string/aload.adoc[aload] - Unpack arrays
-* xref:../commands/array-string/astore.adoc[astore] - Pack arrays
-* xref:../commands/array-string/get.adoc[get] - Access elements
-* xref:../commands/array-string/put.adoc[put] - Modify elements
-* xref:../commands/array-string/forall.adoc[forall] - Iterate arrays
-* xref:../usage/basic/arrays.adoc[Arrays Usage Guide]
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/procedures/[Procedures] - Executable arrays
+* link:/docs/syntax/objects/[Objects] - Composite object model
+* link:/docs/syntax/strings/[Strings] - Similar indexed structure
+* link:/docs/syntax/data-types/[Data Types] - Array type details
+* link:/docs/commands/references/array/[array] - Create arrays
+* link:/docs/commands/references/aload/[aload] - Unpack arrays
+* link:/docs/commands/references/astore/[astore] - Pack arrays
+* link:/docs/commands/references/get/[get] - Access elements
+* link:/docs/commands/references/put/[put] - Modify elements
+* link:/docs/commands/references/forall/[forall] - Iterate arrays
+* link:/docs/usage/basic/arrays/[Arrays Usage Guide]
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/data-types.adoc b/docs/syntax/data-types.adoc
index 3134697..2573093 100644
--- a/docs/syntax/data-types.adoc
+++ b/docs/syntax/data-types.adoc
@@ -1209,18 +1209,18 @@ obj cvx % To executable
=== See Also
-* xref:objects.adoc[Objects] - Object model and attributes
-* xref:tokens.adoc[Tokens] - Type literal syntax
-* xref:operators.adoc[Operators] - Type-specific operations
-* xref:strings.adoc[Strings] - String type details
-* xref:arrays.adoc[Arrays] - Array type details
-* xref:dictionaries.adoc[Dictionaries] - Dictionary type details
-* xref:procedures.adoc[Procedures] - Array type as procedures
-* xref:../commands/array-string/type.adoc[type] - Get object type
-* xref:../commands/array-string/cvi.adoc[cvi] - Convert to integer
-* xref:../commands/array-string/cvr.adoc[cvr] - Convert to real
-* xref:../commands/array-string/cvs.adoc[cvs] - Convert to string
-* xref:../commands/array-string/cvn.adoc[cvn] - Convert to name
-* xref:../commands/array-string/cvlit.adoc[cvlit] - Make literal
-* xref:../commands/array-string/cvx.adoc[cvx] - Make executable
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/objects/[Objects] - Object model and attributes
+* link:/docs/syntax/tokens/[Tokens] - Type literal syntax
+* link:/docs/syntax/operators/[Operators] - Type-specific operations
+* link:/docs/syntax/strings/[Strings] - String type details
+* link:/docs/syntax/arrays/[Arrays] - Array type details
+* link:/docs/syntax/dictionaries/[Dictionaries] - Dictionary type details
+* link:/docs/syntax/procedures/[Procedures] - Array type as procedures
+* link:/docs/commands/references/type/[type] - Get object type
+* link:/docs/commands/references/cvi/[cvi] - Convert to integer
+* link:/docs/commands/references/cvr/[cvr] - Convert to real
+* link:/docs/commands/references/cvs/[cvs] - Convert to string
+* link:/docs/commands/references/cvn/[cvn] - Convert to name
+* link:/docs/commands/references/cvlit/[cvlit] - Make literal
+* link:/docs/commands/references/cvx/[cvx] - Make executable
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/dictionaries.adoc b/docs/syntax/dictionaries.adoc
index c74ed63..cb2796f 100644
--- a/docs/syntax/dictionaries.adoc
+++ b/docs/syntax/dictionaries.adoc
@@ -1015,15 +1015,15 @@ Instance /sharedMethod Lookup exec
=== See Also
-* xref:objects.adoc[Objects] - Dictionary object model
-* xref:arrays.adoc[Arrays] - Similar composite structure
-* xref:procedures.adoc[Procedures] - Local variables with dictionaries
-* xref:operators.adoc[Operators] - Dictionary operators
-* xref:tokens.adoc[Tokens] - Name syntax for keys
-* xref:../commands/dictionary/dict.adoc[dict] - Create dictionaries
-* xref:../commands/dictionary/begin.adoc[begin] - Push onto dict stack
-* xref:../commands/dictionary/end.adoc[end] - Pop from dict stack
-* xref:../commands/dictionary/def.adoc[def] - Define entries
-* xref:../commands/dictionary/load.adoc[load] - Look up values
-* xref:../commands/dictionary/where.adoc[where] - Find definitions
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/objects/[Objects] - Dictionary object model
+* link:/docs/syntax/arrays/[Arrays] - Similar composite structure
+* link:/docs/syntax/procedures/[Procedures] - Local variables with dictionaries
+* link:/docs/syntax/operators/[Operators] - Dictionary operators
+* link:/docs/syntax/tokens/[Tokens] - Name syntax for keys
+* link:/docs/commands/references/dict/[dict] - Create dictionaries
+* link:/docs/commands/references/begin/[begin] - Push onto dict stack
+* link:/docs/commands/references/end/[end] - Pop from dict stack
+* link:/docs/commands/references/def/[def] - Define entries
+* link:/docs/commands/references/load/[load] - Look up values
+* link:/docs/commands/references/where/[where] - Find definitions
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/index.adoc b/docs/syntax/index.adoc
index 23d8072..93bfcdf 100644
--- a/docs/syntax/index.adoc
+++ b/docs/syntax/index.adoc
@@ -269,7 +269,7 @@ exec % Execute: pushes 9
== See Also
-* xref:../commands/index.adoc[Command Reference] - All operators
-* xref:../levels/index.adoc[PostScript Levels] - Version features
-* xref:../usage/basic/index.adoc[Basic Usage] - Getting started
-* xref:../examples/index.adoc[Examples] - Code samples
\ No newline at end of file
+* link:/docs/commands/[Command Reference] - All operators
+* link:/docs/levels/[PostScript Levels] - Version features
+* link:/docs/usage/basic/[Basic Usage] - Getting started
+* link:/docs/examples/[Examples] - Code samples
\ No newline at end of file
diff --git a/docs/syntax/objects.adoc b/docs/syntax/objects.adoc
index 7567bdd..291c670 100644
--- a/docs/syntax/objects.adoc
+++ b/docs/syntax/objects.adoc
@@ -737,13 +737,13 @@ arr wcheck {
=== See Also
-* xref:data-types.adoc[Data Types] - Complete type system
-* xref:tokens.adoc[Tokens] - Lexical elements
-* xref:arrays.adoc[Arrays] - Array objects
-* xref:dictionaries.adoc[Dictionaries] - Dictionary objects
-* xref:strings.adoc[Strings] - String objects
-* xref:operators.adoc[Operators] - Object manipulation operators
-* xref:../commands/array-string/type.adoc[type] - Get object type
-* xref:../commands/array-string/cvlit.adoc[cvlit] - Make literal
-* xref:../commands/array-string/cvx.adoc[cvx] - Make executable
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/data-types/[Data Types] - Complete type system
+* link:/docs/syntax/tokens/[Tokens] - Lexical elements
+* link:/docs/syntax/arrays/[Arrays] - Array objects
+* link:/docs/syntax/dictionaries/[Dictionaries] - Dictionary objects
+* link:/docs/syntax/strings/[Strings] - String objects
+* link:/docs/syntax/operators/[Operators] - Object manipulation operators
+* link:/docs/commands/references/type/[type] - Get object type
+* link:/docs/commands/references/cvlit/[cvlit] - Make literal
+* link:/docs/commands/references/cvx/[cvx] - Make executable
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/operators.adoc b/docs/syntax/operators.adoc
index e5fa8fe..d0e23f7 100644
--- a/docs/syntax/operators.adoc
+++ b/docs/syntax/operators.adoc
@@ -988,13 +988,13 @@ value dup 0 lt {
=== See Also
-* xref:procedures.adoc[Procedures] - User-defined executable arrays
-* xref:objects.adoc[Objects] - Object execution model
-* xref:tokens.adoc[Tokens] - Operator name syntax
-* xref:data-types.adoc[Data Types] - Operand types
-* xref:../commands/control-flow/index.adoc[Control Flow Commands]
-* xref:../commands/stack-manipulation/index.adoc[Stack Manipulation Commands]
-* xref:../commands/arithmetic-math/index.adoc[Arithmetic Commands]
-* xref:../commands/array-string/index.adoc[Array and String Commands]
-* xref:../commands/dictionary/index.adoc[Dictionary Commands]
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/procedures/[Procedures] - User-defined executable arrays
+* link:/docs/syntax/objects/[Objects] - Object execution model
+* link:/docs/syntax/tokens/[Tokens] - Operator name syntax
+* link:/docs/syntax/data-types/[Data Types] - Operand types
+* link:/docs/commands/references/[Control Flow Commands]
+* link:/docs/commands/references/[Stack Manipulation Commands]
+* link:/docs/commands/references/[Arithmetic Commands]
+* link:/docs/commands/references/[Array and String Commands]
+* link:/docs/commands/references/[Dictionary Commands]
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/procedures.adoc b/docs/syntax/procedures.adoc
index cf683a1..38e8c97 100644
--- a/docs/syntax/procedures.adoc
+++ b/docs/syntax/procedures.adoc
@@ -911,12 +911,12 @@ Arrays of procedures enable dispatch tables and strategy patterns.
=== See Also
-* xref:arrays.adoc[Arrays] - Array structure and operations
-* xref:operators.adoc[Operators] - Built-in operations
-* xref:dictionaries.adoc[Dictionaries] - Local variable implementation
-* xref:objects.adoc[Objects] - Executable vs literal objects
-* xref:../commands/control-flow/index.adoc[Control Flow Commands]
-* xref:../commands/dictionary/def.adoc[def] - Define procedures
-* xref:../commands/control-flow/exec.adoc[exec] - Execute procedures
-* xref:../usage/basic/procedures.adoc[Procedures Usage Guide]
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/arrays/[Arrays] - Array structure and operations
+* link:/docs/syntax/operators/[Operators] - Built-in operations
+* link:/docs/syntax/dictionaries/[Dictionaries] - Local variable implementation
+* link:/docs/syntax/objects/[Objects] - Executable vs literal objects
+* link:/docs/commands/references/[Control Flow Commands]
+* link:/docs/commands/references/def/[def] - Define procedures
+* link:/docs/commands/references/exec/[exec] - Execute procedures
+* link:/docs/usage/basic/procedures/[Procedures Usage Guide]
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/strings.adoc b/docs/syntax/strings.adoc
index 029c49b..757dd5e 100644
--- a/docs/syntax/strings.adoc
+++ b/docs/syntax/strings.adoc
@@ -929,14 +929,14 @@ Interpolate % Returns (Hello, World!)
=== See Also
-* xref:tokens.adoc[Tokens] - String token syntax
-* xref:arrays.adoc[Arrays] - Similar indexed structure
-* xref:objects.adoc[Objects] - String object model
-* xref:data-types.adoc[Data Types] - String type details
-* xref:../commands/array-string/string.adoc[string] - Create strings
-* xref:../commands/array-string/get.adoc[get] - Access bytes
-* xref:../commands/array-string/put.adoc[put] - Modify bytes
-* xref:../commands/array-string/search.adoc[search] - Find substrings
-* xref:../commands/array-string/anchorsearch.adoc[anchorsearch] - Prefix search
-* xref:../commands/array-string/cvs.adoc[cvs] - Convert to string
-* xref:index.adoc[Language Syntax Overview]
+* link:/docs/syntax/tokens/[Tokens] - String token syntax
+* link:/docs/syntax/arrays/[Arrays] - Similar indexed structure
+* link:/docs/syntax/objects/[Objects] - String object model
+* link:/docs/syntax/data-types/[Data Types] - String type details
+* link:/docs/commands/references/string/[string] - Create strings
+* link:/docs/commands/references/get/[get] - Access bytes
+* link:/docs/commands/references/put/[put] - Modify bytes
+* link:/docs/commands/references/search/[search] - Find substrings
+* link:/docs/commands/references/anchorsearch/[anchorsearch] - Prefix search
+* link:/docs/commands/references/cvs/[cvs] - Convert to string
+* link:/docs/syntax/[Language Syntax Overview]
diff --git a/docs/syntax/tokens.adoc b/docs/syntax/tokens.adoc
index 7eac8b9..9a61deb 100644
--- a/docs/syntax/tokens.adoc
+++ b/docs/syntax/tokens.adoc
@@ -598,11 +598,11 @@ name % Executable name (looked up)
=== See Also
-* xref:objects.adoc[Objects] - PostScript object model
-* xref:data-types.adoc[Data Types] - Complete type system
-* xref:strings.adoc[Strings] - Detailed string documentation
-* xref:operators.adoc[Operators] - Operator execution
-* xref:../commands/array-string/cvs.adoc[cvs] - Convert to string
-* xref:../commands/array-string/token.adoc[token] - Token scanning
-* xref:index.adoc[Language Syntax Overview]
-* xref:../commands/index.adoc[Command Reference]
+* link:/docs/syntax/objects/[Objects] - PostScript object model
+* link:/docs/syntax/data-types/[Data Types] - Complete type system
+* link:/docs/syntax/strings/[Strings] - Detailed string documentation
+* link:/docs/syntax/operators/[Operators] - Operator execution
+* link:/docs/commands/references/cvs/[cvs] - Convert to string
+* link:/docs/commands/references/token/[token] - Token scanning
+* link:/docs/syntax/[Language Syntax Overview]
+* link:/docs/commands/[Command Reference]
diff --git a/docs/usage/advanced/color-spaces.adoc b/docs/usage/advanced/color-spaces.adoc
index c969e2d..f8ab874 100644
--- a/docs/usage/advanced/color-spaces.adoc
+++ b/docs/usage/advanced/color-spaces.adoc
@@ -971,10 +971,10 @@ grestore
=== See Also
-* xref:../basic/graphics-state.adoc[Graphics State] - Color state management
-* xref:patterns.adoc[Patterns] - Color patterns
-* xref:../../commands/graphics-state/setrgbcolor.adoc[setrgbcolor] - Set RGB color
-* xref:../../commands/graphics-state/setcmykcolor.adoc[setcmykcolor] - Set CMYK color
-* xref:../../commands/graphics-state/setgray.adoc[setgray] - Set gray color
-* xref:../../commands/graphics-state/sethsbcolor.adoc[sethsbcolor] - Set HSB color
-* xref:../../commands/graphics-state/currentrgbcolor.adoc[currentrgbcolor] - Get current RGB
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Color state management
+* link:/docs/usage/advanced/patterns/[Patterns] - Color patterns
+* link:/docs/commands/references/setrgbcolor/[setrgbcolor] - Set RGB color
+* link:/docs/commands/references/setcmykcolor/[setcmykcolor] - Set CMYK color
+* link:/docs/commands/references/setgray/[setgray] - Set gray color
+* link:/docs/commands/references/sethsbcolor/[sethsbcolor] - Set HSB color
+* link:/docs/commands/references/currentrgbcolor/[currentrgbcolor] - Get current RGB
diff --git a/docs/usage/advanced/device-control.adoc b/docs/usage/advanced/device-control.adoc
index e296f3b..920c0af 100644
--- a/docs/usage/advanced/device-control.adoc
+++ b/docs/usage/advanced/device-control.adoc
@@ -857,9 +857,9 @@ matrix currentmatrix dtransform moveto % Wrong!
=== See Also
-* xref:../basic/coordinate-systems.adoc[Coordinate Systems] - Device vs user space
-* xref:../basic/graphics-state.adoc[Graphics State] - State management
-* xref:file-operations.adoc[File Operations] - Output control
-* xref:resource-management.adoc[Resource Management] - Device resources
-* xref:error-handling.adoc[Error Handling] - Device errors
-* xref:../../commands/device-output/index.adoc[Device Output Commands] - Output operators
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - Device vs user space
+* link:/docs/usage/basic/graphics-state/[Graphics State] - State management
+* link:/docs/usage/advanced/file-operations/[File Operations] - Output control
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Device resources
+* link:/docs/usage/advanced/error-handling/[Error Handling] - Device errors
+* link:/docs/commands/references/[Device Output Commands] - Output operators
diff --git a/docs/usage/advanced/error-handling.adoc b/docs/usage/advanced/error-handling.adoc
index a7f90d7..573b7d6 100644
--- a/docs/usage/advanced/error-handling.adoc
+++ b/docs/usage/advanced/error-handling.adoc
@@ -1003,8 +1003,8 @@ ErrorHandlingTests {
=== See Also
-* xref:../debugging.adoc[Debugging] - Debugging techniques
-* xref:file-operations.adoc[File Operations] - File error handling
-* xref:resource-management.adoc[Resource Management] - Resource errors
-* xref:../../commands/error-handling/index.adoc[Error Handling Commands] - Error operators
-* xref:../../commands/control-flow/stopped.adoc[stopped] - Error catching
+* link:/docs/usage/debugging/[Debugging] - Debugging techniques
+* link:/docs/usage/advanced/file-operations/[File Operations] - File error handling
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Resource errors
+* link:/docs/commands/references/[Error Handling Commands] - Error operators
+* link:/docs/commands/references/stopped/[stopped] - Error catching
diff --git a/docs/usage/advanced/file-operations.adoc b/docs/usage/advanced/file-operations.adoc
index daa95ca..61e0eb3 100644
--- a/docs/usage/advanced/file-operations.adoc
+++ b/docs/usage/advanced/file-operations.adoc
@@ -1175,7 +1175,7 @@ file string readline {
=== See Also
-* xref:error-handling.adoc[Error Handling] - File operation errors
-* xref:resource-management.adoc[Resource Management] - Managing file resources
-* xref:../basic/procedures.adoc[Procedures] - File processing procedures
-* xref:../../commands/index.adoc[Command Reference] - File operators
+* link:/docs/usage/advanced/error-handling/[Error Handling] - File operation errors
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Managing file resources
+* link:/docs/usage/basic/procedures/[Procedures] - File processing procedures
+* link:/docs/commands/[Command Reference] - File operators
diff --git a/docs/usage/advanced/fonts-text.adoc b/docs/usage/advanced/fonts-text.adoc
index 754ea2a..365a22a 100644
--- a/docs/usage/advanced/fonts-text.adoc
+++ b/docs/usage/advanced/fonts-text.adoc
@@ -1153,12 +1153,12 @@ grestore
=== See Also
-* xref:../../commands/font-text/index.adoc[Font & Text Commands] - Complete command reference
-* xref:../../commands/font-text/show.adoc[show] - Display text
-* xref:../../commands/font-text/findfont.adoc[findfont] - Find font
-* xref:../../commands/font-text/scalefont.adoc[scalefont] - Scale font
-* xref:../../commands/font-text/setfont.adoc[setfont] - Set current font
-* xref:../../commands/font-text/stringwidth.adoc[stringwidth] - Measure text
-* xref:../../commands/font-text/charpath.adoc[charpath] - Text to path
-* xref:color-spaces.adoc[Color Spaces] - Text colors
-* xref:../basic/graphics-state.adoc[Graphics State] - Text rendering state
+* link:/docs/commands/references/[Font & Text Commands] - Complete command reference
+* link:/docs/commands/references/show/[show] - Display text
+* link:/docs/commands/references/findfont/[findfont] - Find font
+* link:/docs/commands/references/scalefont/[scalefont] - Scale font
+* link:/docs/commands/references/setfont/[setfont] - Set current font
+* link:/docs/commands/references/stringwidth/[stringwidth] - Measure text
+* link:/docs/commands/references/charpath/[charpath] - Text to path
+* link:/docs/usage/advanced/color-spaces/[Color Spaces] - Text colors
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Text rendering state
diff --git a/docs/usage/advanced/forms.adoc b/docs/usage/advanced/forms.adoc
index f332db7..282f474 100644
--- a/docs/usage/advanced/forms.adoc
+++ b/docs/usage/advanced/forms.adoc
@@ -1166,9 +1166,9 @@ grid exec
=== See Also
-* xref:../basic/procedures.adoc[Procedures] - Procedure basics
-* xref:patterns.adoc[Patterns] - Repeating patterns
-* xref:resource-management.adoc[Resource Management] - Optimizing resources
-* xref:../basic/graphics-state.adoc[Graphics State] - State management
-* xref:../basic/coordinate-systems.adoc[Coordinate Systems] - Form positioning
-* xref:../../commands/control-flow/exec.adoc[exec] - Execute forms
+* link:/docs/usage/basic/procedures/[Procedures] - Procedure basics
+* link:/docs/usage/advanced/patterns/[Patterns] - Repeating patterns
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Optimizing resources
+* link:/docs/usage/basic/graphics-state/[Graphics State] - State management
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - Form positioning
+* link:/docs/commands/references/exec/[exec] - Execute forms
diff --git a/docs/usage/advanced/images.adoc b/docs/usage/advanced/images.adoc
index 6a37047..21c24a4 100644
--- a/docs/usage/advanced/images.adoc
+++ b/docs/usage/advanced/images.adoc
@@ -977,9 +977,9 @@ colorimage
=== See Also
-* xref:color-spaces.adoc[Color Spaces] - Image color models
-* xref:patterns.adoc[Patterns] - Image-based patterns
-* xref:../basic/coordinate-systems.adoc[Coordinate Systems] - Image transformations
-* xref:../basic/painting.adoc[Painting] - Image rendering
-* xref:file-operations.adoc[File Operations] - Loading image data
-* xref:resource-management.adoc[Resource Management] - Image memory management
+* link:/docs/usage/advanced/color-spaces/[Color Spaces] - Image color models
+* link:/docs/usage/advanced/patterns/[Patterns] - Image-based patterns
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - Image transformations
+* link:/docs/usage/basic/painting/[Painting] - Image rendering
+* link:/docs/usage/advanced/file-operations/[File Operations] - Loading image data
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Image memory management
diff --git a/docs/usage/advanced/index.adoc b/docs/usage/advanced/index.adoc
index 3416008..6c00b70 100644
--- a/docs/usage/advanced/index.adoc
+++ b/docs/usage/advanced/index.adoc
@@ -184,6 +184,6 @@ end
== See Also
-* xref:../basic/index.adoc[Basic Usage] - Start here first
-* xref:../../commands/index.adoc[Command Reference] - All operators
-* xref:../../examples/index.adoc[Examples] - Practical code
\ No newline at end of file
+* link:/docs/usage/basic/[Basic Usage] - Start here first
+* link:/docs/commands/[Command Reference] - All operators
+* link:/docs/examples/[Examples] - Practical code
\ No newline at end of file
diff --git a/docs/usage/advanced/patterns.adoc b/docs/usage/advanced/patterns.adoc
index 3c6a92f..5f64949 100644
--- a/docs/usage/advanced/patterns.adoc
+++ b/docs/usage/advanced/patterns.adoc
@@ -1181,10 +1181,10 @@ grestore
=== See Also
-* xref:color-spaces.adoc[Color Spaces] - Pattern colors
-* xref:../basic/painting.adoc[Painting] - Filling with patterns
-* xref:../basic/graphics-state.adoc[Graphics State] - Pattern state
-* xref:forms.adoc[Forms] - Cached patterns
-* xref:images.adoc[Images] - Bitmap patterns
-* xref:../../commands/painting/fill.adoc[fill] - Fill with pattern
-* xref:../../commands/painting/clip.adoc[clip] - Pattern clipping
+* link:/docs/usage/advanced/color-spaces/[Color Spaces] - Pattern colors
+* link:/docs/usage/basic/painting/[Painting] - Filling with patterns
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Pattern state
+* link:/docs/usage/advanced/forms/[Forms] - Cached patterns
+* link:/docs/usage/advanced/images/[Images] - Bitmap patterns
+* link:/docs/commands/references/fill/[fill] - Fill with pattern
+* link:/docs/commands/references/clip/[clip] - Pattern clipping
diff --git a/docs/usage/advanced/resource-management.adoc b/docs/usage/advanced/resource-management.adoc
index 1e73904..bae22fd 100644
--- a/docs/usage/advanced/resource-management.adoc
+++ b/docs/usage/advanced/resource-management.adoc
@@ -1016,8 +1016,8 @@ restore
=== See Also
-* xref:error-handling.adoc[Error Handling] - Resource errors
-* xref:file-operations.adoc[File Operations] - File resource management
-* xref:../basic/procedures.adoc[Procedures] - Procedure optimization
-* xref:../debugging.adoc[Debugging] - Resource debugging
-* xref:device-control.adoc[Device Control] - Device resources
+* link:/docs/usage/advanced/error-handling/[Error Handling] - Resource errors
+* link:/docs/usage/advanced/file-operations/[File Operations] - File resource management
+* link:/docs/usage/basic/procedures/[Procedures] - Procedure optimization
+* link:/docs/usage/debugging/[Debugging] - Resource debugging
+* link:/docs/usage/advanced/device-control/[Device Control] - Device resources
diff --git a/docs/usage/basic/arrays.adoc b/docs/usage/basic/arrays.adoc
index 7543cad..a90a1c6 100644
--- a/docs/usage/basic/arrays.adoc
+++ b/docs/usage/basic/arrays.adoc
@@ -974,12 +974,12 @@ idx arr length lt {
=== See Also
-* xref:../../syntax/arrays.adoc[Array Syntax] - Array syntax details
-* xref:procedures.adoc[Procedures] - Using arrays in procedures
-* xref:composite-objects.adoc[Composite Objects] - Complex data structures
-* xref:../../commands/array-string/array.adoc[array] - Create array
-* xref:../../commands/array-string/aload.adoc[aload] - Unpack array
-* xref:../../commands/array-string/astore.adoc[astore] - Pack array
-* xref:../../commands/array-string/get.adoc[get] - Get element
-* xref:../../commands/array-string/put.adoc[put] - Set element
-* xref:../../commands/array-string/forall.adoc[forall] - Iterate array
+* link:/docs/syntax/arrays/[Array Syntax] - Array syntax details
+* link:/docs/usage/basic/procedures/[Procedures] - Using arrays in procedures
+* link:/docs/usage/basic/composite-objects/[Composite Objects] - Complex data structures
+* link:/docs/commands/references/array/[array] - Create array
+* link:/docs/commands/references/aload/[aload] - Unpack array
+* link:/docs/commands/references/astore/[astore] - Pack array
+* link:/docs/commands/references/get/[get] - Get element
+* link:/docs/commands/references/put/[put] - Set element
+* link:/docs/commands/references/forall/[forall] - Iterate array
diff --git a/docs/usage/basic/composite-objects.adoc b/docs/usage/basic/composite-objects.adoc
index f6c449f..89787f4 100644
--- a/docs/usage/basic/composite-objects.adoc
+++ b/docs/usage/basic/composite-objects.adoc
@@ -1048,9 +1048,9 @@ cache /key1 get % Fast O(1) lookup
=== See Also
-* xref:arrays.adoc[Arrays] - Array operations
-* xref:procedures.adoc[Procedures] - Executable arrays
-* xref:../../syntax/dictionaries.adoc[Dictionaries] - Dictionary syntax
-* xref:../../syntax/arrays.adoc[Array Syntax] - Array syntax
-* xref:../../commands/dictionary/index.adoc[Dictionary Commands] - Dictionary operations
-* xref:../../commands/array-string/index.adoc[Array Commands] - Array operations
+* link:/docs/usage/basic/arrays/[Arrays] - Array operations
+* link:/docs/usage/basic/procedures/[Procedures] - Executable arrays
+* link:/docs/syntax/dictionaries/[Dictionaries] - Dictionary syntax
+* link:/docs/syntax/arrays/[Array Syntax] - Array syntax
+* link:/docs/commands/references/[Dictionary Commands] - Dictionary operations
+* link:/docs/commands/references/[Array Commands] - Array operations
diff --git a/docs/usage/basic/coordinate-systems.adoc b/docs/usage/basic/coordinate-systems.adoc
index 73c47db..65c2a4e 100644
--- a/docs/usage/basic/coordinate-systems.adoc
+++ b/docs/usage/basic/coordinate-systems.adoc
@@ -807,9 +807,9 @@ moveto % But moveto expects user coordinates!
=== See Also
-* xref:graphics-state.adoc[Graphics State] - Saving and restoring state
-* xref:../../commands/transformations/index.adoc[Transformation Commands] - Complete transformation reference
-* xref:../../commands/transformations/translate.adoc[translate] - Translation details
-* xref:../../commands/transformations/scale.adoc[scale] - Scaling details
-* xref:../../commands/transformations/rotate.adoc[rotate] - Rotation details
-* xref:path-construction.adoc[Path Construction] - Building paths in user space
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Saving and restoring state
+* link:/docs/commands/references/[Transformation Commands] - Complete transformation reference
+* link:/docs/commands/references/translate/[translate] - Translation details
+* link:/docs/commands/references/scale/[scale] - Scaling details
+* link:/docs/commands/references/rotate/[rotate] - Rotation details
+* link:/docs/usage/basic/path-construction/[Path Construction] - Building paths in user space
diff --git a/docs/usage/basic/graphics-state.adoc b/docs/usage/basic/graphics-state.adoc
index 0ba339b..b0e89b3 100644
--- a/docs/usage/basic/graphics-state.adoc
+++ b/docs/usage/basic/graphics-state.adoc
@@ -964,10 +964,10 @@ drawSomething % Rotated 90° total!
=== See Also
-* xref:coordinate-systems.adoc[Coordinate Systems] - Transformation matrix details
-* xref:painting.adoc[Painting] - Using graphics state for rendering
-* xref:../../commands/graphics-state/index.adoc[Graphics State Commands] - Complete command reference
-* xref:../../commands/graphics-state/gsave.adoc[gsave] - Save graphics state
-* xref:../../commands/graphics-state/grestore.adoc[grestore] - Restore graphics state
-* xref:../../commands/graphics-state/setlinewidth.adoc[setlinewidth] - Set line width
-* xref:../../commands/graphics-state/setrgbcolor.adoc[setrgbcolor] - Set RGB color
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - Transformation matrix details
+* link:/docs/usage/basic/painting/[Painting] - Using graphics state for rendering
+* link:/docs/commands/references/[Graphics State Commands] - Complete command reference
+* link:/docs/commands/references/gsave/[gsave] - Save graphics state
+* link:/docs/commands/references/grestore/[grestore] - Restore graphics state
+* link:/docs/commands/references/setlinewidth/[setlinewidth] - Set line width
+* link:/docs/commands/references/setrgbcolor/[setrgbcolor] - Set RGB color
diff --git a/docs/usage/basic/index.adoc b/docs/usage/basic/index.adoc
index 8110a2f..c73c272 100644
--- a/docs/usage/basic/index.adoc
+++ b/docs/usage/basic/index.adoc
@@ -30,7 +30,7 @@ exch % Stack: 10 20 30 30
pop % Stack: 10 20 30
----
-See xref:../../commands/stack-manipulation/index.adoc[Stack Manipulation Commands] for complete reference.
+See link:/docs/commands/references/[Stack Manipulation Commands] for complete reference.
=== Coordinate Systems
@@ -63,7 +63,7 @@ gsave % Save state
grestore % Restore state
----
-See xref:../../commands/graphics-state/index.adoc[Graphics State Commands].
+See link:/docs/commands/references/[Graphics State Commands].
=== Path Construction
@@ -138,6 +138,6 @@ newpath
== See Also
-* xref:../../commands/index.adoc[Command Reference] - All operators
-* xref:../advanced/index.adoc[Advanced Usage] - Advanced techniques
-* xref:../../examples/index.adoc[Examples] - Code samples
\ No newline at end of file
+* link:/docs/commands/[Command Reference] - All operators
+* link:/docs/usage/advanced/[Advanced Usage] - Advanced techniques
+* link:/docs/examples/[Examples] - Code samples
\ No newline at end of file
diff --git a/docs/usage/basic/painting.adoc b/docs/usage/basic/painting.adoc
index 982ba70..110636c 100644
--- a/docs/usage/basic/painting.adoc
+++ b/docs/usage/basic/painting.adoc
@@ -1010,10 +1010,10 @@ stroke
=== See Also
-* xref:path-construction.adoc[Path Construction] - Building paths
-* xref:graphics-state.adoc[Graphics State] - Controlling appearance
-* xref:../../commands/painting/index.adoc[Painting Commands] - Complete command reference
-* xref:../../commands/painting/fill.adoc[fill] - Fill path
-* xref:../../commands/painting/stroke.adoc[stroke] - Stroke path
-* xref:../../commands/painting/clip.adoc[clip] - Set clipping path
-* xref:../advanced/patterns.adoc[Patterns] - Advanced pattern fills
+* link:/docs/usage/basic/path-construction/[Path Construction] - Building paths
+* link:/docs/usage/basic/graphics-state/[Graphics State] - Controlling appearance
+* link:/docs/commands/references/[Painting Commands] - Complete command reference
+* link:/docs/commands/references/fill/[fill] - Fill path
+* link:/docs/commands/references/stroke/[stroke] - Stroke path
+* link:/docs/commands/references/clip/[clip] - Set clipping path
+* link:/docs/usage/advanced/patterns/[Patterns] - Advanced pattern fills
diff --git a/docs/usage/basic/path-construction.adoc b/docs/usage/basic/path-construction.adoc
index 305b69c..9c1021d 100644
--- a/docs/usage/basic/path-construction.adoc
+++ b/docs/usage/basic/path-construction.adoc
@@ -983,10 +983,10 @@ newpath
=== See Also
-* xref:painting.adoc[Painting] - Rendering paths
-* xref:coordinate-systems.adoc[Coordinate Systems] - User space coordinates
-* xref:../../commands/path-construction/index.adoc[Path Construction Commands] - Complete command reference
-* xref:../../commands/path-construction/moveto.adoc[moveto] - Move to point
-* xref:../../commands/path-construction/lineto.adoc[lineto] - Draw line
-* xref:../../commands/path-construction/arc.adoc[arc] - Draw arc
-* xref:../../commands/path-construction/curveto.adoc[curveto] - Draw curve
+* link:/docs/usage/basic/painting/[Painting] - Rendering paths
+* link:/docs/usage/basic/coordinate-systems/[Coordinate Systems] - User space coordinates
+* link:/docs/commands/references/[Path Construction Commands] - Complete command reference
+* link:/docs/commands/references/moveto/[moveto] - Move to point
+* link:/docs/commands/references/lineto/[lineto] - Draw line
+* link:/docs/commands/references/arc/[arc] - Draw arc
+* link:/docs/commands/references/curveto/[curveto] - Draw curve
diff --git a/docs/usage/basic/procedures.adoc b/docs/usage/basic/procedures.adoc
index 1d1962c..ce2a217 100644
--- a/docs/usage/basic/procedures.adoc
+++ b/docs/usage/basic/procedures.adoc
@@ -1115,10 +1115,10 @@ x 5 add
=== See Also
-* xref:../../syntax/procedures.adoc[Procedure Syntax] - Syntax details
-* xref:arrays.adoc[Arrays] - Array operations
-* xref:composite-objects.adoc[Composite Objects] - Complex data structures
-* xref:../../commands/control-flow/index.adoc[Control Flow Commands] - Control structures
-* xref:../../commands/control-flow/exec.adoc[exec] - Execute procedure
-* xref:../../commands/dictionary/def.adoc[def] - Define procedure
-* xref:../debugging.adoc[Debugging] - Debugging procedures
+* link:/docs/syntax/procedures/[Procedure Syntax] - Syntax details
+* link:/docs/usage/basic/arrays/[Arrays] - Array operations
+* link:/docs/usage/basic/composite-objects/[Composite Objects] - Complex data structures
+* link:/docs/commands/references/[Control Flow Commands] - Control structures
+* link:/docs/commands/references/exec/[exec] - Execute procedure
+* link:/docs/commands/references/def/[def] - Define procedure
+* link:/docs/usage/debugging/[Debugging] - Debugging procedures
diff --git a/docs/usage/basic/stack-operations.adoc b/docs/usage/basic/stack-operations.adoc
index 7add61a..16ae32b 100644
--- a/docs/usage/basic/stack-operations.adoc
+++ b/docs/usage/basic/stack-operations.adoc
@@ -565,8 +565,8 @@ rgb2bgr % Now: 0.0 0.5 1.0 (BGR)
=== See Also
-* xref:procedures.adoc[Procedures] - Creating reusable code blocks
-* xref:arrays.adoc[Arrays] - Working with array objects
-* xref:../../commands/index.adoc[Command Reference] - Complete operator reference
-* xref:../../syntax/operators.adoc[Operators] - Operator syntax details
-* xref:../debugging.adoc[Debugging] - Debugging techniques
+* link:/docs/usage/basic/procedures/[Procedures] - Creating reusable code blocks
+* link:/docs/usage/basic/arrays/[Arrays] - Working with array objects
+* link:/docs/commands/[Command Reference] - Complete operator reference
+* link:/docs/syntax/operators/[Operators] - Operator syntax details
+* link:/docs/usage/debugging/[Debugging] - Debugging techniques
diff --git a/docs/usage/debugging.adoc b/docs/usage/debugging.adoc
index 324ce7c..1c6d3c1 100644
--- a/docs/usage/debugging.adoc
+++ b/docs/usage/debugging.adoc
@@ -903,8 +903,8 @@ someValue debugType
=== See Also
-* xref:error-handling.adoc[Error Handling] - Error management
-* xref:advanced/error-handling.adoc[Advanced Error Handling] - Complex error scenarios
-* xref:advanced/resource-management.adoc[Resource Management] - Memory debugging
-* xref:basic/stack-operations.adoc[Stack Operations] - Stack manipulation
-* xref:basic/procedures.adoc[Procedures] - Procedure debugging
+* link:/docs/usage/error-handling/[Error Handling] - Error management
+* link:/docs/usage/advanced/error-handling/[Advanced Error Handling] - Complex error scenarios
+* link:/docs/usage/advanced/resource-management/[Resource Management] - Memory debugging
+* link:/docs/usage/basic/stack-operations/[Stack Operations] - Stack manipulation
+* link:/docs/usage/basic/procedures/[Procedures] - Procedure debugging
diff --git a/docs/usage/error-handling.adoc b/docs/usage/error-handling.adoc
index 68c7b10..42a8294 100644
--- a/docs/usage/error-handling.adoc
+++ b/docs/usage/error-handling.adoc
@@ -567,14 +567,14 @@ $error /newerror get % Is new error?
For more detailed error handling:
-* **Debugging** - See xref:debugging.adoc[Debugging Guide] for debugging techniques
-* **Advanced Error Handling** - See xref:advanced/error-handling.adoc[Advanced Error Handling] for complex scenarios
-* **Resource Management** - See xref:advanced/resource-management.adoc[Resource Management] for resource-related errors
+* **Debugging** - See link:/docs/usage/debugging/[Debugging Guide] for debugging techniques
+* **Advanced Error Handling** - See link:/docs/usage/advanced/error-handling/[Advanced Error Handling] for complex scenarios
+* **Resource Management** - See link:/docs/usage/advanced/resource-management/[Resource Management] for resource-related errors
=== See Also
-* xref:debugging.adoc[Debugging] - Debugging techniques
-* xref:advanced/error-handling.adoc[Advanced Error Handling] - Detailed error handling
-* xref:advanced/file-operations.adoc[File Operations] - File error handling
-* xref:basic/stack-operations.adoc[Stack Operations] - Stack error prevention
-* link:../commands/control-flow/stopped.html[stopped command] - Error catching operator
+* link:/docs/usage/debugging/[Debugging] - Debugging techniques
+* link:/docs/usage/advanced/error-handling/[Advanced Error Handling] - Detailed error handling
+* link:/docs/usage/advanced/file-operations/[File Operations] - File error handling
+* link:/docs/usage/basic/stack-operations/[Stack Operations] - Stack error prevention
+* link:/docs/commands/references/stopped/[stopped command] - Error catching operator
diff --git a/docs/usage/index.adoc b/docs/usage/index.adoc
index f459478..d1199b6 100644
--- a/docs/usage/index.adoc
+++ b/docs/usage/index.adoc
@@ -10,7 +10,7 @@ Practical guides and tutorials for PostScript programming, from basic concepts t
== Sections
-=== xref:basic/index.adoc[Basic Usage]
+=== link:/docs/usage/basic/[Basic Usage]
Essential concepts every PostScript programmer should know:
@@ -20,7 +20,7 @@ Essential concepts every PostScript programmer should know:
* Path construction fundamentals
* Basic painting operations
-=== xref:advanced/index.adoc[Advanced Usage]
+=== link:/docs/usage/advanced/[Advanced Usage]
Advanced features and professional techniques:
@@ -36,12 +36,12 @@ Advanced features and professional techniques:
== Learning Path
-**Start Here** → xref:basic/index.adoc[Basic Usage]
+**Start Here** → link:/docs/usage/basic/[Basic Usage]
Master the fundamentals before moving to advanced topics.
== See Also
-* xref:../commands/index.adoc[Command Reference] - Detailed operator documentation
-* xref:../examples/index.adoc[Examples] - Working code samples
-* xref:../syntax/index.adoc[Syntax] - Language grammar
\ No newline at end of file
+* link:/docs/commands/[Command Reference] - Detailed operator documentation
+* link:/docs/examples/[Examples] - Working code samples
+* link:/docs/syntax/[Syntax] - Language grammar
\ No newline at end of file
diff --git a/index.adoc b/index.adoc
index 1d651fb..fae5848 100644
--- a/index.adoc
+++ b/index.adoc
@@ -199,7 +199,7 @@ showpage % Output the page
== Contributing
-This documentation is open source and welcomes contributions. See our https://github.com/metanorma/postscript-guide[GitHub repository] for:
+This documentation is open source and welcomes contributions. See our https://github.com/claricle/postscript-guide[GitHub repository] for:
* Reporting errors or omissions
* Suggesting improvements
@@ -209,4 +209,4 @@ This documentation is open source and welcomes contributions. See our https://gi
---
[.text-center]
-_This reference guide is maintained by the Metanorma community._
\ No newline at end of file
+_This reference guide is maintained by the Claricle community._
\ No newline at end of file
diff --git a/lychee.toml b/lychee.toml
new file mode 100644
index 0000000..ff82066
--- /dev/null
+++ b/lychee.toml
@@ -0,0 +1,69 @@
+# Lychee Link Checker Configuration
+# For PostScript Language Reference Guide
+# https://github.com/lycheeverse/lychee
+
+# Cache results to avoid re-checking same URLs
+cache = true
+max_cache_age = "1d"
+
+# Check both source files and built site
+include_verbatim = true
+
+# Recursively check all files
+recursive = true
+
+# File types to check
+# We'll check AsciiDoc source and built HTML
+include = [
+ #"docs/**/*.adoc",
+ "_site/**/*.html"
+]
+
+# Excluded paths
+exclude = [
+ ".git",
+ ".github",
+ "node_modules",
+ "vendor",
+ ".bundle",
+ ".sass-cache",
+ ".jekyll-cache"
+]
+
+# Link checking behavior
+max_redirects = 10
+max_retries = 3
+timeout = 20
+
+# Accept status codes
+accept = [
+ "100..=103", # Informational
+ "200..=299", # Success
+ "429" # Too Many Requests (retry handled by max_retries)
+]
+
+# User agent to identify ourselves
+user_agent = "lychee/postscript-guide-link-checker"
+
+# Check HTTP, HTTPS, and file:// schemes
+scheme = ["https", "http", "file"]
+
+# Include file:// URLs for local link checking
+include_file = true
+
+# Handle different link types
+include_mail = false # Don't check mailto: links
+
+# Follow links but don't check their content recursively
+max_concurrency = 8
+
+# Verbose output for debugging
+verbose = "info"
+
+# Require HTTPS where possible
+require_https = false # Don't enforce
+
+# Check fragment identifiers (anchors)
+# include_fragments = true
+
+index_files = ["index.html"]
\ No newline at end of file