groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Trouble with mm


From: Cedric Sodhi
Subject: Re: [Groff] Trouble with mm
Date: Tue, 17 Apr 2012 13:03:20 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

In reply to my own email, I've come across another bizarre behaviour.

I tried to add an Apendix with a name containing spaces:

.APP "My Appendix"

However, quotes ("") did not prevent the Argument "My Appendix" from
being interpreted as two arguments "My" and "Appendix". I assume this
comes from the fact that the macro expands the argument twice - i.e.
passes it on to yet another macro.

I've never understood how this is supposed to be handled consistently. I
find it strange that one requires knowledge about the "inner workings"
of a specific macro in order to know how to quote arguments to it. It's
not only weird that sometimes arguments have to be quoted once,
sometimes twice and even more often - it also results in the problem
that macro does not work transparently and changing the implementation
might require to re-implement of calls of it.

But even when I assumed the problem was a second expansion of the argument, I 
could not get it work. I tried

.APP ""My Appendix""

which didn't work either. Neither did

.APP """My Appendix"""

Most curiously, the latter worked in that the argument was henceforth
interpreted as one, but it resulted in stray, literal "":

My Appendix""

Perhaps this is not even related to mm, but I would appreciate it if
someone could shed light on this behaviour.

Thank you,
Cedric


On Tue, Apr 17, 2012 at 12:30:09PM +0200, Cedric Sodhi wrote:
> Hello,
> 
> I recently decided to use mm instead of ms because it appeared that mm
> offered far more but I'm having a hard time getting it to do what I
> want.
> 
> With ms things were relatively easy and straight forward. me on the
> other hand appears to be rather complicated and I seem not to find a
> documentation describing me as a whole.
> 
> In particular, I'm missing the information about which macro has to be
> invoked when, where and in which context together with what other
> macros. The list of macros in groff_mm might be complete, but I think
> they are not sufficiently put into relation to understand how to use
> them.
> 
> To illustrate my problem, I tried creating a simple letter. In fact, I
> was left guessing as for which macro goes where, so this might appear
> completely misconcepted to anyone who actually knows me.
> 
> I thought I'd have to start with specifying the overall format of the
> document (this, for example is an information I'd like to see
> documented: Does something have to be called at the very beginning in
> order to work. Only ocassionally there are remarks such as "X has to be
> called immediately after Y"):
> 
> .LT BL
> .LO SJ "A subject"
> .MT 5                 \" <--- What *is* a memorandum type?
> .WA "Me" "Mr."
> Blümchenstraße 12
> .WE
> .HU "Dear Mr. or Mrs."
> This is my letter with references\*(Rf
> .RS
> Such as this one
> .RF
> 
> Now, compiled with "groff -kept -Tps -P-pa4 -dpaper=a4 -m mm" this
> doesn't look like anything I want. The SUBJECT is on the last page
> together with the references, The german "SZ" (ß) becomes a \u[00DF] and
> practically nothing looks like I intended.
> 
> In lack of a better question: Could anyone help?
> 
> Regards,
> Cedric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]