将 \setplength 定义的列内的 \komavar 条目右对齐

将 \setplength 定义的列内的 \komavar 条目右对齐

scrlttr2我正在根据以下内容制定自定义发票模板KOMA 脚本示例代码由 Markus Kohm 提供(具体而言,可在 下找到的文件asymTypB.lco和)。briefwbk.texKOMA-Script-3/Anhang-E/source

为了修饰设计和适合,以及,在正确的位置内的各种信息信息块,我想右对齐(flushright\raggedleft? 它们相同吗?) 条目\usekomavar{date}\usekomavar{place}\usekomavar{frombank}。由于几乎所有事情似乎都运行得相当好,指导\raggedleft所讨论的变量,它们被钩在 A4 大小的纸张边缘。

当前信息块的部分截图

得出此结果的代码来自该asymTypB.lco文件的自定义版本:

% Main block of Info-Column
\put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
\raggedleft%
    \vspace{\useplength{refvpos}}%
    \vspace{\useplength{refaftervskip}}%
    \usekomavar{date}\\%
    \usekomavar{place}\\[9\baselineskip]%
    %
    \raggedright%
    \usekomavar{fromname}\\[\baselineskip]%
    \ifkomavarempty{company}{}{%
      \\
      \usekomavar{company}%
    }~\\%
    \usekomavar{professiona}\\[\baselineskip]%
    \usekomavar{professionb}\\[2\baselineskip]%
    \usekomavar{fromaddress}\\[\baselineskip]%
    \usekomavar*{fromphone}\usekomavar{fromphone}\\[\baselineskip]%
    \ifkomavarempty{fromfax}{}{%
  \\
  \usekomavar*{fromfax}\usekomavar{fromfax}%
    }%
    \usekomavar{fromemail}\\[\baselineskip]%
    %\usekomavar{fromurl}\\%
    \usekomavar{fromlinkedin}\\[2\baselineskip]%
    \usekomavar{fromvatin}\\%
  }%
}%
% Banking information
\put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
    \raggedleft
    \vspace{\useplength{firstfootvpos}}%
    \vspace{-\footskip}%
    \usekomavar{frombank}%
  }%
}%
\end{picture}%
\hspace*{\useplength{infocolwidth}}%

我所追求的是获取信息块中最长的条目(即LinkedIn当前条目)并使用其与纸张边缘的距离作为边距日期地方银行汇款以便将它们与信息块的虚拟右边界对齐。

infocolwidth在同一个.lco文件中由定义\@setplength{infocolwidth}{.2.5\paperwidth}

我怎样才能让这个看起来好看?此外,虽然我读过https://tex.stackexchange.com/a/4692/8272https://tex.stackexchange.com/a/7459/8272,我还是无法修复所有的"There's no line here to end" \opening{text}错误。

更新附加了(不完全是)最小工作示例的文件。

自定义_AsymTypB.lco

% Custom Template for an Inoice (Letter)
% Based on:

% asymTypB.lco
% Copyright 2008 Markus Kohm

% Metadata about this file
\ProvidesFile{asymTypB.lco}%
             [2011/09/20 v0.2 unsupported LCO-file]%

% DIN 676 B
\LoadLetterOption{DINmtext}%

% Place letter body to the left
\setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
\addtolength{\oddsidemargin}{-1in}%

% Again... ?
\AfterCalculatingTypearea{%
  \setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
  \addtolength{\oddsidemargin}{-1in}%
}%
\activateareas

% Head
\@setplength{firstheadvpos}{0pt}%
\@setplength{firstheadwidth}{\paperwidth}%

% Foot
\@setplength{firstfootvpos}{\paperheight}%
\@addtoplength[-]{firstfootvpos}{\useplength{toaddrvpos}}%

% Reference
\@addtoplength{refvpos}{-1.5\baselineskip}%

% New variable(s) here!
\newkomavar{company}%
\newkomavar{professiona}%
\newkomavar{professionb}%
\newkomavar[VATin]{fromvatin}%
\newkomavar{fromlinkedin}%

