Dear all, the weekend is there, and drives me to try silly things (which is a good way to learn a language).
Is there any possibility to count leading spaces in groff? I use [] to express spaces in the following mock-up of an outline: .\" Start of example text Learning Language X \"should return 0 [] Prerequisites \" should return 1 [][] Tools \" should return 2 [][] Documentation \" same [] Learning Objectives \" should return 1 [][] Familiarize yourself with typical structures of language X \" should return 2 [][] Learn to see patterns in your problems for which language X offers idiomatic solutions [][] Learn to transform patterns in your problems for wich language X does not offer an idiomatic solution .\" End of example text Ideally, I should by able to replace the leading spaces with some kind of a counter which I can later re-use, and store it per line. \n[Text_of_my_line] would contain the level of indentation, like \n[Tools] and \n[Documentation] whould both return 2 which could be used to set the section numbering via .NH x. It is safe to assume that X stands for the macro language of groff. Best regards, Oliver. -- Dr. Oliver Corff Mail: oliver.co...@email.de