我有一个两列显示的树,它显示不正确。有一些错误我不知道如何解决它们
\newcommand{\CLASSINPUTbottomtextmargin}{25.4mm}
\newcommand{\CLASSINPUTtoptextmargin}{19.1mm}
\newcommand{\CLASSINPUToutersidemargin}{15.8mm}
\newcommand{\CLASSINPUTinnersidemargin}{17mm}
\setlength{\textfloatsep}{-5pt}
\documentclass[letterpaper,conference]{IEEEtran}
\ifCLASSINFOpdf
\else
\fi
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{array,multirow,makecell}
\usepackage{lineno}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{amssymb}
\usepackage[templates]{genealogytree}
\usetikzlibrary{shadows}
\usepackage{forest}
\makeatletter
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\setcellgapes{1pt}
\makegapedcells
\newenvironment{multicases}[1]
{\let\@ifnextchar\new@ifnextchar
\left\lbrace\def\arraystretch{1.2}%
\array{@{}l*{#1}{@{\quad}l}@{}}}
{\endarray\right.\kern-\nulldelimiterspace}
\makeatother
\newcommand{\RN}[1]{
\textup{\uppercase\expandafter{\romannumeral#1}}
}
\modulolinenumbers[5]
\begin{document}
this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.
\begin{figure*}[!h]
\centering
{\footnotesize
\begin{forest}
for tree={
if level=0{align=center}{
align={@{}C{45mm}@{}},
},
draw,
font=\sffamily\bfseries,
edge path={
\noexpand\path [draw, \forestoption{edge}] (!u.parent anchor) -- +(0,-5mm) -| (.child anchor)\forestoption{edge label};
},
parent anchor=south,
child anchor=north,
l sep=10mm,
tier/.wrap pgfmath arg={tier #1}{level()},
edge={ultra thick, rounded corners=2pt},
inner color=white,
outer color=white,
rounded corners=2pt,
drop shadow,
}
[level x
[level x
[level x
[level x]
[level x]
[level x]
]
]
[level y
[level y]
[level y
[level y
[level y]
]
[level y]
[level y]
]
]
]
\end{forest}
}
\end{figure*}
this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.
\end{document}
谢谢
答案1
这不是一个完整的答案,因为这里的代码不应该被用作其他人使用的示例。有两个问题:
- 中有一个空行
forest
。 - 您没有定义
C
列类型。
修复这些问题后,代码即可无错误运行。
\newcommand{\CLASSINPUTbottomtextmargin}{25.4mm}
\newcommand{\CLASSINPUTtoptextmargin}{19.1mm}
\newcommand{\CLASSINPUToutersidemargin}{15.8mm}
\newcommand{\CLASSINPUTinnersidemargin}{17mm}
\setlength{\textfloatsep}{-5pt}
\documentclass[letterpaper,conference]{IEEEtran}
\ifCLASSINFOpdf
\else
\fi
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{array,multirow,makecell}
\usepackage{lineno}
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{amssymb}
\usepackage[templates]{genealogytree}
\usepackage{forest}
\usetikzlibrary{shadows}
\makeatletter
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\setcellgapes{1pt}
\makegapedcells
\newenvironment{multicases}[1]
{\let\@ifnextchar\new@ifnextchar
\left\lbrace\def\arraystretch{1.2}%
\array{@{}l*{#1}{@{\quad}l}@{}}}
{\endarray\right.\kern-\nulldelimiterspace}
\makeatother
\newcommand{\RN}[1]{
\textup{\uppercase\expandafter{\romannumeral#1}}
}
\modulolinenumbers[5]
\begin{document}
this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.this is just a text.
\begin{figure*}[!h]
\centering
{\footnotesize
\begin{forest}
for tree={
if level=0{align=center}{
align={@{}C{45mm}@{}},
},
draw,
font=\sffamily\bfseries,
edge path={
\noexpand\path [draw, \forestoption{edge}] (!u.parent anchor) -- +(0,-5mm) -| (.child anchor)\forestoption{edge label};
},
parent anchor=south,
child anchor=north,
l sep=10mm,
tier/.wrap pgfmath arg={tier #1}{level()},
edge={ultra thick, rounded corners=2pt},
inner color=white,
outer color=white,
rounded corners=2pt,
drop shadow,
}
[level x
[level x
[level x
[level x]
[level x]
[level x]
]
]
[level y
[level y]
[level y
[level y
[level y]
]
[level y]
[level y]
]
]
]
\end{forest}
}
\end{figure*}
this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.this is just a text.this is just a text.this is just a text.this is just a
text.
\end{document}
但是,你的树太宽了。这个问题需要解决,也许可以使用模式landscape
。