我的工作中有多个条目。因此,我试图更改甘特图的条目。但我无法进行必要的更改。
\documentclass[xcolor=dvipsnames, aspectratio=169, 11pt]{beamer}
\usepackage[top=.8in, bottom=.8in, left=.8in, right=.8in,landscape]{geometry}
\usepackage{tikz,pgfgantt}
\usepackage[inline]{enumitem}
\usepackage{xcolor}
\begin{document}
\thispagestyle{empty}
\section*{}
\resizebox{0.94\textwidth}{!}{%
\begin{tikzpicture}%[node distance=0cm]
%\node[align=center] at (0,0) (o){};% {This is\\ adjust node};
\begin{ganttchart}[y unit title=.6cm,
y unit chart=1cm,
%vgrid={*6{white}, *1{black,dashed,thick}, *2{white}, *{1}{black,thick}, *8{white}}
vgrid={*{2}{lightgray},*{1}{black!60},*{2}{lightgray},*{1}{black!80}},
hgrid={lightgray},
today=18.25,
today rule/.style={
draw=blue,
dash pattern=on 3.5pt off 4.5pt,
line width=1.5pt
},
%newline shortcut=true,
%bar label anchor/.append style={align=right, text width=8em},
bar label node/.append style={align=left, text width=6cm},
bar label node/.append style={anchor=east},
%title label anchor/.style={below=-1.6ex},
title left shift=0,
title right shift=0,
title height=1,
bar/.style={fill=gray!80},
incomplete/.style={fill=white},
progress label text={},
bar height=.4%,
%group right shift=0,
%group top shift=.6,
%group height=.3
]{1}{30}
% \gantttitle{Time Period}{36} \\
\gantttitle{1234--0011}{6}
\gantttitle{1124--0011}{6}
\gantttitle{1141--0011}{6}
\gantttitle{4121--2065}{6}
\gantttitle{122--223}{6}\\
\gantttitle{A}{3}
\gantttitle{S}{3}
\gantttitle{V}{3}
\gantttitle{Q}{3}
\gantttitle{T}{3}
\gantttitle{M}{3}
\gantttitle{Q}{3}
\gantttitle{H}{3}
\gantttitle{W}{3}
\gantttitle{B}{3}\\
%% \gantttitlelist{}{1}\\
%% \gantttitlelist{1,...,36}{1}\\
%% \gantttitlelist{"J","F","M","A","M","J","J","A","S","O","N","D",
%% "J","F","M","A","M","J","J","A","S","O","N","D",
%% "J","F","M","A","M","J","J","A","S","O","N","D"}{1}\\
\ganttbar[name=b1]{\small\setlist{nolistsep}\vspace{-1em}\begin{itemize}[noitemsep]\item[1.] Testing\hfill \textcolor{gray}{\raisebox{.5em}{$\cdots$}}\end{itemize}}{1}{6} \ganttnewline
\ganttbar[name=b2]{\small\setlist{nolistsep}\vspace{-1em}\begin{itemize}[noitemsep]\item[2.] Survey \hfill \textcolor{gray}{$\cdots\cdots\cdots\cdots\cdots$}\end{itemize}}{3}{10} \ganttnewline
\ganttbar[name=b3]{\small\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[3.] Analyzing \hfill \textcolor{gray}{\raisebox{0em}{$\cdots$}}\end{itemize}}{4}{12} \ganttnewline
\ganttbar[name=b4]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[4.] Extraction of sentiments (Obj\#2)\hfill \textcolor{gray}{\raisebox{.5em}{}} \end{itemize}}{8}{17} \ganttnewline
\ganttbar[name=b5]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[5.] Tackling \hfill \textcolor{gray}{\raisebox{0em}{$\cdots\cdots\cdots\cdots\cdots\cdots\cdots\cdots$}} \end{itemize}}{12}{20} \ganttnewline
\ganttbar[name=b6]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[6.] Characterization \hfill \textcolor{gray}{\raisebox{0em}{$\cdots\cdots$}} \end{itemize}}{15}{22} \ganttnewline
\ganttbar[name=b7]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[7.] Effect \hfill \textcolor{gray}{\raisebox{0em}{$\cdots$}} \end{itemize}}{16}{26} \ganttnewline
\ganttbar[name=b8]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[8.] Compilation \hfill \textcolor{gray}{\raisebox{0em}{$\cdots\cdots\cdots\cdots\cdots\cdots\cdots$}} \end{itemize}}{27}{30} %\ganttnewline
%
% \ganttbar[name=b9]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[9.] Semantic Module Design \hfill \textcolor{gray}{\raisebox{0em}{$\cdots$}} \end{itemize}}{20}{27} \ganttnewline
%
% \ganttbar[name=b10]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[10.] Semantic Fusion and Re-Identification \hfill \textcolor{gray}{\raisebox{.5em}{$\cdots\cdots\cdots$}} \end{itemize}}{27}{33} \ganttnewline
%
% \ganttbar[name=b11]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[11.] Report Preparation\hfill \textcolor{gray}{{$\cdots\cdots\cdots$}} \end{itemize}}{34}{36}
\end{ganttchart}
%\node[fill,circle,inner sep=2pt] at (b1) {}; %This line is for demo
%\node[fill,circle,inner sep=3pt] at (o) {};
% \draw[dashed] (o) |- (b1); % This too!
\end{tikzpicture}}
\begin{block}{}
\begin{itemize}
\item Explored
\item current
\item It a
\item Innovating
\end{itemize}
\end{block}
\end{document}
答案1
不要使用
enumitem
带有 beamer 的软件包,它们不兼容beamer 已经
geometry
为您加载了该软件包。您不能使用冲突的选项再次加载它beamer 已经加载了该
xcolor
包,无需再次加载您缺少
frame
环境。这是 beamer 设置其页面元素的最关键部分。不要将任何文本放置在框架环境之外我建议不要
\thispagestyle{empty}
使用plain
框架与其手动对项目进行编号和格式化,不如让 latex 为你完成这些工作
如果你仍然想调整列表的间距,请查看https://stackoverflow.com/a/72557572/2777074如何在不使用不兼容的软件包的情况下做到这一点
\documentclass[xcolor=dvipsnames, aspectratio=169, 11pt]{beamer}
\geometry{top=.8in, bottom=.8in, left=.8in, right=.8in,landscape}
\usepackage{tikz,pgfgantt}
%\usepackage[inline]{enumitem}
%\usepackage{xcolor}
\newcounter{foo}
\setcounter{foo}{0}
\newcommand{\myitem}[1]{\refstepcounter{foo}\small\structure{\thefoo.} \parbox[t]{.9\linewidth}{#1\dotfill}\color{gray}}
\begin{document}
\section*{}
\begin{frame}[plain]
%\thispagestyle{empty}
\resizebox{0.94\textwidth}{!}{%
\begin{tikzpicture}%[node distance=0cm]
%\node[align=center] at (0,0) (o){};% {This is\\ adjust node};
\begin{ganttchart}[y unit title=.6cm,
y unit chart=1cm,
%vgrid={*6{white}, *1{black,dashed,thick}, *2{white}, *{1}{black,thick}, *8{white}}
vgrid={*{2}{lightgray},*{1}{black!60},*{2}{lightgray},*{1}{black!80}},
hgrid={lightgray},
today=18.25,
today rule/.style={
draw=blue,
dash pattern=on 3.5pt off 4.5pt,
line width=1.5pt
},
%newline shortcut=true,
%bar label anchor/.append style={align=right, text width=8em},
bar label node/.append style={align=left, text width=6cm},
bar label node/.append style={anchor=east},
%title label anchor/.style={below=-1.6ex},
title left shift=0,
title right shift=0,
title height=1,
bar/.style={fill=gray!80},
incomplete/.style={fill=white},
progress label text={},
bar height=.4%,
%group right shift=0,
%group top shift=.6,
%group height=.3
]{1}{30}
% \gantttitle{Time Period}{36} \\
\gantttitle{1234--0011}{6}
\gantttitle{1124--0011}{6}
\gantttitle{1141--0011}{6}
\gantttitle{4121--2065}{6}
\gantttitle{122--223}{6}\\
\gantttitle{A}{3}
\gantttitle{S}{3}
\gantttitle{V}{3}
\gantttitle{Q}{3}
\gantttitle{T}{3}
\gantttitle{M}{3}
\gantttitle{Q}{3}
\gantttitle{H}{3}
\gantttitle{W}{3}
\gantttitle{B}{3}\\
%% \gantttitlelist{}{1}\\
%% \gantttitlelist{1,...,36}{1}\\
%% \gantttitlelist{"J","F","M","A","M","J","J","A","S","O","N","D",
%% "J","F","M","A","M","J","J","A","S","O","N","D",
%% "J","F","M","A","M","J","J","A","S","O","N","D"}{1}\\
\ganttbar[name=b1]{\myitem{Testing}}{1}{6} \ganttnewline
\ganttbar[name=b2]{\myitem{Survey}}{3}{10} \ganttnewline
\ganttbar[name=b3]{\myitem{Analyzing}}{4}{12} \ganttnewline
\ganttbar[name=b4]{\myitem{Extraction of sentiments (Obj\#2) long sentance with more than one line}}{8}{17} \ganttnewline
\ganttbar[name=b5]{\myitem{Tackling}}{12}{20} \ganttnewline
\ganttbar[name=b6]{\myitem{Characterization}}{15}{22} \ganttnewline
\ganttbar[name=b7]{\myitem{Effect}}{16}{26} \ganttnewline
\ganttbar[name=b8]{\myitem{Compilation}}{27}{30} %\ganttnewline
%
% \ganttbar[name=b9]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[9.] Semantic Module Design \hfill \textcolor{gray}{\raisebox{0em}{$\cdots$}} \end{itemize}}{20}{27} \ganttnewline
%
% \ganttbar[name=b10]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[10.] Semantic Fusion and Re-Identification \hfill \textcolor{gray}{\raisebox{.5em}{$\cdots\cdots\cdots$}} \end{itemize}}{27}{33} \ganttnewline
%
% \ganttbar[name=b11]{\footnotesize\setlist{nolistsep}\vspace{-1.5em}\begin{itemize}[noitemsep]\item[11.] Report Preparation\hfill \textcolor{gray}{{$\cdots\cdots\cdots$}} \end{itemize}}{34}{36}
\end{ganttchart}
%\node[fill,circle,inner sep=2pt] at (b1) {}; %This line is for demo
%\node[fill,circle,inner sep=3pt] at (o) {};
% \draw[dashed] (o) |- (b1); % This too!
\end{tikzpicture}}
\begin{block}{}
\begin{itemize}
\item Explored
\item current
\item It a
\item Innovating
\end{itemize}
\end{block}
\end{frame}
\end{document}