Skip to content

Commit

Permalink
Modify src: clean LaTeX comments before converting
Browse files Browse the repository at this point in the history
Fix bug #1
  • Loading branch information
Mingzefei committed Oct 17, 2024
1 parent fa2d0be commit 920882a
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 107 deletions.
Binary file modified tests/en/main.docx
Binary file not shown.
Binary file modified tests/en/main.pdf
Binary file not shown.
22 changes: 16 additions & 6 deletions tests/en/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@
...
\end{abstract}

\section{Methodology}
\section{Check LaTeX comments have been removed}

The central principle of the proposed method is to connect the batteries in an RBS in parallel to the maximum possible extent, thereby maximizing the output current. % This is a comment after the textline
% This is a interline comment

This is not a comment: 90 \% samples were used for training, and the remaining 10 \% samples were used for testing.

\section{Check Figures and their References}

\subsection{Figure}

The central principle of the proposed method is to connect the batteries in an RBS in parallel to the maximum possible extent, thereby maximizing the output current.
To achieve this universally and automatically, the overall process is divided into the four steps shown in Fig. \ref{fig:main}.
Expand All @@ -61,7 +70,7 @@ \section{Methodology}
\label{fig:main}
\end{figure}

\subsection{Directed graph Model}
\subsection{SubFigure}

\begin{figure}[htbp]
\centering
Expand All @@ -85,24 +94,23 @@ \subsection{Directed graph Model}
\label{fig:model}
\end{figure}

(Check the ref of subfigures)
\paragraph{Check the refs of subfigures}
He et al. \cite{heExploringAdaptiveReconfiguration2013} proposed an abstracted directed graph model for an RBS, where the nodes represent the batteries, the edges represent the configuration flexibility, and the weight of each vertex corresponds to the battery voltage (Fig. \ref{fig:direct-graph-he}).
...
We previously proposed a directed graph model that differs significantly from He et al.'s model by using nodes to represent the connections between batteries and switches and directed edges to represent batteries and switches (Fig. \ref{fig:direct-graph-xu}), allowing for a one-to-one correspondence between an RBS structure and its directed graph model.
...
Fig. \ref{fig:direct-graph-my} shows the improved directed graph model used in this paper.
The following provides a detailed explanation of the method used for equating components in RBSs and constructing the directed graph model.


\paragraph{Check the refs of common figures}
He et al. \cite{heExploringAdaptiveReconfiguration2013} proposed an abstracted directed graph model for an RBS, where the nodes represent the batteries, the edges represent the configuration flexibility, and the weight of each vertex corresponds to the battery voltage (Fig. \ref{fig:model}(a)).
...
We previously proposed a directed graph model that differs significantly from He et al.'s model by using nodes to represent the connections between batteries and switches and directed edges to represent batteries and switches (Fig. \ref{fig:model}(b)), allowing for a one-to-one correspondence between an RBS structure and its directed graph model.
...
Fig. \ref{fig:model}(c) shows the improved directed graph model used in this paper.
The following provides a detailed explanation of the method used for equating components in an RBS and constructing the directed graph model.


\subsection{Constraints and Objective Function}
\section{Check Equations and their References}

First, the topology in the directed graph model is represented in the form of a matrix $\boldsymbol{A}$, which is known as the incidence matrix and is defined as Eq. \eqref{eq:A}:
\begin{align}\label{eq:A}
Expand Down Expand Up @@ -134,6 +142,8 @@ \subsection{Constraints and Objective Function}
\end{bmatrix}.
\end{equation}

\section{Check BiBTeX References}

\bibliographystyle{ieeetr}
\bibliography{../ref}

Expand Down
Binary file modified tests/en/main_modified.pdf
Binary file not shown.
35 changes: 16 additions & 19 deletions tests/en/main_modified.tex
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}

