0

I use the centerentry command of

Using icons left of the text and symbols in the text line

But as you see in the example, the two symbol lists are not well grouped. Do you have any idea?

  1. vertical to get some scape before and after the headlines?

  2. horizontal to make some shifting? The command assmargin does not work. Is there a other possible?


  \documentclass{article}
  \usepackage{graphicx, tabularx}
    \usepackage[nopar]{lipsum}
    \usepackage[export]{adjustbox}

    \newenvironment{centerentry}[2][]
      {\renewcommand{\tabularxcolumn}[1]{m{##1}}
       \noindent
       \tabularx{\linewidth}{ @{} m{\imagecolwidth} X @{} }
         \includegraphics[width=\linewidth,#1]{#2} &
      }{%
       \endtabularx%
      }
    \newlength{\imagecolwidth}
    \setlength{\imagecolwidth}{2em}

    \sloppy% Just for this example

    \begin{document}
    \section {Write some text}
    Some important symbols (I)\\
    %\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    %\end{addmargin} %%% DOES NOT WORK
    Some important symbols (II)\\
    %\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    %\end{addmargin} %%% DOES NOT WORK
    \end{document}

enter image description here

David Carlisle
  • 757,742
  • I don't understand the question here... Regardless, there's a missing % at the line-end for \renewcommand in your definition of centerentry. – Werner Jan 10 '18 at 19:41

1 Answers1

1

You can get better vertical spacing by using a sensible sectioning command. And to move the images in the margin you can use negative space in the tabular:

 \documentclass{article}
  \usepackage{graphicx, tabularx}
    \usepackage[nopar]{lipsum}
    \usepackage[export]{adjustbox}

    \newenvironment{centerentry}[2][]
      {\renewcommand{\tabularxcolumn}[1]{m{##1}}%
       \noindent
       \tabularx{\linewidth}{ @{\hspace{\dimexpr-2em-2\tabcolsep\relax}} m{\imagecolwidth} X @{} }
         \includegraphics[width=\linewidth,#1]{#2} &
      }{%
       \endtabularx%
      }
    \newlength{\imagecolwidth}
    \setlength{\imagecolwidth}{2em}

    \sloppy% Just for this example

    \begin{document}
    \section {Write some text}

    \subsection*{Some important symbols (I)}
    %\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    %\end{addmargin} %%% DOES NOT WORK
\subsection*{Some important symbols (II)}
    %\begin{addmargin}[0.2cm]{0.3cm} %%% DOES NOT WORK
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    \begin{centerentry}{example-image-a}  Write some text to get more lines. Write some text to get more lines. \end{centerentry}
    %\end{addmargin} %%% DOES NOT WORK
    \end{document}

enter image description here

Ulrike Fischer
  • 327,261