% New variables that concern the client here!
% \newkomavar*[Your VATin]{yourvatin}%

% Set pseudo-length for infocol
\@newplength{infocolwidth}%
\ifdim \textwidth<0.666\paperwidth% How is this supposed to work?
  \@setplength{infocolwidth}{.22222\paperwidth}%
\else
  \@setplength{infocolwidth}{.2.5\paperwidth}%{0.1667\paperwidth}%
\fi


% Set Head first... ?
\setkomavar{firsthead}{%
  \fontsize{8}{9}\sffamily% Font size(s)
  \hspace*{\fill}%
  \begin{picture}(0,0)%
    % Logo?
    \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
        \vspace{\useplength{toaddrvpos}}%
        \usekomavar{fromlogo}%
      }%
    }%
    % Main block of Info-Column
    \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
    \flushright%
        \vspace{\useplength{refvpos}}%
        \vspace{\useplength{refaftervskip}}%
        \usekomavar{date}\\%
        \usekomavar{place}\\[9\baselineskip]%
        %
        \raggedright%
        \usekomavar{fromname}\\[\baselineskip]%
        \ifkomavarempty{company}{}{%
          \\
          \usekomavar{company}%
        }\\[\baselineskip]%
        \usekomavar{professiona}\\[\baselineskip]%
        \usekomavar{professionb}\\[2\baselineskip]%
        \usekomavar{fromaddress}\\[\baselineskip]%
        \usekomavar*{fromphone}\usekomavar{fromphone}\\[\baselineskip]%
        \ifkomavarempty{fromfax}{}{%
      \\
      \usekomavar*{fromfax}\usekomavar{fromfax}%
        }%
        \usekomavar{fromemail}\\[\baselineskip]%
%         \usekomavar{fromurl}\\%
        \usekomavar{fromlinkedin}\\[2\baselineskip]%
        \usekomavar{fromvatin}\\%
      }%
    }%
    % Banking information
    \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
        \raggedleft
        \vspace{\useplength{firstfootvpos}}%
        \vspace{-\footskip}%
        \usekomavar{frombank}%
      }%
    }%
  \end{picture}%
  \hspace*{\useplength{infocolwidth}}%
}%
\KOMAoption{refline}{nodate}
\setkomavar{nexthead}{%
  \@tempswatrue
  \if@twoside\ifodd\number\value{page}\else
      \@tempswafalse
  \fi\fi
  \if@tempswa
    \makebox[0pt][l]{%
      \hspace*{-\oddsidemargin}\hspace{-1in}%
      \hspace{\paperwidth}%
      \hspace{-\useplength{infocolwidth}}%
      \normalfont\fontsize{7}{8}\sffamily
      \begin{picture}(0,0)
        \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
            \vspace*{-\topmargin}\vspace{-1in}%
            \vspace{-\headheight}%
            \vspace{\useplength{toaddrvpos}}%
            \begin{tabular}{@{}c@{}}
              \usekomavar{fromlogo}\\
              \usekomavar{company}\\
            \end{tabular}%
          }%
        }%
      \end{picture}%
    }%
  \fi
}%
\pagestyle{headings}%
\endinput

自定义发票模板.tex

% custom invoice template -- Minimal Working Example
% Based on:

% brieftemplate.tex
% Copyright 2008 Markus Kohm


\RequirePackage{fix-cm}

% \usepackage{mathpazo}
\usepackage[LGR,T1]{fontenc} % Also for ``Greek'' Content
\usepackage[latin9]{inputenc}
\usepackage{babel}

\usepackage{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm}

\setlength{\parskip}{\smallskipamount}

% No indentation at all!
\setlength{\parindent}{0pt}

\usepackage{color}

\usepackage{array}
\usepackage{textcomp}

\usepackage{fixltx2e}
\usepackage{graphicx}


\usepackage{charter}
\usepackage[scaled]{helvet}
\usepackage[scaled=0.87]{luximono}
% \usepackage[scaled=0.92]{frutigernext}% Does not play nice!

