Re: More on writing academic papers

2024-05-22 Thread Thomas Dupond via
Hello Bento,

Damian McGuckin  a écrit :
> Bento,
>
> On Tue, 21 May 2024, Bento Borges Schirmer wrote:
>
>> I think I will stop reproducing templates for conferences for now.
>
> Wise move. I just tweak my standard template every time.
>
>> different template, such as that of ACM!
>
> Mine is close to this.
>
>> That's the entire idea after all, right!? I'll be using defaults for
>> now and worry less.
>
> Very wise move.
>
>> And then, after getting the actual research done and written, I can
>> spend some time tailoring the final print, I hope to find help here :)
>> :) Like how to handle all the ABNT rules for citations and references
>> :(
>
> That is the 'refer' tool. Which is a whole new ball game. I wish I
> understood it better than I do.

Refer is very powerful but may require some tweaking like Hans Bezemer
did to get APA-style citations:

https://www.froude.eu/groff/examples/refer-apa.html

>> Now I'm thinking about writing filters and preprocessors. I dunno if
>> groff or mm provide mechanisms to reference figures and headers,
>> which would be handy. Unless that is the case, I'm thinking about
>> writing small C programs that recognize some commands and count
>> figures and headers and replace text for me when referencing them,
>> something like that. I dunno I dunno. Let's see.
>
> The Table of Contents macro already handles Figures and Tables and
> Headings.  You caption each table and figure with .TB and .FG macros
> respectively/

To add to what Damian said, you could look at page 121 in the Unix
Text Processing book:

http://chuzzlewit.co.uk/utp_book-1.1.pdf

>> Whenever I search for users of groff, people frequently mention
>> computer generated content, such as for business. So I guess troff
>> can be used "directly" by writers, but it also suited to be easy to
>> be... generated?
>
> Yes. We process a database to automatically generate the invoice details
> which is then run through 'groff -mm' to provide the invoice on a
> company letterhead.

Also did an ersatz of this at my previous job to generate numbered
invoices.  The hardest part was finding the company logo in postscript
format :D

-- 
Thomas




Re: More on writing academic papers

2024-05-22 Thread Damian McGuckin

On Wed, 22 May 2024, Thomas Dupond via wrote:

Also did an ersatz of this at my previous job to generate numbered 
invoices.  The hardest part was finding the company logo in postscript 
format :D


In a past life, some of us programmed in Postscript so that solved that
problem.

- Damian



Re: More on writing academic papers

2024-05-22 Thread G. Branden Robinson
At 2024-05-22T09:28:46+0200, Thomas Dupond via wrote:
> Damian McGuckin  a écrit :
> > Yes. We process a database to automatically generate the invoice
> > details which is then run through 'groff -mm' to provide the invoice
> > on a company letterhead.
> 
> Also did an ersatz of this at my previous job to generate numbered
> invoices.  The hardest part was finding the company logo in postscript
> format :D

If you're outputting PDF, you can use groff's `PDFPIC` macro from the
stock "pdfpic.tmac" file to achieve the same end.

https://git.savannah.gnu.org/cgit/groff.git/tree/tmac/pdfpic.tmac?h=1.23.0

Regards,
Branden


signature.asc
Description: PGP signature


Re: More on writing academic papers

2024-05-22 Thread Thomas Dupond via
"G. Branden Robinson"  a écrit :
> At 2024-05-22T09:28:46+0200, Thomas Dupond via wrote:
>> Damian McGuckin  a écrit :
>> > Yes. We process a database to automatically generate the invoice
>> > details which is then run through 'groff -mm' to provide the invoice
>> > on a company letterhead.
>> 
>> Also did an ersatz of this at my previous job to generate numbered
>> invoices.  The hardest part was finding the company logo in postscript
>> format :D
>
> If you're outputting PDF, you can use groff's `PDFPIC` macro from the
> stock "pdfpic.tmac" file to achieve the same end.
>
> https://git.savannah.gnu.org/cgit/groff.git/tree/tmac/pdfpic.tmac?h=1.23.0

Yes!  Tremendous macro file this one.  Although I don’t remember
exactly why I used postscript but I think it is because I compiled in
the default Debian WSL on MS Windows without an admin account.  By
default Debian does not include the full groff package and thus you
cannot output to PDF, only to PS.

Regards,
-- 
Thomas




List within a table using the mm package

2024-05-22 Thread Günther Wollenweber
Hi all,

I'm fairly new to groff and have a question about the mm macro package.

When including a list in a table cell, how can I prevent mm from inserting
a blank vertical space before the first list item and thus completely
disrupt the alignement of the lines?

For instance, the following sample code:

.TS
ll.
Case_1 T{
.AL a 2 1
.LI
Subcase_A
.LI
Subcase_B
.LI
Subcase_C
.LE
T}
.TE

produces this:

Case_1
   a. Subcase_A
   b. Subcase_B
   c. Subcase_C

However, what I want to achieve is this:

Case_1 a. Subcase_A
   b. Subcase_B
   c. Subcase_C

without the additional blank vertical space.

The mm documentation says:

"The spacing between list items may be suppressed for a particular list. If
the last argument to the list initialization macro is the digit 1, a blank
vertical space will not separate the items in the list. However, a blank
vertical space will occur before the first item."

So far, so good, but how can I prevent this from happening?

Thanks in advance for your time!
Günther


Re: List within a table using the mm package

2024-05-22 Thread G. Branden Robinson
Hi Günther,

At 2024-05-23T03:08:22+0200, Günther Wollenweber wrote:
> I'm fairly new to groff and have a question about the mm macro
> package.

Welcome!

> When including a list in a table cell, how can I prevent mm from
> inserting a blank vertical space before the first list item and thus
> completely disrupt the alignement of the lines?

This is one of those relatively rare circumstances where it's necessary
to resort to a *roff request.  I got the desired output by adding an
`ns` request before the `AL` macro call.

Here is my illustration.

.P
This is an
.I mm
document.
.TS
tab(;);
ll.
Case_1;T{
.ns
.AL a 2 1
.LI
Subcase_A
.LI
Subcase_B
.LI
Subcase_C
.LE
T}
.TE

Regards,
Branden


signature.asc
Description: PGP signature