![枚举环境中项目的交叉引用不起作用](https://linux22.com/image/324225/%E6%9E%9A%E4%B8%BE%E7%8E%AF%E5%A2%83%E4%B8%AD%E9%A1%B9%E7%9B%AE%E7%9A%84%E4%BA%A4%E5%8F%89%E5%BC%95%E7%94%A8%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我为我的小册子写了一个主题参考,但我对其中项目的交叉引用enumerate
不起作用。你能帮忙解释一下为什么会发生这种情况吗?
\documentclass[twosides,9pt]{report}
\usepackage{amsmath, amssymb,latexsym, amscd, amsthm}
\usepackage{tikz}
\usetikzlibrary{angles,quotes,calc}
\usepackage{pgf,tikz}
\usetikzlibrary{patterns,decorations.pathmorphing,decorations.markings}
\usepackage{graphics}
\usepackage{multicol}
\usepackage{enumerate}
\usepackage{amsfonts}
\usepackage{multicol,color}
\usepackage{indentfirst}
\usepackage{fancybox}
\begin{document}
\chapter{Maths Meet }
\noindent\shadowbox{\large Maths Meet 1501}
\begin{enumerate}[\scalebox{1.0521}{\bf\arabic{enumi}.}] \item $N$ is
a positive integer that is divisible by 6 but gives a remainder 6 when
divided by 11. Find the least value of $N$. %Dap an 6 \item $N$ is a
positive integer that gives the same remainder when divided by 3, 4
and 7 but gives a remainder 3 when divided by 11. Find the least value
of $N$. %Dap an 168 \item Galiton chooses a five-digit integer and
then deletes one of its digits to make a four-digit number. The sum of
this four-digit number and the original five-digit number is 42357.
What is the sum of the digits of the original five-digit number? %Dap
so 23.
\item \label{question4} If numbers are arranged in three rows $A, B,
C$ in the following manner, which row will contain the number 1000?
\begin{tabular}{ccccccccc} $A$&1&6&7&12&13&18&19&$\cdots$\\
$B$&2&5&8&11&14&17&20&$\cdots$\\ $C$&3&4&9&10&15&16&21&$\cdots$
\end{tabular}
%Dap an C \item $P_n$ is defined as the product of the digits in the
whole number $n$. For examples, $P_{19}=1\times 9=9$, $P_{32}=3\times
2=6$. Find the value of
\[P_{10}+P_{11}+P_{12}+\cdots+P_{98}+P_{99}.\]%Dap so 2025
\item Give an account of why we have the area formula for triangle.
\item How many five-digit numbers are multiples of 5 and 8? (APMOPS
Year 2001)
%Dap so 2250 \item \parbox[t]{2.049815in}{How manytriangles are there in the figure?}
\hspace{1pt}
\raisebox{-25pt}[10pt]{\setlength{\unitlength}{1pt}
\begin{tikzpicture} \tikzset{scale=.5}
\fill[color=black,fill=white,fill opacity=0.1] (4,4) -- (2,1) -- (6,1)
-- cycle; \draw [color=black] (4,4)-- (2,1); \draw [color=black] (2,1)-- (6,1); \draw [color=black] (6,1)-- (4,4); \draw (3.33,2.99)--
(6,1); \draw (6,1)-- (2.65,1.97); \draw (4,4)-- (3.34,1); \draw
(3.34,1)-- (5.27,2.09); \end{tikzpicture}} %Dap so 24 hinh
\item $ABCD$ is a rectangle. Point $E, F$ are on $BC$ and $CD$
respectively such that the areas of triangles $ABE$ and $ADF$ are 4
cm$^2$ and 9 cm$^2$. Given that the area of $ABCD$ is 24 cm$^2$, find
the area of $AEF$. (APMOPS Year 2001)
\item A string has been cut into 4 pieces, all of different lengths.
The length of each piece is 2 times the length of the next smaller
piece. What fraction of the original string is the longest piece?
\item \parbox[t]{3.09815in}{Toothpicks are used to make a grid that is
60 toothpicks long and 32 toothpicks wide. How many toothpicks are
used altogether?} \hspace{1pt}
\raisebox{-34pt}[10pt]{\setlength{\unitlength}{1pt}
\begin{tikzpicture} \tikzset{scale=.56} \draw [thick] (3,4)-- (2,4);
\draw [thick] (2,5)-- (2,4); \draw [thick] (2,4)-- (3,4); \draw
[thick] (3,4)-- (3,5); \draw [thick] (3,5)-- (2,5); \draw [thick]
(3,5)-- (3,4); \draw [thick] (3,4)-- (4,4); \draw [thick] (4,4)--
(4,5); \draw [thick] (4,5)-- (3,5); \draw [thick] (2,3)-- (1,3); \draw
[thick] (1,5)-- (4,5); \draw [thick] (1,3)-- (1,5); \draw [thick]
(3,3)-- (3,5); \draw [thick] (1,3)-- (3,3); \draw [thick] (2,3)--
(2,5);
%\draw [thick] (1,3)-- (1,2); %\draw [thick] (1,2)-- (2,2); %\draw
[thick] (2,2)-- (2,3); \draw[thick] (3,4)-- (3,3); %\draw [thick]
(3,3)-- (4,3); %\draw [thick] (4,3)-- (4,4); \draw [thick] (4,4)--
(3,4); \draw[thick] (4,5)-- (4,4); %\draw[thick](4,4)-- (5,4); %\draw
[thick] (5,4)-- (5,5); %\draw [thick] (5,5)-- (4,5); \draw[thick]
(1,5)-- (4,5); \draw[thick] (2,5)-- (2,3); \draw[thick] (1,5)-- (1,3);
\draw[thick] (3,5)-- (3,3); \draw[thick] (4,5)-- (4,4); \draw[thick]
(1,4)-- (4,4); \draw[thick] (2,3)-- (3,3); \draw[dashed] (4,5)--
(5,5); \draw[dashed] (4,4)-- (5,4); \draw[dashed] (4,4)-- (4,3);
\draw[dashed] (3,3)-- (4,3); \draw [dashed](2,3)-- (2,2);
\draw[dashed] (1,3)-- (1,2);
\draw[dashed] (3,3)-- (3,2); \draw[dashed] (4,3)-- (4,2);
\draw[dashed] (4,3)-- (5,3); \draw[color=white,fill=white,fill
opacity=0.1](1,5) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](2,2) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](3,2) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](5,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](5,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](5,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,2) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,2) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,2) circle (.12cm);
\end{tikzpicture}}
\item One of the outer angles of a triangle is 135 degrees. The
difference of two of its inner angles is 29 degrees. What could the
inner angles of this triangle be?
\item An ant is crawling on the edges of a cube, starting from one
vertex. How many edges can it go through the most if it can go on
every edge only once?
\item The sum of ten positive integers, not necessarily distinct, is
1001. If $d$ is the greatest common divisor of the ten numbers, find the maximum possible value of $d$. \item Given four different prime
numbers $a, b,c,d$, if the product of $a\times b\times c\times d$
\end{enumerate}
\chapter*{Topical Reference}
\section{Number theory}
Question \ref{question4} on page \pageref{question4}
\section{Geometry}
\section{Counting}
\end{document}
答案1
这enumerate
包裹提供了一种格式化的方法\item
提供了一种以非常特定的方式文档:
其中一个标记
A
a
I
i
或的出现会分别产生用或1
打印的计数器的值。\Alph
\alph
\Roman
\roman
\arabic
这些字母可以被任何其他 TeX 表达式的字符串包围,但是如果不想将它们视为特殊符号,则这些标记
A
a
I
i
1
必须位于一个组内。{
}
您的使用
\begin{enumerate}[\scalebox{1.0521}{\bfseries \arabic{enumi}}]
永远不会使用任何建议的令牌外部一个组。因此,您将收到以下
LaTeX 警告:计数器不会被打印。 标签为:\scalebox {1.0521}{\bfseries \arabic {enumi}} 位于输入行 XX。
在你的.log
。
但是可以使用分隔参数宏来捕获和格式化以下输出enumerate
:
\documentclass{article}
\usepackage{lipsum}% Just for this example
\usepackage{graphicx,enumerate}
\begin{document}
See Question~\ref{question4}.
\def\enumlabelformat#1\relax{\scalebox{1.0521}{\bfseries #1}}
\begin{enumerate}[\enumlabelformat 1.\relax]
\item \lipsum[1]
\item \lipsum[2]
\item \lipsum[3]
\item \label{question4}\lipsum[4]
\end{enumerate}
\end{document}
然而,enumitem
取代enumerate
并提供一种使用键值方法指定标签的更为优雅的方法。
答案2
\scalebox
环境标签选项中的等的使用enumerate
会搞砸计数器(和标签系统)。最好使用enumitem
并label={\large \bfseries \arabic*.}
更改标签。
不要使用\bf
!
\documentclass[twosides,9pt]{report}
\usepackage{amsmath, amssymb, latexsym, amscd, amsthm}
\usepackage{tikz}
\usetikzlibrary{angles,quotes,calc}
\usepackage{pgf,tikz}
\usetikzlibrary{patterns,decorations.pathmorphing,decorations.markings}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{amsfonts}
\usepackage{multicol}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{indentfirst}
\usepackage{fancybox}
\begin{document}
\chapter{Maths Meet }
\noindent\shadowbox{\large Maths Meet 1501}
\begin{enumerate}[label={\large \bfseries\arabic*.}]
%\begin{enumerate}%[\scalebox{1.0521}{\bfseries \arabic{enumi}.}]
\item $N$ is
a positive integer that is divisible by 6 but gives a remainder 6 when
divided by 11. Find the least value of $N$. %Dap an 6 \item $N$ is a
positive integer that gives the same remainder when divided by 3, 4
and 7 but gives a remainder 3 when divided by 11. Find the least value
of $N$. %Dap an 168 \item Galiton chooses a five-digit integer and
then deletes one of its digits to make a four-digit number. The sum of
this four-digit number and the original five-digit number is 42357.
What is the sum of the digits of the original five-digit number? %Dap
so 23.
\item \label{question4} If numbers are arranged in three rows $A, B,
C$ in the following manner, which row will contain the number 1000?
\begin{tabular}{ccccccccc}
$A$&1&6&7&12&13&18&19&$\cdots$\\
$B$&2&5&8&11&14&17&20&$\cdots$\\
$C$&3&4&9&10&15&16&21&$\cdots$
\end{tabular}
%Dap an C \item $P_n$ is defined as the product of the digits in the
whole number $n$. For examples, $P_{19}=1\times 9=9$, $P_{32}=3\times
2=6$. Find the value of
\[P_{10}+P_{11}+P_{12}+\cdots+P_{98}+P_{99}.\]%Dap so 2025
\item Give an account of why we have the area formula for triangle.
\item How many five-digit numbers are multiples of 5 and 8? (APMOPS
Year 2001) %Dap so 2250 \item \parbox[t]{2.049815in}{How many triangles are there in the figure?} \hspace{1pt}
\raisebox{-25pt}[10pt]{\setlength{\unitlength}{1pt}
\begin{tikzpicture} \tikzset{scale=.5}
\fill[color=black,fill=white,fill opacity=0.1] (4,4) -- (2,1) -- (6,1)
-- cycle; \draw [color=black] (4,4)-- (2,1); \draw [color=black] (2,1)-- (6,1); \draw [color=black] (6,1)-- (4,4); \draw (3.33,2.99)--
(6,1); \draw (6,1)-- (2.65,1.97); \draw (4,4)-- (3.34,1); \draw
(3.34,1)-- (5.27,2.09); \end{tikzpicture}} %Dap so 24 hinh
\item $ABCD$ is a rectangle. Point $E, F$ are on $BC$ and $CD$
respectively such that the areas of triangles $ABE$ and $ADF$ are 4
cm$^2$ and 9 cm$^2$. Given that the area of $ABCD$ is 24 cm$^2$, find
the area of $AEF$. (APMOPS Year 2001)
\item A string has been cut into 4 pieces, all of different lengths.
The length of each piece is 2 times the length of the next smaller
piece. What fraction of the original string is the longest piece?
\item \parbox[t]{3.09815in}{Toothpicks are used to make a grid that is
60 toothpicks long and 32 toothpicks wide. How many toothpicks are
used altogether?} \hspace{1pt}
\raisebox{-34pt}[10pt]{\setlength{\unitlength}{1pt}
\begin{tikzpicture} \tikzset{scale=.56} \draw [thick] (3,4)-- (2,4);
\draw [thick] (2,5)-- (2,4); \draw [thick] (2,4)-- (3,4); \draw
[thick] (3,4)-- (3,5); \draw [thick] (3,5)-- (2,5); \draw [thick]
(3,5)-- (3,4); \draw [thick] (3,4)-- (4,4); \draw [thick] (4,4)--
(4,5); \draw [thick] (4,5)-- (3,5); \draw [thick] (2,3)-- (1,3); \draw
[thick] (1,5)-- (4,5); \draw [thick] (1,3)-- (1,5); \draw [thick]
(3,3)-- (3,5); \draw [thick] (1,3)-- (3,3); \draw [thick] (2,3)--
(2,5);
%\draw [thick] (1,3)-- (1,2); %\draw [thick] (1,2)-- (2,2); %\draw
[thick] (2,2)-- (2,3); \draw[thick] (3,4)-- (3,3); %\draw [thick]
(3,3)-- (4,3); %\draw [thick] (4,3)-- (4,4); \draw [thick] (4,4)--
(3,4); \draw[thick] (4,5)-- (4,4); %\draw[thick](4,4)-- (5,4); %\draw
[thick] (5,4)-- (5,5); %\draw [thick] (5,5)-- (4,5); \draw[thick]
(1,5)-- (4,5); \draw[thick] (2,5)-- (2,3); \draw[thick] (1,5)-- (1,3);
\draw[thick] (3,5)-- (3,3); \draw[thick] (4,5)-- (4,4); \draw[thick]
(1,4)-- (4,4); \draw[thick] (2,3)-- (3,3); \draw[dashed] (4,5)--
(5,5); \draw[dashed] (4,4)-- (5,4); \draw[dashed] (4,4)-- (4,3);
\draw[dashed] (3,3)-- (4,3); \draw [dashed](2,3)-- (2,2);
\draw[dashed] (1,3)-- (1,2);
\draw[dashed] (3,3)-- (3,2); \draw[dashed] (4,3)-- (4,2);
\draw[dashed] (4,3)-- (5,3); \draw[color=white,fill=white,fill
opacity=0.1](1,5) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](2,2) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](3,2) circle (0.12cm); \draw[color=white,fill=white,fill
opacity=0.1](5,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](3,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,3) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](5,5) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](5,4) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](2,2) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](1,2) circle (0.12cm);
\draw[color=white,fill=white,fill opacity=0.1](4,2) circle (.12cm);
\end{tikzpicture}}
\item One of the outer angles of a triangle is 135 degrees. The
difference of two of its inner angles is 29 degrees. What could the
inner angles of this triangle be?
\item An ant is crawling on the edges of a cube, starting from one
vertex. How many edges can it go through the most if it can go on
every edge only once?
\item The sum of ten positive integers, not necessarily distinct, is
1001. If $d$ is the greatest common divisor of the ten numbers, find the maximum possible value of $d$. \item Given four different prime
numbers $a, b,c,d$, if the product of $a\times b\times c\times d$
\end{enumerate}
\chapter*{Topical Reference}
\section{Number theory}
Question \ref{question4} on page \pageref{question4}
\section{Geometry}
\section{Counting}
\end{document}