<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom"><channel><title>LaTeX | SAJID Lab</title><link>https://sajidbuet.github.io/tags/latex/</link><atom:link href="https://sajidbuet.github.io/tags/latex/index.xml" rel="self" type="application/rss+xml"/><description>LaTeX</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Sun, 07 Jul 2024 00:00:00 +0000</lastBuildDate><image><url>https://sajidbuet.github.io/media/logo.svg</url><title>LaTeX</title><link>https://sajidbuet.github.io/tags/latex/</link></image><item><title>Paper Revision in Overleaf</title><link>https://sajidbuet.github.io/resources/blog/20240711-paperrevisionoverleaf/</link><pubDate>Sun, 07 Jul 2024 00:00:00 +0000</pubDate><guid>https://sajidbuet.github.io/resources/blog/20240711-paperrevisionoverleaf/</guid><description>&lt;p&gt;With microsoft word, it is extremely easy to turn on review mode and add comments, strike out letters and add text, and it is automatically colored. With LaTeX, it is somewhat difficult. My students use two different Overleaf files, one having the edits marked in red and strikeout, and one fresh archive. Doing the same work twice is a hassle, so here I describe a method of LaTeX editing, where you can simply switch between &amp;ldquo;red-lined&amp;rdquo; version that journal wants, and your final production version.&lt;/p&gt;
&lt;h2 id="method"&gt;Method&lt;/h2&gt;
&lt;p&gt;In your main.tex file, you need to have these lines&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;omittext&lt;span class="nb"&gt;}{&lt;/span&gt;RGB&lt;span class="nb"&gt;}{&lt;/span&gt;255,0,0&lt;span class="nb"&gt;}&lt;/span&gt; &lt;span class="c"&gt;%R1: for red version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;%\definecolor{omittext}{RGB}{0,0,0} %B1: for black version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\strikeout&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;[1]&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\textcolor&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;omittext&lt;span class="nb"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\sout&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;#1&lt;span class="nb"&gt;}}&lt;/span&gt;&lt;span class="k"&gt;\xspace&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt; &lt;span class="c"&gt;%R2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;%\newcommand{\strikeout}[1]{\unskip\ignorespaces} %B2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\newtext&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;[1]&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\textcolor&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;omittext&lt;span class="nb"&gt;}{&lt;/span&gt;#1&lt;span class="nb"&gt;}}&lt;/span&gt; &lt;span class="c"&gt;%R3
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;During editing latex, if you want to include a new line or word, simple use the command &lt;code&gt;\newtext{}&lt;/code&gt;. For omiting words, include them inside the &lt;code&gt;\strikeout{}&lt;/code&gt; command For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Nature, through billions of years of evolution, has often provided unique but elegant designs and structures that have &lt;span class="k"&gt;\strikeout&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;inspired&lt;span class="nb"&gt;}&lt;/span&gt; &lt;span class="k"&gt;\newtext&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;aided&lt;span class="nb"&gt;}&lt;/span&gt; researchers and engineers to invent new technologies to enhance the capabilities of existing ones.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just do all revisions in your manuscript as before.&lt;/p&gt;
&lt;p&gt;For creating the red lined verson, comment the B1, B2 line, and uncomment R1, R2, R3. (Shown above).
This would render the text like this:&lt;/p&gt;
&lt;p&gt;Nature, through billions of years of evolution, has often provided unique but elegant designs and structures that have &lt;span style="color:red"&gt;&lt;del&gt;inspired&lt;/del&gt; aided&lt;/span&gt; researchers and engineers to invent new technologies to enhance the capabilities of existing ones.&lt;/p&gt;
&lt;p&gt;For creating final PDF, uncomment the B1, B2 line, and comment R1, R2, R3. (Shown above).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;%\definecolor{omittext}{RGB}{255,0,0} %R1: for red version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;\definecolor&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;omittext&lt;span class="nb"&gt;}{&lt;/span&gt;RGB&lt;span class="nb"&gt;}{&lt;/span&gt;0,0,0&lt;span class="nb"&gt;}&lt;/span&gt; &lt;span class="c"&gt;%B1: for black version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;%\newcommand{\strikeout}[1]{\textcolor{omittext}{\sout{#1}}\xspace} %R2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\strikeout&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;[1]&lt;span class="nb"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\unskip\ignorespaces&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt; &lt;span class="c"&gt;%B2
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;%\newcommand{\newtext}[1]{\textcolor{omittext}{#1}} %R3
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;N.B. These commands were first used in preparing revision for the paper Mehedi Hasan Himel, Bejoy Sikder, Tanvir Ahmed, &lt;strong&gt;Sajid Muhaimin Choudhury&lt;/strong&gt;, &amp;ldquo;Biomimicry in Nanotechnology: A Comprehensive Review&amp;rdquo;,
&lt;/p&gt;</description></item></channel></rss>