Re: Title woes with mm

2023-12-16 Thread Oliver Corff

Hi Damian,

not long after yesterday's question I went to sleep. This morning I woke
up thinking "why bother with the macros, just do the layout yourself",
and in the meantime you had written. Your answer was exactly what I
wanted to do.

Thank you very much!

Best regards,

Oliver.

On 17/12/2023 03:56, Damian McGuckin wrote:

On Sun, 17 Dec 2023, Oliver Corff wrote:


2. Is there a realistic chance to add an authors' affiliation line
   somewhere, or should I include this information, as a work-around in
   abstract block?


Some of us skip the cover sheet stuff and just spell it out. E.g.

.\" kill Header on first page
.PH ""
.\" DOCUMENT TITLE in a Display
.\"
.DS 2
.S 21 25
.\"
.\" force non-empty blank line
.\"
\&
.SP 2
.ft HB
Title which can sometimes
go over more than one line
.SP 2
.S 15 19
Author's names
Author's Affiliations
Anything else about authors
Report Date and Number
.SP 2
.S 11 13
.ft P
.SP 4
.DE
.\" Local String definitions
.\" 
.\" Local Macro definitions
.\" 
.\"
.\" ABSTRACT
.\"
.ce
.B ABSTRACT
.SP
The abstract text.
.SP 2
.\"
.\" Put Page Header back on
.\"
.PH "'Left Text'Centre Text'Right Text'"

.\"
.\" the start of the document proper
.\"
.H 1


--
Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
GERMANY
Tel.: +49-30-85727260
mailto:oliver.co...@email.de




Re: Title woes with mm

2023-12-16 Thread Damian McGuckin

On Sun, 17 Dec 2023, Oliver Corff wrote:


2. Is there a realistic chance to add an authors' affiliation line
   somewhere, or should I include this information, as a work-around in
   abstract block?


Some of us skip the cover sheet stuff and just spell it out. E.g.

.\" kill Header on first page
.PH ""
.\" DOCUMENT TITLE in a Display
.\"
.DS 2
.S 21 25
.\"
.\" force non-empty blank line
.\"
\&
.SP 2
.ft HB
Title which can sometimes
go over more than one line
.SP 2
.S 15 19
Author's names
Author's Affiliations
Anything else about authors
Report Date and Number
.SP 2
.S 11 13
.ft P
.SP 4
.DE
.\" Local String definitions
.\" 
.\" Local Macro definitions
.\" 
.\"
.\" ABSTRACT
.\"
.ce
.B ABSTRACT
.SP
The abstract text.
.SP 2
.\"
.\" Put Page Header back on
.\"
.PH "'Left Text'Centre Text'Right Text'"

.\"
.\" the start of the document proper
.\"
.H 1



Re: Is there a Groff showcase?

2023-12-16 Thread Richard Morse
Hi! Sorry, I can’t find the start of this thread, but this was posted last year?


https://github.com/Allfifthstuning/awesome-groff-user-macrosets.git


Title woes with mm

2023-12-16 Thread Oliver Corff

Dear All,

I can produce a near approximation of an article title with the mm macro
.MT 4, but there are two problems.

1. The authors appear at the top edge of the paper --- see included
example. I tried several means, like inserting .SP, to no avail.

2. Is there a realistic chance to add an authors' affiliation line
somewhere, or should I include this information, as a work-around in
abstract block?

I tried to manipulate the order of macros at the bottom of
../tmac/mm/4.MT just to see whether I could flip title and author lines,
but the output remained unchanged.

My ideal order would be

Title
Authors
Authors' Affiliations
Abstract

Thank you for your enlightenment,

Oliver.