% Author affiliation
\usepackage{authblk}
% Package for line spacing
\usepackage{setspace}
\renewcommand{\baselinestretch}{2.0} % Double spacing
% Margins
\usepackage[margin=1.25in]{geometry}
% Mathematics
\renewcommand{\baselinestretch}{2.0} \usepackage[margin=1.25in]{geometry}
\usepackage{amsmath}
% Tables
\usepackage{tabularx}
\usepackage{booktabs}
% SI units
\usepackage{siunitx}
% Links and referencing within the document
\usepackage[backref]{hyperref}
\hypersetup{hidelinks}
% Advanced math typesetting
\usepackage{mathtools}
% Graphics
\usepackage{graphicx}
\usepackage{subfig}
\graphicspath{{/home/ming/academic/tools/latex2word/tests/en/multifigs}} % Adjust path as needed

\graphicspath{{/home/ming/academic/tools/latex2word/tests/en/multifigs}}
\title{This is only an example}

\author[1$\dag$]{X}
Expand All @@ -46,7 +35,14 @@
...
\end{abstract}

\section{Methodology}
\section{Check LaTeX comments have been removed}

The central principle of the proposed method is to connect the batteries in an RBS in parallel to the maximum possible extent, thereby maximizing the output current.
This is not a comment: 90 \% samples were used for training, and the remaining 10 \% samples were used for testing.

\section{Check Figures and their References}

\subsection{Figure}

The central principle of the proposed method is to connect the batteries in an RBS in parallel to the maximum possible extent, thereby maximizing the output current.
To achieve this universally and automatically, the overall process is divided into the four steps shown in Fig. \ref{multifig:multifig_main}.
Expand All @@ -63,7 +59,7 @@ \section{Methodology}
\end{figure}


\subsection{Directed graph Model}
\subsection{SubFigure}


\begin{figure}[htbp]
Expand All @@ -77,24 +73,23 @@ \subsection{Directed graph Model}
\end{figure}


(Check the ref of subfigures)
\paragraph{Check the refs of subfigures}
He et al. \cite{heExploringAdaptiveReconfiguration2013} proposed an abstracted directed graph model for an RBS, where the nodes represent the batteries, the edges represent the configuration flexibility, and the weight of each vertex corresponds to the battery voltage (Fig. \ref{multifig:multifig_model}(a)).
...
We previously proposed a directed graph model that differs significantly from He et al.'s model by using nodes to represent the connections between batteries and switches and directed edges to represent batteries and switches (Fig. \ref{multifig:multifig_model}(b)), allowing for a one-to-one correspondence between an RBS structure and its directed graph model.
...
Fig. \ref{multifig:multifig_model}(c) shows the improved directed graph model used in this paper.
The following provides a detailed explanation of the method used for equating components in RBSs and constructing the directed graph model.


\paragraph{Check the refs of common figures}
He et al. \cite{heExploringAdaptiveReconfiguration2013} proposed an abstracted directed graph model for an RBS, where the nodes represent the batteries, the edges represent the configuration flexibility, and the weight of each vertex corresponds to the battery voltage (Fig. \ref{multifig:multifig_model}(a)).
...
We previously proposed a directed graph model that differs significantly from He et al.'s model by using nodes to represent the connections between batteries and switches and directed edges to represent batteries and switches (Fig. \ref{multifig:multifig_model}(b)), allowing for a one-to-one correspondence between an RBS structure and its directed graph model.
...
Fig. \ref{multifig:multifig_model}(c) shows the improved directed graph model used in this paper.
The following provides a detailed explanation of the method used for equating components in an RBS and constructing the directed graph model.


\subsection{Constraints and Objective Function}
\section{Check Equations and their References}

First, the topology in the directed graph model is represented in the form of a matrix $\boldsymbol{A}$, which is known as the incidence matrix and is defined as Eq. \eqref{eq:A}:
\begin{align}\label{eq:A}
Expand Down Expand Up @@ -126,6 +121,8 @@ \subsection{Constraints and Objective Function}
\end{bmatrix}.
\end{equation}

\section{Check BiBTeX References}

\bibliographystyle{ieeetr}
\bibliography{../ref}

