How to indent a block of text in an m4 macro

久未见 提交于 2020-01-15 04:56:27

问题


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.


回答1:


How about patsubst:

patsubst(mytext,`^', ` ')


来源:https://stackoverflow.com/questions/29026753/how-to-indent-a-block-of-text-in-an-m4-macro

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!