如何编辑页脚中的第一列表格,以便标记行的文本对齐?
\documentclass[fontsize=11pt, version=last, fromalign=left, backaddress=true, foldmarks=on, fromphone=off, fromemail=off, parskip=half, firsthead=false]{scrlttr2}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{blindtext}
\renewcommand*\familydefault{\sfdefault}
\renewcommand*{\raggedsignature}{\raggedright} % Signatur wird bündig gesetzt
\usepackage[official]{eurosym}
%
%---------------------------------------------------------------------------
% Absender
%
\newcommand{\mVorname}{stupid company GmbH}
\newcommand{\mNachname}{\& Co. KG}
\newcommand{\mStrasse}{Somestreet. 1}
\newcommand{\mStadt}{Somecity}
\newcommand{\mPLZ}{22223}
\setkomavar{date}{}
\setkomavar{fromname}{\mVorname{}~\mNachname{}} % Name
\setkomavar{fromaddress}{\mStrasse{}\\{}\mPLZ{}~\mStadt{}} % Adresse
\setkomavar{frombank}{SomeBank\\
IBAN:DE00 0000 0000 0000 0000 00\\BIC: AAAAAAAAAAA}
\setkomavar{location}{\raggedright
Versandanschrift:\\
\vfill
Some Guy \\
23423 Blablubbing \\
Blabistan \\
Telefon
}
\makeatletter
\@setplength{locvpos}{4.8cm}
\@setplength{locwidth}{7.5cm}
\@setplength{firstfootvpos}{250mm}
\makeatother
\LoadLetterOption{visualize}% loads visualize.lco to visualize boxes
\showfields{address}% show the address box
% header and footer first page:
\setkomavar{firstfoot}{% changed ->
\usekomafont{pageheadfoot}%
\parbox{\useplength{firstfootwidth}}{%
\rule{\linewidth}{.4pt}\\
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{\textbf{Geschäftsinformation:}}\\
persönlich haftende Gesellschafterin:\\
stupid company Verwaltungs-GmbH\\
Sitz Somecity \\
Amtsgericht Somecity, HBR 111111 \\
Handelsregister: Somecity HRA222222 \\
USt-IdNr.: DE 000000000 \\
WEEE-Nr.: DE 00000000 \\
Geschäftsführer: Some Guy
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{\textbf{\usekomavar*{frombank}:}} \smallskip \\
\usekomavar{frombank}
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{} \smallskip \\
Someotherbank \\
IBAN:DE00 0000 0000 0000 0000 00\\
BIC: BBBBBBBBBBB
\end{tabular}%
}%
}%
}
\setkomafont{pageheadfoot}{\scriptsize}
\usepackage{scrlayer-scrpage}% <- sets pagestyle scrheadings automatically
\DeclareNewLayer[
foreground,
textarea,
voffset=\useplength{firstfootvpos},
hoffset=\dimexpr.5\paperwidth-.5\useplength{firstfootwidth}\relax,
width=\useplength{firstfootwidth},
mode=picture,
contents=\putUL{\raisebox{\dimexpr-\height}{\usekomavar{firstfoot}}}
]{likefirstpage.foot}
\AddLayersToPageStyle{scrheadings}{likefirstpage.foot}
\clearpairofpagestyles
\chead*{\pagemark}
\begin{document}
%recipient
\begin{letter}{%
Max Musterkunde \\
Teststraße 2 \\
55555 Teststadt \\
Schweiz \\
}
%
%\setkomavar{title}{Titel}
\setkomavar{subject}{BETREFF}
%
\opening{}
%
%\Blindtext
\end{letter}
\end{document}
答案1
假如说
是所需的输出,您可能需要使用包含两列和其他一些\multicolumn
命令的表,而不是仅包含一列的表:
% header and footer first page:
\setkomavar{firstfoot}{% changed ->
\usekomafont{pageheadfoot}%
\parbox{\useplength{firstfootwidth}}{%
\rule{\linewidth}{.4pt}\\
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{\,}r@{}}
\multicolumn{2}{@{}l@{}}{\textbf{Geschäftsinformation:}}\\
\multicolumn{2}{l}{persönlich haftende Gesellschafterin:}\\
\multicolumn{2}{l}{stupid company Verwaltungs-GmbH}\\
\multicolumn{2}{l}{Sitz Somecity} \\
Amtsgericht Somecity,& HBR 111111 \\
Handelsregister: Somecity &HRA222222 \\
USt-IdNr.:& DE 000000000 \\
WEEE-Nr.: & DE 00000000 \\
\multicolumn{2}{l}{Geschäftsführer: Some Guy}
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{\textbf{\usekomavar*{frombank}:}} \smallskip \\
\usekomavar{frombank}
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{} \smallskip \\
Someotherbank \\
IBAN:DE00 0000 0000 0000 0000 00\\
BIC: BBBBBBBBBBB
\end{tabular}%
}%
}%
}
如果你对
嵌套表格可能会派上用场:
% header and footer first page:
\setkomavar{firstfoot}{% changed ->
\usekomafont{pageheadfoot}%
\parbox{\useplength{firstfootwidth}}{%
\rule{\linewidth}{.4pt}\\
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l}
\multicolumn{1}{@{}l@{}}{\textbf{Geschäftsinformation:}}\\
persönlich haftende Gesellschafterin:\\
stupid company Verwaltungs-GmbH\\
Sitz Somecity \\
\begin{tabular}{@{}l@{\;}l@{}}Amtsgericht Somecity,& HBR 111111 \\
Handelsregister: Somecity &HRA222222 \end{tabular}\\
\begin{tabular}{@{}l@{\;}l@{}}USt-IdNr.:& DE 000000000 \\
WEEE-Nr.: & DE 00000000 \end{tabular}\\
Geschäftsführer: Some Guy
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{\textbf{\usekomavar*{frombank}:}} \smallskip \\
\usekomavar{frombank}
\end{tabular}%
}%
\hfill
\parbox[t]{0.31\linewidth}{%
\begin{tabular}[t]{l@{}}
\multicolumn{1}{@{}l@{}}{} \smallskip \\
Someotherbank \\
IBAN:DE00 0000 0000 0000 0000 00\\
BIC: BBBBBBBBBBB
\end{tabular}%
}%
}%
}