0

I got an excellent answer on this question (how to divide a page into 2 columns) but a new obstacle has come. Now I need to divide it to 1 single column) and 3 columns. So far (thanks to Ignasi) I have the following document:

enter image description here

with following code:

\documentclass[a4paper]{article}
\usepackage[most]{tcolorbox}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{pdfpages}
\pagestyle{empty}
\begin{document}
\begin{tcbposter}[%
    coverage = spread,
    poster = {columns=5, rows=1, spacing=-.5mm},
    boxes={sharp corners, colback=white}
]
\posterbox[left=12mm, enhanced, 
          overlay={\fill[black!70] (frame.north west) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=90]{Lorem ipsum dolor sit amet} 
          ([xshift=9mm]frame.south west);} 
]{name=left, column=1, span=3, rowspan=1}{\lipsum[1-2]}
\posterbox[right=12mm, enhanced, 
          overlay={\fill[black!70] (frame.north east) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=270]{Lorem ipsum dolor sit amet} 
          ([xshift=-9mm]frame.south east);} 
]{name=right, column=4, span=2, rowspan=1}{\lipsum[1]}
\end{tcbposter}
\end{document}

What I am trying to do now is to get the following:

1) A single column:

enter image description here

2) Tree equal columns (On this image they don't look equal but it's because I just draw them on Paint)

enter image description here

I was playing around with this code for a long time but I got just a mes but not the expected results. Could someone help me with it? Thanks in advanced!

4
  • 1
    Sorry, I don't quite get what the actual output should look like. Shall the columns be on one page (one column first and then three columns a little bit farther down) or shall the three-column style start on a second page? – TeXnician Aug 17 '18 at 15:43
  • I apologize for the screenshots guys! I was playing with thumbnail and them got extremely small. I will change it now – Alex Aug 17 '18 at 15:44
  • Hi, TeXnician. Sorry for these small previews. I already changed it. Yes, it should be 2 different page. I just wonder to figure out what should I change in the code to create single(3-column) styles. – Alex Aug 17 '18 at 15:47
  • @TeXnician, I was trying to change these values. But the problem was that the leftmost and the rightmost sections (the grey ones) got misaligned because of these changes. – Alex Aug 17 '18 at 16:08
1

Here's an attempt that relies on strange – manually computed – values to shift the poster into the right position:

strange poster

\documentclass[a4paper]{article}
\usepackage[most]{tcolorbox}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage{geometry}
\usepackage{pdfpages}
\pagestyle{empty}
\begin{document}
\begin{tcbposter}[%
    coverage = spread,
    poster = {columns=5, rows=1, spacing=-.5mm},
    boxes={sharp corners, colback=white}
]
\posterbox[left=12mm, enhanced, 
          overlay={\fill[black!70] (frame.north west) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=90]{Lorem ipsum dolor sit amet} 
          ([xshift=9mm]frame.south west);} 
]{name=left, column=1, span=3, rowspan=1}{\lipsum[1-2]}
\posterbox[right=12mm, enhanced, 
          overlay={\fill[black!70] (frame.north east) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=270]{Lorem ipsum dolor sit amet} 
          ([xshift=-9mm]frame.south east);} 
]{name=right, column=4, span=2, rowspan=1}{\lipsum[1]}
\end{tcbposter}
\begin{tcbposter}[%
    coverage = {spread, left=12.5mm},
    poster = {columns=3, rows=1, spacing=-.5mm, width=\dimexpr\linewidth-9.5mm},
    boxes={sharp corners, colback=white}
]
\posterbox[enhanced,
          overlay={\fill[black!70] (frame.north west) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=90]{Lorem ipsum dolor sit amet} 
          ([xshift=-9mm]frame.south west);} 
]{name=left, column=1, rowspan=1}{\lipsum[1-2]}
\posterbox{name=center, column=2, rowspan=1}{\lipsum[1]}
\posterbox[enhanced,
          overlay={\fill[black!70] (frame.north east) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=270]{Lorem ipsum dolor sit amet} 
          ([xshift=9mm]frame.south east);} 
]{name=right, column=3, rowspan=1}{\lipsum[1]}
\end{tcbposter}
\end{document}

Update: I thought you would get the one-column thing by playing around with the option keys, but here is a code sample:

\begin{tcbposter}[%
    coverage = spread,
    poster = {columns=1, rows=1, spacing=-.5mm},
    boxes={sharp corners, colback=white}
]
\posterbox[left=12mm, right=12mm, enhanced, 
          overlay={
          \fill[black!70] (frame.north west) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=90]{Lorem ipsum dolor sit amet} 
          ([xshift=9mm]frame.south west);
          \fill[black!70] (frame.north east) rectangle 
          node[font=\sffamily\bfseries,text=white,rotate=270]{Lorem ipsum dolor sit amet} 
          ([xshift=-9mm]frame.south east);} 
]{name=left, column=1, rowspan=1}{\lipsum[1-2]}
\end{tcbposter}
3
  • thanks, this works great. But how can I make a singles column document? (second screenshot on my question) – Alex Aug 17 '18 at 17:58
  • 1
    @Alex See my update. – TeXnician Aug 17 '18 at 20:27
  • you are right. I should make my questions clearer next time. Your Update works just great as well. Thanks for your help and have a great weekend! – Alex Aug 17 '18 at 21:00

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.