Expand Down
Binary file modified tests/en/multifigs/multifig_main.pdf
Binary file not shown.
Binary file modified tests/en/multifigs/multifig_model.pdf
Binary file not shown.
Binary file modified tests/zh/main.docx
Binary file not shown.
Binary file modified tests/zh/main.pdf
Binary file not shown.
75 changes: 46 additions & 29 deletions tests/zh/main.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
\documentclass[a4paper,UTF8]{ctexart}
% \usepackage[utf8]{inputenc}

% Author affiliation
\usepackage{authblk}
Expand Down Expand Up @@ -32,93 +31,111 @@
\author[1*]{Q}
\author[1,2]{S}

\affil[1]{R学院,中国}
\affil[2]{A学院,中国}
\affil[*]{通讯作者邮箱}
\affil[1]{中国R学院}
\affil[2]{中国A学院}
\affil[*]{通讯作者:email}
\affil[$\dag$]{这些作者对本文贡献相同。}

\begin{document}

\maketitle

\begin{abstract}
可重构电池系统由于其灵活且动态可变的拓扑结构,能够适应不同的电池充放电策略,因此为传统电池系统提供了有前途的替代方案
可重构电池系统由于其灵活且可动态改变的拓扑结构,可以适应不同的电池充放电策略,是传统电池系统的有力替代方案
...
\end{abstract}

\section{方法论}
\section{检查LaTeX注释是否已删除}

所提出方法的核心原则是尽可能将RBS中的电池并联,从而最大化输出电流。为了实现这一点,整体过程被分为图 \ref{fig:main} 所示的四个步骤。
提出的方法的核心原理是将RBS中的电池尽可能多地并联,从而最大化输出电流。% 这是文本后面的注释
% 这是行间注释

这不是注释:90 \% 的样本用于训练,剩下的 10 \% 样本用于测试。

\section{检查图形及其引用}

\subsection{图形}

提出的方法的核心原理是将RBS中的电池尽可能多地并联,从而最大化输出电流。为普遍实现这一目标,整个过程分为图 \ref{fig:main} 中的四个步骤。
...

\begin{figure}[htbp]
\centering
\includegraphics[width=0.8\linewidth]{main.png}
\caption{
所提出方法的示意图,包含四个主要步骤。
提出的方法图解,包含四个主要步骤。
}
\label{fig:main}
\end{figure}

\subsection{有向图模型}
\subsection{子图}

\begin{figure}[htbp]
\centering
\subfloat[]{
\subfloat[] {
\includegraphics[width=0.31\linewidth]{direct-graph-he.png}
}
\subfloat[]{
}\label{fig:direct-graph-he}
\subfloat[] {
\includegraphics[width=0.23\linewidth]{direct-graph-xu.png}
}
\subfloat[]{
}\label{fig:direct-graph-xu}
\subfloat[] {
\includegraphics[width=0.24\linewidth]{direct-graph-my.png}
}
}\label{fig:direct-graph-my}
\\
\subfloat[]{
\subfloat[] {
\includegraphics[width=0.8\linewidth]{battery_simple.png}
}
}\label{fig:battery-simple}
\caption{
所使用的有向图模型:(a) He等人的工作 \cite{heExploringAdaptiveReconfiguration2013},(b) 我们之前的工作,(c) 本文改进的模型。(d) 本方法中电池的等效电路
定向图模型: (a) He等人的工作 \cite{heExploringAdaptiveReconfiguration2013},(b) 我们之前的工作,(c) 本文提出的改进模型。 (d) 本方法中的电池等效电路图
}
\label{fig:model}
\end{figure}

He等人 \cite{heExploringAdaptiveReconfiguration2013} 提出了RBS的一个抽象有向图模型,其中节点代表电池,边代表配置灵活性,每个顶点的权重对应电池电压 (图 \ref{fig:model}(a))。
\paragraph{检查子图的引用}
He等人 \cite{heExploringAdaptiveReconfiguration2013} 提出了一个RBS的抽象定向图模型,其中节点表示电池,边表示配置的灵活性,且每个顶点的权重对应于电池电压(图 \ref{fig:direct-graph-he})。
...
我们之前提出的定向图模型与He等人的模型显著不同,使用节点表示电池和开关之间的连接,并使用定向边表示电池和开关(图 \ref{fig:direct-graph-xu}),从而实现RBS结构与其定向图模型的一对一对应。
...
\ref{fig:direct-graph-my} 显示了本文中使用的改进定向图模型。

