所需页面几何形状

所需页面几何形状

我需要帮助设置如下所示的页面的几何形状:

奇数页几何

偶数页几何

规格:

  • 页面尺寸为 8 英寸 x 8 英寸
  • 奇数页上的图片宽度不得超过 2 英寸
  • 段落文本应居中,且占用的文本宽度不超过 4 英寸
  • 图像可以放置在页面的右下角,大小与其他图像相同
  • 甚至页面也只有标题和居中的一段文字。

我会添加一个 MWE,但到目前为止,它们与这些图像相差甚远,我认为它们不会对任何人有帮助。我试过弄乱多列,只是玩弄浮点数,但无济于事。任何帮助都非常感谢!

编辑:这是MWE:

\documentclass[twoside, openany]{book}
\usepackage[paperheight=7.5in,paperwidth=7.5in,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx}
\usepackage{tipa}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{subfiles}
\usepackage{enumitem}
\usepackage[none]{hyphenat}
\usepackage[font=small,labelfont=bf]{caption}

%\usepackage{graphicx}
\usepackage{subfig}

\begin{document}

\section{0. The Fool}

Many masks; No mind.\\

\fbox{\begin{minipage}[t]{0.4\textwidth}\vspace{0pt}
\includegraphics[width=0.4\textwidth]{place}

\vspace{.1cm}

\includegraphics[width=0.4\textwidth]{place}

\vspace{.1cm}

\includegraphics[width=0.4\textwidth]{place}

\vspace{.1cm}

\includegraphics[width=0.4\textwidth]{place}
\end{minipage}%
}%
%\hspace{-1in}

\fbox{\begin{minipage}[t]{0.6\textwidth}\vspace{0pt}
\textbf{Mercenarium Function:} The Fool is summoned into play. It has a face value of (L), and no suit. The Fool is not a Mercenary and cannot be bought.\\

When The Fool is summoned, roll the Fool die and place it on the card. The number rolled determines the strength of The Fool’s aura; if a 4 is rolled, then The Fool is considered to have 4 dots on every edge. The Fool blocks all suits in aura ties. If (0) appears on The Fool die, all captures involving The Fool are annihilations. The player who controls The Fool may use their turn action to re-roll the Fool die. Whenever The Fool captures an enemy card, the player who controls The Fool must re-roll the Fool die.\\

If The Fool is moved by the effects of III. Optimo, IX. The Shade, or XI. Visionaire, its die value remains the same.\\

\textbf{Dragonfruit Core Meaning / Secondary Themes / Alteration:}
\textbf{Lessons} / Ignorance, Toil, Anxiety / THE FOX
(color/geometry: indigo sphere) (card value: \textbf{L}) (astrological sign: \textbf{eye of horus})\\

The Fool represents suffering and ignorance, and the masks that we hide behind for protection. It calls towards unresolved trauma, recurring struggles, and lessons that we have yet to learn. It contains the keys to liberation.\\

Its core meaning (Lessons) suggests opportunities for growth that we do not recognize or take advantage of, which forces us to relive painful trials. Its secondary themes (Ignorance, Toil, Anxiety) elicit the most difficult parts of life, in which our perspectives punish us for things that we have no control over. Its alteration (THE FOX) means a flash of awareness – a sudden recognition – that lets us laugh at, savor, and alchemize our pain into something better.\\

\textbf{Lords} represent \textbf{LESSONS}: “The Fool.” These cards present opportunities to transmute pain or discomfort into spiritual growth. When Lords appear, they give us a chance to reflect on the ways we can improve or balance our energy within their sphere.
\end{minipage}}



\end{document}

来自答案的新代码。我做错了什么,导致左侧出现四幅图像?

\documentclass[10pt]{article}   
\usepackage{xcoffins}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}

\usepackage{ifthen,changepage} % check odd or even page
\usepackage{nopageno} % supress page number

%%%%%%%  FOR TESTING  ONLY, comment for final version
%\usepackage{showframe}  %added
%\renewcommand*\ShowFrameColor{\color{red}}    %added

\usepackage[% main page specs
 papersize={8in,8in}, %specs
 textwidth=4in,  %specs
 marginratio=1:1
 ]{geometry}