%
\usepackage{setspace}
\setstretch{1.1000000000000001}

% hyperref
\usepackage[%
  pdftitle={PDF-Title},
  pdfauthor={Author},
  pdfsubject={PDF-Subject},
  pdfkeywords={keyword1, keyword2, keyword3},
  linkcolor=magenta,
  urlcolor=marineblue2,
  citecolor=blue,
  pdfstartview={FitH},
  hyperfootnotes=false,
  unicode=true,
  bookmarks=false,
  breaklinks=false,
  pdfborder={0 0 0},
  backref=false,
  colorlinks=true]{hyperref}

% \providecommand{\SetSize}{%
%   \AtBeginDvi{\special{papersize=210mm,210mm}}%
%   \AtBeginDocument{%
%     \ifpdfoutput{%
%       \pdfpagewidth=210mm
%       \pdfpageheight=210mm
%     }{}%
%   }%
% }
% \SetSize


%
\makeatletter

% Martin Vogels Symbols
\usepackage{marvosym}
\usepackage{ocr}

% Colors
\usepackage{xcolor}

% define marine blue
\definecolor{marineblue}{rgb}{0.05,0.1,0.4}
\definecolor{marineblue2}{rgb}{0.05,0.1,0.5}

% define lightgray
\definecolor{lightgray}{gray}{0.6}
\definecolor{lightgray2}{gray}{0.8}
\definecolor{lightgray-coursework}{gray}{0.3}

%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
DIV=last%
,headsepline=true%            separate the header with a line on page >1
%,footsepline=true%             separate the footer with a line on page >1
%pagenumber=botcenter%   position of the page number (see docu)
%,parskip=false%          Use indent instead of skip (more options cf. docu)
% ,fromalign=center%        alignment of the address
,fromrule=aftername%    separate the address with a line?
,fromphone=true%         print sender phone number
,fromfax=false%          print sender fax number
,fromemail=true%           print sender e-mail address
,fromurl=true%               print sender URL
,fromlogo=true%         print a logo (position depends on fromalign)
%,addrfield=false%        print an address field?
,backaddress=false%  print the back address?
,subject=left%,titled% alternative subject layout and position
%,locfield=narrow%      width of the (extra) location field
,foldmarks=false%      print foldmarks?
%,numericaldate=true%  date layout
,refline=wide%             layout of the refline
}

%% Customize Separators
%\setkomavar{placeseparator}{ -- }
\setkomavar{backaddressseparator}{ $\cdot$ }
%\setkomavar{emailseparator}{ --> }
%\setkomavar{enclseparator}{ > }
%\setkomavar{faxseparator}{ --> }
%\setkomavar{phoneseparator}{ --> }
%\setkomavar{subjectseparator}{ >>> }

%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
% \setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
% \setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\scshape}
%\setkomafont{pagefoot}{}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{subject}{}
%\setkomafont{title}{}

% Logo
\setkomavar{fromlogo}{\includegraphics[clip,width=3cm,height=3cm,bb = 0 0 200 100, draft, type=eps]{qr_coded_mecard}\\
{\scriptsize{\textcolor{lightgray}{MECARD}\hfill{}}}}

% Name
\setkomavar{fromname}{\noun{First & Last Name}}

% Signature
\setkomavar{signature}{\includegraphics[width=84mm,height=24mm,keepaspectratio,bb = 0 0 200 100, draft, type=eps]{signature}\\
{\small{First Last Name}}}

% Professional Identity
\setkomavar{company}{Company}
\setkomavar{professiona}{Professional Activities A}
\setkomavar{professionb}{Professional Activities B}

% VATin
\setkomavar{fromvatin}{VAT\,in \ocr{ZZ\,000\,000\,000}\\Public Financial Service}
% \setkomavar{yourvatin}{Your \ocr{VAT}}

% Address(es)
\setkomavar{fromaddress}{{\small\Letter~}\\Address Line 1\\Postal Code, City\\Country}
% \setkomavar{fromzipcode}

% Phone
\setkomavar{fromphone}[]{{\large\Mobilefone}\\{\ocr{+00\,9999\,666\,333}}}

