aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-12-29 00:56:52 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2014-12-29 00:56:52 -0500
commit4591f06237edf1a78f266a1f64217eb51e57c6a9 (patch)
treeffce9e78d6fede0f60f306c9e9ddf1a2d9795d25
parent5f557450a55ba17fd88e9b84cb05e155c53cc424 (diff)
downloadwmletterhead-4591f06237edf1a78f266a1f64217eb51e57c6a9.tar.gz
wmletterhead-4591f06237edf1a78f266a1f64217eb51e57c6a9.zip
rework header so it automaticly line up logo and WM address
-rw-r--r--wmletterhead.cls20
1 files changed, 7 insertions, 13 deletions
diff --git a/wmletterhead.cls b/wmletterhead.cls
index 0faa98a..c0d654a 100644
--- a/wmletterhead.cls
+++ b/wmletterhead.cls
@@ -104,6 +104,7 @@
\newlength{\wmaddressheight} % to be calculated at the opening
+\newlength{\wmaddresstotalheight}
\newlength{\wmaddresswidth}
\newlength{\wmaddresshpos}
% --------------------------------------------------
@@ -139,25 +140,18 @@
}
\newcommand{\setwmaddresssizes}{
- \settototalheight{\wmaddressheight}{\hbox{\wmaddress}}%
+ \settototalheight{\wmaddresstotalheight}{\hbox{\wmaddress}}%
+ \settoheight{\wmaddressheight}{\hbox{\wmaddress}}%
\settowidth{\wmaddresswidth}{\hbox{\wmaddress}}%
}
\newcommand{\wmfromwithlogo}{
\setwmaddresssizes
- %\hskip -\wmlogoWhpos
- %\includegraphics[height=\wmlogoheight{},keepaspectratio=true]{\wmheaderlogo}
- \parbox[t]{\textwidth}{
- \raisebox{\wmlogoWvpos}{
- \parbox[t]{\textwidth-\wmaddresswidth}{
- \hskip -\wmlogoWhpos
- \includegraphics[height=\wmlogoheight{},keepaspectratio=true]{\wmheaderlogo}
- }
+ \raisebox{\wmaddressheight-\wmlogoheight+\wmlogoWvpos}[\wmaddressheight]{
+ \hskip -\wmlogoWhpos%
+ \includegraphics[height=\wmlogoheight{},keepaspectratio=true]{\wmheaderlogo}
}
- \parbox[t]{\wmaddresswidth}{
- \wmaddress{}
- }
- }
+ \hfill\wmaddress{}%
}