3

I need to place two different boxes on the same line with the word 'and' separating them, if anyone could help it would be much appreciated, thanks.

Something like this:

enter image description here

Torbjørn T.
  • 206,688
  • 2
    Could you provide us with some more detail? Perhaps a visual clue by means of an image of what you're after exactly? We deal with boxes and alignment here, every day, so this question is very general/vague at the moment. – Werner Nov 30 '15 at 22:13
  • @Werner I have now added the image :) – Ben Lindon Nov 30 '15 at 22:18
  • If boxes contain math expressions, take a look at http://tex.stackexchange.com/questions/109900/how-can-i-box-multiple-aligned-equations/240327#240327 – Ignasi Dec 01 '15 at 07:52

1 Answers1

5

This is quite 'easy' with the tcolorbox package -- I've defined a special infobox environment -- the parameters can be changed using the optional argument -- the important setup is baseline=3.5mm -- this is most likely to be adapted to the real situation:

\documentclass{article}

\usepackage[most]{tcolorbox}
\begin{document}

\newtcolorbox{infobox}[1][]{%
  enhanced,
  left=2pt,
  nobeforeafter,
  width=0.2\textwidth,
  colback={white!30!yellow},
  box align=center,
  baseline=3.5mm,
  #1
}


Running text
\begin{infobox}
Info
\end{infobox}
and 
\begin{infobox}[colback={yellow!30!white}]
Info
\end{infobox}


\end{document}

enter image description here