我正在制作一本书的封面,并且遇到了将三个块对齐在一起的问题:
- 一些信息(这部分还算可以)
- 书名(必须位于中间,但目前已调整至顶部)
- 由于某种原因,封面图片不在同一页面上
不幸的是,我对乳胶的不系统经验不允许我发现错误,所以我非常感谢您的评论。
\documentclass{book}
\usepackage[ paperwidth=300mm, paperheight=210mm, inner=0in, outer=0in, bottom=in, top=in, showframe]{geometry}
\usepackage{graphicx}
\graphicspath{ {./images/} }
%\usepackage[pass]{geometry}% just to show the page margins
\usepackage{pagecolor}% http://ctan.org/pkg/{pagecolor,lipsum}
\usepackage[colorlinks]{hyperref}
\usepackage{blindtext}
\begin{document}
%\pagecolor{black}
\begin{minipage}{0.4\textwidth}% adapt widths of minipages to your needs
{\color{red} This is the place for any info you will put \blindtext}
\end{minipage}%
%\hfill%
\begin{minipage}[c]% Name of the book
{\color{red} \rotatebox{90}{Monday begins on Saturday}}
\end{minipage}%
%\hfill%
\begin{minipage}{0.5\textwidth}%\raggedleft
\begin{figure}
\begin{flushright}% or better \raggedleft see comments below
\includegraphics[height=200mm]{cover.png}
\end{flushright}
\end{figure}
\end{minipage}%
\end{document}
答案1
我提出了这个解决方案,使用简单的工具:我使用tabularx
,包含文本的列和包含图像的列X
,我添加了一个包含长度为 200 毫米的隐形规则的第一列,并且我使用了一些\raisebox
es 来垂直居中图像(我必须采用我的一个)。
\documentclass[11pt]{book}
\usepackage[ paperwidth=300mm, paperheight=210mm, hmargin=0in, vmargin=1in, noheadfoot, showframe ]{geometry}
\usepackage{graphicx, , rotating}
\usepackage[export]{adjustbox}
\graphicspath{ {./images/} }
\usepackage{tabularx}
\usepackage[svgnames]{xcolor}
\usepackage{pagecolor}% http://ctan.org/pkg/{pagecolor,lipsum}
\usepackage{blindtext}
\pagestyle{empty}
\begin{document}
\pagecolor{DarkSlateGrey}
\begin{tabularx}{\textwidth}{@{}c@{}X |c| >{\raggedleft}X <{\qquad}}%
\rule[\dimexpr-\textheight +2ex]{0pt}{\textheight} & \color{red} \large This is the place for any info you will put \blindtext &
\qquad\smash{\rotatebox[origin=r]{90}{%
\makebox[\dimexpr\textheight-3ex]{\huge\bfseries\color{Gold}\raisebox{2.5ex}{Monday begins on Saturday}}}}\qquad
&\smash{\raisebox{\dimexpr1 in-5 mm}{ \includegraphics[height=200mm, valign =t]{paravent}}}
\end{tabularx}%
\end{document}