--
Dr. Oliver Corff
mailto:oliver.co...@email.de
.\" mso de.tmac
.nr Hy 1
.nr N 2
.PH "''- % -'Ind Hlth& Occup Dis 2006, Vol. 32, No. 1'"
.TL
Auswirkungen von Lärm in Wärmekraftwerken auf das kardiovaskuläre System von Arbeitskräften
.AF "Some University"
.AU
Lou Shuyan¹
Duan Xiaoyan¹
Li Lianchong²
Wang Hongwei¹
Yang Jinlong¹
Su Dongmei¹
Li Ying³
.AST Zusammenfassung
.AS
Um die Auswirkungen des Lärms von Wärmekraftwerken auf das kardiovaskuläre System der Arbeitskräfte
zu verstehen, wurden 843 Personen, die Lärm ausgesetzt waren, als Beobachtungsgruppe ausgewählt,
während 183 Personen, die keinem Lärm ausgesetzt waren, als Kontrollgruppe dienten. Es wurde eine
Untersuchung unter Verwendung von Methoden wie Umgebungslärmmessungen und berufsbezogenen
Gesundheitsuntersuchungen durchgeführt. Die statistische Analyse konzentrierte sich auf Blutdruckwerte
und Elektrokardiogramme. Die Ergebnisse zeigen, dass der Mittel- und Hochfrequenzlärm in einem
Wärmekraftwerk Auswirkungen auf das kardiovaskuläre System der Arbeitskräfte hat. Dies äußert sich
hauptsächlich in einer signifikant höheren Rate von Bluthochdruck und auffälligen Ergebnissen in der
Elektrokardiographie im Vergleich zur Kontrollgruppe ($P < 0.01$). Im Vergleich zur Kontrollgruppe wurde
eine deutliche Zunahme der Detektionsrate von sinuatrialer Arrhythmie und sinuatrialer Bradykardie in der
Beobachtungsgruppe festgestellt (P<0.01), ebenso wie vermehrte Anzeichen von Myokardischämie,
Veränderungen in der ST-Strecke und der T-Welle (P<0.05).
.br
.B Schlüsselwörter:
.R
Wärmekraftwerk; Arbeit unter Lärmbelastung; kardiovaskuläres System 
.AE
.MT 4


Botched_Title.pdf
Description: Adobe PDF document


Re: Proper or correct way to display tables, figures, illustrations

2023-12-16 Thread Oliver Corff

Thank you for this hint, too!

Oliver.

On 16/12/2023 22:17, Damian McGuckin wrote:

On Sat, 16 Dec 2023, Oliver Corff wrote:


wonderful! That does the trick. I had been digesting the mm manual page
this afternoon, however .TB somehow managed to evade my attention.


The

.TC

table of contents macro automatically summarizes them at the end of
the document.

- Damian


--
Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
GERMANY
Tel.: +49-30-85727260
mailto:oliver.co...@email.de




Re: Proper or correct way to display tables, figures, illustrations

2023-12-16 Thread Damian McGuckin

On Sat, 16 Dec 2023, Oliver Corff wrote:


wonderful! That does the trick. I had been digesting the mm manual page
this afternoon, however .TB somehow managed to evade my attention.


The

.TC

table of contents macro automatically summarizes them at the end of the 
document.


- Damian



Re: Is there a Groff showcase?

2023-12-16 Thread Robert Thorsby

On 17/12/23 06:57, Peter Schaffter wrote:

On Sat, Dec 16, 2023, Mike wrote:

Is there a website where the various document layouts and visual
capabilities of groff are displayed?


If such a website were to exist, it should be divided into
categories by the primary macro set used, with an additional
category "pure groff" for user-written DIY solutions.  The mom
macros, for example, handle everything in your list with ease
(except text around images/quotes), but it would be misleading to
post a mom example as *the* way to accomplish something with groff.
Take margin notes.  If using mom, they are added with the MN macro.
If using ms, they require Werner Lemberg's standalone margin notes
macros.  Showing "that groff can do this" isn't really useful;
groff can handle just about any typographic challenge.  Showing
examples of *the ways it can be done* strikes me as better.


I cannot agree more. One of the problems I see with "newcomers" asking 
innocent questions is that they have usually tried to do what they want 
by using an existing macro set (usually ms or mm, rarely mom). I believe 
that they do so in the belief that they *have to use a macro set* and 
mom has slipped under their radar because it is so new (how many 
decades, Peter?).


Further, the OPs are often unaware that they can use (with caution) more 
than one macro set.


Now for my radical suggestion, over my first cup of coffee on what looks 
to be a scorcher of a Sunday here on the East Coast of AU. Tell the 
newbies to create environments, diversions, defined strings, and number 
registers, and tell them to use CamelCase when doing so. By using 
CamelCase (which is generally regarded by real programmers as not fit 
for human consumption) they will not stuff up anything important written 
by the gurus. Encourage the OPs to post their efforts on the list (which 
they will probably do anyway as they seek advice) -- as a final step the 
suggestion may be made that they rename MyBrilliantDiversion to ... .


Everyone benefits. I know, because the advice and help that I have 
received from the list has helped me achieve results that I could never 
have pulled off by myself. But I still use CamelCase!!!


Robert
You miss 100% of the shots you never take.
  -- Wayne Gretzky, advice from his father



Re: Proper or correct way to display tables, figures, illustrations

2023-12-16 Thread Oliver Corff

Hi Damian,