% FAX
% \setkomavar{fromfax}[]

% e-Mail
\setkomavar{fromemail}{{\large\Email}\\{\href{mailto:[email protected]}{user-id\,@\,domain.name}}}

% Web
\setkomavar{fromurl}{{\Info}~\href{web:website.ext}{website.ext}}
\setkomavar{fromlinkedin}{\includegraphics[width=0.25cm,height=0.25cm]{linkedin.png}\\{\href{http://gr.linkedin.com/pub/AccountName}{linkedin.com/pub/AccountName}}}

% Banking
\setkomavar{frombank}{Account holder\\%
\textcolor{blue}{\ocr{First Name, Last Name}}\\%
IBAN\\%
\textcolor{blue}{\ocr{zz0000011111222223333344444}}\\%
SWIFT\,-\,BIC\\%
\textcolor{blue}{\ocr{QWERTYUI}}}%

自定义发票.tex

%% custom invoice template -- Minimal Working Example
%% Based on:

% briefwbk.tex
% Copyright 2008 Markus Kohm

\documentclass[%
  english,
  custom_asymTypB,
  DIV=8,
  fontsize=11pt]{scrlttr2}

% What, Where, When?
\setkomavar{subject}{Quotation for... \textbf{yyy}}

% \setkomavar{toname}
% \setkomavar{toaddress}

% \setkomavar{customer}
% \setkomavar{refname}
% \setkomavar{refvalue}

% \setkomavar{invoice}


\setkomavar{myref}{Project: yyy}

% Place, Location
% \setkomavar{placeseparator}
\setkomavar{place}{Place}
% \setkomavar{location}{Location}

% Date
\setkomavar{date}{\today}

% Structure and Basic Information
\input{custom_invoice_template.tex}

\begin{document}

  \begin{letter}{Mr. xxx xxx\\
  Institution\\
  Description\\
  Address Line 1\\
  Address Line 2\\
  Country}

  \opening{Dear xxx,}

  \begin{flushleft}
  herewith I am sending you a quotation...
  \end{flushleft}

  \closing{Sincerely yours,}

  \encl{Enclosures}
  \cc{}

  \end{letter}

\end{document}

答案1

这不是对最初问题的直接回答。但是,通过硬编码距离(当然,这不是要求的),这是一种可行的解决方案。

非常欢迎提供改进外观的更正和提示。例如,如何正确地将签名放置在页脚的位置。

自定义_AsymTypB.lco

% Custom Template for an Invoice (Letter)
% Based on:

% asymTypB.lco
% Copyright 2008 Markus Kohm

% Metadata about this file
\ProvidesFile{asymTypB.lco}%
             [2011/09/20 v0.2 unsupported LCO-file]%

% DIN 676 B
\LoadLetterOption{DINmtext}%

% Place letter body to the left
\setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
\addtolength{\oddsidemargin}{-2.54cm}%

% Again... ?
\AfterCalculatingTypearea{%
  \setlength{\oddsidemargin}{\useplength{toaddrhpos}}%
  \addtolength{\oddsidemargin}{-2.54cm}%
}%
\activateareas

% Head
\@setplength{firstheadvpos}{0pt}%
\@setplength{firstheadwidth}{\paperwidth}%

% Foot
\@setplength{firstfootvpos}{\paperheight}%
\@addtoplength[-]{firstfootvpos}{\useplength{toaddrvpos}}%

% Reference
\@addtoplength{refvpos}{-1.5\baselineskip}%

% New variable(s) here!
\newkomavar{company}%
\newkomavar{professiona}%
\newkomavar{professionb}%
\newkomavar{fromvatin}%
\newkomavar{fromlinkedin}%

% New variables that concern the client here!
\newkomavar*[Your VAT\,in]{yourvatin}%

% Set pseudo-length for infocol
\@newplength{infocolwidth}%
\ifdim \textwidth<0.666\paperwidth% How is this supposed to work?
  \@setplength{infocolwidth}{.2\paperwidth}%
\else
  \@setplength{infocolwidth}{.21\paperwidth}%{0.1667\paperwidth}%
\fi


% Set Head first... ?
\setkomavar{firsthead}{%
  \fontsize{9}{10}\sffamily% Font size(s)
  \hspace*{\fill}%
  \begin{picture}(0,0)%
    % Logo?
    \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
        \vspace{\useplength{toaddrvpos}}%
        \usekomavar{fromlogo}%
      }%
    }%
    % Date only
      \put(-224,0){\parbox[t]{2.45\useplength{infocolwidth}}{%
        \flushright
        \vspace{\useplength{refvpos}}%
        \vspace{\useplength{refaftervskip}}%
        \usekomavar{place}\\%
        \usekomavar{date}%
      }
      }
    % Main block of Info-Column
      \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
        \raggedright%
        \vspace{\useplength{refvpos}}%
        \vspace{\useplength{refaftervskip}}
        \vspace{8\baselineskip}%
        \usekomavar{fromname}\\[\baselineskip]%
        \ifkomavarempty{company}{}{%
          \\
          \usekomavar{company}\\%
        }%
        \usekomavar{professiona}\\[\baselineskip]%
        \usekomavar{professionb}\\[\baselineskip]%
        \usekomavar{fromaddress}\\[\baselineskip]%
        \usekomavar*{fromphone}\usekomavar{fromphone}\\[\baselineskip]%
        \ifkomavarempty{fromfax}{}{%
      \\
      \usekomavar*{fromfax}\usekomavar{fromfax}%
        }%
        \usekomavar{fromemail}\\[\baselineskip]%
        %\usekomavar{fromurl}\\%
        \usekomavar{fromlinkedin}\\[\baselineskip]%
        \usekomavar[\textbf{\textcolor{lightgray06}{VAT\,in}}\\]{fromvatin}%
      }%
    }%
    % Banking information
    \put(-200,0){\parbox[t]{2.45\useplength{infocolwidth}}{%
        \flushright
        \vspace{\useplength{firstfootvpos}}%
        \vspace{-\footskip}%
        \usekomavar{frombank}%
      }%
    }%
  \end{picture}%
  \hspace*{\useplength{infocolwidth}}%
}%
\KOMAoption{refline}{nodate}
\setkomavar{nexthead}{%
  \@tempswatrue
  \if@twoside\ifodd\number\value{page}\else
      \@tempswafalse
  \fi\fi
  \if@tempswa
    \makebox[0pt][l]{%
      \hspace*{-\oddsidemargin}\hspace{-1in}%
      \hspace{\paperwidth}%
      \hspace{-\useplength{infocolwidth}}%
      \normalfont\fontsize{7}{8}\sffamily
      \begin{picture}(0,0)
        \put(0,0){\parbox[t]{\useplength{infocolwidth}}{%
            \vspace*{-\topmargin}\vspace{-1in}%
            \vspace{-\headheight}%
            \vspace{\useplength{toaddrvpos}}%
            \begin{tabular}{@{}c@{}}
              \usekomavar{fromlogo}\\
              \usekomavar{company}\\
            \end{tabular}%
          }%
        }%
      \end{picture}%
    }%
  \fi
}%
\pagestyle{headings}%
\endinput

