latex

How to highlight references numbers and citations in overleaf?


I want to highlight my changes in the revised paper for submitting it to the journal. Specifically, I want to highlight specific reference numbers included in multi-reference citations.

I tried with "\hl{}" using "\usepackage{soul}" but it gives me errors unless I skip the citations (i.e., \cite{}) and refrering sentences for tables or figures (\ref{}).

I have two questions:

1- How I can highlight only a specific reference number (e.g., reference number 13) among the multi references that started from 11 to 15?

as here (I can not highlight reference number 13):

 \documentclass[10pt,journal,compsoc]{IEEEtran}
 \usepackage{soul}
 \usepackage{xcolor}
  \usepackage{cite}
  \sethlcolor{yellow} 

 \begin{document} 

  Second, sensor-based approaches~\cite{yamazoe1991new,korotcenkov2011instability,park2015material,rosi2011social,clark1992optimal} rely on



\bibliography{Refernces_file}
 \bibliographystyle{unsrt}

  \end{document}

Refernces_file:

@article{yamazoe1991new,
  title={New approaches for improving semiconductor gas sensors},
  author={Yamazoe, Noboru},
  journal={Sensors and Actuators B: Chemical},
  volume={5},
  number={1-4},
  pages={7--19},
  year={1991},
  publisher={Elsevier}
  }



  @article{korotcenkov2011instability,
  title={Instability of metal oxide-based conductometric gas sensors and 
   approaches to stability improvement (short survey)},
   author={Korotcenkov, G and Cho, BK},
   journal={Sensors and Actuators B: Chemical},
   volume={156},
   number={2},
   pages={527--538},
   year={2011},
   publisher={Elsevier}
   }

  @article{park2015material,
  title={Material approaches to stretchable strain sensors},
  author={Park, Jaeyoon and You, Insang and Shin, Sangbaie and Jeong, 
   Unyong},
   journal={ChemPhysChem},
   volume={16},
   number={6},
   pages={1155--1163},
   year={2015},
   publisher={Wiley Online Library}
    }



    @inproceedings{rosi2011social,
     title={Social sensors and pervasive services: Approaches and 
     perspectives},
     author={Rosi, Alberto and Mamei, Marco and Zambonelli, Franco and 
    Dobson, Simon and Stevenson, Graeme and Ye, Juan},
    booktitle={2011 IEEE international conference on pervasive computing and 
  communications workshops (PERCOM Workshops)},
   pages={525--530},
   year={2011},
   organization={IEEE}
     }


    @article{clark1992optimal,
    title={Optimal placement of piezoelectric actuators and polyvinylidene 
    fluoride error sensors in active structural acoustic control approaches},
     author={Clark, Robert L and Fuller, Chris R},
    journal={The Journal of the Acoustical Society of America},
   volume={92},
    number={3},
    pages={1521--1533},
     year={1992},
     publisher={ASA}
     }

enter image description here

2- How I can highlight a phrase with including citations and references of sections, tables or figures?

as here (I can not highlight numbers of the sections):

\documentclass[10pt,journal,compsoc]{IEEEtran}
 \usepackage{soul}
\hl{In Section}~\ref{section 5}, \hl{we add a supplemental case study.}\hl{ 
In Section}~\ref{section 6} \hl{a description of related work is given, and 
in Section}~\ref{section 7},\hl{ we conclude the paper.}

Output:

enter image description here


Solution

  • To use \ref within a highlighted text, wrap it in an additional layer of {} and \cite commands can be hidden in an \mbox (for non-numerical reference styles this might lead to problems with linebreaks):

     \documentclass[10pt,journal,compsoc]{IEEEtran}
    \usepackage{soul}
    \usepackage{xcolor}
    \usepackage{cite}
    \sethlcolor{yellow} 
    
    \begin{document} 
    
    \section{section 5}
    \label{section5}
    \section{section 6}
    \label{section6}
    \section{section 7}
    \label{section7}
    
    \hl{In Section~{\ref{section5}}, we add a supplemental case study. In Section~{\ref{section6}} a description of related work is given, and 
    in Section~{\ref{section7}}, we conclude the paper.}
    
    \hl{test\mbox{\cite{yamazoe1991new}} test}
    
    \bibliography{\jobname}
    \bibliographystyle{unsrt}
    
    \end{document}
    

    Unrelated to the problem, but you should avoid spaces within labels

    enter image description here