0

I'm trying to build a document in R Markdown using R studio, and I originally posted this question to stackoverflow, where a kind user referred me to this site.

I'm in no way a LaTeX expert, but I initially tried to, with the help of another user, build a dark blue box with white writing using the following code:

---
output: 
  pdf_document:
    keep_tex: yes
---

\begin{Form}
    \TextField[width = 10cm,%
               height = 3cm,%
               multiline=true,%
               bordercolor = 0 0 0.5,%
               backgroundcolor = 0 0 0.5,%
               color = 1 1 1,%
               value = {%
                          This is the textbox.\string\n
                          I would like a dark blue textbox with white writing
                        }%
               ]{}
\end{Form}

Now this actually helped me build a box, but the box was only white with a black outline and black text. Furthermore, the line shift \string\n did not help shift the lines.

Can someone here maybe help me out or take a look at this?

0
---
header-includes: \usepackage{xcolor}
output: pdf_document
---
\sffamily\fboxrule.1em\fboxsep1em
\fcolorbox{black}{blue!50}{\color{white}
\begin{minipage}[c][4cm][t]{4cm}
This is the textbox. 
I would like a dark blue textbox with white writing.
\end{minipage}}

mwe

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.