自定义发票模板.tex

% custom invoice template -- Minimal Working Example
% Based on:

% brieftemplate.tex
% Copyright 2008 Markus Kohm


\RequirePackage{fix-cm}

% \usepackage{mathpazo}
\usepackage[LGR,T1]{fontenc} % Also for ``Greek'' Content?
\usepackage[latin9]{inputenc}
\usepackage{babel}

\usepackage{geometry}
\geometry{verbose,tmargin=0cm,bmargin=0cm}

\setlength{\parskip}{\smallskipamount}

% No indentation at all!
\setlength{\parindent}{0pt}


% Colors

\usepackage{color}
\usepackage{xcolor}

% define marine blue
\definecolor{marineblue}{rgb}{0.05,0.1,0.4}
\definecolor{marineblue2}{rgb}{0.05,0.1,0.5}

% define lightgray
\definecolor{lightgray08}{gray}{0.8}
\definecolor{lightgray06}{gray}{0.6}
\definecolor{lightgray04}{gray}{0.4}
\definecolor{lightgray02}{gray}{0.2}

\usepackage{array}
\usepackage{textcomp}

\usepackage{fixltx2e}
\usepackage{graphicx}


\usepackage{charter}
\usepackage[scaled]{helvet}
\usepackage[scaled=0.87]{luximono}
% \usepackage[scaled=0.92]{frutigernext}% Does not play nice!

