How to indent a block of text in an m4 macro
Asked Answered
M

1

2

Is there a good way to uniformly indent a block of text in an m4 macro? In other words, the macro

define(`mytext',dnl
This is
a
piece of text
that I would like
to indent)
mytext

generates

This is
a
piece of text
that I would like
to indent

I'd like to have a way to indent the whole block of text to a specified amount.

Merrymaker answered 13/3, 2015 at 7:17 Comment(0)
A
2

How about patsubst:

patsubst(mytext,`^', ` ')
Amphioxus answered 18/3, 2015 at 20:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.