% Package: revbadge
% Version: 1.2
% Date: 19/08/2026

\documentclass[10pt,journal,compsoc,twocolumn]{IEEEtran}
\usepackage{lipsum}
\usepackage{revbadge} % Loads revbadge package locally

\usepackage{graphicx}
\usepackage{url}

% Define break points for LaTeX command characters
\def\UrlBreaks{%
  \do\-\do\.\do\_\do\~\do\|\do\\\do\{\do\}\do\[\do\]\do\(\do\)%
}

\begin{document}

\title{The \texttt{revbadge} Package \\ Custom Highlighting for Academic Revisions\\
\vspace{5px} \large Version 1.2 --- Release Date: 19/08/2026}
\author{Zhang Fu}
\maketitle

\begin{abstract}
This document serves as both the official user manual and a compilation demonstration for the \texttt{revbadge} package (Version 1.2). We present examples of how to address peer-review revisions across inline edits, word-level tags, and block environments using distinct color schemes within standard multi-column academic layouts.
\end{abstract}

\section{Introduction \& Package Purpose}
With the increasing rigor of peer-review processes, keeping track of manuscript modifications has become crucial. The \texttt{revbadge} package provides a flexible **four-component** architecture for revision management:
\begin{itemize}
  \item \textbf{Inline Highlights (\texttt{\textbackslash revbadgeinline}):} For mid-sentence text changes that require soft, multi-line wrapping and background track highlighting.
  \item \textbf{Word Badges (\texttt{\textbackslash wordbadge}):} Compact, self-contained on-line boxes for tagging specific words, symbols, or quick metrics.
  \item \textbf{Block Boxes (\texttt{revbadge}):} TColorBox-powered callout blocks for entire paragraphs or new structural additions.
  \item \textbf{Multi-line Badges (\texttt{revbadgemultiline}):} Extended block environments that support multi-line title badges and smaller typography for detailed reviewer comments.
\end{itemize}
All components share a unified 24-theme color palette and automatic cross-referencing via \texttt{cleveref}.

\section{Core Commands \& Environments}

\subsection{Inline Edits}
\noindent
\textbf{Command used:} \path|\revbadgeinline[colframe=purp, colback=purpb]{R3}{rev:short}{stochastic descent}|

Reviewer 3 pointed out a technical term error. We have corrected the phrase
\revbadgeinline[colframe=purp, colback=purpb]{R3}{rev:short}{stochastic gradient descent
to match their preferred domain nomenclature. As shown by this example, it handles micro-edits gracefully without breaking line spacing.}

\subsection{Compact Word Badges}
\noindent
\textbf{Command used:} \path|\wordbadge[colframe=teal, colback=tealb]{R1.2}{rev:wbadge}{Updated Parameter}|

When highlighting standalone terms, metrics, or labels without needing a full-text highlight track, use \texttt{\textbackslash wordbadge}:
The model optimization now utilizes an \wordbadge[colframe=teal, colback=tealb]{R1.2}{rev:wbadge}{Adaptive Learning Rate} setting during fine-tuning.

\subsection{Block Level Revisions}
\noindent
\textbf{Environment used:} \texttt{revbadge}

For larger text changes or entire sections, use the \texttt{revbadge} environment:

\subsubsection{Methodology Updates}
Fusce malesuada ipsum erat, nec imperdiet felis accumsan eu. Etiam et ultricies eros. Morbi laoreet viverra mattis. Nulla facilisi. Nam convallis, nisl eu luctus interdum, erat sapien imperdiet enim, sed rhoncus turpis turpis eget massa.

\noindent
\textbf{Command:} \path|\begin{revbadge}[colframe=aqua, colback=aquab]{R2}{rev:theory} ... \end{revbadge}|
\begin{revbadge}[colframe=aqua, colback=aquab]{R2}{rev:theory}
maximus ac pretium id, porta quis est. Ut ante dolor, semper vitae mauris nec, finibus cursus mauris. Aliquam tincidunt tellus lorem, vitae vulputate magna cursus sit amet. Phasellus ante magna, consequat a nunc id.
\end{revbadge}

\noindent
\textbf{Command:} \path|\begin{revbadge}[colframe=gren, colback=grenb]{What do you mean by this?}{rev:baseline_clarity} ... \end{revbadge}|
\begin{revbadge}[colframe=gren, colback=grenb]{What do you mean by this?}{rev:baseline_clarity}
Our core algorithm relies on a highly modular pipeline. Reviewer 1 pointed out a structural flaw in our original baseline model equation. Consequently, we have revised the mathematical formulation to ensure convexity.
\end{revbadge}

\subsection{Nested Frameworks and Mathematics}
\noindent
\textbf{Command:} Nesting \texttt{revbadge} environments.

The environment naturally preserves mathematical structures inside columns without spacing bleed and allows internal nesting:

\begin{revbadge}{R3}{rev:math_fix}
    We update our primary objective function to include a regularization parameter $\lambda$. The new optimization problem is formulated as follows:

    % Inner badge
    \begin{revbadge}[colframe=redx, colback=redxb]{Corrected Eq.}{rev:math_fix_2}
    \begin{equation}
        \min_{\theta} \mathcal{L}(\theta) + \lambda \|\theta\|_2^2
    \end{equation}
    \end{revbadge}
    This formulation guarantees a unique global minimum under standard Lipschitz continuity conditions.
\end{revbadge}

\subsection{Multi-line Badges}
\noindent
\textbf{Environment used:} \texttt{revbadgemultiline}