\paragraph{检查普通图的引用}
He等人 \cite{heExploringAdaptiveReconfiguration2013} 提出了一个RBS的抽象定向图模型,其中节点表示电池,边表示配置的灵活性,且每个顶点的权重对应于电池电压(图 \ref{fig:model}(a))。
...
我们之前提出的有向图模型显著不同于He等人的模型,节点代表电池与开关之间的连接,且有向边代表电池与开关 (\ref{fig:model}(b)),从而实现RBS结构与其有向图模型的一一对应
我们之前提出的定向图模型与He等人的模型显著不同,使用节点表示电池和开关之间的连接,并使用定向边表示电池和开关(\ref{fig:model}(b)),从而实现RBS结构与其定向图模型的一对一对应
...
\ref{fig:model}(c) 展示了本文使用的改进有向图模型。接下来详细解释了RBS中等效组件的方法及有向图模型的构建
\ref{fig:model}(c) 显示了本文中使用的改进定向图模型

\subsection{约束条件与目标函数}
\section{检查公式及其引用}

首先,有向图模型中的拓扑结构以矩阵 $\boldsymbol{A}$ 的形式表示,该矩阵称为关联矩阵,定义如式 \eqref{eq:A}:
首先,定向图模型中的拓扑结构以矩阵$\boldsymbol{A}$的形式表示,称为关联矩阵,定义如公式 \eqref{eq:A}:
\begin{align}\label{eq:A}
a_{kl}=
\begin{cases}
1, & \text{边 $l$ 从节点 $k$ 出发},\\
1, & \text{边 $l$ 离开节点 $k$},\\
-1, & \text{边 $l$ 进入节点 $k$},\\
0, & \text{其他情况}.
\end{cases}
\end{align}
对于由 $N$ 个节点和 $N_b+2N_s+1$ 条有向边组成的有向图,关联矩阵 $\boldsymbol{A}$ 是一个 $N\times(N_b+2N_s+1)$ 的矩阵。在该矩阵中,行和列分别表示有向图的节点和边。通过区分RBS中对应每一列的组件,$\boldsymbol{A}$ 可以重写为
对于由 $N$ 个节点和 $N_b+2N_s+1$ 条定向边组成的定向图,关联矩阵 $\boldsymbol{A}$ 是一个 $N\times(N_b+2N_s+1)$ 的矩阵。
在该矩阵中,行和列分别表示定向图的节点和边。
通过区分与RBS对应的每一列的组件,$\boldsymbol{A}$ 可以重新写为
\begin{equation}\label{eq:A_bso}
\boldsymbol{A} =
\begin{bmatrix}
\boldsymbol{A}_b & \boldsymbol{A}_s & \boldsymbol{A}_o
\end{bmatrix},
\end{equation}
其中 $\boldsymbol{A}_b$$\boldsymbol{A}_s$$\boldsymbol{A}_o$ 分别是对应电池、开关和外部负载的子矩阵。
...
因此,对于子矩阵 $\boldsymbol{A}_s$,每对代表相同开关的列中仅保留一列。
其中 $\boldsymbol{A}_b$, $\boldsymbol{A}_s$$\boldsymbol{A}_o$ 分别是对应于电池、开关和外部负载的子矩阵。
...
与式 \eqref{eq:A_bso} 类似$\boldsymbol{\tilde{A}}$ 可以重写为
类似于公式 \eqref{eq:A_bso},$\boldsymbol{\tilde{A}}$ 可以重新写为
\begin{equation}\label{eq:A_bso_tilde}
\boldsymbol{\tilde{A}} =
\begin{bmatrix}
\boldsymbol{\tilde{A}}_b & \boldsymbol{\tilde{A}}_s & \boldsymbol{\tilde{A}}_o
\end{bmatrix}.
\end{equation}

\section{检查参考文献}

\bibliographystyle{ieeetr}
\bibliography{../ref}
Expand Down
Loading

0 comments on commit 920882a

Please sign in to comment.