%
\usepackage{setspace}
\setstretch{1.15}

% hyperref
\usepackage[%
  pdftitle={PDF-Title},
  pdfauthor={Author},
  pdfsubject={PDF-Subject},
  pdfkeywords={keyword1, keyword2, keyword3},
  linkcolor=magenta,
  urlcolor=marineblue2,
  citecolor=blue,
  pdfstartview={FitH},
  hyperfootnotes=false,
  unicode=true,
  bookmarks=false,
  breaklinks=false,
  pdfborder={0 0 0},
  backref=false,
  colorlinks=true]{hyperref}

% \providecommand{\SetSize}{%
%   \AtBeginDvi{\special{papersize=210mm,210mm}}%
%   \AtBeginDocument{%
%     \ifpdfoutput{%
%       \pdfpagewidth=210mm
%       \pdfpageheight=210mm
%     }{}%
%   }%
% }
% \SetSize


%
\makeatletter

% Martin Vogels Symbols
\usepackage{marvosym}
\usepackage{ocr}

%% Remove preceeding '%' to uncomment an item
\KOMAoptions{%
DIV=last%
,headsepline=true%  separate the header with a line on page >1
%,footsepline=true% separate the footer with a line on page >1
%pagenumber=botcenter%  position of the page number (see docu)
,parskip=full-% Use indent instead of skip (more options cf. docu)
%,fromalign=center% alignment of the address
,fromrule=aftername%    separate the address with a line?
,fromphone=true%    print sender phone number
,fromfax=false%     print sender fax number
,fromemail=true%    print sender e-mail address
,fromurl=true%      print sender URL
,fromlogo=true%     print a logo (position depends on fromalign)
%,addrfield=false%  print an address field?
% ,backaddress=false%   print the back address?
,subject=centered%,titled%  alternative subject layout and position
%,locfield=narrow%  width of the (extra) location field
,foldmarks=true%    print foldmarks?
% ,numericaldate=true%  date layout
,refline=narrow%    layout of the refline
}

%% Customize Separators

\setkomavar{placeseparator}{~}%\setkomavar{placeseparator}{ -- }
\setkomavar{backaddressseparator}{ $\cdot$ }
%\setkomavar{emailseparator}{ --> }
\setkomavar{enclseparator}{ > }
%\setkomavar{faxseparator}{ --> }
%\setkomavar{phoneseparator}{ --> }
%\setkomavar{subjectseparator}{ >>> }

%% Customize fonts
%% Use LaTeX's standard font commands
%% Modify with \setkomafont or \addtokomafont
%% (see KOMA documentation)
% \setkomafont{backaddress}{\rmfamily}
%\setkomafont{descriptionlabel}{}
% \setkomafont{fromaddress}{\small}
\setkomafont{fromname}{\scshape}
%\setkomafont{pagefoot}{}
%\setkomafont{pagehead}{}
%\setkomafont{pagenumber}{}
%\setkomafont{title}{}
\addtokomafont{title}{\color{lightgray04}}
%\setkomafont{subject}{}
\addtokomafont{subject}{\color{lightgray06}}

\addtokomafont{foldmark}{\color{lightgray08}}

% Place, Location

