Hello all,
After frowning for some time at the increased verti-
cal space after static displays in MM, when they
concluded an list item or a section, I decided to
look what was going on.
The .DE macro turned out to be generating the final
vertical space by directly calling .sp, instead
Ted Harding:
> And, just for comparison, in the ms macros the variables
> (amongst others) are defined:
>
> \n[PD] "Paragraph Drop": space before the next paragraph
> \n[DD] "Display Drop": space before and after a display
>
> I prefer, myself, to set these to zero, and explicitly
> insert whateve
Hello, Mike
A long time ago you gave me this tip:
> To format a document of arbitrary length as _one_ nroff page
> I use this trick.
>
> First, set the page length _very_ long:
> .pl 9
>
> And then make the last two lines of input a line break and
> setting the page length to
Werner:
> Nice! This could be added to groff.texinfo...
I will be glad to add it to the "End-of-input Traps"
section, with an added note about how not to over-
ride an existing end-of-input trap that might be
used a macro package, but currently I am very busy
and will get to it on the we
Werner Lemberg:
> > I will be glad to add it to the "End-of-input
> > Traps" section,
>
> Great!
Here it is, coming sooner than expected. Please, see
if it is sane and readable.
Anton
--- groff.texinfo 2011-02-12 19:31:07.96875 +0300
+++ groff_new.texinfo 2011-02-12 22:20:55.78125
Me:
> Here it is, coming sooner than expected. Please, see
> if it is sane and readable.
Yet, I made with typos.
Corrected version attached.
Sorry.
Anton
groff.texinfo.diff
Description: Binary data
Werben Lemberg:
> Thanks! In the CVS, I've heavily modified your
> patch. Please check.
Thanks. It is more concise and technically correct.
Anton
Werner Lemberg:
> It is not possible to find out the type of the
> last node in the line node list. However, if you
> say
>
>.vpt 0
>.DEVTAG-EO-H
>.br
>.sp -1
>.vpt 1
>
> the vertical effect of .DEVTAG-EO-H is cancelled;
I have just run into a problem with this fix:
Werner Lemberg:
> \n[.l] vs. \n[.ll]?
I don't think so, because there's no such thing as
temporary line length, and, since the wrapper calls
.br anyway, only the .l matters.
Anton
Here's a patch for keeping the temporary indent.
Anton
--- m_old.tmac 2011-02-27 18:19:22.734375000 +0300
+++ m.tmac 2011-02-27 18:23:54.71875 +0300
@@ -741,12 +741,18 @@
..
.\" Wrapper to cancel the side effect of .tag + .br generating
.\" unwanted vertical space.
-.de misc@tag
+.d
Walter Harms asked:
> Is there any fancy trick i can use to convince
> groff not to page break ?
Yes. In addition to Clarke Echols's advice, you can
make this behaviour more manageable using end-of-
input traps. This way, the single-page mode can be
turned on and off with a single comma
Walter Harms:
> thx for the hint, but how does setting the page
> lenght affect the printed output ? the main point
> is to print the document, showing it is only sec-
> ond.
It depends on what you call printed output. If you
mean the output of one of groff's character-cell
devices (-T
Werner Lemberg:
> > And the rationale is exactly what you said:
> > paper sizes and screen sizes do not mix prop-
> > erly; so it may be useful to ignore a length and
> > leave the "page break" to a pager.
>
> Exactly. For man pages this is done like this by
> default.
And exactly in
Walter Harms
> i have added .pl i and it works so far but now
> i see ^h^h^h^h in front of my table. I can fix
> that with "cut -b5-" or tr -d "\b" but i am con-
> fused.
> (i did not notice it before since i used | more to
> show the output but xmessage is something differ-
> ent).
Lo
Walter Harms
> does not work for me, the ^h are still produced
Hmmm. I'll have too look at your nroff code to
understand why.
Anton
Myself:
> Here's a patch for keeping the temporary indent.
Doesn't make sense?
Anton
Werner LEMBERG
> Additionally, I would like to integrate gropdf as
> a next step.
Great :)
Anton
Dominique Cretel:
> About this page :
> http://www.gnu.org/software/groff/manual/index.html
> And more particularly, the postscript file, is
> this document written using groff ?
This part of the documentation is maintained in
texinfo, but you can look into any of the groff-
related
Jan Vcelak:
> The backslash-period escape sequence in groff
> doesn't work as described in documentation.
> [...]
> I'm attaching a proposed patch.
Will it work when the control character is redefined
using the .cc request?
Anton
Tadziu Hoffmann:
> Note the "dot" version of the comment in the last
> example.
Thank you very much!
Anton
Hello again,
One of my macros does not work when called first in
the document, before any text has been output. The
problem is caused by the vertial position registers
(.d and nl) not being affected by the .sp request.
Here is an example:
.tm Initial vert. pos.: \n[.d]
.sp 4
Ralph Corderoy:
> To make the first .tm print 0 add a line at the
> beginning containing just
>
> \&
Hello, Ralph, and thanks.
In order to completely get rid of the side effect of
the invisible character I used:
\&
.br
.sp -1v \"Return to initial location
But why is GROFF behaving like
Dave Kemper:
> I get different results with your sample code
> depending on which macro package I use. Putting
> your code in a file called "test" and running
> groff 1.21:
> [...]
Thank you for the test, Dave. I only tested this
with no package and with -mm, which also causes .
I said:
> Ted Harding suggested that I use the zero-width
> character...
It was Ralph Corderoy. Sorry.
Anton
Tadziu and Werner -- thank you for the clarifica-
tion.
Anton
Ralph Corderoy:
> Is it non-standard? I thought the normal way was
> to set up two passes, or more strictly a loop
> until everything settles down into place, as this
> is how TeX does it too IIRC. Not that TeX's way
> of doing anything necessarily makes it right. ;-)
I meant, non-s
Mike Bianchi:
> [...] To do even the simplest document requires
> much-too-much expertise for the rank beginner.
>
> What is missing is a Front Door that leads you
> gently into the Castle, teaches you the way
> through the rooms, closets and pantries, so you
> can live comforta
Hello all,
I have found what seems to be a bug in m.tmac. The
display-start macro stored the current indent into a
register and used its values in the dispaly-end
macro. This didn't work when, for example, a display
wrapped a list having another display as its item.
In the attached patch,
Clarke Echols:
> I was working on a troff/nroff tutorial at HP back
> in 1988, but got pulled off of it to handle the
> HP-UX Reference (man pages) for four years. The
> version that got produced was a cut-down version
> for nroff only, and it never hit the bookstore
> market like the
Ingo Schwarze:
> > From my own experince, the existing packages are
> > much stronger coupled with Groff and cannot be
> > used without good understanding of Groff itself.
> > I didn't try mom though.
>
> Maybe you didn't try mdoc(7), either - or only
> considered general purpose packages
Doug McIlroy:
> This thread has mentioned Kernighan's troff tuto-
> rial Here's where to get it:
>
> http://cm.bell-labs.com/7thEdMan/index.html
>
> Of course it lacks the modest, but very helpful,
> groff extensions, but it'sa great base document.
> I would think Brian would welcome an u
Simon:
> I am using MacVIM at the moment - which has great
> syntax highlighting support. I am finding it odd
> to use after using TextEdit for so long though, so
> hence the quest for something else.
I too use Vim. As it is with touch-typing, the key
to the successful learning of Vi(m) i
I wrote:
> Maybe Clark will give advice...
I meant Clarke. Sorry.
Anton
Here's Chris Schaller e-mail in which he proposes to
(ab)use Vim's make and quickfix functionality and
provides references to two more Vim-related books.
Posting from Chris's permission:
Anton,
Here's yet another vi lover. I am not sure
Hello, all
I want to use Russian KOI8-encoded Type 1 fonts with
Groff. Provided that I am using UTF-8-encoded Groff
sourcres, does it mean that I should create my own
font_map file in order to specify the translation
from Groff internal characters, used in the UTF-8
mode, into PostScript
Hello, Werner, and thank you for the reply.
I got the font working, although I do not completely
understand what is going on internally. In addition,
the CMCyr package, which I registered with Groff, is
only an extension to the Computer Modern fonts hav-
ing only Russian-specific symbols, and i
Werner LEMBERG:
> Please don't hesitate to ask! Ideally, you could
> then improve the documentation based on your ques-
> tions :-)
Thanks, I appreciate it. I thouhgt I'd jot a draft
document descirbing various aspects of setting up
groff for a specific language, that would include
deal
Werner LEMBERG:
> I've posted a solution a few years ago to the
> groff list which is still valid.
Ah, thank you. So you are mapping the Russian alpha-
bet to internal characters correspoinding to KOI-8-R
and then using hyphenation patterns in the same
encoding.
This way, not only UTF
Sorry for the mangled text in the previous message.
Werner LEMBERG:
> I've posted a solution a few years ago to the
> groff list which is still valid.
Ah, thank you. So you are mapping the Russian alpha-
bet to internal characters correspoinding to KOI-8-R
and then using a hyphenation patt
Thank you for the kind and patient explanation,
Werner.
> However, please avoid the term 'AGL compatible'.
> We are not talking about glyphs but about charac-
> ters!
Maybe this confusion is not only my fault also the
manual's:
The distinction between input, characters,
and o
Werner LEMBERG:
> Yes, this is a mess, introduced long before I was
> involved in groff. However, this affects the ter-
> minology but not the documentation itself. AFAIK,
> I've fixed all places in the doc files to make a
> clear distinction between input characters and
> output glyphs.
Werner LEMBERG:
> This is not possible. How shall come a glyph-only
> object into existence? I don't count ligatures
> and similar things here since they also need input
> characters to exist.
> [...]
> Well, \N'...' is kind of a glyph-only object, but
> by its very definition you can't hyph
Werner LEMBERG:
> > Frankly, yes :) -- add a warning to the descrip-
> > tion of the .tr request. Especially so, because
> > there are examples in the manual in which the
> > mapping is changed and then "restored" back. The
> > user should know the side effect of this opera-
> > tion.
>
> Tha
Just as I thought I have finished the patch, I found
out I was wrong about the following piece:
Werner LEMBERG:
> > Therefore, I suppose that groff applies the ex-
> > isting character translations inversely to get
> > back to some simple characters. Then, hyphen-
> > ation codes can be com
Sorry, the later request should be:
.hcode \[u] x
Anton
Hello, Werner.
Here is what I came up with. Feel free to edit to
your own taste or reject :)
Anton
--- groff.texinfo 2011-08-21 23:08:07.18750 +0400
+++ groff.texinfo.new 2011-08-27 01:04:15.546875000 +0400
@@ -6882,7 +6882,11 @@
@cindex manipulating hyphenation
@cindex hyphenati
Hello all,
MM has only two hyphenation modes: no hyphenation
and mode 14. I disfavour mode 14 and propose a
patch that will allow MM to use other hyphenation
modes while keeping it backwards compatible with the
current behaviour.
The semantics of MM's Hy register are remaining the
sa
Werner LEMBERG:
> Please do so. And please provide a ChangeLog en-
> try also.
OK.
> PS: I can apply your patches as soon as the copy-
> right assignment has arrived.
Oh, I thought the limit was on the size of one patch
and not on their total size so I still could submit
small ones...
Werner LEMBERG:
> > If it is OK, I will also provide a corresponding
> > path for the groff_mm man page.
>
> Please do so. And please provide a ChangeLog en-
> try also.
The patch to the man page is attached, and the
changelog entry could be as follows:
Add support for hyphenation modes
Larry Kollar:
> I'm in sudden need of a hyphenation file for Por-
> tuguese (Brazilian if it matters).
Try the LaTeX patterns:
http://www.ctan.org/tex-archive/language/portuguese
Groff is designed to accept them. As I see, the
Portuguese file has some \lcode requests which may
be inco
Hello all,
I want to typeset headers in man pages (an-old.tmac)
differently for text-based and PostScript devices.
For the former I want them to be uppercase, while
for the latter -- in the normal case, as they were
typed.
I thought I would prepend the TH and SH macros with
code that woul
Clarke Echols:
> [...]
> I went through the entire system and changed it so
> the name of a command, system call, etc. was al-
> ways lowercase unless the actual command or name
> was uppercase or mixed-case.
>
> That eliminated the confusion and improved usabil-
> ity. I am still opposed to
Werner LEMBERG:
> Can you prepare a small example which really
> demonstrates what you want to do?
Sorry for the innacurate example. I used a latin
letter instead of a Russian one and a random unicode
entity just to show the kind of translation I was
using.
Here is what I want to
Thanks for your reply, Werner:
> What about doing it the naive way?
>
> File `lcuc' in UTF-8 encoding:
> [...]
> Provided you have proper PS fonts, this works with
> -Tps also.
>
> Am I missing something?
Your example works perfectly with -Tutf8 if the
source file is in UTF-8 and the -K pr
The previous post was encoded in CP-1251.
Please, accept my apology.
I can re-post it if necessary.
Anton
Werner LEMBERG:
> Unfortunately, I don't have enough time currently
> to find a solution for your original problem.
Thank you very much for your time! Now I have more
options to choose from.
Anton
Volker,
I have tried your example on my machine, and the re-
sult is right-justified, as expected.
Deri James suggested that your PostScript viewer
might not be working correctly. Try opening your
.ps file in a different viewer and also check if
with -Tlatin1 the resulting text file
Date: Thu, 22 Dec 2011 18:24:28 +0100
From: vol...@volker-wolfram.de (Volker Wolfram)
To: anton@gmail.com
Subject: Re: [Groff] Right margin problems
Anton Shepelev wrote:
> Volker,
>
> I have tried your example on my machine, and the re-
> sult is right-justified, as expect
Volker Wolfram:
> I'm using groff from the packages depot. But I re-
> ported to this list problems with textblock and
> viewing Postscriptfiles with ghostview and gv for
> a while.
But in the thread "Right margin problems" you said
the problem was with GhostScript, not with Groff.
Try v
Clarke Echols:
> I know the 'bp is the cause, but don't know how to
> handle page numbering at the bottom of the page
> while suppressing the 'bp request after EOF is
> reached.
Do I understand you correctly that you are calling a
'bp explicitly in the end of your file? If so,
maybe
Ken Mandelberg:
> It seems like AU/AT with the MM macros is not
> working properly.
The problem is with the Memorandum-style signature
macro.
Without .warn in the beginning of your file you were
missing several warnings from Groff. I added it and
saw where the errors were. It turns o
Ken Mandelberg:
> Still no CEO.
Sorry, I missed this part. I looked into m.tmac and
found that the Memorandum-style signature does not
include the title (.AT). The only place where the
title is used is in the ms.cov -- ms-style cover
page activated by .COVER ms.
The curent implemenat
Vannevar Bush:
> It parses and shows me the whole page. What if I
> want to parse only OPTIONS section ? I am looking
> for something like :-
>
>groff -X -P -resolution -P100 -man -parse-section "OPTIONS" passwd
Here is my quick, dirty and incomplete solution:
.nr skip 0u \" Flag to in
Dear Siteshwar, excuse me for addressing you as Van-
nevar Bush.
Anton
Please, add the following two lines to the beginning
of the file:
.warn
.if !d secf .ds secf \" If not specified on commandline, init secf here.
I somehow missed them when copying.
I have attached the full working file for convenience.
Anton
secfilter.man
Description: Unix manual page
Hello, John
I don't have access to any other implementation of
troff than groff, but I have consulted "The Docu-
menter's Workbench", and it seems that groff's mm
signature macros have incompatibilities more serious
than the omission of the title, and some errors too.
For example, it print
Ken Mandelberg:
> It seems like AU/AT with the MM macros is not
> working properly.
>
> Here is a simple test
>
>.AU "John Smith"
>.AT "CEO"
>.MT 5
>.P
>testing
>.FC
>.SG
>.br
>
> [...]
>
> So the AT title string never comes out, and there
> is an extraneous "
Ken Mandelberg:
> I tested the patch. It does indeed fix the single
> author with title case.
>
> However, there still is one difference between
> groff and troff. In troff the signature comes out
> bold and in groff it doesn't. Any thoughts on
> that?
OK, I have modified the patch (at
Ken Mandelberg:
> I've attached the ascii and postscript output. It
> gets the multiple authors and author titles right
Looks like your version of mm completerly ignored
the last three arguments to AU: location, deparment
and initials. I am not sure it is correct either.
Anton
Werner LEMBERG:
> Please tell me if you have found a patch which I
> can apply to the repository.
This is bound to be difficult because I don't have
an exact specification of how mm _should_ typeset
the signature, and have to try to imitate it based
on tests -- the black box method...
O
Ralph Corderoy:
> Is
> http://books.google.co.uk/books?id=Wz1C5JhTzlYC&lpg=PR12&ots=e8Ftu5WzMi&dq=documenters%20workbench%20mm%20macros&pg=PA38#v=onepage&q=documenters%20workbench%20mm%20macros&f=false
> of any use? Section 7 might be going through the macros you're
> discussing. Obviously, not
Ken Mandelberg:
> I've attached the ascii and postscript output. It
> gets the multiple authors and author titles right,
> but makes a mess of the document title. I suspect
> the latter is too Bell Labs specific.
The mess in the title is some roff language con-
structs that, assuming the
Hello, all
Could you please tell me the purpose of this mapping
in unicode.tmac:
.char ' \[cq]
This causes all apostrophes to be typeset as closing
single quotes. Is it correct?
Anton
Tadziu Hoffmann:
>> Could you please tell me the purpose of this
>> mapping in unicode.tmac:
>>
>> .char ' \[cq]
>>
>> This causes all apostrophes to be typeset as
>> closing single quotes. Is it correct?
>
> Yes.Apostrophes and (english) single right
> quotes are identica
I wrote:
> Another question is about the hyphen sym-
> bol -- \[hy]. Is it possible to tell groff to use
> the standard hyphen-minus sign of the ASCII table
> instead of \[u2012] for hyphenation? I couln't
> achieve it by commeting out the corresponding line
> in unicode.tmac, and i
Bruno Haible:
> Anton Shepelev:
>
> > Is it possible to tell groff to use the standard
> > hyphen-minus sign of the ASCII table instead of
> > \[u2012] for hyphenation?
>
> People who ask this usually have a groff input
> that uses '-' both to d
I accidently came upon what seems to me an unfair
judgement about groff and TeX:
As an example: In a presentation-markup lan-
guage, if you want to emphasize a word, you
might instruct the formatter to set it in
boldface. In troff(1) this would look like
so:
A
Steve Izma
> James Lowden sent me, off list, this link to an
> article he wrote about the relevance of groff to
> fundamental concepts of programming and computer
> use. I assume he's too modest to broadcast it,
> but I think it's excellent:
> [...]
My thanks to James and to you, Steve
Hello all,
.bp doesn't seem to work in an end-of-input trap.
Here's an example for -Tascii:
.de END
this page
.tm before bp
.bp
.tm after bp
next page
..
.em END
End of input occurs here!
Why could this be? The same code works as expected,
i.e. prints "ne
Tadziu Hoffmann:
> > Adding \c and replacing .bp with 'bp fixed it.
>
> In a message further on in the thread Werner says
> he has implemented an "em1" request which is the
> same as "em" but doesn't have the last-page re-
> striction.
Yes, I had seen it. But my version of groff is too
ol
Hello all,
I have a problem designing well-strucutred documents
consisting of several files. Files included via
.mso, .so, or -m, are never run through preproces-
sors. For example, it is very incovenient to use a
macro package containing Russian text together with
-K, and it is impossi
Werner LEMBERG:
> Compare this to the doc package: Before installa-
> tion to the tmac directory, (almost) all names
> have the prefix `doc-' which gets stripped, to-
> gether with all leading whitespace. Using a Make-
> file for doing `make install', it is really triv-
> ial to preproce
Tadziu Hoffmann:
> Interesting that you mention this, because that's
> exactly what I usually do (inspired by man, of
> course). That is, I have a shell script "myroff"
> [*] which reads the first line of the input file,
> interprets it as options, and calls groff accord-
> ingly (and als
Hello, all
I have problems with gpreconv on Windows (GNUWin32
Groff). Whenever I want to use it, I have to con-
vert the end-of-line symbols:
tr -d \015 < [infile]|groff -U -Kcp1251 ...
which makes the use of soelim much less convenient,
because I have to preconvert my files to the
Hello, again
I want to typeset a list like this:
1. Text text text text text text text [label A]
text text text text text text text text
text text text text text text text text
text text..
2. Text text text text text text text [label B]
Tadziu Hoffmann:
> If you know for sure that your label requires only
> one line-height, then it would be easier to start
> a partially collected line (e.g., including your
> list marker and the right-hand label) and then al-
> ready set the new line length. This way you
> wouldn't have
Clarke Echols:
> The approach I usually use for superscripts is \u
> and \d, and to reduce the size of the superscript
> a \s-1 and \s+1 or +/- 2 if it looks better.
When I need to make my superscripts size-indepen-
dent, I multiply the current font size by a factor
instead of using a fixe
Hello all,
I have started using references in mm and found that
GETHN returns a heading number with two trailing
spaces, because this is the value of the hd*mark
string. This format is very inconvenient, because
what I expect to be '(2.1)' is in fact '(2.1. )'.
May I suggest a patc
And here's another problem: floating displays in mm
are output from within a very strange environment
called \%ds*fev, which is nowhere defined, which
means it has the default parameters, including the
line length of 16 cm. This results, for example, in
incorrect horizontal alignment of
Werner Lemberg:
> > May I suggest a patch that will fix the format
> > of the header number in references?
>
> Please do!
OK, it is attached.
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
--- m-orig.tmac 2012-08-02 20:06:16.773
I wrote:
> Is it reasonable to modify gpreconv or its Windows
> port so that on Windows it will expect '\r\n'?
preconv(1) says:
Trailing '-dos', '-unix', and '-mac' suffixes of
coding tags (which give the end-of-line conven-
tion used in the file) are stripped off before
the c
Keith Marshall:
> Actually, preconv opens its input stream in "bina-
> ry" mode, rather than in Window's special "text"
> mode. Thus, it does see the \r\n EOL sequence,
> which it then explicitly interprets as the line
> terminator, so explicitly emulating the behaviour
> which would hav
Anton Shterenlikht:
> How about maths in the abstract?
> I don't know where to place
>
> .EQ
> delim $$
> .EN
I don't have time now to look why this happens, but
Werner's method works with .AS as well:
.ds eq $a sup b$
.AS
\\*[eq] is a formula in the abstract!
...
just make sur
Tadziu Hoffmann:
> > I don't have time now to look why this happens
> > [...]
>
> It has to do with "AS" saving the text in a macro.
> This results in part of the eqn code being already
> evaluated while saving the abstract, not when it's
> being processed for printing.
Thanks, now I see. Wh
Anton Shterenlikht:
> How can I make the ToC appear in the beginning of
> the document, and not at the end, with mm .TC
> macro?
Using the psutils package, you can move the last
page containing the TOC to the beginning of the doc-
ument:
psselect -p_1,1-_2 in.ps out.ps
> Also, ho
Anton Shterenlikht:
> I want to reference some figure in the caption of
> another figure.
Instead of .SETR, you should use the fourth parame-
ter of .FG. Same applies to .TB. You may check the
corresponding entries in the groff_mm man page.
--
() ascii ribbon campaign - against html e-mail
Anton Shterenlikht:
> I want to reference some figure in the caption of
> another figure.
Also, you can use the second argument to .GETST to
save the reference into a string and use that in the
caption.
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against p
Anton Shterenlikht:
> I'd like to make a cover page with mm .COV-
> ER/.COVEND. How can I not number it, i.e. start
> numbering pages only from the following (front)
> page?
>
> Also, ideally I don't want to show the number on
> the front page. How to do this?
I don't have time t
Anton Shterenlikht:
> > Also, you can use the second argument to .GETST
> > to save the reference into a string and use that
> > in the caption.
>
> Thanks, this works:
>
> .PSPIC rep-cold-mises-mesh.ps 6.0
> .ds caption "Mises stress in the 0.3 mm notch model
> .as caption " at \*[co
I wrote:
> Anton Shterenlikht:
>
> > > Also, you can use the second argument to
> > > .GETST to save the reference into a string and
> > > use that in the caption.
> >
> > Thanks, this works:
> >
> > .PSPIC rep-cold-mises-mesh.ps 6.0
> > .ds caption "Mises stress in the 0.3 mm notch
101 - 200 of 220 matches
Mail list logo