作者oversky0 (oversky0)
看板RegExp
标题[问题] 如何删除开头有注解的
时间Sun Oct 25 22:40:28 2009
我想用 grep 在 vim 内抓出论文的大纲。
:vimgrep /section{\|epsfig/
结果如下
\section{Introduction}
\section{Background and Problem Formulation}
\centering\epsfig{file=figs/fig1-1.eps,angle=0,width=3.2in}
\section{Proposed Technique:\\ Phase Partition Method}
\subsection{A Suboptimal Subset of Nodes}
%%%\subsection{Dividing the Available Sensor Nodes in Suboptimal
\section{Simulation Results}
\subsection{Proof of concept}
\epsfig{file=figs/fig11.eps,width=3.3in}\\
% \epsfig{file=figs/fig25.eps,width=3.3in}\\
%\subsection{Effect of number of sensors}
%\epsfig{file=figs/fig68.eps,width=2.30in}\\
\epsfig{file=figs/fig68.eps,width=2.30in}\\
\section{Discussion and Future Work}
% \section{Discussion}
\section{Conclusion}
请问要如何改才能避掉开头有 % 注解的那几行?
因为注解的格式没有用的很整齐,变得有点复杂。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 128.211.253.111
※ 编辑: oversky0 来自: 128.211.253.111 (10/25 22:52)
1F:推 COLDTURNIP:vim 内部搜寻:/^[^%]*\(section{\|epsfig\) 10/26 06:14
谢谢,後来发现抓图的 caption 比较好,再修改一下你的方案成
/^[\s]*\\\(sub\)*section{\\|^[\s]*\\caption{/ %
这样连 subsection, subsubsection 都能抓到,结果如下:
\section{Introduction}
\section{Background and Problem Formulation}
\caption{Concept of distributed beamforming. The chosen nodes form a
\section{Proposed Technique:\\ Phase Partition Method}
\subsection{A Suboptimal Subset of Nodes}
\caption{Normalized power as function of relative phase difference
\subsection{Dividing the Available Sensor Nodes in Suboptimal
\subsubsection{Test1}
\subsubsection{Test2}
\caption{Sensor distribution as a function of phase. The Phase
\section{Simulation Results}
\subsection{Proof of concept}
\caption{Proof of concept. $M=100, \rho=1 \lambda.\ \overline D_{max} =
\subsection{Effect of Distribution Radius}
\caption{Effect of distribution radius.}
\subsection{Effect of number of sensors}
\caption{Effect of number of sensors.}
\subsection{Effect of phase uncertainty}
\caption{Effect of phase uncertainty. $M=1000$, $\rho=100 \lambda$. All
\section{Discussion and Future Work}
\section{Conclusion}
有办法再进化成下面那样树状结构吗?
Introduction
Background and Problem Formulation
Fig: Concept of distributed beamforming. The chosen nodes form a
Proposed Technique:\\ Phase Partition Method
A Suboptimal Subset of Nodes
Fig: Normalized power as function of relative phase difference
Dividing the Available Sensor Nodes in Suboptimal
Test1
Test2
大概还要加上
1. 取 { } 中的字,不过有的 } 被折到下一行了
2. 在 subsection 前加一个 TAB
3. 在 subsubsection 前加两个 TAB
4. 在 caption 前加 一个 TAB 及 fig:
不过要判断 caption 是在那一层可能还要加上上下文分析才行。
※ 编辑: oversky0 来自: 128.211.253.111 (10/26 08:35)
※ 编辑: oversky0 来自: 128.211.253.111 (10/26 08:38)