% \setkomavar{placeseparator
\setkomavar{place}{\textcolor{lightgray04}{SomePlace, SomeCountry}}
% \setkomavar{location}


% Logo
\setkomavar{fromlogo}{\includegraphics[clip,width=3cm,height=3cm,bb = 0 0 200 100, draft, type=eps]{qr_coded_mecard}\\
{\scriptsize{\textcolor{lightgray}{MECARD}\hfill{}}}}

% Name

\setkomavar{fromname}{\textcolor{lightgray04}{\textsc{FirstName \textbf{LastName}}, Title}}


% Signature
\setkomavar{signature}{\includegraphics[width=84mm,height=24mm,keepaspectratio,bb = 0 0 200 100, draft, type=eps]{signature}\\
{\small{Fisrt & Last Name}}}


% Professional Identity / Company

\setkomavar{company}{\textcolor{lightgray04}{Company}}


% Professional Identities

\setkomavar{professiona}{\textcolor{lightgray06}{Profession A}}
\setkomavar{professionb}{\textcolor{lightgray04}{Profession B}\\%
  \textcolor{lightgray06}{Profession B Related Info}}


% VATin

\setkomavar{fromvatin}{\textcolor{lightgray04}{\ocr{XX\,111\,222\,333}\\Financial Service\\SomePlace, SomeCountry}}


% Address(es)

\setkomavar{fromaddress}{{\large\textcolor{lightgray06}{\Letter}}~\\{\color{lightgray04}{Street Nr.\\Postal\,Code City\\Country}}}
\setkomavar{fromzipcode}{Postal\,Code}
\setkomavar{backaddress}{Name\\Street Nr.\\Postal\,Code City\\Country}


% Phone

\setkomavar{fromphone}[]{{\large\textcolor{lightgray06}{\Mobilefone}}\\{\textcolor{lightgray04}{\ocr{+00\,1122\,333\,444}}}}


% FAX
% \setkomavar{fromfax}[]

% e-Mail

\setkomavar{fromemail}{{\large\textcolor{lightgray04}{\Email}}\\{\href{mailto:[email protected]}{userid\,@\,domain.name}}}


% Web

\setkomavar{fromurl}{{\Info}~\href{web:websitename}{websitename}}
\setkomavar{fromlinkedin}{\includegraphics[width=0.25cm,height=0.25cm]{linkedin.png}\\{\href{http://xx.linkedin.com/pub/account-name}{linkedin.com/pub/account-name}}}


% Banking

\setkomavar{frombank}{\color{lightgray06}{Account holder}\\%
\textcolor{lightgray04}{\ocr{NAME LASTNAME}}\\[\smallskip]%
IBAN\\%
\textcolor{lightgray04}{\ocr{XX0123456789012345678901234}}\\[\smallskip]%
SWIFT\,-\,BIC\\%
\textcolor{lightgray04}{\ocr{QQQQQQQQ}}}%

自定义发票.tex

%% custom invoice template -- Minimal Working Example
%% Based on:

% briefwbk.tex
% Copyright 2008 Markus Kohm

\documentclass[%
  english,
  custom_asymTypB,
  DIV=8,
  fontsize=11pt]{scrlttr2}

% Structure and Basic Information
\input{custom_invoice_template.tex}


% What, Where, When?
\setkomavar{title}{Quotation - Invoice}
\setkomavar{subject}{Quotation for... \textbf{yyy}}

% \setkomavar{toname}
% \setkomavar{toaddress}

% \setkomavar{customer}
% \setkomavar{refname}
% \setkomavar{refvalue}

% \setkomavar{invoice}

\setkomavar{myref}{Project: yyy}


% Place, Location
\setkomavar{place}{Place}
% \setkomavar{placeseparator}
% \setkomavar{location}{Location}


% Date
\setkomavar{date}{\today}


\begin{document}

  \begin{letter}{Mr. xxx xxx\\
  Institution\\
  Description\\
  Address Line 1\\
  Address Line 2\\
  Country}

  \opening{Dear xxx,}

  \begin{flushleft}
  herewith I am sending you a quotation...
  \end{flushleft}


  \closing{Sincerely yours,}

  \encl{Enclosures}
  \cc{}

  \end{letter}

\end{document}

结果

自定义发票(MWE)模板的屏幕截图

相关内容