첫 번째 페이지 이후 너비 크기가 조정된 깨지기 쉬운 상자를 어떻게 정의할 수 있나요?

첫 번째 페이지 이후 너비 크기가 조정된 깨지기 쉬운 상자를 어떻게 정의할 수 있나요?

잠재적으로 여러 페이지인 이력서에 대해 두 개의 열이 있는 병렬 레이아웃을 정의하고 싶습니다.

왼쪽 열은 첫 번째 페이지에 일부 정적 정보(예: 개인 및 연락처 데이터)를 포함하고 다음 페이지에 맞게 크기를 조정해야 합니다(예: 이름 또는 페이지만 포함).

오른쪽 열은 잠재적인 여러 페이지의 콘텐츠(예: 교육, 업무 경험 등)를 수용할 수 있도록 분리 가능해야 합니다.


나는 오른쪽 열을 구현하고 왼쪽 열에 s를 구현하기 위해 매개변수 tcolorbox를 사용하여 이것을 구현하려고 했습니다 . 왼쪽 열의 크기를 조정하기 위해 / 후크를 사용하고 있습니다 .breakableoverlayoverlay firstoverlay middle and last

문제는 왼쪽 열만 올바르게 크기가 조정된다는 것입니다. 또한 깨지기 쉬운 상자가 올바르게 정렬되지 않아 텍스트 내용이 넘칩니다.

상자를 정렬하고 첫 번째 페이지 이후 모든 페이지의 텍스트 너비를 조정하는 방법이 있습니까 tcolorbox? 으로 가능하지 않다면 tcolorbox더 나은 솔루션은 어떤 모습일까요?


MWE

\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은 프레임을 텍스트로 채우는 반면 tcolorbox내부 sep 여백을 추가한다는 것입니다. 프레임 크기를 줄이거나 \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}

관련 정보