相对定位:如何避免外部形象的偏离中心?

相对定位:如何避免外部形象的偏离中心?

在为商业计划书制作“我们是谁”部分时遇到了以下问题。代码

\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning}

\begin{document}

\begin{tikzpicture}[every node/.style={inner sep=0pt,outer sep=0pt,align=center},path image/.style={align=center,
path picture={align=center,
\node at (path picture bounding box.center) {
\includegraphics[width=5cm]{#1}
};}}]
\centering
\node[circle,align=center,minimum size=4cm,path image=frog.jpg,draw=white,ultra thin] (bergkamp) {};
\node[text width=4cm,below=of bergkamp] (bergkampbio) {Dennis Bergkamp \\ founder  \\ \textit{Amsterdam graduate} \\ \textit{Harvard professor}};

\node[circle,align=center,minimum size=4cm,right=of bergkamp,path image=frog.jpg,draw=white,ultra thin] (henry) {};
\node[text width=4cm,below=of henry] (henrybio) {Thierry Henry \\ cofounder \\ \textit{Princeton graduate} \\ \textit{USTC professor}};

\node[circle,minimum size=4cm,path image=frog.jpg,draw=white,ultra thin,right=of henry] (pires) {};
\node[text width=4cm,below=of pires] (piresbio) {Robert Pires \\ assistant \\ \textit{PhD student} \\ \textit{HSE, Math department}};

\node[circle,align=center,minimum size=4cm,path image=frog.jpg,draw=white,ultra thin,below=of bergkampbio] (vieira) {};
\node[text width=4cm,below=of vieira] (vieibio) {Partick Vieira \\ team lead \\ \textit{University of Milano} \\ \textit{Imperial College} };

\node[circle,align=center,minimum size=4cm,path image=frog.jpg,draw=white,ultra thin,below=of henrybio] (keane) {};
\node[text width=4cm,below=of keane] (keanobio) {Roy Keane \\ marketing \\ \textit{University of Nottingham} \\ \textit{Manchester fellow} };


\end{tikzpicture}
\end{document}

提供

我们的队伍

显然,我们需要五张青蛙脸。另一个问题是,整个图片没有正确居中(左侧边距大于右侧边距),但我认为使用 可以相对轻松地修复它0.33*\textwidth

答案1

% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
% arara: pdflatex: { synctex: true }
\pdfminorversion=7

\documentclass[a4paper]{article}

\usepackage{tikz,graphicx}
\usetikzlibrary{positioning}

\begin{document}
  {\centering
    \makebox[0pt]{%
      \begin{tikzpicture}
        [
        every node/.style={
          inner sep=0pt,outer sep=0pt,align=center
        },
        path image/.style n args=2{
          path picture={
            \node (#1) at (path picture bounding box.center) {\includegraphics[width=5cm]{#2}};
          },
          draw=red,
          ultra thin
        }
        ]
        \path [path image={bergkamp}{tiger}] circle (20mm);
        \node[text width=4cm,below=of bergkamp] (bergkampbio) {Dennis Bergkamp \\ founder  \\ \textit{Amsterdam graduate} \\ \textit{Harvard professor}};
        \path  [path image={henry}{tiger}] ([xshift=25mm]bergkamp.east)  circle (20mm);
        \node[text width=4cm,below=of henry] (henrybio) {Thierry Henry \\ cofounder \\ \textit{Princeton graduate} \\ \textit{USTC professor}};
        \path  [path image={pires}{tiger}] ([xshift=25mm]henry.east)  circle (20mm);
        \node[text width=4cm,below=of pires] (piresbio) {Robert Pires \\ assistant \\ \textit{PhD student} \\ \textit{HSE, Math department}};
        \path  [path image={vieira}{tiger}] ([yshift=-25mm]bergkampbio.south)  circle (20mm);
        \node[text width=4cm,below=of vieira] (vieibio) {Partick Vieira \\ team lead \\ \textit{University of Milano} \\ \textit{Imperial College} };
        \path  [path image={keane}{tiger}] ([yshift=-25mm]henrybio.south)  circle (20mm);
        \node[text width=4cm,below=of keane] (keanobio) {Roy Keane \\ marketing \\ \textit{University of Nottingham} \\ \textit{Manchester fellow} };
      \end{tikzpicture}}\par}
\end{document}

老虎

相关内容