• 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.

    Commands are also split at environments and at any macros listed in macrosThatBreakPars.

    Parameters

    • ast: Group | Node[]
    • isStreamingCommand: ((node) => node is Macro)
        • (node): node is Macro
        • Parameters

          • node: any

          Returns node is Macro

    • replacer: ((content, streamingCommand) => Node | Node[])
    • Optional options: {
          environmentsThatDontBreakPars?: string[];
          macrosThatBreakPars?: string[];
      }
      • Optional environmentsThatDontBreakPars?: string[]
      • Optional macrosThatBreakPars?: string[]

    Returns Node[]

Generated using TypeDoc