
Sou bastante novo no Latex e estou tendo dificuldades com o pacote tikz. Estou fazendo um gerador automático de currículos, que imprime as habilidades de uma pessoa junto com uma barra de progresso. Essa árvore de habilidades é, na verdade, um ambiente crescente dependendo de quantas habilidades uma pessoa deseja listar em seu currículo.
O problema que estou enfrentando é que o ambiente tikzpicture não insere automaticamente uma quebra de página quando a árvore de habilidades chega ao final da página. Devido a isso, a árvore de habilidades não continua automaticamente na próxima página.
Em vez disso, todas as imagens tikz abaixo da parte inferior da página desaparecem. Como posso fazer com que essa crescente árvore de habilidades avance para a próxima página?
meu MWE:
arquivo de classe:
\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}
}
Arquivo .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}
Obrigado! por favor, avise-me se esclarecimentos adicionais forem necessários.
Responder1
Esta é uma solução parcial. Ele define um novo skills
comando que desenha cada habilidade como diferente tikzpicture
em uma linha diferente e quebra no final da página. Ele não usa o .cls original.
\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}