Latex-Style Equations in Troff

2021-07-26 Thread mahdi mohammadi via
hello,I've recently worked on adding latex equations syntax and format to troff. By typing tex equations inside .BL/.EL blocks, the equations will be transformed to troff equations with .EQ/.EN blocks. it also supports inline equations by defining the start and end tags like below: .BL\

Re: Equations

2021-01-15 Thread M Douglas McIlroy
groff ships with Eric Raymon's extended manual for pic, but nothing similar for eqn. If the AT&T release would permit it, and Gnu would honor AT&T's terms, a Kernighan/Cherry document could be distributed with groff. K&C documents are widely available online. Source text is at https://minnie.tuhs

Re: Equations

2021-01-14 Thread Oliver Corff
Hi Filip, the man pages are your friend. While eqn(1) is admittedly not especially talkative to this effect, your answers can be found in groff_char(7). There is a whole section entitled "Arrows". Since I am not a mathematician I cannot answer whether implication arrows are included or not, but i

Equations

2021-01-14 Thread filip
Hi, where can I find all commands that can be run? How do I make implication arrows and such? Best regards Filip

Re: [Groff] Using variables from register within fractions or equations

2013-04-17 Thread Tadziu Hoffmann
> Depending on whether there are questions in a line of output > and whether there are questions in adjacent lines, the line > spacing keeps changing. It's because of the "extra line space" function \x.

Re: [Groff] Using variables from register within fractions or equations

2013-04-16 Thread maouinin
=1 \Z'\o'_\s'-2'\fI\\*x''\fR\s'0'\c > .if \\nm=2 \Z'\o'_\s'-2'\fI\\*x''\fR\s'0'\c > If it is, how might one fix it? > > > -- View this message in context: http://old.nabble.com/Using-variables-from

Re: [Groff] Using variables from register within fractions or equations

2013-04-16 Thread maouinin
ch makes the drink pink and gives it a cherry .Q flavor . This .Q mixture is poured into a tall glass full of ice. As decoration, the glass usually contains a slice of orange and a cherry. .P The new drink quickly .Q caught on with children across the country. They enjoyed its sweet .Q taste . They also liked it because it was named after one of their .Q favorite stars. When they drank the new drink, they felt like they were as famous as Shirley Temple. .P Now, you don't have to be .Q left out when your parents are ordering fancy drinks. You can .Q join them and order a special cocktail of your own. Thanks to Shirley Temple, cocktail hour can be enjoyed by .Q kids , too. .P .ad r \*[tm] marks -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p35302990.html Sent from the Groff - General mailing list archive at Nabble.com.

Re: [Groff] Using variables from register within fractions or equations

2013-04-14 Thread Ralph Corderoy
Hi maouinin, Tadziu wrote: > With groff, instead of "--", you have to use "\[en]" to get an > en-dash. For left and right quotes use "\[lq]" and "\[rq]". Or the older style of \(en for the two-letter ones. There's also preconv(1), normally invoked with groff's -k option. That way you can feed

Re: [Groff] Using variables from register within fractions or equations

2013-04-14 Thread Tadziu Hoffmann
> When I give these tests, which often run into a number of > pages I like to put the "page_number of total_pages". > Something like "page 3 of 8". This at times helps me avoid > some classroom/testing confusion. In TeX there is a package > for this, "lastpage" if I remember correctly. How would I

Re: [Groff] Using variables from register within fractions or equations

2013-04-14 Thread maouinin
; > Did Tadziu intend you to write > > .Q movies . > > with any needed punctuation supplied as a second parameter, as is common > in some macro sets? I see .Y refers to $2. > > Cheers, Ralph. > > > -- View this message in context: http://old.nabble.com/Us

Re: [Groff] Using variables from register within fractions or equations

2013-04-13 Thread Ralph Corderoy
Hi maouinin, > Here is the entirety of the macro supplied by Tadziu Hoffmann in the > original thread. Did Tadziu intend you to write .Q movies . with any needed punctuation supplied as a second parameter, as is common in some macro sets? I see .Y refers to $2. Cheers, Ralph.

Re: [Groff] Using variables from register within fractions or equations

2013-04-13 Thread maouinin
e of ginger ale, orange juice and grenadine which makes the drink pink and gives it a cherry .Q flavor. This .Q mixture \Z' 'is poured into a tall glass full of ice. As decoration, the glass usually contains a slice of orange and a cherry. .P The new drink quickly .Q caught on with children across the country. They enjoyed its sweet .Q taste. They also liked it because it was named after one of their .Q favorite stars. When they drank the new drink, they felt like they were as famous as Shirley Temple. .P Now, you don't have to be .Q left out when your parents are ordering fancy drinks. You can .Q join them and order a special cocktail of your own. Thanks to Shirley Temple, cocktail hour can be enjoyed by .Q kids, too. .P .ad r \*[tm] marks -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p35290940.html Sent from the Groff - General mailing list archive at Nabble.com.

Re: [Groff] Using variables from register within fractions or equations

2013-04-13 Thread Ralph Corderoy
Hi maouinin, > In mode 1, the blanks, etc. are printed and followed by whatever > punctuation is present. However in modes 2 and 3, I am unable to get > the punctuation to print. Any suggestions would be greatly > appreciated. I didn't notice anything from a quick look. I think I'd need a small

Re: [Groff] Using variables from register within fractions or equations

2013-04-12 Thread maouinin
of these when you create exercises spanning multiple lines.) Now the word is finished, and groff can start linebreaking if necessary. .. then we print the blank and the number as before, \Z'\\*[W]'\c \h'\\n[w]u'\v'1m'\\*[n]\v'-1m'\h'\\n[w]u'\\$2\x'1m'\x'-1m' -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p35285428.html Sent from the Groff - General mailing list archive at Nabble.com.

