2

i have matrix in posterbox. Minimal working coding:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usepackage{tcolorbox}
\tcbuselibrary{poster}
\usepackage[margin=1in]{geometry}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{enumitem}
\usepackage{tcolorbox,enumitem,setspace}
\begin{document}
\begin{tcbposter}[
  poster = {
    columns=1,
    rows=2,
    spacing=1mm,
    height=14cm,
    width=12cm,
  },
]

\posterbox[colframe=red,width=18cm,height=8cm]{column=1}{
\begin{tikzpicture}
\path(0,0,0);
\matrix[ampersand replacement=\&,matrix of nodes,column sep=10pt, row sep=2pt] at (0.1,0.1,0.02,0.02,0.02) {
\includegraphics[width=2.0cm,height=3.0cm,angle=0,valign=l]{example-image-a} \& abc \& 
\hfill  
\includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b} \\
\includegraphics[width=2.0cm,height=1.5cm,angle=0,valign=l]{example-image-a} \& abc xyz \& \hfill 
\includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b} \\
\includegraphics[width=2.0cm,height=2.0cm,angle=0,valign=l]{example-image-a} \& abc xyz mlk \& \hfill 
\includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0,valign=l]{example-image-b} \\
};
\end{tikzpicture}
}

\end{tcbposter}
\end{document}

Please see attachment.

Please help:

1/ middle align of image a, 3 images b and text

2/ move 3 images b to the left ( /hfill don't work)

3/ how can increase/decrease distance between 3 images b?

Thanks

image that i need:

enter image description here

Image from my code:

enter image description here

3

This addresses your questions on the vertical alignment and column distances.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,calc}
\usepackage{tcolorbox}
\tcbuselibrary{poster}
\usepackage[margin=1in]{geometry}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{enumitem}
\usepackage{tcolorbox,enumitem,setspace}
\begin{document}
\begin{tcbposter}[
  poster = {
    columns=1,
    rows=2,
    spacing=1mm,
    height=14cm,
    width=12cm,
  },
]

\posterbox[colframe=red,width=18cm,height=8cm]{column=1}{
\begin{tikzpicture}
\matrix[ampersand replacement=\&,matrix of nodes,column sep=10pt, row sep=2pt,
nodes={anchor=center}, %<- center nodes including pictures
column 1/.append style={column sep=3cm},% <- increase specific column separation
column 2/.append style={column sep=4cm},% <- increase specific column separation
] (mat) at (0.1,0.1,0.02,0.02,0.02) {
\includegraphics[width=2.0cm,height=3.0cm,angle=0]{example-image-a} \& abc \& 
\includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b} \\
\includegraphics[width=2.0cm,height=1.5cm,angle=0]{example-image-a} \& abc xyz \& \hfill 
\includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b} \\
\includegraphics[width=2.0cm,height=2.0cm,angle=0]{example-image-a} \& abc xyz mlk \& \hfill 
\includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b}\&  \includegraphics[width=1.0cm,height=0.5cm,angle=0]{example-image-b} \\
};
\fill[white] foreach \X in {1,2,3}
{([xshift=1em,yshift=-1em]mat-\X-1.east) rectangle
([xshift=-1em,yshift=1em]mat-\X-2.west)
([xshift=1em,yshift=-1em]mat-\X-2.east) rectangle
([xshift=-0.1em,yshift=1em]mat-\X-3.west)}
;
\end{tikzpicture}
}
\end{tcbposter}
\end{document}

enter image description here

Let me note that I do not know if it is always harmless to put a tikzpicture inside a tcolorbox. Rather, I suspect that this amounts to nesting tikzpictures. It seems to work but it should be noted that it would be straightforward to add the frame and background with TikZ. Also your figure is a bit too wide.

4
  • How can move 3 images B more to the left? example: space = 0.1 cm to left vertical of table. Thanks
    – latexforti
    May 14 '19 at 1:33
  • 1
    @latexforti These distances are controlled by the individual column seps. However, I do not quite understand what "to left vertical table" means (and am not really online right now).
    – user121799
    May 14 '19 at 2:00
  • sorry, like right margin = 0.1 cm, distance between (last image B) and vertical line of box = 0.1cm. Thanks
    – latexforti
    May 14 '19 at 2:32
  • 1
    @latexforti Yes, this is possible, but at this point the whole setup is not really optimal. Apart from the possible issue of nesting tikzpictures the whole setup is not very symmetric. So I think it might make more sense to clarify first what you really want to achieve. Do you really want to have a posterbox, or is it just a means to get the frame and the background? Do you really want a poster of width width=12cm but a box inside of width width=18cm? It will be much more efficient to clarify these things beforehand.
    – user121799
    May 14 '19 at 2:49
2

like this?

enter image description here

in your case \hfill not help to push last three columns to the right. you need to increase width of the second column and if necessary column sep. for example with

    column 2/.style={nodes={minimum width=5cm},
                     column sep=25mm}]

also you can make MWE code a little bit shorter with use Gin key for images in matrix. for vertical centering you need to put images baseline to the center (by valign=center, as already showed in @marmot answer)}:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\usepackage{tcolorbox}
\tcbuselibrary{poster}
\usepackage[margin=1in]{geometry}
\usepackage{bbding}
\usepackage{pifont}
\usepackage{enumitem}
\usepackage{tcolorbox,enumitem,setspace}
\usepackage[export]{adjustbox}

\begin{document}
\begin{tcbposter}[
  poster = {
    columns=1,
    rows=2,
    spacing=1mm,
    height=14cm,
    width=12cm,
  },
]

\posterbox[colframe=red,width=18cm,height=8cm]{column=1}{
\begin{tikzpicture}
\setkeys{Gin}{height=1cm,width=1cm}
\path(0,0,0);
\matrix[ampersand replacement=\&,
        matrix of nodes,
        column sep=10mm,
        row sep=2pt,
        column 2/.style={nodes={minimum width=4cm},
                         column sep=30mm}]
{
\includegraphics[height=3.0cm,width=2cm,
                 valign=c]{example-image-a} \&
                                       abc  \&
\includegraphics[valign=c]{example-image-b} \&
\includegraphics[valign=c]{example-image-b} \&
\includegraphics[valign=c]{example-image-b} \\
\includegraphics[height=1.5cm,width=2cm,
                 valign=c]{example-image-a} \& 
                                    abc xyz \& 
\includegraphics[valign=c]{example-image-b} \&  
\includegraphics[valign=c]{example-image-b} \&
\includegraphics[valign=c]{example-image-b} \\
\includegraphics[height=2.0cm,width=2cm,
                 valign=c]{example-image-a} \&
                                abc xyz mlk \&
\includegraphics[valign=c]{example-image-b} \&
\includegraphics[valign=c]{example-image-b} \&
\includegraphics[valign=c]{example-image-b} \\

};
\end{tikzpicture}
}

\end{tcbposter}
\end{document}
2
  • This produces a symmetric spacing but in the OP's screenshot it is not symmetric.
    – user121799
    May 14 '19 at 0:37
  • 1
    @marmot, you might be right. Now i see, what OPe like to obtain with \hfill . Since you already give a hint how to do this, I will probably left answer as it is. It may some ideas from it will be helpful to someone. Meanwhile i will rethinking, if there is short way (without defining new column sep for each column) to increase distance between "b" images (sub question c)., but here is now time to slip/hibernate :-)
    – Zarko
    May 14 '19 at 1:21

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.