o(∩_∩)o
o(∩_∩)o
这家伙很懒,什么也没写!

注册于 5年前

回答
15
文章
0
关注者
0

找到答案了,@u70550 谢谢大佬帮忙

\documentclass{ctexbeamer}
\usepackage{tikz}
\usetikzlibrary{calc}
\setbeamercolor{normal text}{bg=teal}%背景色
\setbeamertemplate{footline}{
  \begin{tikzpicture}
    \def\r{1pt}
    \def\d{0.3pt}
    \coordinate (A) at (0,1em);
    \coordinate (B) at ($(A)+(0:{\paperwidth})$);
    \draw[red,line cap=rect] (A)--(B);
    \node[anchor=south west,inner sep=0pt,outer sep=0pt,fill=red,draw=red] at (0,0){\color{white}测试测试测试};
  \end{tikzpicture}
}
\begin{document}

\begin{frame}
  测试
\end{frame}

\end{document}

请先了解一下什么是MWE,你代码不完全,连\都没有。你的\quan又是什么东西。
以下是代码

\documentclass{ctexart}
\usepackage{tkz-euclide,enumitem,mathtools,amsmath}
\usepackage{wrapfig2}
\usetikzlibrary{calc}
\begin{document}
    已知$\triangle ABC$中,$AB=AC=12$厘米,$BC=9$厘米,点$D$为$AB$的中点。
    \begin{wrapfigure}{r}{0.3\linewidth}
        \begin{center}
            \begin{tikzpicture}[scale=0.4, font=\small]
                \tikzset{
                arr/.style={postaction=decorate,
                    decoration={markings,mark=at position .8 with {\arrow[thick]{#1}}}
                }}
                % ===== 定义点 =====
                \tkzDefPoints{9/0/C, 0/0/B, 3/0/P}
                \tkzDefShiftPoint[B](65:12){A}
                \tkzDefMidPoint(A,B)
                \tkzGetPoint{D}
                \tkzCalcLength(B,P)
                \tkzGetLength{dBP}
                \tkzDefPointWith[linear normed,K=\dBP](C,A)
                \tkzGetPoint{Q}
                % ===== 绘制图形 =====
                \tkzDrawPolygon[thick](A,B,C)
                \tkzDrawSegments[thick](D,P Q,P) 
                \tkzDrawSegments[arr=stealth](B,P C,Q)
                % ===== 标示点 =====
                \tkzLabelPoints[above](A)
                \tkzLabelPoints[left](B)
                \tkzLabelPoints[right](C)
                \tkzLabelPoints[above left=-2pt](D)
                \tkzLabelPoints[above right=-2pt](Q)
                \tkzLabelPoints[below](P)
            \end{tikzpicture}
        \end{center}
    \end{wrapfigure}
    \begin{enumerate}[before=\vspace{-\baselineskip},label={(\arabic*)},labelindent=1em,labelwidth=0.2em,labelsep=0.2em,leftmargin=3em,parsep=-2pt]
    \item   如果点$P$在线段$BC$上以3厘米秒的速度由$BC$运动,同时点$Q$在线段$CA$上由$C$点向$A$点运动。若点$Q$的运动速度与点$P$的运动速度相等,当运动1秒时,$\triangle BPD$与$\triangle CQP$ 
            是否全等?若点$Q$的运动速度与点$P$的运动速度不相等,当点$Q$的运动速度为多少时,$\triangle BPD \cong \triangle CPQ$?
    \item   若点$Q$以(1)中,的速度从点 $C$ 出发,点 $P$ 以原来运动速度从点$B$出发,都逆时针沿$\triangle ABC$三边运动,多长时间$P$与$Q$第一次相遇,此时在$\triangle ABC$哪条边上相遇?
    \end{enumerate}
\end{document}

image.png

解决了,要勾选gnuplot的添加到环境变量,安装的太快了,看掉了

这是移动\bool_new:N \l_is_answer_bool位置后的代码

\documentclass{ctexart}
\usepackage{xparse,enumitem}
\ExplSyntaxOn
\bool_new:N \l_only_show_answer_bool
\bool_new:N \l_is_answer_bool
\bool_set_false:N \l_only_show_answer_bool%想通过这个bool来只显示答案
\seq_new:N \l_answer_seq
\NewDocumentCommand{\answer}{+m}{
    \seq_gput_right:Nn \l_answer_seq{#1}
}
\NewDocumentEnvironment{ceshi}{O{} +b}{%
    \bool_if:NTF \l_only_show_answer_bool
    {   
        
        \bool_set_false:N \l_is_answer_bool
        \tl_map_inline:nn {#2}
        {
            \bool_if:NTF \l_is_answer_bool
            {
                \answer{##1}
                \bool_set_false:N \l_is_answer_bool
            }
            {
                \str_compare:nNnT {\tl_to_str:n {##1}} = {\tl_to_str:n {\answer}}
                {
                    \bool_set_true:N \l_is_answer_bool
                }
            }
        }
    }
    {
        \UseHook{env/enumerate/before}%
        \UseHook{env/enumerate/begin}%
        \enumerate[#1]%
              #2
        \endenumerate%
        \UseHook{env/enumerate/end}%
        \UseHook{env/enumerate/after}%
    }
}{}
\AtEndDocument{
    \newpage
    \begin{flushleft}
        这是答案
    \end{flushleft}
    \seq_map_inline:Nn \l_answer_seq{
        \noindent
        #1
        \par
    }
}
\ExplSyntaxOff
\begin{document}
    \begin{ceshi}[resume]
        \item   这是第一个\answer{答案1}
        \item   这是第二个\answer{答案2}
    \end{ceshi}
\end{document}

佬,还有两个问题
第一个是,组内是\task被花括号包裹在里面的意思吗?
第二个是,没有解析到item是什么意思呀?
第三个是,查了interface3\exp_not:V还是不太明白
麻烦了

mwe.zip
加入on line

\documentclass{ctexart}
\usepackage[most]{tcolorbox}
\usepackage{zhlipsum}

% 定义一个不会换行的命令
\newtcbox{\myexample}{
    enhanced,
    left=1pt,
    right=1pt,
    top=2pt,
    bottom=2pt,
    boxrule=-1pt,
    toprule=1pt,
    colback=white,
    colframe=cyan,
    on line, % 确保命令在行内执行,不会导致换行
}

\newcounter{examplecounter}
\setcounter{examplecounter}{1}
\newtcolorbox{example}{
    enhanced,
    breakable,
    colback=white,
    colframe=white,
    colbacktitle=cyan!10,
    coltitle=cyan,
    attach title to upper,
    title=\myexample{例~\theexamplecounter} ,
    before upper=\tcbtitle \;,
}

\begin{document}

\begin{example}
    \zhlipsum[12]
\end{example}

\end{document}

谢谢大佬,长知识了,但是不明白这个问题是怎么产生的

雾月老师,我还是没有修改正确,麻烦看一下

\documentclass{ctexart}
\usepackage{tabularray}
\SetTblrInner[tblr]{%
    cells={c},
    hlines,
    vlines,
}
\begin{document}
    \ExplSyntaxOn

    \newcommand{\tl}{  
    \seq_set_split:Nnn \l_my_seq_a {,}{a,b,c,d,ef}
    \int_step_inline:nnn{1}{\seq_count:N \l_my_seq_a}
    {
        \int_compare:nNnTF {##1}<{\seq_count:N \l_my_seq_a}{
            ##1 & 
        }
        {
            ##1 \\
        }
    }   
    \int_seq_inline:nnn{1}{\seq_count:N \l_my_seq_a}{
        \int_compare:nNnTF {##1}<{\seq_count:N \l_my_seq_a}{
            \seq_item:Nn \l_my_seq_a {##1 &}
        }
        {
            \seq_item:Nn \l_my_seq_a {##1}
        }
    }
    }
    \begin{tblr}[expand=\tl]{}
        \tl
    \end{tblr} 
    \ExplSyntaxOff
\end{document}

经过大佬提醒在外网看到了解决办法加入环境
`begin{NoHyper}
...
end{NoHyper}
`

\documentclass{ctexart}
\usepackage{hyperref}%问题出现在这里,如果不用这个宏包就没问题,但我需要用这个宏包
\usepackage{enumitem}
\newcommand{\juantou}{
     本试卷共4页,22小题,满分150分,考试用时120分钟.\\
    \textbf{注意事项:}
\begin{NoHyper}
    \begin{minipage}[t]{.8\linewidth}%
    \begin{enumerate}[itemsep=0pt,partopsep=0pt,parsep=\parskip,topsep=0pt]
        \item   答卷前,考试务必将自己的姓名、考生号、考场号和座位号填写在答题卡上.用
                2B 铅笔将试卷类型(A)填涂在答题卡相应的位置上.将条形码横贴在答题卡
                右上角“条形码粘贴处”.
        \item   作答选择题时,选出每小题答案后,用 2B 铅笔在答题卡上对应题目选项的答
                案信息点涂黑;如需改动,用橡皮擦干净后,再选涂其他答案.答案不能答在试
                卷上
        \item   非选择题必须用黑色字迹的钢笔或签字笔作答,答案必须写在答题卡各题目指
                定区域内相应位置上;如需改动,先划掉原来的答案,然后再写上新答案;不准
                使用铅笔和涂改液.不安以上要求作答无效.
        \item   考生必须保持答题卡的整洁.考试结束后,将试卷和答题卡一并交回.
    \end{enumerate}
\end{minipage}
\end{NoHyper}
}
\begin{document}
\juantou
\begin{enumerate}
    \item  测试
    \item  测试
    \item  测试
\end{enumerate}
\end{document}

上图贴的代码有问题

\documentclass[margin=1cm]{standalone}
\usepackage{tikz,ctex}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture} 
    \begin{axis}[%
        title=2022年居民消费价格月度涨跌幅度,
        legend pos=north west,
        legend columns=2,
        xlabel=2022年,
        ylabel=$\%$,
        ymin=-3.0,
        ymax=6.0,
        xtick distance=3,
        xtick={1,2,...,12},
        xticklabels={{1月},{2月},{3月},{4月},{5月},{6月},{7月},{8月},{9月},{10月},{11月},{12月}},
        xticklabel style={xshift=-0.25cm,yshift=0mm},
        ytick={-3,0,3,6},
        ylabel style={xshift=3cm,yshift=-0.6cm,rotate=90}
        ]
        \addplot+[mark=*,black] coordinates {
        (1, 0.9)
        (2, 0.9)
        (3, 1.5)
        (4, 2.1)
        (5, 2.1)
        (6, 2.5)
        (7, 2.7)
        (8, 2.5)
        (9, 2.8)
        (10, 2.1)
        (11,1.6)
        (12,1.8)
    };
    \addplot+ [mark=triangle*,black] coordinates {
   (1, 0.4)
   (2, 0.6)
   (3, 0)
   (4, 0.4)
   (5, -0.2)
   (6, 0)
   (7, 0.5)
   (8, -0.1)
   (9, 0.3)
   (10, 0.1)
   (11,-0.2)
   (12,0)
};
\legend{月度同比,月度环比}
    \end{axis} 
    \end{tikzpicture}
\end{document}

请问\advance是什么意思呢?这些命令去哪里看,学习呢?麻烦了

不好意思我附件传错了,谢谢大佬!请问一下expand是tex命令吗?另外expand这些命令,需要看什么文档呢?麻烦了

发布
问题