TransWikia.com

How to center the footer in koma

TeX - LaTeX Asked by 412p9wej on May 10, 2021

I want a centered footer. What am I missing?

% Created 2021-01-16 Sat 18:12
% Intended LaTeX compiler: pdflatex
documentclass[11pt]{scrlttr2}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{grffile}
usepackage{longtable}
usepackage{wrapfig}
usepackage{rotating}
usepackage[normalem]{ulem}
usepackage{amsmath}
usepackage{textcomp}
usepackage{amssymb}
usepackage{capt-of}
usepackage{hyperref}
setkomavar{firsthead}{}
setkomavar{firstfoot}{parbox[b]{linewidth}{centeringusekomavar{fromname}}}
setkomavar{fromaddress}{foo}
setkomavar{toaddress}{SOME place in toaddress 3bCODE-Townname}
KOMAoption{fromlogo}{false}
setkomavar{fromname}{mycenteredname}
setkomavar{place}{foo}
KOMAoptions{foldmarks=false}
setkomavar{date}{today}
begin{document}
begin{letter}{%
my text}
opening{bla}
my other text
closing{best regards}
end{letter}
end{document}

screenshot

One Answer

Replacing linewidth with textwidth seems to result in a horizontally centered footer:

documentclass[11pt]{scrlttr2}

setkomavar{firsthead}{}
setkomavar{firstfoot}{parbox[b]{textwidth}{centeringusekomavar{fromname}}}

setkomavar{fromaddress}{foo}
setkomavar{toaddress}{SOME place in toaddress 3bCODE-Townname}
KOMAoption{fromlogo}{false}
setkomavar{fromname}{mycenteredname}
setkomavar{place}{foo}
KOMAoptions{foldmarks=false}
setkomavar{date}{today}


begin{document}
begin{letter}{%
my text}
opening{bla}
my other text
closing{best regards}
end{letter}
end{document}

Answered by leandriis on May 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP