<zz>latex中subfigure间距调整

注意要使用宏包\usepackage{graphicx}和\usepackage{subfigure}

\begin{figure} \centering
\subfigure[figure 1 title.] { \label{fig:a}
\includegraphics[width=0.8\columnwidth]{fig1.eps}
}
\subfigure[figure 2 title.] { \label{fig:b}
\includegraphics[width=0.8\columnwidth]{fig2.eps}
}
\caption{ general title. }
\label{fig}
\end{figure}

Note:
如果前图漏掉 \caption{},后图的编号可能不会从(a)算起。改变编号用
\setcounter{subfigure}{0};
引用子编号\subref{fig:subfig};

改变间距用 \vspace{.3in} 和\hspace{.1in},置于两subfigure间.


这里的in表示inch, 另外也可以用cm控制。

控制图片大小可以使用width, height, scale选项, 比较灵活。

  • 5
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
您可以使用HTML和JavaScript来创建一个画布,并实现您描述的功能。下面是一个简单的示例代码: ```html <!DOCTYPE html> <html> <head> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script> <style> #canvas { position: relative; width: 500px; height: 500px; border: 1px solid black; } .math-container { position: absolute; border: 1px solid blue; background-color: #f0f0f0; padding: 10px; } </style> </head> <body> <div id="canvas"></div> <script> let canvas = document.getElementById('canvas'); let mathContainers = []; // 多维数组记录<div>的属性 function createMathContainer(latex, x, y) { let container = document.createElement('div'); container.className = 'math-container'; container.style.left = x + 'px'; container.style.top = y + 'px'; container.innerHTML = latex; canvas.appendChild(container); // 将<div>属性保存到多维数组 let containerData = { latex: latex, x: x, y: y, width: container.offsetWidth, height: container.offsetHeight }; mathContainers.push(containerData); } function moveMathContainer(event) { // 移动<div>的代码逻辑 } function handleMouseDown(event) { // 判断按下的位置是否存在<div>的代码逻辑 } function handleMouseMove(event) { // 按下并移动鼠标将拖动<div>的代码逻辑 } function handleMouseUp(event) { // 放开鼠标取消移动的代码逻辑 } canvas.addEventListener('mousedown', handleMouseDown); canvas.addEventListener('mousemove', handleMouseMove); canvas.addEventListener('mouseup', handleMouseUp); // 示例:创建一个初始的<div> createMathContainer('$$x^2 + y^2 = r^2$$', 100, 100); </script> </body> </html> ``` 这段代码创建了一个固定大小的画布,使用`<div>`元素作为画布容器。通过JavaScript代码,您可以创建新的`<div>`元素,并通过MathJax渲染数学公式。多维数组`mathContainers`用于记录每个`<div>`的属性。 您需要进一步实现`moveMathContainer`、`handleMouseDown`、`handleMouseMove`和`handleMouseUp`函数来完成移动和判断点击位置是否存在`<div>`等功能。这些功能的具体实现取决于您的需求和交互逻辑。 请注意,我只是根据您的描述提供了一个基本的示例代码,您可能需要根据实际情况进行修改和调整。希望这能帮到您!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值