Re: An extremely lazy proposal

2024-03-23 Thread Ulrich Lauther
I solved this problem for me by having a pseudo comment in the first line of my documents which indicates how this individual document is to be handled. In my bash-script, that eventally calls groff with appropriate options and preprocessors I have FILE="$1" # check for .\" eqn tbl add

Re: Converting between macro sets?

2022-08-18 Thread Ulrich Lauther
Not a script and not -ms to -me but a set of macros that allow me to use some -mm comands with -mom. ulrich On Thu, Aug 18, 2022 at 02:08:23PM -0400, Robert Goulding wrote: > Just out of curiosity, has anyone written a script to, say, convert text > written with -ms to -me? > > Robert.

Re: macro returning a value?

2021-11-15 Thread Ulrich Lauther
> You shouldn't be seeing a blank line. What's more, removing the > space before the opening parens should cause the \R escape to fail > with 'troff: :: warning: missing number'. A backtrace > points directly to the \R line. > > I'm mystified. Can you send a small example exhibiting the proble

Re: macro returning a value?

2021-11-15 Thread Ulrich Lauther
On Sun, Nov 14, 2021 at 12:33:38PM +0100, Ulrich Lauther wrote: > On Sat, Nov 13, 2021 at 12:19:09PM -0500, Peter Schaffter wrote: > > On Sat, Nov 13, 2021, Ulrich Lauther wrote: > > > Is there a trick to make a macro or string return a value? snip > > .de Pos > >

Re: macro returning a value?

2021-11-14 Thread Ulrich Lauther
On Sat, Nov 13, 2021 at 12:19:09PM -0500, Peter Schaffter wrote: > On Sat, Nov 13, 2021, Ulrich Lauther wrote: > > Is there a trick to make a macro or string return a value? > > > The only solution I found looks like this: > > > > .de Pos END > >

macro returning a value?

2021-11-13 Thread Ulrich Lauther
Is there a trick to make a macro or string return a value? Motivation: I can write position: \n[.d] and get the current position in units. But I want millimeters, \n[.d]*25.4/72000 or, as arithmetic is in integer, \n[.d]*254/72 The only solution I found looks like this:

Re: .SPACE in mom

2021-11-11 Thread Ulrich Lauther
Here is a macro to be used with mom, that moves to a distance down from top or up from bottom, depending on the sign of the argument: .\" Goto position relative to top or bottom of page depending .\" on sign of argument, respecting margins with parameter "m" .\" Examples: .Goto -3c / .Goto 3c m

weird behaviour of .sp| with expression

2021-11-11 Thread Ulrich Lauther
Hi all, look at this code: .nr t1 5c .nr t2 5c .nr foo1 \n[t1]u+\n[t2]u foo1 \n[foo1] .nr foo2 (\n[t1]+\n[t2])u foo2 \n[foo2] .sp |10c 10 c .sp |\n[t1]u+\n[t2]u no braket .sp |(\n[t1]+\n[t2])u with braket

Re: Groff on Raspberry?

2021-10-06 Thread Ulrich Lauther
On Wed, Oct 06, 2021 at 03:58:19PM +0200, Oliver Corff wrote: > Dear All, > > Please bear with me if the answer is in front of my nose (I did not see > it yet). Does anybody know whether the Raspberry Pi OS comes with groff? > I run Rasbian on a PI-zero and Ubuntu Mate on a pi 4. Both have got gr

Re: man-intro

2021-05-22 Thread Ulrich Lauther
On Sat, May 22, 2021 at 08:18:41PM +0200, Oliver Corff wrote: > > "man cd", on the other hand, opens the bash built-in command *man page*, > which, at least on my system is a plethora of text to read (and digest). > on my sytem (ubunto mate) "man cd" results in "No manual entry for cd". > Just m

Re: Interesting articles

2021-03-26 Thread Ulrich Lauther
> The Awk solution was by far the shortest by line count. Since > the runtime for all the different solutions was a few seconds or > less, Awk was probably the fastest because it took the least time > to code. :D > What about "wc -w" ? ulrich lauther

Re: End-of-sentence spacing, for our German readers

2021-01-14 Thread Ulrich Lauther
On Thu, Jan 14, 2021 at 06:01:33AM +, Dorai Sitaram via wrote: > I'm used to single-spacing by now, given its ubiquity, but surely the > Germans carry their disdain for typographic breathing space a little too far? > As in the posted article, paragraphs are difficult to visually separate, >