%\usepackage{kantlipsum} % dummy text

\usepackage{atbegshi}

\AtBeginShipout{\AtBeginShipoutAddToBox{%  shipout even and odd pages title and figures
            \checkoddpage
\checkoddpage
        \ifthenelse{\boolean{oddpage}}{\TypesetCoffin\FrameOx}{\TypesetCoffin\FrameEx}}
    }

\NewCoffin\FrameOx
\NewCoffin\FrameEx

\NewCoffin\FrameOddx
\NewCoffin\FrameEvenx

\NewCoffin\FigTop
\NewCoffin\FigMid
\NewCoffin\FigMed
\NewCoffin\FigBottom
\NewCoffin\FigRight
\NewCoffin\Titlex


%%%%%%%%%   set figures width/heigth  plus height of text area
\newlength{\imageW}
\setlength{\imageW}{1.6in} % heigth and width of the figures, max =2in <<<<<<<<<<<<
\newlength{\textH}
\setlength{\textH}{6in} % heigth of text area, min =3\imageW  <<<<<<<<<<<<
%%%%%%%%%%%%%

\begin{document}
    \setlength{\parindent}{0pt}
    
\SetVerticalCoffin\FigTop{\imageW}{% upper figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-a}
}

\SetVerticalCoffin\FigMid{\imageW}{% middle figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-b}
}

\SetVerticalCoffin\FigMed{\imageW}{% other middle figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-c}
}

\SetVerticalCoffin\FigBottom{\imageW}{% lower figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-c}
}

\SetVerticalCoffin\FigRight{\imageW}{% lower right figure
    \includegraphics[height=\imageW,width=\imageW]{example-grid-100x100pt}
}   
    
%********************************************* set & assembly the content of even and odd pages 
\SetVerticalCoffin\FrameOddx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}    
\SetVerticalCoffin\FrameEvenx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}

%%%%%%  FOR TESTING  ONLY, comment for final version
%\SetVerticalCoffin\FrameOddx{\textwidth}{\fboxsep = 0pt \framebox{\color{red!10}\rule{\textwidth}{\textH}}} 
%\SetVerticalCoffin\FrameEvenx{\textwidth}{\fboxsep = 0pt \framebox{\color{blue!10}\rule{\textwidth}{\textH}}}
%%%%%% 

\SetVerticalCoffin\Titlex{2in}{% title, the same in odd and even pages
 \sffamily \Large \centering 0. The Fool
 }

\newlength{\Hoffset}
\setlength{\Hoffset}{\oddsidemargin}

\newlength{\Hgap}
%\setlength{\Hgap}{(\pagewidth -\textwidth -2\imageW)/4} % H offset to  text equally distributed


