0

I want to add math equations to pic labels. How can I write such a thing, for example

box "This is an $1 over 2$ test" "using math in pic labels"

. I know of ctan circuit_macros, but that would require a tex document. I want the document to stay in roff -ms format.

For example the output of

printf ".EQ\n1 over 2\n.EN" | eqn |groff -Tps > 1over2.ps

is what you see below.

enter image description here

I will try my luck with macros... or is there some inline way to define .EQ text?

ikrabbe
  • 1,909
  • 12
  • 25

1 Answers1

1

Sorry guy's you are too slow. The solution comes with inline equations, defined by delimiters:

printf '.PS\nbox "This is an A1 over 2B test" ""'\
'"using math in pic labels" wid 2 ht .7\n.PE' |
pic|eqn -Tps -dAB | groff -Tps > testbox.ps

gives:

enter image description here

ikrabbe
  • 1,909
  • 12
  • 25