For a report I'm writing, I have got an MS Word template for a page that needs to be included. The page looks like this (print screen from Word):
However, there are a few things that makes me not want to use this template in its current form, but rewrite it in LaTeX:
- This page is in Word, while the rest of my report is in LaTeX. Hence the styles will be different, which includes fonts and line widths for example.
- Word converts vector images stored in pdf format to low-resolved raster images when you include them (and yes it is still rasterized after you have printed it as a pdf file).
Anyway, enough of the arguing for using LaTeX already and to the question: How do I achieve this kind of layout using LaTeX? All I need to know for the moment is how to create these kind of boxes that exist right next to each other in this pattern, and how to get the text adjusted properly within the boxes.
Edit: It would be nice if the dimensions of the boxes were independent of the content inside of them. In that way the layout would stay the same for different people who used the same LaTeX template. My department at the university is maybe going to use it as an official alternative to the Word template.
Best Answer
I do this in my reports. First you need the setup in your class or style file. In my case, it is our report class and it contains the following definitions for doing a govt SF-298 form:
As you can see, it uses the native picture environment of LaTeX, in which it overlays your text on top of a blank form (the blank form is imported as a graphic). In your document, you then need to call on the environment to draw the picture:
The net result is
In response to the request for a self-contained example, I took the questioner's image at the top of this page, and saved it (as form.png). I then wrote this abbreviated snippet
The result is as follows, where a report number, a date, and an extended text section have been added to the user's form. In this example, I use both the environment to add data (
\SFitemSEVENTEEN
) as well as using previously defined data (\pubdate
and\rptno
) within the form