Re: End-of-sentence spacing

2020-12-19 Thread Ulrich Lauther
On Sat, Dec 19, 2020 at 10:27:01AM +, Dorai Sitaram wrote: > groff pretty much forces one to use two spaces after sentence-ending > punctuation, unless it's at the end of a source line. In my opinion it is good style to start every sentence on a new source line. This is helpful for editing t

Re: bug or my ignorance?

2020-08-11 Thread Ulrich Lauther
anks a lot, the ".br" does it. When I use a macro instead of a diversion, the formatting seems to take place not until the macro is called. Right? ulrich lauther

bug or my ignorance?

2020-08-10 Thread Ulrich Lauther
test 16 test 17 test 18 test 19 test 20 test 21 test 22 test 23 test 24 test 25 test 26 test 27 test 28 test 29 as expected. So, why behaves the diversion (for me) unexpected, or what am I doing wrong? Best, ulrich lauther

Re: Proposed: drop groffer (was: contrib/groffer/roff2.1.man)

2020-04-21 Thread Ulrich Lauther
Maybe I am not qualified to contribute my opinion, as I never used groffer. I use groff a lot, wrote a shell wrapper tailored to my needs many years ago. So I wouldn't miss groffer. Best, ulrich

Re: [groff] An alternative to info(1) ?

2020-02-17 Thread Ulrich Lauther
On Mon, Feb 17, 2020 at 08:58:04AM -0500, Mike Bianchi wrote: > On Sun, Feb 16, 2020 at 07:55:31PM -0800, Larry McVoy wrote: > > I *hate* info. It has made Linux less available to a lot of people. > What about tkinfo? ulrich lauther

Re: weird behaviour of groff / preconv

2019-11-25 Thread Ulrich Lauther
On Mon, Nov 25, 2019 at 02:05:39AM +0100, Tadziu Hoffmann wrote: > > > > It seems groff expands to b\[u00F6]\fPld instead of b\[u00F6]ld\fP. > > If I print out the text using .tm, I get > > \f3b\[u00f6\fPld] > > so it seems that the string argument scanner stops at the first "]", > passing "

weird behaviour of groff / preconv

2019-11-24 Thread Ulrich Lauther
Hi, I process this input .ps 20 This is a partly \f3bold\fP text. This is a partly \f3böld\fP text. .ds MyBLD \f3\\$*\fP This is a partly \*[MyBLD bold] text. This is a partly \*[MyBLD "böld"] text. This is a partly \*[MyBLD böld] text.

Re: [groff] A poor mans Excel

2019-10-10 Thread Ulrich Lauther
ode) addtbl.exp (an example) addtbl.exp.ps (corresponding output) Cheers, ulrich : # Copyright 2019 Ulrich Lauther # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F

Re: [groff] A poor mans Excel

2019-10-10 Thread Ulrich Lauther
On Thu, Oct 10, 2019 at 03:45:54PM +0100, Ralph Corderoy wrote: > Hi Ulrich, > > > I have written a small perlscript, that preprocesses tables and allows > > to > > > > - add the values in selected collums > > - to replace a table entry by the result of an expression > > Thanks for letti

[groff] A poor mans Excel

2019-10-10 Thread Ulrich Lauther
tations: Multiline table enties are not supported. If there is interest, I'll post the script and an example. Kind regards, ulrich lauther

Re: [groff] a5 paper size?

2018-12-22 Thread Ulrich Lauther
On Fri, Dec 21, 2018 at 09:47:46PM -0500, Richard Morse wrote: > Thanks for the suggestion. I’ve done a bit more research, and it looks like > gropdf doesn’t implement the “\X” command according to the documentation, > which is the problem. > > I’m trying to keep things off the command line, bec

Re: [groff] mom manpage

2018-12-05 Thread Ulrich Lauther
On Wed, Dec 05, 2018 at 03:29:36PM +0100, Tadziu Hoffmann wrote: > > Quite the contrary. Less allows searching the page using > regular expressions, which actually helps a lot. Many html > A real life example: I want to read an answer from stdin into a variable, but - as I do not shell progra

Re: [groff] mom manpage

