1

I am trying to present my reviewer response with highlighted texts. I am using the soul package in IEEE double-column format. The issue is, the texts go beyond the column margin. Is there anyone who had the same experience and got it solved?

\documentclass{ieeeaccess}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{mathptmx} 
\usepackage{multirow}
\usepackage{enumerate}
\usepackage{cite}
\usepackage{color,soul}
\sethlcolor{yellow}
% \renewcommand\hl[1]{#1}

\begin{document}
    
    \hl{We select three linear paths $(\eta_{h}=5.5477~m$, $\eta_{k}=2.234~m$, $\eta_{c}=1.1~m)$ and 
    five angular paths $(\Omega_k \in \{0,\frac{\pi}{6},\frac{\pi}{4},\frac{\pi}{3},\frac{\pi} 
    {2},\frac{2\pi}{3},\frac{3\pi}{4},\frac{5\pi}{6},\pi\}~rad)$ inside the applicable range of the machine. This is a dummy text I am using to show the double margin.I guess you understand it.}
\EOD
\end{document}

Then the output will look like the following. I want to maintain the original double-column margin as noted by the arrow. When the highlighting is not applied, the texts fall inside the margin with no issue. enter image description here

It works fine with the Article class (see below image) enter image description here

4
  • The problem is not the highlighting but the maths environment and the content of that... May 13 at 21:15
  • Can you also show this with standard classes like the article class? In my tests everything works fine... May 13 at 21:23
  • Thanks. The article class works fine. I added an image. See my original post. May 13 at 21:26
  • When the highlighting is not applied, the texts fall inside the margin. May 13 at 21:34

1 Answer 1

0

The problem is the mathematical term and the length of the content in the brackets. You need to manually break it:

\documentclass{ieeeaccess}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{mathptmx} 
\usepackage{multirow}
\usepackage{enumerate}
\usepackage{cite}
\usepackage{color,soul}
\sethlcolor{yellow}

\begin{document}
    
    \hl{We select three linear paths $(\eta_{h}=5.5477~m$, $\eta_{k}=2.234~m$, $\eta_{c}=1.1~m)$ and 
        five angular paths $(\Omega_k \in \{0,\frac{\pi}{6}, \frac{\pi}{4},\frac{\pi}{3},\frac{\pi} 
        {2},\frac{2\pi}{3},$ \\ $\frac{3\pi}{4},\frac{5\pi}{6},\pi\}~rad)$ inside the applicable range of the machine. This is a dummy text I am using to show the double margin.I guess you understand it.}
    \EOD
\end{document}

enter image description here

Or you just write longer / shorter text so the mathematical text does not need to be placed in different lines:

\documentclass{ieeeaccess}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{mathptmx} 
\usepackage{multirow}
\usepackage{enumerate}
\usepackage{cite}
\usepackage{color,soul}
\sethlcolor{yellow}

\begin{document}
    
    \hl{We select three linear paths $(\eta_{h}=5.5477~m$, $\eta_{k}=2.234~m$, $\eta_{c}=1.1~m)$ and 
        of course we also selected five angular paths $(\Omega_k \in \{0,\frac{\pi}{6}, \frac{\pi}{4},\frac{\pi}{3},\frac{\pi} 
        {2},\frac{2\pi}{3}, \frac{3\pi}{4},\frac{5\pi}{6},\pi\}~rad)$ inside the applicable range of the machine. This is a dummy text I am using to show the double margin.I guess you understand it.}
    \EOD
\end{document}

enter image description here

5
  • Yes. Thank you very much. Both methods work. May 13 at 21:38
  • You don't need the extra slash-space at the break in the math; just a single space should work. With the slash-space, the broken line is followed by an indentation on the next line. May 14 at 0:30
  • @barbarabeeton: a single space does not work. That’s why I’ve added the ``. Since that is not the best choice and also annoying and not visually the best to manually split the formula, I had added the second version. May 14 at 8:33
  • Interesting. I wouldn't have predicted that. Thanks. I'll have to think about this, since the leading space is distracting. May 14 at 14:09
  • @barbarabeeton: It is distracting. However, having thought about this some more I concluded that since you know anyways that a new line should be started you can replace `with \` and therefore remove the distracting space at the beginning of the line. I have updated my answer accordingly. But I still prefer the second version... May 14 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .