【LaTeX & Overleaf】 论文修订

对于在word中写的论文一般是使用【审阅】-【比较文档】来输出对比结果;对于overleaf,使用LaTeX排版,如何通过标记文字颜色来实现对比效果呢??

1 批注功能-使用changes 宏包

在 LaTeX 中,changes 宏包是一个非常有用的工具,用于在文档中添加批注、插入和删除修改。它特别适用于论文写作和文档审阅。以下是如何使用 changes 宏包的一些基本步骤和示例:

(1)安装 changes 宏包

首先,确保你的 LaTeX 环境已经安装了 changes 宏包。如果没有安装,可以使用 TeX Live 或 MikTeX 等工具进行安装。

(2)在导言区加载宏包

在你的 LaTeX 文档的导言区添加以下行以加载 changes 宏包:

\usepackage[markup=default]{changes}

你可以根据需要选择不同的标记样式,如 markup=underlinedmarkup=highlight

(3)添加作者

如果有多个审阅者,可以添加他们的名字:

\setauthor{author1}
\setauthor{author2}

(4)使用批注功能

以下是一些常用命令:

  • 插入文本:使用 \added 命令

  • 这是一个\added{新增的}句子。
    

  • 删除文本:使用 \deleted 命令。

  • 这是一个\deleted{需要删除的}句子。
    

 替换文本:使用 \replaced 命令。

这是一个\replaced{新的文本}{旧的文本}。

 添加批注:使用 \highlight\comment 命令。

这是一个\highlight{需要注意的部分}。

或者

这是一个需要\comment{这里需要更多解释}解释的句子。

(5)示例代码

下面是一个完整的示例代码:

\documentclass{article}
\usepackage[markup=default,authormarkup=none]{changes}

% Define authors and their colors
\definechangesauthor[name={Reviewer 1}, color=orange]{R1}
\definechangesauthor[name={Reviewer 2}, color=blue]{R2}
\definechangesauthor[name={Reviewer 3}, color=green]{R3}

\author{Author}
\title{Enhanced Example Document with Changes from Multiple Reviewers}

\begin{document}
\maketitle

This is an enhanced example document that demonstrates various modifications from different reviewers.

\section{Introduction}
Here we will demonstrate how to use the \added[id=R1]{changes package to} add annotations and modifications. This document has been reviewed by multiple reviewers, each providing their feedback and suggestions. 

\section{Methods}
In the methods section, we \deleted[id=R2]{will describe our techniques in detail.} \replaced[id=R3]{use the changes package}{use other tools} to mark modifications. The methods employed in this study include both qualitative and quantitative approaches. \highlight[id=R3]{It is essential}to describe the statistical analysis in detail.\added[id=R1]{We also conducted a comprehensive literature review to support our methodology.}


\section{Results}
This is the results section, where you can use \highlight[id=R1]{highlight} to emphasize important content. \replaced[id=R2]{The results show a significant improvement in accuracy.}{The results are inconclusive and require further analysis.} \added[id=R3]{Additional experiments are needed to validate these findings.}

\section{Discussion}
In the discussion section, you can \comment[id=R2]{add more details} to explain the results. \deleted[id=R1]{The discussion lacks depth in certain areas.} \added[id=R1]{The implications of these results are far-reaching, suggesting that the proposed methods can be applied to a wide range of applications.} \highlight[id=R2]{Be sure to compare these findings with previous studies.}

\section{Conclusion}
The conclusion summarizes the key findings of the study. \replaced[id=R3]{Future work should focus on refining the methodology and exploring new applications.}{The current study provides a solid foundation for future research.} \deleted[id=R2]{It is essential to address the limitations mentioned in the discussion.}

\end{document}

如下 

2 报错问题:

如果是为了输出不带批注的版本,引用changes包的时候加上final就可以了:

\usepackage[commandnameprefix=always,final]{changes}

最后对changes包选项进行修改,使用[commandnameprefix=always]修饰, 

\usepackage[commandnameprefix=always]{changes}
这里的commandnameprefix=always选项确保了所有批注命令的前缀都是ch,这对于创建最终版本非常有用,因为这些前缀会在编译过程中被移除。

命令修改如下

\chadded{new text} %用于标记新添加的文本。
\chdeleted{old text} %用于标记被删除的文本。
\chreplaced{old text}{new text} %用于标记替换的文本。

针对上文示例,修改如下

\documentclass{article}

\usepackage[commandnameprefix=always,markup=default,authormarkup=none]{changes}
% \usepackage[commandnameprefix=always,final,markup=default,authormarkup=none]{changes}

% Define authors and their colors
\definechangesauthor[name={Reviewer 1}, color=orange]{R1}
\definechangesauthor[name={Reviewer 2}, color=blue]{R2}
\definechangesauthor[name={Reviewer 3}, color=green]{R3}

\author{Author}
\title{Enhanced Example Document with Changes from Multiple Reviewers}

\begin{document}
\maketitle

This is an enhanced example document that demonstrates various modifications from different reviewers.

\section{Introduction}
Here we will demonstrate how to use the \chadded[id=R1]{changes package to} add annotations and modifications. This document has been reviewed by multiple reviewers, each providing their feedback and suggestions. 

\section{Methods}
In the methods section, we \chdeleted[id=R2]{will describe our techniques in detail.} \chreplaced[id=R3]{use the changes package}{use other tools} to mark modifications. The methods employed in this study include both qualitative and quantitative approaches. \chhighlight[id=R3]{It is essential}to describe the statistical analysis in detail.\chadded[id=R1]{We also conducted a comprehensive literature review to support our methodology.}


\section{Results}
This is the results section, where you can use \chhighlight[id=R1]{highlight} to emphasize important content. \chreplaced[id=R2]{The results show a significant improvement in accuracy.}{The results are inconclusive and require further analysis.} \chadded[id=R3]{Additional experiments are needed to validate these findings.}

\section{Discussion}
In the discussion section, you can \chcomment[id=R2]{add more details} to explain the results. \chdeleted[id=R1]{The discussion lacks depth in certain areas.} \chadded[id=R1]{The implications of these results are far-reaching, suggesting that the proposed methods can be applied to a wide range of applications.} \chhighlight[id=R2]{Be sure to compare these findings with previous studies.}

\section{Conclusion}
The conclusion summarizes the key findings of the study. \chreplaced[id=R3]{Future work should focus on refining the methodology and exploring new applications.}{The current study provides a solid foundation for future research.} \chdeleted[id=R2]{It is essential to address the limitations mentioned in the discussion.}

\end{document}

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LeapMay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值