帮我在 latex 中写出下面图片的代码

帮我在 latex 中写出下面图片的代码

我在 Latex 文档中写入下图代码时遇到了问题。请为我提供指导。 在此处输入图片描述

答案1

\documentclass[border=3.141592]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                decorations.pathreplacing,
                    calligraphy} % had to be loaded after decorations.pathreplacing

\begin{document}
    \begin{tikzpicture}[
            > = Straight Barb,
node distance = 8mm and 24mm,
    BC/.style = {% Brace Calligraphic
        decorate,
        decoration={calligraphic brace, #1,% for mirror
                    pre =moveto, pre  length=1pt,
                    post=moveto, post length=1pt,
                    raise=6pt, amplitude=6pt},
                    very thick, thick, pen colour={black}
                },
  BC/.default = \empty,
   dot/.style = {circle, fill, inner sep=2pt, outer sep=0pt},
every label/.append style = {align=center}
                    ]
\draw[->]   (0,0.0) node[left=1mm] {$q'(t)$:} -- 
            (8,0.0) node[below left] {$t$};
\draw       (4,0.1) -- ++ (0,-0.2) node[below] {$-\frac{1}{b}$};
%
\draw[BC]   (0,0) -- node[above=11pt] {$-$} (4,0);
\draw[BC]   (4,0) -- node[above=11pt] {$+$} (8,0);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
  q'(t)\colon
  \makebox[0pt][l]{$
    \overbrace{\makebox[2.5cm]{\mathstrut}}^{-}
    \!
    \makebox[0pt][c]{$\mathop{\vert}\limits_{-\frac{1}{b}}$}
    \!
    \overbrace{\makebox[2.5cm]{\mathstrut}}^{+}
  $}
  \makebox[5cm]{\rightarrowfill}_t
\end{equation*}
\end{document}

在此处输入图片描述

答案3

\documentclass[border=1cm]{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
    
    \begin{tikzpicture}
        \draw[->](0,0) -- (5,0) node[midway,yshift=-0.75cm](a) {$-\frac{1}{b}$};
        \draw (2.5,-0.25) -- (2.5,0.25);
        \node[yshift=-0.75cm] at (5,0) {t};
        \node[xshift=-0.75cm] at (0,0) {q´t:};
        %brace -
        \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=10pt]
        (0,0) -- (2.5,0) node [black,midway,xshift=0cm,yshift=0.5cm] 
        {\footnotesize -};
        %brace +
        \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=10pt]
        (2.5,0) -- (5,0) node [black,midway,xshift=0cm,yshift=0.5cm] 
        {\footnotesize +};
        \end{tikzpicture}
    
\end{document}

在此处输入图片描述

相关内容