% *************** odd pages 
\JoinCoffins*\FigTop[hc,t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameOddx[l,t]\FigTop[r,t](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,vc]\FigMid[r,vc](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,vc]\FigMed[r,vc](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,b]\FigBottom[r,b](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[r,b]\FigRight[l,b](\Hgap,0pt)
\JoinCoffins*\FrameOx[r,t]\FrameOddx[l,t](\Hoffset,-\baselineskip)

% *************** even pages
\JoinCoffins*\FrameEvenx[hc, t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameEx[hc,vc]\FrameEvenx[l,t](\Hoffset,-\baselineskip)   
%*********************************************  
    
\hspace{2ex} % H offset
\begin{minipage}{\textwidth-5ex}
\textbf{Mercenarium Function:} The Fool is summoned into play. It has a face value of (L), and no suit. The Fool is not a Mercenary and cannot be bought.\\

When The Fool is summoned, roll the Fool die and place it on the card. The number rolled determines the strength of The Fool’s aura; if a 4 is rolled, then The Fool is considered to have 4 dots on every edge. The Fool blocks all suits in aura ties. If (0) appears on The Fool die, all captures involving The Fool are annihilations. The player who controls The Fool may use their turn action to re-roll the Fool die. Whenever The Fool captures an enemy card, the player who controls The Fool must re-roll the Fool die.\\

If The Fool is moved by the effects of III. Optimo, IX. The Shade, or XI. Visionaire, its die value remains the same.\\

\textbf{Dragonfruit Core Meaning / Secondary Themes / Alteration:}
\textbf{Lessons} / Ignorance, Toil, Anxiety / THE FOX
(color/geometry: indigo sphere) (card value: \textbf{L}) (astrological sign: \textbf{eye of horus})\\

The Fool represents suffering and ignorance, and the masks that we hide behind for protection. It calls towards unresolved trauma, recurring struggles, and lessons that we have yet to learn. It contains the keys to liberation.\\

%Its core meaning (Lessons) suggests opportunities for growth that we do not recognize or take advantage of, which forces us to relive painful trials. Its secondary themes (Ignorance, Toil, Anxiety) elicit the most difficult parts of life, in which our perspectives punish us for things that we have no control over. Its alteration (THE FOX) means a flash of awareness – a sudden recognition – that lets us laugh at, savor, and alchemize our pain into something better.\\

%\textbf{Lords} represent \textbf{LESSONS}: “The Fool.” These cards present opportunities to transmute pain or discomfort into spiritual growth. When Lords appear, they give us a chance to reflect on the ways we can improve or balance our energy within their sphere.
\end{minipage}

\newpage
\hspace{8ex} % H offset
\begin{minipage}{\textwidth-16ex}
    3. stuff
\end{minipage}

\end{document}

答案1

让我们看看我是否正确理解了您的要求。除了 minipage 之外,还需要其他工具。

我所知道的将图形和文本放置在页面特定位置的最佳工具是包xcoffins

简而言之,它将物品放入带有多个手柄的特殊盒子中。手柄可让盒子精确连接在一起,并在必要时添加 XY 偏移。

该工具的行为几乎类似于布局设计程序(没有 GUI),因为内容独立于几何设置,并且还允许您使用它们的相对位置指定其在页面上的位置,类似于您在问题中提出的规范。

对于奇数页,有六个盒子(称为棺材):4 个图形、标题和一个用作其他盒子的收集器的框架。

对于偶数页只需要一个框,因为标题被重复使用,只是放在不同的地方。

在以适当的偏移量连接这些框之后,结果将作为文本对象放置在当前插入点。这是在程序包的帮助下完成的atbegshi,该程序包会在发货时插入奇数页或偶数页的组件。

文本本身包含在小页面中。手动选择的偏移量会将文本在小页面内水平移动。

您可以使用模板更改\textH、框架的文本高度、以及\imageW图形的宽度和高度,或者\textwidth查看组件如何适应自身。

对于“最终”版本,请注释掉标记为仅用于测试的两行。这将消除黑框和背景颜色。(或设置\color{white}

很抱歉在解决方案中工作时没有看到您的 MWE。(无论如何我无法编译它)。

\documentclass[10pt]{article}   
\usepackage{xcoffins}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}

\usepackage{ifthen,changepage} % check odd or even page
\usepackage{nopageno} % supress page number

%%%%%%%  FOR TESTING  ONLY, comment for final version
%\usepackage{showframe}  %added
%\renewcommand*\ShowFrameColor{\color{red}}    %added

\usepackage[% main page specs
 papersize={8in,8in}, %specs
 textwidth=4in,  %specs
 marginratio=1:1
 ]{geometry}

\usepackage{kantlipsum} % dummy text

\usepackage{atbegshi}

\AtBeginShipout{\AtBeginShipoutAddToBox{%  shipout even and odd pages title and figures
            \checkoddpage
        \ifthenelse{\boolean{oddpage}}{\TypesetCoffin\FrameOx}{\TypesetCoffin\FrameEx}}
    }

\NewCoffin\FrameOx
\NewCoffin\FrameEx

\NewCoffin\FrameOddx
\NewCoffin\FrameEvenx

\NewCoffin\FigTop
\NewCoffin\FigMed
\NewCoffin\FigBottom
\NewCoffin\FigRight
\NewCoffin\Titlex


%%%%%%%%%   set figures width/heigth  plus height of text area
\newlength{\imageW}
\setlength{\imageW}{1.6in} % heigth and width of the figures, max =2in <<<<<<<<<<<<
\newlength{\textH}
\setlength{\textH}{6in} % heigth of text area, min =3\imageW  <<<<<<<<<<<<
%%%%%%%%%%%%%

\begin{document}
    \setlength{\parindent}{0pt}
    
\SetVerticalCoffin\FigTop{\imageW}{% upper figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-a}
}

\SetVerticalCoffin\FigMed{\imageW}{% middle figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-b}
}

\SetVerticalCoffin\FigBottom{\imageW}{% lower figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-c}
}

