> To place two images side by side. > How to place to two or more images side by side. HTML treateds > a little picture almost as if it were a text item. If you put > two pictures in the code after each other then they appear > side by side (if there is space for that on the line). Can you > do something similar in groff or what does it take to put two > pictures up next to each other?
In the groff world, the mechanics of inserting a picture (not drawn by troff itself) into the generated output is done by the postprocessor via a "device special", which in the case of grops is "ps: import". Troff does not need to know anything about the picture except to reserve a little space for it, so it does not overwrite other parts of the output. This is preferably done with a macro to simplify the markup, but the included picture can be treated as an inline item just like a normal piece of text, as the attached example shows (deliberately left simple to better understand the way it works).
.\" .\" ---------------------------------------------------------------- .de inlinepic .psbb \\$1 .nr pswd \\$2 .ie !'\\$3'' .nr psht \\$3 .el .nr psht \\$2*(\\n[ury]-\\n[lly])/(\\n[urx]-\\n[llx]) .nr extra \\n[psht]-.5v .tm inlinepic: width: \\n[pswd], height: \\n[psht], extra: \\n[extra] \X'ps: import \\$1 \\n[llx] \\n[lly] \\n[urx] \\n[ury] \\n[pswd] \\n[psht]'\ \h'\\n[pswd]u'\x'-\\n[extra]u' .. .\" ---------------------------------------------------------------- .sp 3c .ps 10 .vs 12 Text text text text text text text text text text. Text text text text text text text text text text. Text text text text text text text text text text. .inlinepic f.ps 30p 40p Text. .inlinepic f.ps 10p Text text text text text text text text text text. Text text text text text text text text text text. Text text text text text text text text text text.
f.ps
Description: PostScript document