3

The default output of sidebyside option in tcolorbox environment is two equal-side columns (Refer to the MWE). But what is needed is to produce difference two difference column width. How can we get the first column with .7\textwidth and the second column with .3\textwidth?

\documentclass{article}
    \usepackage{tcolorbox}
    \begin{document}
        \begin{tcolorbox}[sidebyside]
            hello world hello world hello world 
            \tcblower
            world
        \end{tcolorbox}
    \end{document}
2
  • 3
    You can use righthand width=.3\textwidth.
    – Salim Bou
    Dec 23, 2016 at 6:00
  • Pretty fine @SalimBou :) I looked for this key yesterday, I did not meet it. Actually, in was written in an illustrating example on page 67 of the manual.
    – Say OL
    Dec 23, 2016 at 22:27

1 Answer 1

5

According to @SalimBou's comment, we can use the ready-made key righthand width.

\documentclass{article}
    \usepackage{tcolorbox}
    \begin{document}
        \begin{tcolorbox}[sidebyside,righthand width=.3\textwidth]
            hello world hello world hello world 
            \tcblower
            world
        \end{tcolorbox}
    \end{document}

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.