.png)
moderncv
履歴書に を使用しています。moderncvstyleclassic.sty
かなり調整しましたが、ほぼ希望どおりの結果になりました。解決できないことが 1 つだけあります。 の右端にロゴを追加したいのです\cventry
。
現時点では、新しいコマンドを作成しました\cventrylogo
:
\renewcommand*{\cventrylogo}[8][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6.}%
\ifthenelse{\equal{#7}{}}{}{\hfill \includegraphics[scale=0.25]{#7}}%
\strut%
\ifx&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#8\end{minipage}}\fi}}
これを次のように使用します:
\section{Experience}
\cventrylogo{2015}{Short Term Scientific Collaborator}{M\'et\'eosuisse}{Payerne}{Switzerland}{logo_meteosuisse}{}
\cventrylogo{2009--2014}{PhD. in Physical Chemistry}{ETH}{Zurich}{Switzerland}{logo_eth}{}
\cventrylogo{2006--2008}{Process Development Engineer}{STM S.p.A.}{Agrate Brianza}{Italy}{logo_st}{}
\cventrylogo{2004--2005}{Internship}{Alenia Spazio S.p.A.}{Turin}{Italy}{logo_tas}{}
結果は次のとおりです。
すでに同様の質問を見てきましたが、1そして2しかし、これはまさに私が望んでいることではありません。問題が 2 つあります。まず、画像が下部に揃えられているので、テキストの中央に揃えたいのですが、次に、コマンドで画像のサイズを指定するオプションが欲しいのです\cventrylogo
が、これを実装するのは私の能力を超えています。どなたか助けていただければ幸いです。
私は Harish Kumar の協力を得て、MWE を提供してもらい、この質問に自分で答えました。
答え1
\cventrylogo
次のように定義されたコマンドを使用すると、期待どおりに動作するようになりました。
\renewcommand{\cventrylogo}[9][.25em]{%
\cvitem[#1]{#2}{%
{\bfseries#3}%
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
\ifthenelse{\equal{#5}{}}{}{, #5}%
\ifthenelse{\equal{#6}{}}{}{, #6.}%
\ifthenelse{\equal{#7}{}}{}{%
\ifthenelse{\equal{#8}{}}{}{\hfill \raisebox{-0.5\height}{\includegraphics[width=#8]{#7}}}}%
\strut%
\ifx	&%
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#9\end{minipage}}\fi} }
MWE は、誰のために使用できるかをさらに詳しく参照するためにここにあります。
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[utf8]{inputenc}
\usepackage[scale=0.8]{geometry}
\name{Riccardo}{I.}
\title{Title title}
\address{XXX}{place ville}{}
\phone[mobile]{+00~(0)~00~000~00~00}
\email{[email protected]}
\begin{document}
\makecvtitle
\section{Experience}
\cventrylogo{2015}{Short Term Scientific Collaborator}{M\'et\'eosuisse}{Payerne}{Switzerland}{logo_meteosuisse}{16mm}{}
\cventrylogo{2009--2014}{PhD. in Physical Chemistry}{ETH}{Zurich}{Switzerland}{logo_eth}{25mm}{}
\cventrylogo{2006--2008}{Process Development Engineer}{STM S.p.A.}{Agrate Brianza}{Italy}{logo_st}{18mm}{}
\cventrylogo{2004--2005}{Internship}{Alenia Spazio S.p.A.}{Turin}{Italy}{logo_tas}{20mm}{}
\end{document}