Re: [Groff] Using variables from register within fractions or equations

2012-02-19 Thread Tadziu Hoffmann
Sorry that this was a bit confusing... I have a habit of using the old-style roff syntax with one- or two-character names. Here's a slightly revised version using groff's extended syntax (which is probably a bit easier to understand for novices) including a short description of how it's supposed

Re: [Groff] Using variables from register within fractions or equations

2012-02-17 Thread Holger Herrlich
On 02/17/2012 02:45 PM, maouinin wrote: >> \h'\\nwu'\v'1m'\\*n\v'-1m'\h'\\nwu'\\$2 father on: \*n \" recalls string of name n \v'-1m' \" vertical move up one (1) line (m), this is a value. Note that \v for instance will interpret values by a default unit, used in absence of one given. There

Re: [Groff] Using variables from register within fractions or equations

2012-02-17 Thread Ralph Corderoy
Hi maouinin, I'll have a stab... > > if \\nm=1 .X \\$@ > > I follow the front, but what is \\$@? From .de Q .if \\nm=1 .X \\$@ .if \\nm=2 .Y \\$@ .if \\nm=3 .Y \\$@ .. $@ refers to all the arguments passed to the macro, similar to $@ and $* in sh. IOW, macro Q is calling

Re: [Groff] Using variables from register within fractions or equations

2012-02-17 Thread maouinin
ay at your > .Q commencement . > .nr m 2 > .Z > I am > .Q honored > to be with you today at your > .Q commencement . > .nr m 3 > .Z > I am > .Q honored > to be with you today at your > .Q commencement . > > > ... I left out the extra line in the "e

Re: [Groff] Using variables from register within fractions or equations

2012-02-11 Thread Ted Harding
On 11-Feb-2012 Tadziu Hoffmann wrote: > How about this, just to throw some ideas into the pool: > (Of course there's lots of stuff that can be tweaked. > For example, I left out the extra line in the "easy" case > because I personally didn't like it.) > > .\" > .\"

Re: [Groff] Using variables from register within fractions or equations

2012-02-11 Thread Tadziu Hoffmann
How about this, just to throw some ideas into the pool: (Of course there's lots of stuff that can be tweaked. For example, I left out the extra line in the "easy" case because I personally didn't like it.) .\" .\" .de Z .s

Re: [Groff] Using variables from register within fractions or equations

2012-02-11 Thread maouinin
, and I am not sure I am skilled enough to figure out how to do it without the fraction, since the lengths of words are different. The lines for each letter are of a fixed length -- giving different lengths for each letter would be a bit too easy. Thanks. -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p33305903.html Sent from the Groff - General mailing list archive at Nabble.com.

Re: [Groff] Using variables from register within fractions or equations

2012-02-11 Thread Ralph Corderoy
Hi maouinin, Just to make we're aiming at the right target, can you confirm/correct these... > 1) for strong students: a blank line with the question number below -- > no first letter given The blank line is contiguous and of fixed length, giving no clue as to the word length. The question numb

Re: [Groff] Using variables from register within fractions or equations

2012-02-10 Thread maouinin
ement... >> >> becomes: >> I am h___ to be with you today at your c ... >> 1 2 >> >> Is this possible with groff, using eqn perhaps? Is it possible >> to use variables from number registers within equations or >> fraction

Re: [Groff] Using variables from register within fractions or equations

2012-02-10 Thread Ted Harding
2 > > Is this possible with groff, using eqn perhaps? Is it possible > to use variables from number registers within equations or > fractions? > -- For the particular effect which you describe, it is not necessary to use fractions and eqn. You can do it perfectly well u

[Groff] Using variables from register within fractions or equations

2012-02-10 Thread maouinin
equations or fractions? -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p33299025.html Sent from the Groff - General mailing list archive at Nabble.com.

Re: [Groff] Coloured equations?

2007-02-06 Thread Tadziu Hoffmann
able to make do with simple black-and-white equations. Now, on the other hand, colorizing *parts* of equations (or using colored boxes, see attached PDF) for didactic purposes could indeed be useful, but that would not mean an all-out attack but rather a selective insertion of \m-escapes by hand, w

Re: [Groff] Coloured equations?

2007-02-05 Thread Werner LEMBERG
> > I'd like to have all eqn terms appear in a single colour. gfont > > chooses the eqn font, but there appears no easy way to have all > > eqn terms appear in a specific colour. Any suggestions? > > Well, it's kinda possible (see attached PDF), but it involves > some terrible hackery. Actually

Re: [Groff] Coloured equations?

2007-02-05 Thread Tadziu Hoffmann
ery. I guess it would be preferable to make eqn color-aware (like it is already font- and size-aware), but that appears harder than it sounds, because for inlining equations eqn can save font and size of the surrounding text with inline register definitions (\R), but color registers (.m) ar

RE: [Groff] Coloured equations?

2007-02-05 Thread Ted Harding
en colour (e.g. blue equations in a black text)? I.e. not only the symbols x, y, ... for quantities but also the operators like "+", "-", "times", and brackets, integrals, summation signs and everyting else. or: b) The equation basically in the same col

[Groff] Coloured equations?

2007-02-04 Thread Robert Marks
I'd like to have all eqn terms appear in a single colour. gfont chooses the eqn font, but there appears no easy way to have all en terms appear in a specific colour. Any suggestions? Thanks, Bob -- Robert MARKS, Australian Graduate School of Management, UNSW SYDNEY, NSW 2052, Austr