2018-12-05 Thread Ulrich Lauther
Peter, I couldn't agree more to what you are saying. In my opinion, a man page should contain (at most) NAME, SYNOPSIS, COPYRIGHT, DESCRIPTION, OPTIONS, ARGUMENTS, INVOCATION, but not LANGUAGE. A bad example is bash: NAME to INVOCATION take 210 lines, o.k.. The whole man-page is 5869 lines. A h

[groff] problem with umlaut in string

2018-11-18 Thread Ulrich Lauther
I use .ds BLD \f3\\$*\fP and this text is partly \*[BLD in bold face] to switch to bold face and back within a line of text. This works fine as long as there is no german umlaut in the argument to BLD. With an umlaut, I get groff -Tps -k -t -mom -P-pa4 - > /tmp/4451out.ps :219: missing `]

Re: [groff] A few issues with mom's LIST macros

2017-11-27 Thread Ulrich Lauther
On Sun, Nov 26, 2017 at 06:31:42PM -0500, Peter Schaffter wrote: > On Sun, Nov 26, 2017, Ulrich Lauther wrote: > > why do we have to use "ROMAN" and not "ROMAN ", which would be easier > > to process? > > Historical reasons? > > Yep. :) >

Re: [groff] A few issues with mom's LIST macros

2017-11-26 Thread Ulrich Lauther
On Sun, Nov 26, 2017 at 03:04:29PM -0500, Peter Schaffter wrote: > Ulrich -- > > On Sun, Nov 26, 2017, Ulrich Lauther wrote: > > 2) if ROMAN or roman is used without a trailing number, e.g., ROMAN instead > > of ROMAN7, > >the command ".tm1 "[mom]:

[groff] A few issues with mom's LIST macros

2017-11-26 Thread Ulrich Lauther
Hi all, working with the LIST macros I came across these issues: 1) besides BULLET, DASH, USER, etc. also "PLAIN" can be used. However, this is not mentioned in the documentation. 2) if ROMAN or roman is used without a trailing number, e.g., ROMAN instead of ROMAN7, the command ".tm1 "[mo

Re: [groff] infinite loop with groff + mom

2017-11-24 Thread Ulrich Lauther
On Fri, Nov 24, 2017 at 11:49:51AM -0500, Peter Schaffter wrote: > On Fri, Nov 24, 2017, Ulrich Lauther wrote: > > However, the file mom-2.2-a.tar.gz is NOT a gzipped tar file. It is just > > plain tar: > > > > file mom-2.2-a.tar.gz gives: > > > &

Re: [groff] infinite loop with groff + mom

2017-11-24 Thread Ulrich Lauther
On Thu, Nov 23, 2017 at 10:00:22PM -0500, Peter Schaffter wrote: > On Thu, Nov 23, 2017, Ulrich Lauther wrote: > > Sorry, but I can't find that tarball. On > > http://www.schaffter.ca/mom/mom-05.html I see > > My apologies. The tarball has been uploaded and the li

Re: [groff] infinite loop with groff + mom

2017-11-23 Thread Ulrich Lauther
On Thu, Nov 23, 2017 at 12:10:14PM -0500, Peter Schaffter wrote: > Ulrich -- > > > I'm not seeing this behaviour in your file with version 2.2-a, which > I just patched to fix this very problem (missing .mk request in > PRINT_FOOTER). Have you updated? The patched version is in the > repo and

[groff] infinite loop with groff + mom

2017-11-23 Thread Ulrich Lauther
Hi all, I process the file below with groff -Tps -k -mom -P-pa4 test.mom > /tmp/out.ps and get test.mom:74: fatal error: input stack limit exceeded (probable infinite loop) I get one page of output with center and right part of the footer at the top(!) and left part at the bo

Re: [Groff] What does the "-u" in ".tmac-u" mean?

2017-11-05 Thread Ulrich Lauther
On Sun, Nov 05, 2017 at 11:32:10AM +0100, oe wrote: > Am 05.11.2017 um 11:11 schrieb Ralph Corderoy: > > Hi, > > > > Werner wrote: > > > Branden wrote: > > > > I move that we stop stripping the files. Stripping them is saving > > > > us only a few hundred kB out of 25 megs. > > > It's not about s

Re: [Groff] Converting very small file into .dvi

2014-12-31 Thread Ulrich Lauther
On Tue, Dec 30, 2014 at 10:26:00PM +0100, Grégoire Babey wrote: > Thank you Tadziu, I was using gedit with utf-8. > > Thank you Werner. Using -k, the error message is still there. > It doesn't matter, using dvips, I could turn the dvi-file into .ps. > > maybe, you should inspect yor input file

Re: [Groff] Question about .substring

2014-11-19 Thread Ulrich Lauther
On Wed, Nov 19, 2014 at 05:24:22PM +, Ralph Corderoy wrote: > Hi Steffen, > > > > > Replace the string named xx with the substring defined by > > > > the indices n1 and n2. > The full documentation of .substring wasn't originally given. > > -- Request: .substring str n1 [n2] >

Re: [Groff] [bug #43569] Fix for compile warnings with gcc 4.6.3

2014-11-10 Thread Ulrich Lauther
On Mon, Nov 10, 2014 at 10:07:01AM +, anonymous wrote: From: anonymous Subject: [bug #43569] Fix for compile warnings with gcc 4.6.3 "anonymous" was me. Failed to log in first. Sorry, ulrich

Re: [Groff] GNU troff version 1.22.3

2014-11-06 Thread Ulrich Lauther
On Wed, Nov 05, 2014 at 11:00:50AM +0100, Werner LEMBERG wrote: > > >> groff 1.22.3 has been released. > >> > > First, thanks a lot! > > > > Should groff compile with gcc version 4.6.3 without warnings? > > I guess the answer is no. There are some warnings here and there, and > I haven't found

Re: [Groff] GNU troff version 1.22.3

2014-11-05 Thread Ulrich Lauther
On Wed, Nov 05, 2014 at 09:15:54AM +0100, Werner LEMBERG wrote: > > groff 1.22.3 has been released. > First, thanks a lot! Should groff compile with gcc version 4.6.3 without warnings? Cheers, ulrich

Re: [Groff] PDF_IMAGE and MOM

2014-11-02 Thread Ulrich Lauther
On Sun, Nov 02, 2014 at 11:45:48AM +0100, mikkel meinike wrote: > > #Removes the file extension so I only have the base name > > rose=`echo "$1" |sed 's/.pnm//'` > A simpler way: rose=${1%.pnm} Cheers, ulrich

Re: [Groff] order of PRINTSTYLE and other requests in mom

2014-10-05 Thread Ulrich Lauther
On Sun, Oct 05, 2014 at 04:37:40PM -0400, Peter Schaffter wrote: > Ulrich -- > > On Sun, Oct 05, 2014, Ulrich Lauther wrote: > > BTW, there are two typos: > > will not changes mom’s default paper size to A4, nor her > > default document leading 14 points, whereas &g

Re: [Groff] order of PRINTSTYLE and other requests in mom

2014-10-05 Thread Ulrich Lauther
On Sun, Oct 05, 2014 at 01:25:54AM -0400, Peter Schaffter wrote: > Ulrich -- > > PRINTSTYLE requires page dimensions in order to set the margins, > and uses whatever is in effect. PAGEWIDTH, PAGELENGTH and PAPER > can, in fact, come before PRINTSTYLE. However, I'm averse to the > word "except" i

[Groff] order of PRINTSTYLE and other requests in mom

2014-10-04 Thread Ulrich Lauther
Hi, the mom-docu says: As mentioned above, PRINTSTYLE TYPESET must come before any changes to mom’s default typographic settings. For example, .PAPER A4 .LS 14 .PRINTSTYLE TYPESET will not changes mom’s default paper size to A4, nor her default document leading [to] 14 poin

Re: [Groff] understanding groff's source code

2014-09-29 Thread Ulrich Lauther
On Mon, Sep 29, 2014 at 09:05:48AM +0100, Ralph Corderoy wrote: > Hi Ulrich, > > > In case of questions, should one ask on the list > > I'd say ask here; answers would be part of the public record. These > answers are all based on a quick look; I don't know they're correct. > > > However, not

[Groff] understanding groff's source code

2014-09-28 Thread Ulrich Lauther
Hi, I am trying to read and understand groff source code, which is - at least for me - not easy. In case of questions, should one ask on the list or are there specialists who are able and willing to help? An example: In input.cpp there is a linked list class "node_list". Member functions are n

Re: [Groff] new automake system

2014-09-26 Thread Ulrich Lauther
On Fri, Sep 26, 2014 at 10:52:49AM +0200, Bertrand Garrigues wrote: > Hi Ulrich, > > > This may be a fault on my side, > > No, you found a bug ... > > > not to use "make clean" after changing the prefix; or missing > > dependencies? > > The groff binary is not rebuilt, because defs.h was not r

Re: [Groff] new automake system

2014-09-26 Thread Ulrich Lauther
On Fri, Sep 26, 2014 at 10:52:49AM +0200, Bertrand Garrigues wrote: > Hi Ulrich, > > > No, you found a bug ... > > > not to use "make clean" after changing the prefix; or missing > > dependencies? > > The groff binary is not rebuilt, because defs.h was not regenerated, and > thus defs.h still h

Re: [Groff] new automake system

2014-09-25 Thread Ulrich Lauther
On Thu, Sep 25, 2014 at 01:13:19AM +0200, Bertrand Garrigues wrote: > Hi Ulrich, > Hm ... I see no obvious mistake in your commands, and could not > reproduce the problem. I have no idea of what's going on. Could you > please apply the attached patch to trace the error we have when > attempting to

Re: [Groff] new automake system

2014-09-24 Thread Ulrich Lauther
On Mon, Sep 22, 2014 at 01:17:39AM +0200, Bernd Warken wrote: > I would improve your install commands a bit into: > > test -d old && rm -rf old > test -d groff && mv groff old > git clone git://git.savannah.gnu.org/groff.git > cd groff > git checkout automake2 > ./bootstrap > mkdir build > cd buil

Re: [Groff] new automake system

2014-09-22 Thread Ulrich Lauther
On Mon, Sep 22, 2014 at 01:17:39AM +0200, Bernd Warken wrote: > > I would improve your install commands a bit into: > > test -d old && rm -rf old > test -d groff && mv groff old > git clone git://git.savannah.gnu.org/groff.git > cd groff > git checkout automake2 > ./bootstrap > mkdir build > cd

Re: [Groff] PDFPIC macro

2014-09-21 Thread Ulrich Lauther
rchives/PDFReference.pdf Deri also gave some hints on the structure of pdf documents, which he might post to the list. > Regards, ulrich -- -lauther

Re: [Groff] Overview, Sept. 2014

2014-09-11 Thread Ulrich Lauther
On Thu, Sep 11, 2014 at 05:46:22PM -0400, James K. Lowden wrote: [ ... ] > If by "all about" Urich meant a sentence or two, sure, a comment block > is fine. If by "all about" he meant a description of the semantics of > the public interface (which is what I thought he meant) then ISTM that > belon

Re: [Groff] Overview, Sept. 2014

2014-09-11 Thread Ulrich Lauther
On Thu, Sep 11, 2014 at 01:11:40PM -0400, James K. Lowden wrote: > On Wed, 10 Sep 2014 11:49:37 +0200 > Ulrich Lauther wrote: > > > other modifications would really > > improve readability and maintainability: > > - capitalization of class names > >

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 10:16:47PM +0200, Werner LEMBERG wrote: > > > I may have to look into this C++ stuff. I have only written C and I > > have not figured out how to write multi-threaded applications > > without global variables. And I make good use of goto and > > longjmp. Apps would be a lot

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 08:02:30PM +0200, Werner LEMBERG wrote: > > > The problem with global variables is their long range effect, > > comparable with the infamous goto statement: considered harmful. > > I like `goto' a lot, and it is an invaluable instruction if used with > care. Yes, e.g., for

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 01:23:41PM +0200, Werner LEMBERG wrote: > > >> Additionally, `git blame' would become much more inconvenient to > >> use. > > > > I am not familiar with git and git blame, used cvs in my active > > time. Could you explain, what the problem with upper case class > > names

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 05:29:13PM +0200, Ingo Schwarze wrote: > Hi Ulrich, > > Ulrich Lauther wrote on Wed, Sep 10, 2014 at 01:01:37PM +0200: > > On Wed, Sep 10, 2014 at 12:16:06PM +0200, Werner LEMBERG wrote: > > >> Additionally, `git blame' would beco

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 03:55:12PM +0200, Werner LEMBERG wrote: > > > Because it consumes space in BSS, or DATA -- and then even causing > > linker work upon loading time, even if never used. > > A program with a DATA section is shit ;) > > Well, I don't care :-) groff uses static constructors to

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
On Wed, Sep 10, 2014 at 12:16:06PM +0200, Werner LEMBERG wrote: > > > you may be right about setter()/getter() usage; > > He is definitely right! :-) > > > other modifications would really improve readability and > > maintainability: > > - capitalization of class names > > - a na

