我得到了一个非常好的答案这个问题(如何将页面分成 2 列)但新的障碍来了。现在我需要将其分成 1 列)和 3 列。到目前为止(感谢伊格纳西)我有以下文件:
使用以下代码:
\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}
我现在想做的是获得以下内容:
1)单列:
2)树形等列(在这张图片上它们看起来并不相等,但这是因为我只是在 Paint 上绘制它们)
我玩弄这段代码很长时间,但只得到了一个错误,没有得到预期的结果。有人能帮我吗?提前谢谢!
答案1
这是一个依靠奇怪的(手动计算的)值将海报移动到正确位置的尝试:
\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}
更新:我以为你会通过摆弄选项键来获得单列的东西,但这里有一个代码示例:
\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}