3

In an article is it possible to create boxes so that when the document has been printed users have some text boxes areas where they are able to make notes in?

A very basic mock up using word with text boxes looks like the attached picture. Notes can then be written inside the box, or used as an area on a form that information needs to be written in for example.

Right now I need to do it for a work book that I am writting, it has exercises to complete with questions about the exercises that the user just completed, and a notes section for them to make additional notes on the module and exercises they just completed. The text in the box must be in the top left corner.

I've been able to make a text box sort of in Latex, but I can't seem to increase the size of the box vertically as pictured.

The boxes should fit on a single page, should a box need to be bigger than a page or what is left of that page, a new box will be on the following page, but no header would be on this box.

The boxes will vary in height as this would depend on the size the box is able to be following the content on the page where the box starts.

text

6
  • You might add an invisible rule oriented downwards.
    – Bernard
    Feb 4, 2019 at 19:49
  • @Bernard Do you happen to have a brief example of the command for that? am not sure I have ever used one before, I don't think I have.
    – AeroMaxx
    Feb 4, 2019 at 19:54
  • Is the box always expected to fit on a single page? Feb 4, 2019 at 20:10
  • Will your boxes all have the same height? Should they be able to break across pages?
    – Bernard
    Feb 4, 2019 at 20:12
  • @StevenB.Segletes I've added the answer to your question into the original question, but basically the boxes will take up whatever is left on the page they started on, if the boxes was too small a new box will be required on the following page but no header would be on the box.
    – AeroMaxx
    Feb 4, 2019 at 22:28

3 Answers 3

2

enter image description here

Did somebody say text boxes? Well tcolorbox is meant for text color boxes, the 'color' can be set to white, of course. The example below defines a mytextbox with some preset options, which can be set differently with the optional argument, see the 2nd box example.

\documentclass{article}

\usepackage[margin=2cm]{geometry}
\usepackage[most]{tcolorbox}

\newtcolorbox{mytextbox}[1][]{%
  sharp corners,
  enhanced,
  colback=white,
  height=10cm,
  attach title to upper,
  #1
}


\begin{document}

\begin{mytextbox}

Give some text here:



\end{mytextbox}


\begin{mytextbox}[colupper=blue,fontupper=\bfseries\large]

Give other some text here:



\end{mytextbox}



\end{document}
2
  • I'll need to have a go at this, just one question can the height also be set differently so I can have boxes of varying heights?
    – AeroMaxx
    Feb 4, 2019 at 22:35
  • @AeroMaxx: Of course, you can say \begin{mytextbox}[height=5cm] etc. just as you like it or you can even let them break at page bottom with \begin{mytextbox}[breakable,height=20cm]
    – user31729
    Feb 4, 2019 at 22:37
0

A simple solution with framed and multido. There is an optional argument (the number of lines of the box after the title) and a mandatory (the title text). It can break across pages:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage{framed, multido}

\newcommand{\mytextbox}[2][6]{% 6\baselineskip bydefault
\begin{framed}
\noindent#2%
\multido{\i=1+1}{#1}{\newline …}
\end{framed}}

\begin{document}

\vspace*{10cm}
\lipsum[1]

Some more text
 \mytextbox[10]{Some title text}

\end{document}

enter image description here enter image description here

2
  • this is fine kind of, the "Some title text" is an indicator to the person in possession of the document as to what is meant to be filled in the box. The box itself will have no other text within it as the document will be printed and given out and as a result will be filled in using pen and paper. Can the box be made taller without having to have those dots placed in it? I removed them and the box shrunk so I was back to square one sadly.
    – AeroMaxx
    Feb 5, 2019 at 7:30
  • @sebastiano I did not read the question carefully enough and answered too quickly. I deleted my answer. Feb 5, 2019 at 10:23
0

In LaTeX, the \fbox command can be used to create a box around text. For example, to create a box around the word "box" in a sentence, you would write the following:

The word "box" should be \fbox{boxed}.

Alternatively, you can use the framed or mdframed packages to create more customizable boxes around text. For example:

\usepackage{framed}

\begin{framed}
The word "box" should be boxed.
\end{framed}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.