wonderful! That does the trick. I had been digesting the mm manual page
this afternoon, however .TB somehow managed to evade my attention.

Best regards,

Oliver.


On 16/12/2023 22:08, Damian McGuckin wrote:

On Sat, 16 Dec 2023, Oliver Corff wrote:


What is the canonical way to display a title/and or small caption (like
"Table 1: Distribution of Events over Time")?


.TB "Dictribution of Events over Time"

See "man groff_mm"

Regardss - Damian


--
Dr. Oliver Corff
mailto:oliver.co...@email.de




Re: Proper or correct way to display tables, figures, illustrations

2023-12-16 Thread Damian McGuckin

On Sat, 16 Dec 2023, Oliver Corff wrote:


What is the canonical way to display a title/and or small caption (like
"Table 1: Distribution of Events over Time")?


.TB "Dictribution of Events over Time"

See "man groff_mm"

Regardss - Damian



Re: Is there a Groff showcase?

2023-12-16 Thread Peter Schaffter
On Sat, Dec 16, 2023, Mike wrote:
> My original thought was:
> 
> Is there a website where the various document layouts and visual
> capabilities of groff are displayed?
> 
> - Drop caps
> - Text in the margin
> - Text around an image or quote
> - Graphical title pages
> - Background images
> - Coloured backgrounds
> - Custom bullet points
> - Coloured text boxes
> - Custom paper sizes
> ...

I've been following this thread silently.  Time to chime in.

If such a website were to exist, it should be divided into
categories by the primary macro set used, with an additional
category "pure groff" for user-written DIY solutions.  The mom
macros, for example, handle everything in your list with ease
(except text around images/quotes), but it would be misleading to
post a mom example as *the* way to accomplish something with groff.
Take margin notes.  If using mom, they are added with the MN macro.
If using ms, they require Werner Lemberg's standalone margin notes
macros.  Showing "that groff can do this" isn't really useful;
groff can handle just about any typographic challenge.  Showing
examples of *the ways it can be done* strikes me as better.
 
> Has anyone achieved flowing text around an image or text box, I
> would love to know? (I have seen discussion on this topic, but no
> examples).

To my knowledge, no one has achieved this with any degree of
robustness.  I can be done "by hand" on a case-by-case basis, but I
doubt that's what you want.  I've made several stabs at it
but have never come up with a solution sturdy enough to go into the
mom macros.  Left or right aligned images/quotes don't present much
of a problem for floating text, neither do columns with cutouts for
images.  However, floating justified text around an image is a whole
'nother ball of wax.

-- 
Peter Schaffter
https://www.schaffter.ca



Proper or correct way to display tables, figures, illustrations

2023-12-16 Thread Oliver Corff

Dear All,

currently I am working on a large translation, the text contains a
number of illustrations, figures and tables.

I am using the macro package mm.

What is the canonical way to display a title/and or small caption (like
"Table 1: Distribution of Events over Time")?

In my earlier work, I used to hard-code the table title directly into
the table definition, but I do not know whether this is the preferred way.

The UTP Manual does not elaborate on these issues --- probably because
this is a question of style rather than technical functionality, I assume.

Thanks a lot for any clarification,

Oliver.


--
Dr. Oliver Corff
Wittelsbacherstr. 5A
10707 Berlin
GERMANY
Tel.: +49-30-85727260
mailto:oliver.co...@email.de




Re: Groff hdtbl tables disappear near the footer

2023-12-16 Thread Bjarni Ingi Gislason
  There are bugs in "page-a.ms".  The last one is for a trailing
space.

  Found by using the options "-ww -b -z" (except the trailing
space) and patched HDTBL macros.

--- page-a.ms   2023-12-16 17:42:06.0 +
+++ page-a.new.ms   2023-12-16 18:06:58.0 +
@@ -3,7 +3,7 @@
 ..
 \Z'\
 \h'-1i'\v'10.52i'\
-\X'ps: import floral-border.eps 0 0 595 842 594000'
+\X'ps: import floral-border.eps 0 0 595 842 594000''
 .so macros.ms
 \#.fam source
 .sp -.5c
@@ -21,10 +21,10 @@
 \Z'\v'0.5m'\D'P 0 -1.7m \n[bwd]u 0 0 1.7m -\n[bwd]u 0'\v'-0.5m''\
 \X'ps: exec 1 setgray'\0with Open Source Software\0
 \Z'\
-
+'
 \#.PSPIC -C page-symbol.eps 2i
 .LP
