Add documentation

This commit is contained in:
Guille Gonzalez
2026-01-11 06:53:55 +01:00
parent 339f20a34b
commit 8d32feb1bd
4 changed files with 63 additions and 0 deletions

View File

@@ -1,13 +1,17 @@
import SwiftUI
extension Math {
/// Controls how math is typeset (display vs inline text).
public enum TypesettingStyle: Sendable {
/// Display style for standalone equations.
case display
/// Text style for inline math.
case text
}
}
extension View {
/// Sets the typesetting style for ``Math`` views in this hierarchy.
public func mathTypesettingStyle(_ typesettingStyle: Math.TypesettingStyle) -> some View {
environment(\.mathTypesettingStyle, typesettingStyle)
}