
複数ページになる可能性のある履歴書用に、2 つの列を持つ並列レイアウトを定義したいと考えています。
左の列には、最初のページに静的な情報 (個人データや連絡先データなど) が含まれ、その後のページでサイズを変更する必要があります (名前またはページのみを含むなど)。
右側の列は、複数のコンテンツ ページ (教育、職務経験など) に対応するために分割可能である必要があります。
私は、右の列を実装するためにtcolorbox
withパラメータを使用し、左の列を実装するために s を使用してこれを実装しようとしていました。左の列のサイズを変更するために/ hooksを使用しています。breakable
overlay
overlay first
overlay middle and last
問題は、左の列のみが正しくサイズ変更されることです。さらに、分割可能なボックスが正しく配置されておらず、テキスト コンテンツがオーバーフローしています。
を使用して、最初のページ以降のすべてのページのボックスを揃え、テキスト幅のサイズを変更する方法はありますかtcolorbox
? でそれが不可能な場合tcolorbox
、より良い解決策は何でしょうか?
ムウェ
\documentclass[a4paper, 12pt]{article}
%
%! Dependencies
%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{titleps}
\usepackage{tikz}
\usepackage{tcolorbox}
\usepackage{blindtext}
%
%! Settings
%
\usetikzlibrary{positioning}
\tcbuselibrary{skins, breakable}
%! blank page style
\newpagestyle{blank}{%
\setheadrule{0pt}%
\setfootrule{0pt}%
\sethead{}{}{}%
\setfoot{}{}{}%
}
%! blank page geometry
\newgeometry{%
%! ignore header, footer, margin par
noheadfoot%
, nomarginpar%
, ignoreall%
, width=\paperwidth%
, height=\paperheight%
}
\savegeometry{blank}
\pagestyle{blank}
\loadgeometry{blank}
%
%! Document
%
\begin{document}
\begin{tcolorbox}[%
show bounding box%
, colback=white%
, colframe=white
, borderline={0pt}{0pt}{white}%
, sharp corners%
, breakable%
, height fixed for=all%
, text width=0.65\paperwidth%
, overlay first={%
\tikz{%
\draw[use as bounding box, fill=black] rectangle (0.3\paperwidth, \paperheight);%
\node[text=white, below right=0pt and 0pt of current bounding box.north west] {%
\begin{tabular}{l}
0.3\textbackslash paperwidth\\
side\\
bar
\end{tabular}
};%
}%
}%
, overlay middle and last={%
\tikz{%
\draw[use as bounding box, fill=black] rectangle (0.15\paperwidth, \paperheight);%
\node[text=white, below right=0pt and 0pt of current bounding box.north west] {%
\begin{tabular}{l}
0.15\\
\textbackslash paperwidth\\
side\\
bar
\end{tabular}
};%
}%
}%
]%
\blindtext[10]
\end{tcolorbox}
\end{document}
答え1
との主な違いflowfram
は、 がフレームをテキストで埋めるのに対し、 は内側の sep マージンを追加することです。フレームのサイズを小さくするか、 やなどtcolorbox
を追加して、自分でマージンを追加することを忘れないでください。\leftskip
\rightskip
ページが分割された段落に注意してください。
\documentclass[a4paper, 12pt]{article}
%
%! Dependencies
%
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
\usepackage[margin=0pt]{geometry}% use entire page
\usepackage{flowfram}
\usepackage{tikz}
\usepackage{lipsum}
\AtBeginDocument{\pagestyle{empty}}
%
%! Settings
%
\newstaticframe[1]{0.3\paperwidth}{\paperheight}{0pt}{0pt}[first]
\newstaticframe[>1]{0.15\paperwidth}{\paperheight}{0pt}{0pt}[second]
\setstaticframe*{first,second}{backcolor=black,textcolor=white}
\begin{staticcontents*}{first}
\begin{center}
default is vertically centered
\end{center}
\end{staticcontents*}
\begin{staticcontents*}{second}
But you can use \verb$\vspace*{\fill}}$ to force text to the top or bottom.
\vspace*{\fill}
\end{staticcontents*}
\newflowframe[1]{0.65\paperwidth}{\paperheight}{.35\paperwidth}{0pt}
\newflowframe[>1]{0.8\paperwidth}{\paperheight}{.2\paperwidth}{0pt}
\begin{document}
\lipsum[1-12]
\end{document}