我想编译一个 XeTeX 文件,该文件会引入多个已为页面几何定义棺材的文件。
所有文件都单独编译,当我将它们一起运行时,棺材页面不会显示在最终编译中。我尝试使用子文件包,但发现我的棺材文件无法编译。
另外,我将两个棺材文件的所有内容都放入 MWE 中,以便我们可以排除可能损害文件显示的问题。
主要 TeX MWE:
\documentclass[twoside, openany]{book}
\usepackage[subpreambles=true]{standalone}
\usepackage[paperheight=7.5in,paperwidth=7.5in,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx, amsmath, xcolor, wrapfig, float, subfiles, enumitem, xcoffins, atbegshi, fontspec}
\usepackage[outline]{contour}
\usepackage[none]{hyphenat}
\usepackage[font=small,labelfont=bf]{caption}
\setmainfont{Futura}
\usepackage{titlesec}
\titleformat{\chapter}{}{}{0em}{\bf\LARGE}
\titleformat*{\subsubsection}{\Large\bfseries}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{-1}
\setcounter{tocdepth}{3}
\renewcommand\chaptermark[1]{%
\markright{\thechapter\ #1}}
\newcommand{\changefont}{%
\fontsize{10}{9}\selectfont
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LO]{\textit\rightmark}
\fancyhead[RO]{\thepage}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{\textit\leftmark}
\renewcommand{\headrulewidth}{0pt}
\definecolor{BLUE}{HTML}{23afdc}
\definecolor{RED}{HTML}{a81e2d}
\definecolor{ORANGE}{HTML}{ea6d3c}
\definecolor{YELLOW}{HTML}{e6a327}
\definecolor{GREEN}{HTML}{5fa244}
\definecolor{INDIGO}{HTML}{005988}
\definecolor{VIOLET}{HTML}{7B2C8E}
\begin{document}
\mainmatter
Basic Text imported from a basic text file goes here.
\import{level3/hymns}{I.Fireyes}
\import{level3/hymns}{II.Meatwar}
\end{document}
一、Fireyes档案:
%\documentclass[10pt]{article}
\documentclass[class=article, crop=false]{standalone}
\usepackage[subpreambles=true]{standalone}
\usepackage{xcoffins}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}
\usepackage{ifthen,changepage}
\usepackage{nopageno} % supress page number
%\usepackage[papersize={8in,8in}, top=1in, textwidth=6in, marginratio=1:1 ]{geometry}
\usepackage{atbegshi}
\AtBeginShipout{\AtBeginShipoutAddToBox{% shipout even and odd pages title and figures
\checkoddpage
\ifthenelse{\boolean{oddpage}}{\TypesetCoffin\FrameOx}{\TypesetCoffin\FrameEx}}
}
\NewCoffin\FrameOx
\NewCoffin\FrameOddx
\NewCoffin\FigTT
\NewCoffin\FigBT
\NewCoffin\FigRT
\NewCoffin\FigRM
\NewCoffin\FigLB
\NewCoffin\FigM
%\NewCoffin\FigM
%\NewCoffin\FigR
\NewCoffin\FrameEx
\NewCoffin\FrameEvenx
%%%%%%%%% set figures width/height plus height of text area
\newlength{\imageRT}
\setlength{\imageRT}{1in} % height and width of the figures, max =2in <<<<<<<<<<<<
\newlength{\imageRM}
\setlength{\imageRM}{1.05in}
\newlength{\imageLB}
\setlength{\imageLB}{2.5in}
\newlength{\textsty}
\setlength{\textsty}{2.9in}
\newlength{\textH}
\setlength{\textH}{6in} % height of text area, min =3\imageW <<<<<<<<<<<<
%%%%%%%%%%%%%
\begin{document}
%\newgeometry{papersize={7.5in,7.5in}, textwidth=4in, marginratio=1:1}
\setlength{\parindent}{0pt}
\SetVerticalCoffin\FrameOddx{\textH}{\color{white}\rule{\textH}{\textH}}
\SetVerticalCoffin\FigRT{\imageRT}{% top right
\includegraphics[height=\imageRT,width=\imageRT]{1aries}
}
\SetVerticalCoffin\FigRM{3in}{% middle right
\includegraphics[height=\imageRM,width=3in]{3-1}
}
\SetVerticalCoffin\FigLB{\imageLB}{% leftmost bottom
\includegraphics[height=\imageLB,width=\imageLB]{01}
\vspace{0.25cm}
\begin{center}
\textit{Full of light; Reveal the way.}
\end{center}
}
\SetVerticalCoffin\FigTT{\textsty}{
{\huge I. Fireyes}
\vspace{0.25cm}
{\scriptsize\textbf{Mercenarium Function:} When you sing I. Fireyes, you may choose and discard any number of cards from your hand (you do not have to discard any if you do not wish to). After this, draw cards from the deck until you are holding the maximum of (5) non-hymn cards.}
\vspace{0.15cm}
{\scriptsize If this hymn causes a player to draw the last card in the deck before they are holding (5) non-hymn cards, the game enters singularity (meaning that the deck, hymnal, and discard pile are shuffled together, see \textcolor{red}{“Singularity” p. xx}) and the player then continues to draw from the singularity deck until they are holding 5 cards. After singing this hymn, discard it.}
\vspace{0.15cm}
{\scriptsize If the game enters singularity for any other reason, the effect of I. Fireyes becomes “Draw (5) cards.”}
\vspace{-0.09cm}
%\vfill
\rule{\textsty}{0.1pt}
%\vfill
}
\SetVerticalCoffin\FigBT{\textsty}{
\rule{\textsty}{0.1pt}
\vfill
{\scriptsize\textbf{Dragonfruit Meanings:}
\textbf{Authority} / Charge, Attraction, Influence / Patience}
\vspace{0.15cm}
{\scriptsize Fireyes represents the gathering of energy before great movement; the act of preparation, of planning, or of cultivating the skills and resources needed to affect meaningful change in the world. It represents leadership and asks us to reflect on the true nature of power; as well as the responsibility of action that comes to those who have cultivated themselves (to have authority is to have both power and duty). It describes the tendency for power to accumulate: As resources and respect build, so too the creative capacities of its sovereignty. Its alteration suggests that the way to cultivate authority is through patience – though taking the time to wait, to learn, and to listen.}
\vspace{0.15cm}
{\scriptsize \textbf{Aces} are \textbf{LEADERS}: “The Adept” archetype; Individuals with material power and sources of inspiration or resentment in those around them. Their influence allows them to affect the world in good and bad ways even through small actions. Their powers are amplified by technology, represented in their illustrations as legendary artifacts.}
}
%%%%%%********************* assembly of odd pages
\JoinCoffins\FrameOddx[r,t]\FigRT[r,t]% top right
\JoinCoffins\FrameOddx[l,t]\FigTT[l,t]% top text
\JoinCoffins\FrameOddx[r,b]\FigBT[r,b]% bottom right
\JoinCoffins*\FrameOddx[r,t]\FigRM[r,t](0pt,-\imageRT-0.27in) %Vgap here
\JoinCoffins*\FrameOddx[l,b]\FigLB[l,b] %bottom row
\JoinCoffins*\FrameOx[l,t]\FrameOddx[l,t]
%%%%************************
\SetVerticalCoffin\FrameEvenx{\textwidth}{\color{white}\rule{\textwidth}{\textH}}
\newlength{\Hoffset}
\setlength{\Hoffset}{\oddsidemargin}
% *************** even pages
%\JoinCoffins*\FrameEvenx[hc, t]\Lyricx[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameEx[hc,vc]\FrameEvenx[l,t](\Hoffset,-\baselineskip)
%*********************************************
\clearpage
\pagestyle{empty}
\mbox{}
\clearpage
\vspace*{\fill}
\begin{center}
\textit{Foreign melodies, who is telling these}\\
\textit{animated, complicated fugues?}\\
\textit{Form a symphony, out of your sympathies,}\\
\textit{if you'd please tell us what we should do.}\\
\vspace{0.5cm}
\textit{Hidden in the deepest forest,}\\
\textit{there's a quiet, constant chorus,}\\
\textit{led by men, with eyes, of fire.}\\
\textit{Their chanting's only getting stronger;}\\
\textit{they'll all burn if they're much longer;}\\
\textit{cast into, the funeral pyre.}\\
\vspace{0.5cm}
\textit{Animosity is unbecoming,}\\
\textit{overwhelmed as you may feel.}\\
\textit{Color crossed with destiny,}\\
\textit{you'll be satisfied with what the light reveals.}\\
\vspace{0.5cm}
\textit{Hidden in the deepest forest,}\\
\textit{there's a quiet, constant chorus}\\
\textit{led by men with eyes of fire,}\\
\textit{as they ignite that funeral pyre.}\\
\textit{Their chanting's only getting stronger.}\\
\textit{They'll all burn if they're much longer,}\\
\textit{but they afford their apathy to}\\
\textit{the fire in their eyes.}\\
\end{center}
\vfill
\clearpage
\end{document}
II.肉体战争档案:
\documentclass[class=article, crop=false]{standalone}
\usepackage[subpreambles=true]{standalone}
\usepackage{xcoffins}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{xcolor}
\usepackage{ifthen,changepage}
\usepackage{nopageno} % supress page number
%\usepackage[papersize={8in,8in}, top=1in, textwidth=6in, marginratio=1:1 ]{geometry}
\usepackage{atbegshi}
\AtBeginShipout{\AtBeginShipoutAddToBox{% shipout even and odd pages title and figures
\checkoddpage
\ifthenelse{\boolean{oddpage}}{\TypesetCoffin\FrameOMeatx}{\TypesetCoffin\FrameEMeatx}}
}
\NewCoffin\FrameOMeatx
\NewCoffin\FrameOddMeatx
\NewCoffin\FigMeatTT
\NewCoffin\FigMeatBT
\NewCoffin\FigMeatRT
\NewCoffin\FigMeatRM
\NewCoffin\FigMeatLB
\NewCoffin\FigMeatM
%\NewCoffin\FigM
%\NewCoffin\FigR
\NewCoffin\FrameEMeatx
\NewCoffin\FrameEvenMeatx
%%%%%%%%% set figures width/height plus height of text area
\newlength{\imageMeatRT}
\setlength{\imageMeatRT}{1in} % height and width of the figures, max =2in <<<<<<<<<<<<
\newlength{\imageMeatRM}
\setlength{\imageMeatRM}{1.06285in}
\newlength{\imageMeatLB}
\setlength{\imageMeatLB}{2.5in}
\newlength{\textstyMeat}
\setlength{\textstyMeat}{2.9in}
\newlength{\textHMeat}
\setlength{\textHMeat}{6in} % height of text area, min =3\imageW <<<<<<<<<<<<
%%%%%%%%%%%%%
\begin{document}
\setlength{\parindent}{0pt}
\SetVerticalCoffin\FrameOddMeatx{\textHMeat}{\color{white}\rule{\textHMeat}{\textHMeat}}
\SetVerticalCoffin\FigMeatRT{\imageMeatRT}{% top right
\includegraphics[height=\imageMeatRT,width=\imageMeatRT]{2taurus}
}
\SetVerticalCoffin\FigMeatRM{3in}{% middle right
\includegraphics[height=\imageMeatRM,width=2.9in]{3-2}
}
\SetVerticalCoffin\FigMeatLB{\imageMeatLB}{% leftmost bottom
\includegraphics[height=\imageMeatLB,width=\imageMeatLB]{02}
\vspace{0.25cm}
\begin{center}
\textit{Guardian's gaze; Pay the price.}
\end{center}
}
%\SetVerticalCoffin\FigM{\textwidth}{\rule{2\textwidth}{.1pt}}
\SetVerticalCoffin\FigMeatTT{\textstyMeat}{
\sffamily{\huge II. Meatwar}
\vspace{0.25cm}
{\scriptsize\textbf{Mercenarium Function:} II. Meatwar is sung in reaction to an enemy player’s turn action: If you hold II. Meatwar when any other player moves to capture a card, you may immediately reveal II. Meatwar, discard it, and cause both cards involved in said capture to be annihilated. This applies to any capture interaction, including those involving 0. The Fool or 00. The Fox. If an enemy player uses V. Dragoon to attempt (2) consecutive captures, the player holding II. Meatwar may choose to reveal it after the first or the second capture. The player that reveals and sings this hymn must pass their next turn.}
\vspace{0.15cm}
{\scriptsize A player may attempt to sing XIII. Zodiac as II. Meatwar in reaction to another player’s capture, but only if they can roll the appropriate number on the Zodiac die. See “Meatwar Special” under the hymnal entry for XIII. Zodiac for more information.}
\vspace{0.15cm}
%\vfill
\rule{\textstyMeat}{0.1pt}
%\vfill
}
\SetVerticalCoffin\FigMeatBT{\textstyMeat}{
\rule{\textstyMeat}{0.1pt}
\vfill
{\scriptsize\textbf{Dragonfruit Meanings:}
\textbf{Sacrifice} / Ritual, Suffering, Exchange / Abundance}
\vspace{0.15cm}
{\scriptsize Meatwar represents the cycle of work and harvest; toil undertaken willingly or with awareness, so that a goal can be reached, or a need satisfied. It can also represent necessary social conflict that must be sought out and resolved for growth to take place. It alludes to a voluntary destruction or release of one reality to produce the conditions for another to arise; or else, a change in our focus that allows something to fall away so that something more urgent can be cultivated. It suggests an intentional nature to this sacrifice; that the person making the sacrifice is aware of what they are losing and what they hope to receive by doing so. Its alteration suggests the prosperity attained by those willing to suffer in search of it.}
\vspace{0.15cm}
{\scriptsize 2s are \textbf{SACRIFICES}: acts of giving something up (time, money, pride, family) to gain something in return.}
}
%%%%%%********************* assembly of odd pages
\JoinCoffins\FrameOddMeatx[r,t]\FigMeatRT[r,t]% top right
\JoinCoffins\FrameOddMeatx[l,t]\FigMeatTT[l,t]% top text
\JoinCoffins\FrameOddMeatx[r,b]\FigMeatBT[r,b]% bottom right
\JoinCoffins*\FrameOddMeatx[r,t]\FigMeatRM[r,t](0.1in,-\imageMeatRT-0.49in) %Vgap here
\JoinCoffins*\FrameOddMeatx[l,b]\FigMeatLB[l,b](0.25in,0pt) %bottom row
\JoinCoffins*\FrameOMeatx[l,t]\FrameOddMeatx[l,t]
%%%%************************
\SetVerticalCoffin\FrameEvenMeatx{\textwidth}{\color{white}\rule{\textwidth}{\textHMeat}}
\newlength{\HoffsetMeat}
\setlength{\HoffsetMeat}{\oddsidemargin}
% *************** even pages
%\JoinCoffins*\FrameEvenx[hc, t]\Lyricx[hc,b](0pt,\baselineskip)
\JoinCoffins*\FrameEMeatx[hc,vc]\FrameEvenMeatx[l,t](\HoffsetMeat,-\baselineskip)
%*********************************************
\clearpage
\pagestyle{empty}
\mbox{}
\clearpage
\vspace*{\fill}
\begin{center}
\textit{There's blood to lose.}\\
\textit{Come through.}\\
\textit{Food, is it you?}\\
\textit{You'll save yourself,}\\
\textit{and I will too.}\\
\vspace{0.5cm}
\textit{I don't want the same runes}\\
\textit{that have seemed to fail you;}\\
\textit{all the crimson tales whose}\\
\textit{souls raise hell do.}\\
\textit{There's an ample pain, down,}\\
\textit{looking past your eyes}\\
\textit{where all the anger is.}\\
\vspace{0.5cm}
\textit{It's a Meat War!}\\
\textit{I feel it too,}\\
\textit{and I'm sort of sorry}\\
\textit{this happened to you.}\\
\vspace{0.5cm}
\textit{I'm ready for ascent.}\\
\textit{For the courageous,}\\
\textit{there is no medicine,}\\
\textit{no medicine.}\\
\vspace{0.5cm}
\textit{There's no medicine.}\\
\textit{For courageous men,}\\
\textit{there is no medicine.}\\
\vspace{0.5cm}
\textit{It's a meatwar,}\\
\textit{It's a meatwar.}
\end{center}
\vfill
\clearpage
\end{document}
答案1
由于您能够编译这两个子文件,将两个 pdf 文件合并到主文档中的更简单的方法是使用pdfpages
。
... previous preamble
\usepackage{pdfpages}
\begin{document}
\mainmatter
Basic Text imported from a basic text file goes here.
% \import{level3/hymns}{I.Fireyes}
%
% \import{level3/hymns}{II.Meatwar}
\includepdf[pages=-]{I.Fireyes.pdf}
\includepdf[pages=-]{II.Meatwar.pdf}
\end{document}
请记住,你可以用偏移量来移动棺材。例如第二个文件
\JoinCoffins*\FrameOddMeatx[l,b]\FigMeatLB[l,b](0.25in,-15pt) %bottom row
vspace
比在框架收集器内添加效果更好,
在三个文件中使用相同的geometry
设置,结果看起来更好。
\usepackage[paperheight=7.5in,paperwidth=7.5in,left=1in,right=1in,top=1in,bottom=1in]{geometry}