1

I use Pod to write manuals for my program. And I ran into a problem. Please tell me how to solve it.

I have the following code:

#include <myhead.h>
I<void> myfunc (I<int arg1>, I<int arg2>);

I would like the text to be written from the next line after the word 'void'. Moreover, it is with the next line, and not through one.

Jonas
131k103 gold badges330 silver badges408 bronze badges
asked Dec 5, 2020 at 18:57
2
  • This looks like a C program. Are you using Perl to generate documentation for a C program? Commented Dec 5, 2020 at 20:53
  • Yes, I use pod2man and create manuals in several languages. Commented Dec 5, 2020 at 21:04

2 Answers 2

3

Pod is "plain ol' documentation" and doesn't have fancy features. It sounds like you want the text after void to be on the next line. In that case, you have to put that text on the next line and make it verbatim text so it retains the formatting:

=pod
 #include <myhead.h>
 I<void> 
 myfunc (I<int arg1>, I<int arg2>);
=cut

If you need something else, improve your questions by showing exactly what you expect.

But, I expect that you probably want to write your own Pod formatter. Then you can do exactly what you want. Fo what it's worth, I write all of my books in Pod and use several custom formatters to get them into their end states.

answered Dec 5, 2020 at 21:03
Sign up to request clarification or add additional context in comments.

1 Comment

I suppose the "= pod" insertion is unnecessary - the file initially has a .pod extension and contains only man. If I write indented then format codes are not executed.
1

Pod has paragraph breaks and preformatted text, but no line breaks.

If you are targeting a particular output format, you can do, for example:

=begin html 
One line
Another line
=end html

Or you could do some kind of post-processing on the file.

answered Dec 5, 2020 at 20:59

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.