如何从moderncvbanking风格的\makecvtitle中删除名称和标题之间的规则“|”?

huangapple go评论65阅读模式
英文:

how to remove the rule "|" between name and title in \makecvtitle from moderncvbanking style?

问题

这是您提供的一段英文文本,以下是翻译好的部分:

"我想首先说,我不是程序员,对此了解不多,
我尝试使用LaTeX制作自己的简历作为第一次尝试,您将在下面找到我所做的截图,然后我会解释我不明白的地方;

这是我找到的模板中的代码:
输入图片描述
这是它显示我的姓名和标题的方式:
输入图片描述

我想做的是删除连接我的姓名和我的标题的“|”符号,
我进行了一些研究并了解到银行风格影响了\makecvtitle 命令,我不知道如何删除它?

这是评论中要求的代码:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

\usepackage{import}

\name{Hichem}{RAHMANI\}

\title{认证的SAP顾问}
\phone[mobile]{+213 540 323 550}
\email{h.rahmani04221995@gmail.com}

\begin{document}

\makecvtitle
\end{document}

如果有人能向我展示如何实现这一点,我将不胜感激,

提前感谢。"

英文:

i want to start by saying that i am no programmer and that i do not know a lot about it,
i tried to make my own cv using latex as a first experience, you will find screenshots of what i did below and then i'll explain what i don't understand ;

this is the code in the model i found :
enter image description here
and this is how it displays my name and title :
enter image description here

what i would like to do, is to delete the \rule "|" that it between my name and my title,
i did some research and understood that the banking style affects the command \makecvtitle, what i do not know is how can i delete it ?

here is the code as asked in the comments :

    \documentclass[11pt,a4paper,sans]{moderncv}        
    \moderncvstyle{banking}                            
    \moderncvcolor{blue}      

    \usepackage[utf8]{inputenc}                      
    \usepackage[scale=0.75]{geometry}

    \usepackage{import}


    \name{Hichem}{RAHMANI\\}

    \title{Certified SAP Consultant}                                
    \phone[mobile]{+213 540 323 550}                   
    \email{h.rahmani04221995@gmail.com}                                


    \begin{document}

    \makecvtitle
    \end{document}

i would be more than grateful if anyone could show me this,

thanks in advance.

答案1

得分: 1

你可以像这样重新定义头部:

\documentclass[11pt,a4paper,sans]{moderncv}        
\moderncvstyle{banking}                            
\moderncvcolor{blue}      

\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.75]{geometry}

\usepackage{import}

\makeatletter
\@initializecommand{\makehead}{%
  \setlength{\makeheaddetailswidth}{0.8\textwidth}%
  \hfil%
  \parbox{\makeheaddetailswidth}{%
    \centering%
    % 姓名和标题
    \namestyle{\@firstname~\@lastname}\linebreak%
    \vskip-1.5ex%
    \ifthenelse{\equal{\@title}{}}{}{\titlestyle{\@title}}% \isundefined 不适用于 \@title,因为 LaTeX 自身在可能被 \title 重新定义之前定义了 \@title 
    % 可选的详细信息
    \if@details{%
      \\%
      \addressfont\color{color2}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{\addtomakeheaddetails{\addresssymbol\@addressstreet}%
        \ifthenelse{\equal{\@addresscity}{}}{}{\addtomakeheaddetails[~--~]{\@addresscity}}% 如果 \addresstreet 被定义,\addresscity 和 \addresscountry 将始终被定义,但可能为空
        \ifthenelse{\equal{\@addresscountry}{}}{}{\addtomakeheaddetails[~--~]{\@addresscountry}}%
        \flushmakeheaddetails\@firstmakeheaddetailselementtrue\\}%
      \ifthenelse{\isundefined{\@born}}{}{\addtomakeheaddetails{\bornsymbol\@born}}%
      \collectionloop{phones}{% 键包含电话类型(=符号命令前缀),项目包含号码
        \addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
      \ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%%
      \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}%%
      \collectionloop{socials}{% 键包含社交类型(=符号命令前缀),项目包含链接
        \addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
      \flushmakeheaddetails}\fi}\\[2.5em]}% 需要在此之后强制插入 \par,以避免在 \makehead 后的第一节之前没有留下空行时出现奇怪的间距错误

\makeatother

\name{Hichem}{RAHMANI}

\title{Certified SAP Consultant}                                
\phone[mobile]{+213 540 323 550}                   
\email{h.rahmani04221995@gmail.com}                                


\begin{document}

\makecvtitle
\end{document}
英文:

You can redefine the head like this:

\documentclass[11pt,a4paper,sans]{moderncv}        
\moderncvstyle{banking}                            
\moderncvcolor{blue}      
\usepackage[utf8]{inputenc}                      
\usepackage[scale=0.75]{geometry}
\usepackage{import}
\makeatletter
\@initializecommand{\makehead}{%
\setlength{\makeheaddetailswidth}{0.8\textwidth}%
\hfil%
\parbox{\makeheaddetailswidth}{%
\centering%
% name and title
\namestyle{\@firstname~\@lastname}\linebreak%
\vskip-1.5ex%
\ifthenelse{\equal{\@title}{}}{}{\titlestyle{\@title}}% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title) 
% optional detailed information
\if@details{%
\\%
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtomakeheaddetails{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomakeheaddetails[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
\ifthenelse{\equal{\@addresscountry}{}}{}{\addtomakeheaddetails[~--~]{\@addresscountry}}%
\flushmakeheaddetails\@firstmakeheaddetailselementtrue\\}%
\ifthenelse{\isundefined{\@born}}{}{\addtomakeheaddetails{\bornsymbol\@born}}%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
\ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
\flushmakeheaddetails}\fi}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \makehead
\makeatother
\name{Hichem}{RAHMANI}
\title{Certified SAP Consultant}                                
\phone[mobile]{+213 540 323 550}                   
\email{h.rahmani04221995@gmail.com}                                
\begin{document}
\makecvtitle
\end{document}

huangapple
  • 本文由 发表于 2023年3月7日 02:57:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/75654767.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定