1

How could I get a grey box in latex like the one I get on math.stackexchange when I type > to start a paragraph?

abc
  • 11
  • which package are you using? color, framed, tcolorbox, or something else? – Thruston Jan 31 '14 at 14:43
  • 2
    If I read this right, that's not MathJaX, that's Markdown. – Andrew Stacey Jan 31 '14 at 14:46
  • @Thruston None of them yet, because I don't know exactly how that would work. So I also don't have any specific preferece for any of those. – abc Jan 31 '14 at 14:46
  • Well any of those packages will let you create grey shaded boxes, so if you pick one - colorbox provided by the color package is probably the simplest - and have a go, and if you get stuck you could then update your Q with an example for people to work on. – Thruston Jan 31 '14 at 14:52
  • @AndrewStacey That could be true, I am not quite familiar with all those 'languages'. Do you know how I could get the same effect in Latex? – abc Jan 31 '14 at 15:06
  • @Thruston Ok I got the colorbox with the colorpackage to work now, but the color grey that I get is way darker than the standard color that you for instance used in your comments. Is there a way to get that same color? – abc Jan 31 '14 at 15:11
  • Also, the colorbox by far doesn't work as easily as the boxes that you can use on the stackex websites. For instance, if I want to include multiple paragraphs into one block of 'gray', everything gets messed up. – abc Jan 31 '14 at 15:16
  • This page tells you how to mix your own colours. – Thruston Jan 31 '14 at 15:17
  • 1
    @abc please take a look at the possibilities listed in this answer to How to highlight an entire paragraph?. – Gonzalo Medina Jan 31 '14 at 15:18
  • 1
    You can put a whole minipage inside a colorbox. But at this stage you really should give us an example! – Thruston Jan 31 '14 at 15:18
  • @GonzaloMedina Thanks a lot, that might be what I'm looking for. I'll try it out and post back. – abc Jan 31 '14 at 15:19
  • @Thruston I'll first try out Gonzalo's suggestion, if that doesn't work I'll post an example – abc Jan 31 '14 at 15:20
  • @GonzaloMedina The suggestions on your link solve my problem. Thanks :)! Except for that I'd like a lighter color of grey still (like the one on stackex). – abc Jan 31 '14 at 15:24
  • @abc you can change blue!20 to gray!20 (or similar). Since the problem seems solved, do you consider this question can be closed as a duplicate? – Gonzalo Medina Jan 31 '14 at 15:26
  • I used the following command from @Thruston's link: \definecolor{light-gray}{gray}{0.95}. Now everything works fine. Thanks everyone for your input. – abc Jan 31 '14 at 15:26
  • @GonzaloMedina Yes it can be closed if you wish. (Though I think it's not an exact duplicate so some people might still benifit from it later). – abc Jan 31 '14 at 15:27
  • @abc if it's not an exact duplicate, perhaps you could edit your question and add some code showing what you've tried and what problems are still present. – Gonzalo Medina Jan 31 '14 at 15:33

0 Answers0