import * as Ast from "../../unified-latex-types"; /** * Process streaming commands in a group. If needed, "escape" the group. * For example, `{\bfseries xx}` -> `\textbf{xx}`, but `{foo \bfseries xx}` -> `{foo \textbf{xx}}`. */ export declare function replaceStreamingCommandInGroup(group: Ast.Group, isStreamingCommand: (node: any) => node is Ast.Macro, replacer: (content: Ast.Node[], streamingCommand: Ast.Macro) => Ast.Node | Ast.Node[]): Ast.Node[]; /** * Given a group or a node array, look for streaming commands (e.g., `\bfseries`) and replace them * with the specified macro. The "arguments" of the streaming command are passed to `replacer` and the return * value of `replacer` is inserted into the stream. * * By default, this command will split at parbreaks (since commands like `\textbf{...} do not accept parbreaks in their * contents) and call `replacer` multiple times, once per paragraph. */ export declare function replaceStreamingCommand(ast: Ast.Group | Ast.Node[], isStreamingCommand: (node: any) => node is Ast.Macro, replacer: (content: Ast.Node[], streamingCommand: Ast.Macro) => Ast.Node | Ast.Node[]): Ast.Node[];