1

Does someone know how to do higher roots (cube roots, 4th roots, etc) in groff eqn? Been searching around the docs and cant seem to find the answer

2 Answers2

2

In simple cases you can use a subscripted number before the root sign:

"" sup 3 sqrt x

but this does not look too good depending on the equation:

1 over { "" sup 3 { sqrt {ax sup 2 +bx+c} } }

An alternative is to use left-justified pile, which also has a large gap:

1 over { lpile { { size -8 3 } above { sqrt {ax sup 2 +bx+c} } } }

so often the best is to use the eqn local motion commands, up, back, size to play with the position to get the wanted result:

1 over { { up 90 size -8 3 } back 30 { sqrt {ax sup 2 +bx+c} } }

enter image description here

meuh
  • 11,500
  • 2
  • 29
  • 45
0

I would recommend using eqn macros like this

.EQ
define exp % "" sup fwd 30 %
define cube % "" sup fwd 30 3 sqrt %
define root % { "" sup fwd 30 $1 sqrt $2 } %

exp 3 sqrt 11
cube 11
root(3,11)
.EN