Re: [Groff] Overview, Sept. 2014

2014-09-10 Thread Ulrich Lauther
comments explaining what the class is all about > Cheers, ulrich -- -lauther

Re: [Groff] Formatting algorithm, an experiment

2014-06-28 Thread Ulrich Lauther
On Fri, Jun 27, 2014 at 08:06:38PM +0200, Steffen Nurpmeso wrote: > Hello Ulrich, > [ ... ] > (But again, i personally never had a problem with the typesetting > quality of troff (with the TeX-borrowed German hyphenation > enabled), proof-reading provided -- the German translation of > K & R "Prog

Re: [Groff] Formatting algorithm, an experiment

2014-06-27 Thread Ulrich Lauther
On Fri, Jun 27, 2014 at 03:43:24PM +0200, Steffen Nurpmeso wrote: > > Oh, after fiddling with unsupported linker options etc. to compile > the showcase i got a SIGBUS. You know, as in "Bus stop, wet day, > she's there" etc. Only the umbrella is still missing. > Ciao, > > --steffen Not clear to

Re: [Groff] Formatting algorithm, an experiment

2014-06-26 Thread Ulrich Lauther
In the meantime I have send the tgz-file directly to Dough, not to the list, and he was able to read it. Waiting for comments, ulrich

Re: [Groff] Three topics related to images

2014-06-20 Thread Ulrich Lauther
On Fri, Jun 20, 2014 at 11:49:51AM +0200, Tadziu Hoffmann wrote: > > > It looks like -mm but the misalignment doesn't happen when > > I try it. > > Ulrich: Perhaps then the bounding box of one of the pictures is > wrong? Does it also happen if you use the same picture twice? > Sorry, it was my

Re: [Groff] My way to run preprosessors and to set options

2014-06-19 Thread Ulrich Lauther
On Thu, Jun 19, 2014 at 10:33:01PM +0200, Bernd Warken wrote: > > Von: "Ulrich Lauther" > > > .\" tbl eqn lnd > > I understand that `lnd' has to do with `landscape'. > Is that something useful for `groff' or `mm'? > Where did you ge

Re: [Groff] Three topics related to images

2014-06-19 Thread Ulrich Lauther
On Thu, Jun 19, 2014 at 03:40:42PM +0200, mikkel meinike wrote: > Hello all > I have during the past two years become increasingly groff user or perhaps > more specifick mom uses. I try as much as possible to stick to one macro > package to keep my text setting life as simple as possible. I am a hu

Re: [Groff] My way to run preprosessors and to set options

2014-06-19 Thread Ulrich Lauther
On Wed, Jun 18, 2014 at 10:48:51AM +0200, Bernd Warken wrote: > > No, I am not (yet?) a groff contributer. But I could publish my script, if > > there is general interest. > > Please publish your script! The implementation in `grog' would be very easy. > But `groff.cpp' > needs C++, which is s

[Groff] My way to run preprosessors and to set options

2014-06-17 Thread Ulrich Lauther
On Tue, Jun 17, 2014 at 11:13:26PM +0200, Bernd Warken wrote: > > Von: "Ulrich Lauther" > > > > The way I handle preprocessors and other options, is, to put them into a > > (pseudo-) comment > > in the first line of a document, like e.g.: > &g

Re: [Groff] groff variable for ideal

2014-06-17 Thread Ulrich Lauther
On Mon, Jun 16, 2014 at 11:24:46PM +0100, Ralph Corderoy wrote: > Hi Bernd, > > > A `groff' option for running the `gideal' preprocessor is needed. > > Only once the preprocessor has a significant enough audience to make it > worthwhile? Meanwhile, it can continue to be explicitly pipelined? >

Re: [Groff] Formatting algorithm, an experiment

2014-05-28 Thread Ulrich Lauther
On Mon, Mar 31, 2014 at 07:44:07PM -0400, Peter Schaffter wrote: > Here's the bare bones version of the algorithm I was thinking of > when I proposed improving line formatting by getting groff to > shoulder the burden for some of the work we do manually. It's > written out in brute-force pseudo-co

Re: [Groff] [groff] Formatting algorithm

2014-05-09 Thread Ulrich Lauther
On Fri, May 09, 2014 at 01:12:14PM +0100, Roger Leigh wrote: > On Fri, May 09, 2014 at 01:07:02PM +0200, Ulrich Lauther wrote: > > On Fri, May 09, 2014 at 10:48:08AM +0100, Denis M. Wilson wrote: > > > The method used in TeX is the shortest path in a directed acyclic graph. &g

Re: [Groff] [groff] Formatting algorithm

2014-05-09 Thread Ulrich Lauther
On Fri, May 09, 2014 at 10:48:08AM +0100, Denis M. Wilson wrote: > The method used in TeX is the shortest path in a directed acyclic graph. > This is a well-understood problem. There seems unfortunately to be > nothing useful in the STL. The DAG would need to be a new data type. > To build and use

Re: [Groff] [groff] Formatting algorithm

2014-05-09 Thread Ulrich Lauther
On Thu, May 08, 2014 at 04:17:16PM -0400, Doug McIlroy wrote: [...] > I fully agree with the first paragraph. However, as there is essentially no > limit on the amount (or kind) of path-dependent state that may be needed > to calculate each partial solution, I see forking as the easiest way to > im

Re: [Groff] Formatting algorithm

2014-05-06 Thread Ulrich Lauther
On Sun, May 04, 2014 at 02:59:19PM -0400, Doug McIlroy wrote: > > I don't see why any forking should be needed. > > I am all ears. I'd love to know a better way to cope with events > that are triggered by line breaks, when several different potential > line breaks are in play, as were discussed i

Re: [Groff] Formatting algorithm

2014-05-03 Thread Ulrich Lauther
was not known. Dynamic programming can be quite fast and I don't see why any forking should be needed. ulrich lauther

Re: [Groff] Formatting algorithm

2014-04-24 Thread Ulrich Lauther
On Wed, Apr 23, 2014 at 07:30:34PM -0400, Peter Schaffter wrote: > On Wed, Apr 23, 2014, Ted Harding wrote: > > I think some confusion is possibly arising here. See in-line below. > > > > > Doesn't a paragraph logically conclude at any request which introduces a > > > break? Or invocation of any m

Re: [Groff] Formatting algorithm

2014-04-22 Thread Ulrich Lauther
On Tue, Apr 22, 2014 at 12:04:27PM -0400, Peter Schaffter wrote: > Ulrich -- > > But maybe just implementing "read NextWord" is the difficulty? > > After adjusting and breaking a line, groff holds remaining > input-line text as a partially-filled line, so reading NextWord is > at least theoretical

Re: [Groff] Formatting algorithm

2014-04-14 Thread Ulrich Lauther
lable, it's easy to collect the paragraph: while (! paragraph ends) { read NextWord; store NextWord in paragraph_buffer; } But maybe just implementing "read NextWord" is the difficulty? ulrich -- -lauther

Re: [Groff] Formatting algorithm

2014-04-14 Thread Ulrich Lauther
vided a clean interface and input/output specifications are available I would volunteer to implement the dynamic programming (KP) variant. Kind regards, ulrich lauther

Re: [Groff] mission statement 3

2014-03-30 Thread Ulrich Lauther
sults. The description of the algorithm takes only about 5 pages and is not hard to understand for someone familiar with dynamic programming. ulrich lauther

Re: [Groff] Letterspacing

2014-03-30 Thread Ulrich Lauther
t; > whole paragraph. > > It might be useful to investigate if not minimizing the maximum demerits would give even better results than minimizing their (squared) sum. This should easily fit into the dynamic programming framework. ulrich lauther

[Groff] mom: line spacing within a list ITEM

2013-11-21 Thread Ulrich Lauther
When the text of an ITEM needs more than one line, the spacing beetween these lines is larger than that of running text outside the list. (I am not talking about line space between items, but inside an item). Is this behaviour intended? If so, why? Can I change it? (This is a difference to lists

Re: [Groff] question about .rs and .nop

2013-09-03 Thread Ulrich Lauther
On Tue, Sep 03, 2013 at 01:40:31PM -0400, Peter Schaffter wrote: > On Tue, Aug 27, 2013, Ulrich Lauther wrote: > > However, when the user explicitely requests a new page, this seems > > not to be needed: he/she knows that following text goes to a new page > > and should b

Re: [Groff] question about .rs and .nop

2013-08-26 Thread Ulrich Lauther
ly. Any suggestion for a clean solution? Nice would be a parameter to NEWPAGE that suppresses the nospace behaviour. BTW, I never understood why the formatting macro packages don´t like the user to put space at the top of their pages. Cheers, ulrich lauther

Re: [Groff] question about .rs and .nop

2013-08-26 Thread Ulrich Lauther
On Mon, Aug 26, 2013 at 01:21:34AM +0200, Werner LEMBERG wrote: > > >> The groff manual says: > >> > >> .rs Restore spacing; turn no-space mode off. > >> > >> However, > >> .rs > >> .sp 3 > >> does not work; one has to output some text first, to get .sp to > >> work. > > I don't under

Re: [Groff] question about .rs and .nop

2013-08-25 Thread Ulrich Lauther
s process anything. > > > > What is this request good for? > > It's good for things like > > .rs > .nop \& > .sp 3 > > which is offers a solution to the .rs/.sp problem when you don't > want "actual text" to be output before the sp request. > and what´s the difference to .rs \& .sp 3 ? Cheers, ulrich lauther

[Groff] question about .rs and .nop

2013-08-24 Thread Ulrich Lauther
The groff manual says: .rs Restore spacing; turn no-space mode off. However, .rs .sp 3 does not work; one has to output some text first, to get .sp to work. Is this a bug in groff, or in its documentation? What is the rationale for this behaviour? About the .nop request: .nop anyth

[Groff] mom and .AUTOLEAD

2013-08-24 Thread Ulrich Lauther
Hi all, .AUTOLEAD seems to work only if given AFTER .START Proof: .PRINTSTYLE TYPESET .FAMILY N .FONT R .PT_SIZE 12 .AUTOLEAD 3 .START .LEFT pt_size set to 12 pt_size = \n[#PT_SIZE], lead = \n[#LEAD] .PT_SIZE 24 pt_size set to 24 pt_size = \n[#PT_SIZE], lead = \n[#LEAD] .AUTOLEAD 3 .PT_SIZE 12

Re: [Groff] Problem with mom and multipage table

2013-08-23 Thread Ulrich Lauther
On Fri, Aug 23, 2013 at 01:22:58PM +0200, Werner LEMBERG wrote: > > When I use the mom macros, in a multi page table, the first two > > lines on each output page are printed without vertical spacing, > > i.e. on top of each other. > > Example, please. > > I attach a small example and the output

[Groff] Problem with mom and multipage table

2013-08-23 Thread Ulrich Lauther
: page 46: table text block will not fit on one page warning: page 47: table text block will not fit on one page warning: page 48: table text block will not fit on one page ) Best, ulrich lauther

[Groff] Explanation for .BP ?

2013-03-05 Thread Ulrich Lauther
(I tried to send this via the forum interface, but got HTTP error 550) To generate a page break within a table, one is supposed to use .de BP . ie ’\\n(.z’’ .bp \\$1 . el \!.BP \\$1 .. Could some kind soul explain the working of this macro? The else branch looks like a recursve call. And why

[Groff] mm-macros: page break too early after list

2013-03-05 Thread lauther
a short question about the mm-macros (1.20.1): I have sometimes the problem, that a list triggers a page break too early, e.g. when a list or a picture would easily fit onto the page. I circumvent this in this way: .ch pg@footer .BL [any stuff here] .LE .

[Groff] Explanation for .BP ?

2013-03-05 Thread lauther
To generate a page break within a table, one is supposed to use .de BP . ie ’\\n(.z’’ .bp \\$1 . el \!.BP \\$1 .. Could some kind soul explain the working of this macro? The else branch looks like a recursive call. And why does plain .bp not work? Thanks for enlightenment, ulrich -- View th

[Groff] Explanation for .BP ?

2013-03-05 Thread Ulrich Lauther
(I tried to send this via the nabble forum interface, but got HTTP error 500) To generate a page break within a table, one is supposed to use .de BP . ie ’\\n(.z’’ .bp \\$1 . el \!.BP \\$1 .. Could some kind soul explain the working of this macro? The else branch looks like a recursive call.

[Groff] mm-macros, page break too early

2013-03-05 Thread Ulrich Lauther
lauther

[Groff] mm-macros: page break too early after list

2013-03-05 Thread lauther
short question about the mm-macros (1.20.1): I have sometimes the problem, that a list triggers a page break too early, e.g. when a list or a picture would easily fit onto the page. I circumvent this in this way: .ch pg@footer .BL [any stuff here] .LE .wh