\SetVerticalCoffin\FigRight{\imageW}{% lower right figure
    \includegraphics[height=\imageW,width=\imageW]{example-grid-100x100pt}
}   
    
%********************************************* set & assembly the content of even and odd pages 
\SetVerticalCoffin\FrameOddx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}    
\SetVerticalCoffin\FrameEvenx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}


%%%%%%  FOR TESTING  ONLY, comment for final version
\SetVerticalCoffin\FrameOddx{\textwidth}{\fboxsep = 0pt \framebox{\color{red!10}\rule{\textwidth}{\textH}}} 
\SetVerticalCoffin\FrameEvenx{\textwidth}{\fboxsep = 0pt \framebox{\color{blue!10}\rule{\textwidth}{\textH}}}
%%%%%% 

\SetVerticalCoffin\Titlex{2in}{% title, the same in odd and even pages
 \sffamily \Large \centering Title goes here  \\ second line
 }

\newlength{\Hoffset}
\setlength{\Hoffset}{\oddsidemargin}

\newlength{\Hgap}
\setlength{\Hgap}{(\paperwidth -\textwidth -2\imageW)/4} % H offset to  text equally distributed


% *************** odd pages 
\JoinCoffins*\FigTop[hc,t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameOddx[l,t]\FigTop[r,t](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,vc]\FigMed[r,vc](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,b]\FigBottom[r,b](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[r,b]\FigRight[l,b](\Hgap,0pt)
\JoinCoffins*\FrameOx[r,t]\FrameOddx[l,t](\Hoffset,-\baselineskip)

% *************** even pages
\JoinCoffins*\FrameEvenx[hc, t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameEx[hc,vc]\FrameEvenx[l,t](\Hoffset,-\baselineskip)   
%*********************************************  
    
\hspace{2ex} % H offset
\begin{minipage}{\textwidth-5ex}
    1. \kant[1]
\end{minipage}

\newpage
\hspace{8ex} % H offset
\begin{minipage}{\textwidth-16ex}
    3. \kant[3]
\end{minipage}

\end{document}

图形宽度和高度 = 1.6 英寸,文本高度 = 6 英寸

A

图形宽度和高度 = 1.0 英寸,文本高度 = 4 英寸

乙

文本宽度= 3 英寸

C

更新 如何在左侧添加另一个图形

1-创建并填充新图形的框(明显)。

2 - 计算垂直间隙以均匀分布 4 个数字 = (文本高度 - 4 * 图像高度)/3 。 (4 个数字,因此需要 3 个垂直间隙)

笔记:图像的最大宽度和高度是文本高度/数字数量,因此垂直间隙保持> = 0。

3-使每个新图形的连接相对于原点具有增加的垂直偏移量。

% !TeX TS-program = pdflatex

\documentclass[10pt]{article}   
\usepackage{xcoffins}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}

\usepackage{ifthen,changepage} % check odd or even page
\usepackage{nopageno} % supress page number

%%%%%%%  FOR TESTING  ONLY, comment for final version
%\usepackage{showframe}  %added
%\renewcommand*\ShowFrameColor{\color{red}}    %added

\usepackage[% main page specs
 papersize={8in,8in}, %specs
 textwidth=4in,  %specs
 marginratio=1:1
 ]{geometry}

\usepackage{kantlipsum} % dummy text

\usepackage{atbegshi}

\AtBeginShipout{\AtBeginShipoutAddToBox{%  shipout even and odd pages title and figures
            \checkoddpage
        \ifthenelse{\boolean{oddpage}}{\TypesetCoffin\FrameOx}{\TypesetCoffin\FrameEx}}
    }

\NewCoffin\FrameOx
\NewCoffin\FrameEx

\NewCoffin\FrameOddx
\NewCoffin\FrameEvenx

\NewCoffin\FigTop
\NewCoffin\FigMed
\NewCoffin\FigBottom
\NewCoffin\FigRight
\NewCoffin\Titlex
    
\NewCoffin\FigPlus %added fourth fig 

%%%%%%%%%   set figures width/height  plus height of text area
\newlength{\imageW}
\setlength{\imageW}{1.2in} % height and width of the figures, max = text height/number of  fig <<<<<<<<<<<<
\newlength{\textH}
\setlength{\textH}{6in} % heigth of text area, min =3\imageW  <<<<<<<<<<<<
%%%%%%%%%%%%%

\begin{document}
    \setlength{\parindent}{0pt}
    
\SetVerticalCoffin\FigTop{\imageW}{% upper figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-a}
}

\SetVerticalCoffin\FigMed{\imageW}{% middle figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-b}
}

