0
MWE

\documentclass[a4paper]{article} 
\usepackage{geometry}
\usepackage[svgnames]{xcolor}
\usepackage[listings,skins,breakable,hooks,most]{tcolorbox}
\usepackage{empheq}
\usepackage[color]{changebar}
\usepackage{soul}

\newcommand\A{True choice is \textbf{A}.}

\newcommand*\mybox[1]{%
\colorbox{yellow}{\hspace{1em}#1\hspace{1em}}}

\newcommand{\denk}[1]{\begin{empheq}[box=\mybox]{align}{\textnormal{#1}\nonumber}\end{empheq}}

\newcommand{\hlc}[2][yellow]{\sethlcolor{#1} \hl{#2}}

\newcommand*\lng[1]{%
\colorbox{yellow}{\parbox{\dimexpr\textwidth-2\fboxsep}{\hspace{1em}#1\hspace{1em}}}}

\newcommand{\kutu}[2]{%
\abovedisplayskip=0pt
\begin{tcolorbox}[%
    %oversize,
    %halign=center,
    enhanced jigsaw,
    breakable, left=0mm,
    right=0mm,bottom=0mm,top=0mm,
    colback=red!5!white,
    colframe=red!75!black,
    pad at break=1mm]
    #1%
    \begin{flushright}
        \textit{#2}
    \end{flushright}
\end{tcolorbox}
}

\begin{document}
\twocolumn

Single line, good.
\kutu{\denk{International Telecommunication Union}}{\A}

Long sentence, bad. Overflowing
\kutu{\denk{European Conference of Postal and Telecommunications Administrations}}{\A}

Highlight, bad.
\kutu{\hlc{European Conference of Postal and Telecommunications Administrations}}{\A}

Parbox, not bad.
\kutu{\lng{European Conference of Postal and Telecommunications Administrations}}{\A}

\end{document}

And output

enter image description here

What I really try to do,

enter image description here

I mean, I want to use \parbox or \hlc, but I want the vertical distance to be the same as in the \empheq package, and the vertical distance from the right to the left \1em. I hope I could write my problem correctly.

  • 3
    Sorry, this looks ugly – user31729 Dec 20 '17 at 20:16
  • You're right. I think it's ugly. But I need to find a solution that matches the first picture. So I have to find a standard for the first picture and the second picture. What should I do? – Özgür Dec 20 '17 at 20:20
  • 1
    You misunderstood me: The whole highlighting in the already highlighting box is not nice. Is this really necessary? – user31729 Dec 20 '17 at 20:21
  • I did the answers in a single line. I need to find a solution to long answers too. Because I want to get a standard in all the documentation. Or you suggest a solution. What would you do if you were in your book? – Özgür Dec 20 '17 at 20:24
  • 3
    I wouldn't use this yellow color. Like Christian I think that it looks rather ugly. – Ulrike Fischer Dec 20 '17 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.