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:

    keep_tex: yes

    \TextField[width = 10cm,%
               height = 3cm,%
               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

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?

header-includes: \usepackage{xcolor}
output: pdf_document
This is the textbox. 
I would like a dark blue textbox with white writing.


|improve this answer|||||

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.