\SetVerticalCoffin\FigBottom{\imageW}{% lower figure
    \includegraphics[height=\imageW,width=\imageW]{example-image-c}
}

\SetVerticalCoffin\FigRight{\imageW}{% lower right figure
    \includegraphics[height=\imageW,width=\imageW]{example-grid-100x100pt}
}   

\SetVerticalCoffin\FigPlus{\imageW}{% fourth fig on left side  ADDED
    \includegraphics[height=\imageW,width=\imageW]{example-grid-100x100pt}
}  
    
%********************************************* set & assembly the content of even and odd pages 
\SetVerticalCoffin\FrameOddx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}    
\SetVerticalCoffin\FrameEvenx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}


%%%%%%  FOR TESTING  ONLY, comment for final version
\SetVerticalCoffin\FrameOddx{\textwidth}{\fboxsep = 0pt \framebox{\color{red!10}\rule{\textwidth}{\textH}}} 
\SetVerticalCoffin\FrameEvenx{\textwidth}{\fboxsep = 0pt \framebox{\color{blue!10}\rule{\textwidth}{\textH}}}
%%%%%% 

\SetVerticalCoffin\Titlex{2in}{% title, the same in odd and even pages
 \sffamily \Large \centering Title goes here  \\ second line
 }

\newlength{\Hoffset}
\setlength{\Hoffset}{\oddsidemargin}

\newlength{\Hgap}
\setlength{\Hgap}{(\paperwidth-\textwidth -2\imageW)/4} % H offset to  text equally distributed

\newlength{\Vgap} % added
\setlength{\Vgap}{(\textH -4\imageW)/3} % V offset 3 gaps distributed beteween 4 images

% *************** odd pages >> changed to add another figure
\JoinCoffins*\FigTop[hc,t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameOddx[l,t]\FigTop[r,t](-\Hgap,0pt)
\JoinCoffins*\FrameOddx[l,t]\FigMed[r,t](-\Hgap,-\Vgap-\imageW)
\JoinCoffins*\FrameOddx[l,t]\FigBottom[r,t](-\Hgap,-2\Vgap-2\imageW)
\JoinCoffins*\FrameOddx[l,t]\FigPlus[r,t](-\Hgap,-3\Vgap-3\imageW) %ADDED

\JoinCoffins*\FrameOddx[r,b]\FigRight[l,b](\Hgap,0pt)
\JoinCoffins*\FrameOx[r,t]\FrameOddx[l,t](\Hoffset,-\baselineskip)

% *************** even pages
\JoinCoffins*\FrameEvenx[hc, t]\Titlex[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameEx[hc,vc]\FrameEvenx[l,t](\Hoffset,-\baselineskip)   
%*********************************************  
    
\hspace{2ex} % H offset
\begin{minipage}{\textwidth-5ex}
    1. \kant[1]
\end{minipage}

\newpage
\hspace{8ex} % H offset
\begin{minipage}{\textwidth-16ex}
    3. \kant[3]
\end{minipage}

\end{document}

图形宽度和高度 = 1.2 英寸,文本高度 = 6 英寸

x4

相关内容