\noindent
\textbf{Command:} \path|\begin{revbadgemultiline}[colframe=purp, colback=purpb]{Long Reviewer Query...}{rev:r2c1} ... \end{revbadgemultiline}|
\begin{revbadgemultiline}[colframe=purp, colback=purpb]{This is a substantial revision that requires re-analysis of the data.}{rev:r2c1}
    The reviewer has raised several important points about methodology, statistical power, and interpretation of results. We need to:
    \begin{itemize}
        \item Re-run the analysis with additional controls
        \item Provide sensitivity analyses
        \item Clarify the theoretical framework
    \end{itemize}
    We have addressed each point comprehensively in the revised manuscript.
\end{revbadgemultiline}

\subsection{Table Integration}
\noindent
\textbf{Command:} \path|\revbadgeinline| inside a \texttt{tabular} cell.

Reviewer 1 requested updated evaluation metrics in our comparative analysis. As shown in Table~\ref{tab:metrics}, we can seamlessly embed tracking badges directly inside tabular environments.

\begin{table}[htbp]
\caption{Baseline Performance Metrics Comparison}
\label{tab:metrics}
\centering
\begin{tabular}{lccc}
\hline
\textbf{Method} & \textbf{Accuracy (\%)} & \textbf{F1-Score} & \textbf{Latency (ms)} \\ \hline
ResNet-50       & 76.2                    & 0.74               & 12.5                  \\
ViT-Base        & 81.4                    & 0.80               & 24.1                  \\
\textbf{Ours}   & \revbadgeinline[colframe=redx, colback=redxb]{R1}{rev:table_update}{\textbf{84.9}} & \textbf{0.83}     & \textbf{18.4}         \\ \hline
\end{tabular}
\end{table}

\subsection{Highlighting Figure Captions}
You can use inline highlight badges inside figure captions:

\begin{figure}[htbp]
\centering
\fbox{\rule{0.6\columnwidth}{2.2cm}} % Dummy figure placeholder
\caption{Performance comparison of our method \revbadgeinline[colframe=orng, colback=orngb]{R1.6}{rev:fig_caption}{Ours} against state-of-the-art baselines.}
\label{fig:performance}
\end{figure}

\subsection{Custom Layout Formatting}
\noindent
\textbf{Command:} \texttt{revbadge} with custom geometry options (\texttt{top=4pt, bottom=4pt}).

\begin{revbadge}[colframe=ylow, colback=ylowb, top=4pt, bottom=4pt]{Hardware Specs}{rev:twelines}
    All evaluations executed natively on an NVIDIA H100 GPU cluster. \\
    The total execution window spanned exactly 48 continuous hours.
\end{revbadge}

\section{Cross-Referencing Tracker}
Because the package automatically binds internal counters to \texttt{cleveref}, referencing edits is seamless. For example, referencing the word badge yields \cref{rev:wbadge}, the inline edit maps to \cref{rev:short}, the block update resolves to \cref{rev:baseline_clarity}, the table fix maps to \cref{rev:table_update}, and the nested equation resolves to \cref{rev:math_fix_2}.

\section{Color Palette}
The package defines 24 unique color themes. Each frame color has a corresponding background color appended with the letter \texttt{b} (e.g., \texttt{blue} frame with \texttt{blueb} background).

\noindent
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}} l c c @{}}
  \textbf{Name} & \textbf{Frame} & \textbf{Background} \\[2pt]
  \hline
  blue   & \fcolorbox{blue}{blue}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{blueb}{blueb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  orng   & \fcolorbox{orng}{orng}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{orngb}{orngb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  gren   & \fcolorbox{gren}{gren}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{grenb}{grenb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  purp   & \fcolorbox{purp}{purp}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{purpb}{purpb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  grey   & \fcolorbox{grey}{grey}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{greyb}{greyb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  ylow   & \fcolorbox{ylow}{ylow}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{ylowb}{ylowb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  cyan   & \fcolorbox{cyan}{cyan}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{cyanb}{cyanb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  redx   & \fcolorbox{redx}{redx}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{redxb}{redxb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  pink   & \fcolorbox{pink}{pink}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{pinkb}{pinkb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  brow   & \fcolorbox{brow}{brow}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{browb}{browb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  lime   & \fcolorbox{lime}{lime}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{limeb}{limeb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  teal   & \fcolorbox{teal}{teal}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{tealb}{tealb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  sage   & \fcolorbox{sage}{sage}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{sageb}{sageb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  plum   & \fcolorbox{plum}{plum}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{plumb}{plumb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  rust   & \fcolorbox{rust}{rust}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{rustb}{rustb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  jade   & \fcolorbox{jade}{jade}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{jadeb}{jadeb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  gold   & \fcolorbox{gold}{gold}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{goldb}{goldb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  navy   & \fcolorbox{navy}{navy}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{navyb}{navyb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  wine   & \fcolorbox{wine}{wine}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{wineb}{wineb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  clay   & \fcolorbox{clay}{clay}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{clayb}{clayb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  aqua   & \fcolorbox{aqua}{aqua}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{aquab}{aquab}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  char   & \fcolorbox{char}{char}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{charb}{charb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  rose   & \fcolorbox{rose}{rose}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{roseb}{roseb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
  sand   & \fcolorbox{sand}{sand}{\rule{0pt}{1.2ex}\hspace{1.5em}} & \fcolorbox{sandb}{sandb}{\rule{0pt}{1.2ex}\hspace{1.5em}} \\
\end{tabular*}

\end{document}
