tikzpicture でページの下部に自動的に改ページを挿入するようにする

tikzpicture でページの下部に自動的に改ページを挿入するようにする

私は Latex の初心者で、tikz パッケージで苦労しています。私は、進捗状況バーとともに人のスキルを出力する自動履歴書ジェネレータを作成しています。このスキル ツリーは、実際には、履歴書に記載したいスキルの数に応じて成長する環境です。

私が直面している問題は、スキル ツリーがページの下部に到達したときに、tikzpicture 環境が自動的にページ区切りを挿入しないことです。このため、スキル ツリーは自動的に次のページに続きません。

代わりに、ページの下部にあるすべての tikzpicture が消えます。この成長するスキル ツリーを次のページに進めるにはどうすればよいですか?

私のMWE:

クラスファイル:

    \ProvidesClass{CV_Tool}
\LoadClass{article}
\NeedsTeXFormat{LaTeX2e}

%----------------------------------------------------------------------------------------
%    REQUIRED PACKAGES
%----------------------------------------------------------------------------------------

\RequirePackage[sfdefault]{ClearSans}
\RequirePackage[T1]{fontenc}
\RequirePackage{tikz}
\RequirePackage{xcolor}
\RequirePackage[absolute,overlay]{textpos}
\RequirePackage{ragged2e}
\RequirePackage{etoolbox}
\RequirePackage{ifmtarg}
\RequirePackage{ifthen}
\RequirePackage{pgffor}
\RequirePackage{marvosym}
\RequirePackage{parskip}
\RequirePackage{color}
\RequirePackage{graphicx}

%----------------------------------------------------------------------------------------
%    COLOURS
%----------------------------------------------------------------------------------------

\definecolor{white}{RGB}{255,255,255}
\definecolor{sidecolor}{HTML}{E7E7E7}
\definecolor{main}{HTML}{0E5484}
\definecolor{barshade}{HTML}{B9B9B9}

%----------------------------------------------------------------------------------------
%    MISC CONFIGURATIONS
%----------------------------------------------------------------------------------------

\newlength{\TotalSectionLength}                                     % Define a new length to hold the remaining line width after the section title is printed
\newlength{\SectionTitleLength}                                         % Define a new length to hold the width of the section title
\newcommand{\profilesection}[1]{%
    \setlength\TotalSectionLength{\linewidth}                           % Set the total line width
    \settowidth{\SectionTitleLength}{\huge #1 }                         % Calculate the width of the section title
    \addtolength\TotalSectionLength{-\SectionTitleLength}                   % Subtract the section title width from the total width
    \addtolength\TotalSectionLength{-2.22221pt}                         % Modifier to remove overfull box warning
    \vspace{8pt}                                            % Whitespace before the section title
    {\color{black!80} \huge #1 \rule[0.15\baselineskip]{\TotalSectionLength}{1pt}}      % Print the title and auto-width rule
}

%----------------------------------------------------------------------------------------
%   SKILL PROGRESS BARS
%----------------------------------------------------------------------------------------
% Command for printing skill progress bars
\newcommand\skills[1]{ 
    \renewcommand{\skills}{
        \begin{tikzpicture}[scale=1]
            \foreach [count=\i] \x/\y in {#1}{
                \draw[fill=barshade,barshade] (0,\i) rectangle (6,\i+0.4);
                \draw[fill=white,main](0,\i) rectangle (\y,\i+0.4);
                \large
                \node [above right] at (-0.15,\i+0.3) {\x};
            }
        \end{tikzpicture}
    }
}

% Command for printing skills text
\newcommand\skillstext[1]{ 
    \renewcommand{\skillstext}{
        \begin{flushleft}[scale=1]
            \foreach [count=\i] \x/\y in {#1}{ 
                \x$ \star $\y
            }
        \end{flushleft}
    }
}



%----------------------------------------------------------------------------------------
%    SIDEBAR LAYOUT
%----------------------------------------------------------------------------------------

\newcommand{\makeprofile}{


    \begin{textblock}{6}(0.5, 0.2)



        \profilesection{Skills}

        \skills
        \skillstext
        \scriptsize

        %------------------------------------------------

    \end{textblock}
}

.tex ファイル:

\documentclass[a4paper]{CV_Tool}
\begin{document}

%----------------------------------------------------------------------------------------
%    SKILLS
%----------------------------------------------------------------------------------------

        \skills{
            {Coaching/3},                       %{<Skill>/{<value between 0 and 6>
            {consulting/3},                     %{<Skill>/{<value between 0 and 6>
            {aerodynamics/3},                       %{<Skill>/{<value between 0 and 6>
            {python/3},                     %{<Skill>/{<value between 0 and 6>
            {matlab/3},                     %{<Skill>/{<value between 0 and 6>
            {flow/3},                       %{<Skill>/{<value between 0 and 6>
            {stress/3},                     %{<Skill>/{<value between 0 and 6>
            {engineering/3},                        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {ICT/5.5}}                          %{<Skill>/{<value between 0 and 6>

        \makeprofile % Print the sidebar
\end{document} 

ありがとうございます。追加の説明が必要な場合はお知らせください。

答え1

これは部分的な解決策です。すべてのスキルを異なる行にskills異なるものとして描画し、ページの最後で改行する新しいコマンドを定義します。元の .cls は使用しません。tikzpicture

\documentclass{article}
\usepackage{tikz}

\definecolor{white}{RGB}{255,255,255}
\definecolor{sidecolor}{HTML}{E7E7E7}
\definecolor{main}{HTML}{0E5484}
\definecolor{barshade}{HTML}{B9B9B9}

\newcommand{\skills}[1]{
    \foreach \i/\j in {#1}{%
        \noindent
        \begin{tikzpicture}
        \draw[fill=barshade,barshade] (0,0) rectangle ++(6,.4);
        \draw[fill=white,main] (0,0) rectangle ++(\j,.4);
        \node[font=\large, above right] at (-.15,.3){\i};
        \end{tikzpicture}\\}}

\begin{document}

        \skills{
            {Coaching/3},                       %{<Skill>/{<value between 0 and 6>
            {consulting/3},                     %{<Skill>/{<value between 0 and 6>
            {aerodynamics/3},                       %{<Skill>/{<value between 0 and 6>
            {python/3},                     %{<Skill>/{<value between 0 and 6>
            {matlab/3},                     %{<Skill>/{<value between 0 and 6>
            {flow/3},                       %{<Skill>/{<value between 0 and 6>
            {stress/3},                     %{<Skill>/{<value between 0 and 6>
            {engineering/3},                        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {Business Strategy/4},              %{<Skill>/{<value between 0 and 6>
            {Outsourcing/4},                    %{<Skill>/{<value between 0 and 6>
            {Change Management/4.5},            %{<Skill>/{<value between 0 and 6>
            {Management Consulting/5},          %{<Skill>/{<value between 0 and 6>
            {Interim Management/5.5},           %{<Skill>/{<value between 0 and 6>
            {Operations Management/5.5},        %{<Skill>/{<value between 0 and 6>
            {ICT/5.5}}                          %{<Skill>/{<value between 0 and 6>

\end{document}

ここに画像の説明を入力してください

関連情報