tikz 折线 箭头_这种箭头用LaTex怎么实现?
题主是否下定决心去实现这一目标呢?说实话, 这确实需要一定的付出, 越来越觉得与其如此不如说是浪费时间, 不如直接做PPT来得高效一些吧?不过既然有人询问, 我也恰好对这方面很感兴趣, 第一次接触LaTeX绘图工具软件——tikz, 尝试了一下花了不少时间. 该软件大致呈现出了这样的效果, 但未做颜色填充与整体排版设计基础, 如果有机会可以进一步学习tikz进行完善拓展哦
======================= 更新
近期又温习了一遍TikZ的手册。意识到第一个版本呈现得不够美观。于是对整个流程进行了修订,并更加整洁地重新设计了界面布局。颜色也增添了一些深浅不一的配色方案。
代码如下
\documentclass[]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{bm} %加粗数学字体
\usepackage{color} %调整文本颜色
\usetikzlibrary{tikzmark,positioning} %引入TikZ库中的tikzmark和positioning功能
\tikzstyle{component} = [draw, a rectangular shape with a thick border, dimensions set to 2 em units in both minimum height and width, anchored to the west side]
\renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}} % bold vectors
\begin{document}
\begin{tikzpicture}[overlay, remember picture,>=stealth]
\node[block,draw=blue,dotted] (eq1) {\varphi(\vecx)=\frac{1}{4\pi\epsilon_0}\int_V\tikzmarknode[align=right]{rho}{\rho}(\vecx')[\frac{1}{R}-\vecx'\cdot\tikzmarknode{nabla}{\nabla}\frac{1}{R}+\frac{1}{2}\tikzmarknode{x1}{\vecx}'\vecx':\nabla\nabla\frac{1}{R}+\cdots]\mathrmdV'};
This block node is filled with a blue shade of 60%, featuring a dotted border. It is positioned below the west anchor point of the element located at 1.5cm south of eq1's west side.
这是一个在Visio中绘制的、具有violet颜色且带点线的、位于eq2右侧的模块化节点。
\node[block,draw=red!80,dotted,below=1cm of eq2.west, anchor=west] (eq4) {\mathcal{D}=\int_V3\vecx'\vecx'\rho(\vecx')\mathrm{d}V'};
\bm{\mathcal{D}}_{ij}在区域V内对\bm{x'}进行积分运算得到的结果为\mathcal{D}_{ij}其中i,j取值范围均为1到3。
节点位于eq5节点西边下方1厘米处的块中,并使用cyan颜色绘制;该方程为\varphi(\vec{x})=\ldots
\draw [->, draw=blue] (eq2.north) -- (rho);
% \draw [->] (eq3.north) -- (nabla); \draw [
\draw [
\end{tikzpicture}
\end{document}
另外,请问我能否将documentclass从article改为standalone?更换后发现图片格式出现了问题,请问能否告知具体原因并提供解决方案?
=====================================
以下是原始回答:
没有进行精细地参数调整,所以效果很糙,见谅。
\documentclass[]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tikzpicture}[overlay, remember picture,>=stealth]
\node [rectangle, draw, align=right, text width=0.8\textwidth] (eq1){
\begin{minipage}{\textwidth}
\centering
\phi(x) 表示为 \frac{1}{4\pi \epsilon_0} 乘以积分 \int_V 区域 V 内的电荷密度函数 \rho(x) 乘以括号内各项之和的结果。
具体来说,
括号内第一项为 [\frac{1}{R}],
第二项为 [-x\nabla(\tikzmarknode{nabla})]
第三项为 [\tikzmarknode{x'}{\nabla\nabla} x' : ],
后面省略号前的部分则表示更高阶的小项。
\end{minipage}
};
\node [rectangle, draw, left=1.5cm, below=1.5cm, text width=3.5cm] (eq2){
\begin{minipage}{\textwidth}
\centering
Q=\int_V\rho(x')\mathrm{d}V'
\end{minipage}
};
\node [rectangle, draw, right=1cm, text width=3.5cm] (eq3) at (eq2.east){
\begin{minipage}{\textwidth}
\centering
Q=\int_V\rho(x')\mathrm{d}V'
\end{minipage}
};
\node [rectangle, draw, below=1cm, text width=3.5cm] (eq4) at (eq2.south){
\begin{minipage}{\textwidth}
\centering
Q=\int_V\rho(x')\mathrm{d}V'
\end{minipage}
};
\draw [->] (eq2.north) -- (rho);
% \draw [->] (eq3.north) -- (nabla); \draw [
\draw [
\end{tikzpicture}
\end{document}
为用户筛选出几款实用的LaTeX制图工具教程, 这些资源涵盖了其中涉及的操作及其用法, 官方文档首篇详细介绍了如何绘制基础图表, 您可以直接访问以下地址获取完整的学习资料: TikZ & PGF 手册, 以及相关的入门指南: LaTeX 排版技巧入门.
题主可借此机会学习
代码如下:
该方案由Dominik Haumann提出。该方案旨在通过动态观察与静态估计相结合的方式实现状态估计。
% employ UTF-8 encoding for extended character support
\usepackage[utf8x]{inputenc}
% utilize the T1 font encoding for enhanced typography
\usepackage[T1]{fontenc}
% provide comprehensive mathematical notation support
\usepackage{amsmath}
% enable boldface in mathematical expressions
\usepackage{bm}
% facilitate color customization in text content
\usepackage{color}
\usepackage{tikz}
用于绘制蛇形线的装饰库。\usetikzlibrary{decorations.pathmorphing} % decorations.pathmorphing库的功能描述
% TikZ风格用于绘制\tikzstyle{block} = [draw, rectangle, thick, minimum height=2em, minimum width=2em]
\tikzstyle{sum} = [draw,circle,inner sep=0mm,minimum size=2mm]
\tikzstyle{connector} = [->,thick]
\tikzstyle{line} = [thick]
TikZ样式定义:分支节点被定义为一个圆形元素其内空宽度为零最小尺寸设置为1毫米填充颜色设定为黑色并带有黑色线条
\tikzstyle{guide} = []
\tikzstyle{snakeline} = [connector, decorate, decoration={pre length=0.2cm,
post length=0.2cm, snake, amplitude=.4mm,
segment length=2mm},thick, magenta, ->]
\renewcommand{\vec}[1]{\ensuremath{\boldsymbol{#1}}} % Define bold vector command
\def \myneq {\skew{-2}\not =} % Adjust skew of single not equal sign
\begin{document}
\begin{tikzpicture}[scale=1, auto, >=stealth']
\small
% node positioning with matrix toolkit: a 5×4 matrix \matrix[ampersand substitution=&, row separation set to 0.2cm, column separation set to 0.4cm] {
% \node[block] (F1) {\vec{u}_i=F_i(\{\widetilde{\vec{x}}_j\}_{j=1}^N)}; &
\node[branch] (u1) {}; &
&
\node[block] (f1) {$$}; & \
&
&
&
\node[block] (L1) {\vec{e}_i(\vec{y}_i-\widetilde{\vec{y}}_i)};&
\node [sum] (e1) {}; \
&
&
\node[sum] (v1) {}; &
\node[block] (o1) {$$};
&
\
\node[guide] (i1) {}; & & & & \
};
% now link the nodes \draw [line] (F1) -- (u1);
\draw [connector] (u1) -- node {u_i} (f1);
\draw [connector] (f1) -| node[near end] {\vec{y}_i} (e1);
\draw [connector] (e1) -- (L1);
\draw [connector] (L1) -| (v1);
\draw [connector] (v1) -- node {\vec{v}_i} (o1);
\draw [connector] (u1) |- (v1);
\draw [connector] (o1) -| node[pos=0.96] {-} node [near end, swap]
{\widetilde{\vec{y}}_i} (e1);
\draw [connector] (o1.south) -- ++(0,-.5cm) -| node [near start]
{\widetilde{\vec{x}}_i} ((F1.south)+(0.4cm,0em));
% 使用calc库中的偏移功能绘制蛇形线条(并带有偏移量)\draw [snakeline] (i1 - (0.4cm, -1cm)) -- node.
{\{\widetilde{\vec{x}}_j\}_{j\myneqi}} ((F1.south)-(0.4cm,0em));
\draw [snakeline, swap] ((v1.east)-(1.0cm,0.4cm)) -- node
{\{\widetilde{\vec{x}}_j\}_{j\myneqi}} ((o1.west)-(0cm,0.4cm));
\draw [snakeline, swap] ((u1.east)+(0.1cm,-0.4cm)) -- node
{\{\widetilde{\vec{x}}_j\}_{j\myneqi}} ((f1.west)-(0cm,0.4cm));
\end{tikzpicture}
\end{document}
