Re: Is there a Groff showcase?
IMHO, the website pool should not be divided. Instead access to information should be accomplished by different means. I dump all my code snippets or running prof of concepts, what I otherwise would forget, into one directory and find these old samples later either by file naming or via grep. The naming I use is a category like 'pic' or 'mom' and some keys (topics) I want the file to be found afterwards. This way categories emerge by itself. They may be subdivided if hits become crowded. That has the advantage of being easy going. No web forms, no clicking around, no website to build up again and again. Just name a file, upload, forget, search later but knowing if not found its nowhere else. Well a website is not a directory. Also of cause it may become more complicated for a multi user setup. I do not know if the web can do that or if another technology is more suited. On Sat, 16 Dec 2023 14:57:33 -0500 Peter Schaffter wrote: > 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. This robustness level is a class of its own. Learning from it however may be hard. Aiming for robustness neglects education. With this in mind, to address categories a naming convention would be handy. However searching the content should be possible independently of category. > > 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. > pgpJ7_hVjTCkA.pgp Description: OpenPGP digital signature
Re: Is there a Groff showcase?
Le 2023-12-16 à 09:44, Mike a écrit : >> 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 A paper with drop caps can be found here: https://www.froude.eu/groff/documents/moyal-dirac.html > - Text in the margin > - Text around an image or quote Some example of this can be found here: https://www.froude.eu/groff/examples/one-page-dungeon.html > - Graphical title pages > - Background images > - Coloured backgrounds Tangentially, gray alternating backgrounds in tables, here: https://www.froude.eu/groff/examples/table-background.html > - Custom bullet points > - Coloured text boxes > - Custom paper sizes This paper has coloured text and custom paper: https://www.froude.eu/groff/documents/conference.html > ... > > 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 I maintain www.froude.eu/groff after some people asked for a repository for useful macros and examples to be avaible in one place. This is far from perfect. As you said, a more visual presentation would be preferable and a lot more examples are needed. If you have a quick sketch as to how you would prefer the website to be presented, I can try to achieve the layout you prefer. I welcome any contribution :) -- Thomas
Re: Is there a Groff showcase?
Will post an example soon. Mike <898...@smartsprout.co.uk> wrote: > > Almost all my exams (being a science teacher) are created using > Groff. > > That sounds really interesting. If it isn't confidential, I'd love to > see a copy of your exam paper to see how it was made and how you create > two versions in the same document. > > Kind regards, > > Mike
Re: Is there a Groff showcase?
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
Re: Is there a Groff showcase?
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: Is there a Groff showcase?
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
Re: Is there a Groff showcase?
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?
> 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
Re: Is there a Groff showcase?
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. Those kinda website have to be invented in the first place, right? On Thu, 07 Dec 2023 17:35:25 + Mike <898...@smartsprout.co.uk> wrote: > Hello, > > Not a technical question, so I apologise in advance if this is the > wrong place to post. > > I'd like to know if a showcase of Groff typeset documents exists > anywhere on the internet? > > Kind regards, > > Mike > > pgpHxpHb3sfAW.pgp Description: OpenPGP digital signature
Re: Is there a Groff showcase?
On 15/12/23 14:14, Damian McGuckin wrote: There are times when I prefer to use other tools like simple Python to do some of the harder work such as creating alternate/multiple documents from some master depending on the scenario. A lot of the documentation for Documenters Workbench 3.3, the most recent version of groff and friends from Plan 9, is available. The documentation is written in itself. Of course, you are correct. What a lot of newcomers don't realize (and everyone else sometimes forgets) is that a [gt]roff input file is a simple text file. If the input file is written in a civilized fashion it can be torn apart by whatever text parsing tool you care to use. Sorry Damian, I couldn't resist the epilogue. Robert A computing laddie from Dundee Once wrote a program in P... . But it ran quicker in ed, And much better in sed, So he rewrote the damned thing in C.
Re: Is there a Groff showcase?
On Thu, 14 Dec 2023, Larry McVoy wrote: Agreed, I plugged -ms because after trying other stuff, I came back to -ms. Haven't tried mom, I'm retired, but I hear good things. But your point that this is pure troff is spot on. No macro package required. There are times when I prefer to use other tools like simple Python to do some of the harder work such as creating alternate/multiple documents from some master depending on the scenario. A lot of the documentation for Documenters Workbench 3.3, the most recent version of groff and friends from Plan 9, is available. The documentation is written in itself. - Damian
Re: Is there a Groff showcase?
Agreed, I plugged -ms because after trying other stuff, I came back to -ms. Haven't tried mom, I'm retired, but I hear good things. But your point that this is pure troff is spot on. No macro package required. On Fri, Dec 15, 2023 at 01:33:42PM +1100, Robert Thorsby wrote: > On 15/12/23 12:44, Larry McVoy wrote: > >Here's the intro at the top of the -ms doc: > > > > It may be worth noting that you do not need to use the ms macro package or > any macro package at all (apart from the built-in macros, of course). > > I usually create a defined string (.ds) or number register (.nr) somewhere > very close to the top of the input file. Then, before the substantive > document starts you use Larry's idea to list the various parameters. > > .ds Answers marker > ... > .ie '\^[Answers]'marker' \{\ > . etc etc etc > . \} > . el \{\ > .etc etc etc > .\} > [you can nest conditionals till the cows come home and you don't need double > backslashes] > Also defined strings (.ds) is very powerful and worth reading the man/info > pahes. > ... > .\" Start of substantive document. > ... > [provide your alternatives based on the value of "\*[Answers]"] > you may have to use ".nop" if you need indenting to save your sanity. > you can use loops as well. > > My 2 cents to an interesting discussion. > > Robert Thorsby -- --- Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
Re: Is there a Groff showcase?
Typo \^[Answers] should be \*[Answers] There may be more. Rotten debilitating medical condition is to blame. Robt On 15/12/23 13:33, Robert Thorsby wrote: .ds Answers marker ... .ie '\^[Answers]'marker' \{\ . etc etc etc
Re: Is there a Groff showcase?
On 15/12/23 12:44, Larry McVoy wrote: Here's the intro at the top of the -ms doc: It may be worth noting that you do not need to use the ms macro package or any macro package at all (apart from the built-in macros, of course). I usually create a defined string (.ds) or number register (.nr) somewhere very close to the top of the input file. Then, before the substantive document starts you use Larry's idea to list the various parameters. .ds Answers marker ... .ie '\^[Answers]'marker' \{\ . etc etc etc . \} . el \{\ .etc etc etc .\} [you can nest conditionals till the cows come home and you don't need double backslashes] Also defined strings (.ds) is very powerful and worth reading the man/info pahes. ... .\" Start of substantive document. ... [provide your alternatives based on the value of "\*[Answers]"] you may have to use ".nop" if you need indenting to save your sanity. you can use loops as well. My 2 cents to an interesting discussion. Robert Thorsby
Re: Is there a Groff showcase?
On Fri, Dec 15, 2023 at 01:28:56AM +, Mike wrote: > > Almost all my exams (being a science teacher) are created using > Groff. > > That sounds really interesting. If it isn't confidential, I'd love to > see a copy of your exam paper to see how it was made and how you create > two versions in the same document. I can give you the source to the commercial license for a product we did. I actually got the lawyers at Fenwick & West to work on this in the troff source. Once they got what I was doing they were ecstatic, they clearly saw the value in one document generating multiple documents. Their comment was "Word wishes it could do this". Here's the intro at the top of the -ms doc: .ig ** README FIRST ** Notes for people unfamiliar with this file format: Line breaks are very important, if you work on this work on it with an editor that does hard line breaks, don't use soft (automatic) line breaks. Comments may be entered with a leading .\" or in a block delimited with a starting ".ig" (for ignore) and an ending ".." on a line by itself. Markup requests are present in the document, they are the funky looking things which start a line with a period like ".HH". Since the section numbers are automatically generate with the .HH macro we manually inserted .\" [1] above each .HH so you could see which section you are in, i.e., [1] above the first one, [2] above the next, and so on. Makes it slightly easier to go from the formatted text to the source. This document is actually several documents. It conditionally produces output based on the EULA variable which is currently set to one of 0 (Academic), 1 (Basic), 2 (Pro), or 3 (Enterprise). We'll likely shift that up when we fold the Free license into this one. You can do conditional exclusion or inclusion of the text based on the EULA variable like so (indented for clarity, it may not be indented in real use): .if \n[EULA]=1 \{\ I am the basic license agreement .\} .if \n[EULA]<=1 \{\ I am either the basic or the academic license agreement .\} .if \n[EULA]>1 \{\ I am either the pro or the enterprise license .\} You can do a conditional on two different EULAs like so: .if ((\n[EULA]=2) : (\n[EULA]=4)) \{\ I am either EULA2 or EULA4 .\} You negate an expression with "!" .if !\n[EULA]=4 \{\ All eulas except 4. .\} You can do if/else in this oh-so-obvious way: .ie \n[EULA]=4 text for EULA4 .el text for all other cases And finally, the \{ stuff is not needed if you are doing a short line. .if \n[EULA]=4 Use this text for EULA4. Given that we have two classes of licenses being generated here, EULA and MLA, we are evolving a bit. EULA 0..3 are EULAs, 4 is Intel, 5 is Cisco. But for each EULA we define a string, EULA, and for each MLA we define a string, MLA. We don't use the contents of the string, just the fact that it exists. We also define INTEL for Intel and CISCO for Cisco. This lets me do MLA specific stuff that is not Intel or Cisco specific like so .if dMLA and we can do INTEL specific stuff like so .if dINTEL Etc. Notes to reviewers/lawyers/whatever are typically done with "XXX" markups in comments, search for those for hints on places which need work. Thank you for putting up with this weird format, it helps us. .. .if !rEULA .ab No EULA defined .if \n[EULA]=0 \{\ . ds type Academic End User . ds TYPE ACADEMIC END USER . ds EULA Academic .\} .if \n[EULA]=1 \{\ . ds type Essentials End User .ds TYPE ESSENTIALS END USER . ds EULA Essentials .\} .if \n[EULA]=2 \{\ . ds type Premier End User . ds TYPE PREMIER END USER . ds EULA Premier .\} .if \n[EULA]=3 \{\ . ds type Enterprise End User . ds TYPE ENTERPRISE END USER . ds EULA Enterprise .\} .if \n[EULA]=4 \{\ . ds type / Intel Master . ds TYPE / INTEL MASTER . ds MLA Intel . ds INTEL true .\} .if \n[EULA]=5 \{\ . ds type / Cisco Master . ds TYPE / CISCO MASTER . ds MLA Cisco . ds CISCO true .\}
Re: Is there a Groff showcase?
> Almost all my exams (being a science teacher) are created using Groff. That sounds really interesting. If it isn't confidential, I'd love to see a copy of your exam paper to see how it was made and how you create two versions in the same document. Kind regards, Mike
Re: Is there a Groff showcase?
Le 2023-12-07 à 22:35, Mike a écrit : I was thinking of a website or web page which demonstrates the extent of groff's capabilities. If there isn't anything like this, currently. Has this been considered? I have only just learned of groff. The manual is awesome (though tough reading for me in places). groff does so much more than I first imagined. I don't know if this aligns with the goals of the contributors, but examples of some well-designed, finished documents might attract new users and potential contributors. Hello Mike, I have a small list of documents typeset with groff with source available on the "groff examples repository" website. The website is here : https://froude.eu/groff You will have to scroll some to find the section labelled "Documents edited with groff". There are only 3 documents right now but they cover a lot of ground (math, dropcaps, hyperlinks, bibliography, coloured text, etc.) Any contribution is welcome :) -- Thomas
Re: Is there a Groff showcase?
On Do 07 Dez 2023 at 21:35, Mike <898...@smartsprout.co.uk> wrote: > I was thinking of a website or web page which demonstrates the extent > of groff's capabilities. > > If there isn't anything like this, currently. Has this been considered? > > I have only just learned of groff. The manual is awesome (though tough > reading for me in places). groff does so much more than I first > imagined. > > I don't know if this aligns with the goals of the contributors, but > examples of some well-designed, finished documents might attract new > users and potential contributors. > > Forgive me for being bold, I am just thinking out loud. > > Mike You might have a look at https://www.schaffter.ca/mom/ then. Iy is for a new macroset called mom from Peter Schaffter and it is very well documented and has some demostration documents with source. 'Andreas
Re: Is there a Groff showcase?
You're not bold it's a fair question. I've worked with LaTeX a lot and also with Word, besides Groff. Groff outshines the alternatives by far in my humble opinion. Why? For me the ability to create pictures, graphs and tables all text based is a big advantage. Almost all my exams (being a science teacher) are created using Groff. I have a simple but effective macro which enables me to create two versions at once: One version for students with space (and lines) between the questions to fill in their answers. A second version where the empty lines are replaced with the correct answers and distribution of points. Having the questions and answers in one source document is very handy. Secondly you can pull in any other program you want. For instance I use Lilypond to create small pieces of sheet music, which are imported in the document. The reason why groff is not widely used is (imho) that its greatest strenght is also its weakness: Being deeply rooted in the (l)unix-philosophy of piping data through different (small) programs makes it hard to attract windows users. I'm trying to get Groff running on Windows for my collegues, but this isn't be far a walk in the park. Having an overleaf.com kind of solution would be a game changer. Just my two cents. Regards, Hans Mike <898...@smartsprout.co.uk> wrote: > > It's not much, but I did some kind of a template for different stuff > > with groff > > that you can find here : https://t.karchnu.fr/doc/grofftut.pdf > > > > Not sure it's what you're looking for. > > Thank you Philippe. > > That is an interesting resource, thank you for sharing it with me. > > I was thinking of a website or web page which demonstrates the extent > of groff's capabilities. > > If there isn't anything like this, currently. Has this been considered? > > I have only just learned of groff. The manual is awesome (though tough > reading for me in places). groff does so much more than I first > imagined. > > I don't know if this aligns with the goals of the contributors, but > examples of some well-designed, finished documents might attract new > users and potential contributors. > > Forgive me for being bold, I am just thinking out loud. > > Mike
Re: Is there a Groff showcase?
> It's not much, but I did some kind of a template for different stuff > with groff > that you can find here : https://t.karchnu.fr/doc/grofftut.pdf > > Not sure it's what you're looking for. Thank you Philippe. That is an interesting resource, thank you for sharing it with me. I was thinking of a website or web page which demonstrates the extent of groff's capabilities. If there isn't anything like this, currently. Has this been considered? I have only just learned of groff. The manual is awesome (though tough reading for me in places). groff does so much more than I first imagined. I don't know if this aligns with the goals of the contributors, but examples of some well-designed, finished documents might attract new users and potential contributors. Forgive me for being bold, I am just thinking out loud. Mike
Re: Is there a Groff showcase?
Le Thu, Dec 07, 2023 at 05:35:25PM +, Mike a écrit : > Hello, > > I'd like to know if a showcase of Groff typeset documents exists > anywhere on the internet? It's not much, but I did some kind of a template for different stuff with groff that you can find here : https://t.karchnu.fr/doc/grofftut.pdf Not sure it's what you're looking for.
Is there a Groff showcase?
Hello, Not a technical question, so I apologise in advance if this is the wrong place to post. I'd like to know if a showcase of Groff typeset documents exists anywhere on the internet? Kind regards, Mike