-\*[DGREY]\f[B]Duis ac purus elementum, posuere metus nec, porttitor mauris 
aliquam scelerisque lacus ultrice.\f[R] Sollicitudin libero a, iaculis augue. 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc. 
+\*[DGREY]\f[B]Duis ac purus elementum, posuere metus nec, porttitor mauris 
aliquam scelerisque lacus ultrice.\f[R] Sollicitudin libero a, iaculis augue. 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc.
 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam condimentum 
luctus urna vel sodales. Etiam leo justo, lacinia id vehicula eu, facilisis sit 
amet nunc. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam 
condimentum luctus urna vel sodales.
 .br
 .po .93i



Re: gropdf : missing colour when used with HDTBL macros

2023-12-16 Thread Bjarni Ingi Gislason
On Thu, Dec 14, 2023 at 11:02:50PM +, Deri wrote:
> On Thursday, 14 December 2023 22:35:26 GMT Bjarni Ingi Gislason wrote:
> >   File examples in
> > 
> > https://list.gnu.org/archive/html/groff/2023-12/msg00013.html
> > 
> > with subject "Groff hdtbl tables disappear near the footer".
> > 
> >   /usr/bin/groff -Tpdf -ms -mhdtbl hdtbl-issue.ms > hdtbl-issue.pdf
> > 
> >   Output does not have a "coloured" header "Professional
> > Experience" (but black on white background) as the PostScript
> > output file.
> > 
> > -.-.
> > 
> > /usr/bin/groff -Tpdf --version:
> > 
> > GNU groff version 1.23.0
> > Copyright (C) 2022 Free Software Foundation, Inc.
> > [...]
> > called subprograms:
> > 
> > GNU troff (groff) version 1.23.0
> > GNU gropdf (groff) version 1.23.0
> 
> Hi Bjarni,
> 
> If you look in hdtbl-issue-macros.ms you will see:-
> 
> .ds ACCENT "\X'ps: exec .1 .3 .6 setrgbcolor'
> .ds GREY "\X'ps: exec .7 .7 .7 setrgbcolor'
> .ds DGREY "\X'ps: exec .3 .3 .3 setrgbcolor'
> .ds RED "\X'ps: exec 1 0 0 setrgbcolor'
> .ds BLUE "\X'ps: exec 0 0 1 setrgbcolor'
> .ds BLACK "\X'ps: exec 0 0 0 setrgbcolor'
> .ds WHITE "\X'ps: exec 1 1 1 setrgbcolor'
> .defcolor textcolor rgb #353535
> .defcolor linecolor rgb #a1a1a1
> 
> The first 7 lines are defined as postscript commands which are not parsed by 
> gropdf. Its man page documents the particular \X'ps: ..." which are 
> understood.
> 
> The last two colours use normal groff colour definitions. I'm not too sure 
> why 
> most of the colours are done as postscript commands, but this sort of 
> postscript used to be the only way to get colours from groff, before Werner 
> added the colour commands, so it may be old code.
> 
> Cheers 
> 
> Deri
> 
> 
> 
  Thanks for this enlightenment.

  Thus, the "gropdf" should warn if it can't complete the
conversion, for example by adding a case where the tag 'ps:' does
not match any processed case.

  The same for any tag, that is not processed.

  And the manual should not state that 
" All other ps: tags are silently ignored."



Re: Is there a Groff showcase?

2023-12-16 Thread Nate Bargmann
Perhaps the author of the site doesn't think it would fit the site's
scope but it seems to me that troff.org would be the most logical site
to host such a gallery.

- Nate

-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819



signature.asc
Description: PGP signature


Re: Is there a Groff showcase?

2023-12-16 Thread Mike
> A showcase as like at a trade show?

> I think it would be better to have easy to understand single topic
prove-of-concepts samples, a bin to throw in and a whatever-grep-
function for searching.

My original thought was:

Is there a website where the various document layouts and visual
capabilities of groff are displayed?

- Drop caps
- Text in the margin
- Text around an image or quote
- Graphical title pages
- Background images
- Coloured backgrounds
- Custom bullet points
- Coloured text boxes
- Custom paper sizes
...

I have found information on technical aspects of groff and people here
have been kind enough to point me toward some useful online resources.

However, I have not seen any resources which focus on the visual
aspects.

This would allow people, including myself, to see at a glance how groff
visually stacks up against word processors, LaTeX and desktop
publishing software. To see if groff is the right choice for their
project.

I am, currently, exploring to find the visual boundaries of the
software and any help from groff users would be appreciated.

Has anyone achieved flowing text around an image or text box, I would
love to know? (I have seen discussion on this topic, but no examples).

Mike