Grafika láblécben

Fórumok

Van valakinek egy öltlete arra, hogy láblécben valamilyen grafika legyen?

Köszi!
fm

Hozzászólások

nem pont ez, de némileg hasonló trükkök az UK TeX FAQ-ból:

Putting things at fixed positions on the page

TeX’s model of the world is (broadly speaking) that the author writes text, and TeX and its macros decide how it all fits on the page. This is not good news for the author who has, from whatever source, a requirement that certain things go in exactly the right place on the page.

There are places on the page, from which things may be hung, and two LaTeX packages allow you position things relative to such points, thus providing a means of absolute positioning.

The textpos package aids the construction of pages from “blobs”, dotted around over the page (as in a poster); you give it the location, and it places your typeset box accordingly.

The eso-pic defines a “shipout picture” that covers the page. The user may add picture-mode commands to this picture, which of course can include box placements as well as the other rather stilted commands of picture-mode. (Eso-pic requires the services of everyshi, which must therefore also be available.)

eso-pic.sty
macros/latex/contrib/eso-pic (or browse the directory); catalogue entry
everyshi.sty
Distributed as part of macros/latex/contrib/ms (or browse the directory); catalogue entry
textpos.sty
macros/latex/contrib/textpos (or browse the directory); catalogue entry

Az én megoldásom erre:

\usepackage{eso-pic}

\AddToShipoutPicture{\unitlength 1mm
\put(5,10){\includegraphics[width=200mm]{hatter.pdf}}}

A hatter.pdf a teljes oldal hátterét tartalmazza. Pl. inkscape-pel megszerkeszthető.

Ezek a beállítások akkor működnek, ha a hatter.pdf az A4-nél kicsivel kisebb, 200mm szélességű. (Ezt azért csinálom így, hogy véletlen se írjak semmit a lap széléhez 5mm-nél közelebb, mert azt a nyomtató esetleg levágja meg csúnya is.)

Ha a hatter.pdf jó magas, akkor a fejléc is belefér ebbe, de ha csak mondjuk 20 mm-es, akkor egy ilyen lábléc lesz belőle.

Persze, ha csak egy kis logo kell valahova, akkor a \put() paraméterezésével akárhova átteheted.

Ja, és pdflatex kell a fordításhoz ezután.

Nálunk a hivatalos dokumentumokon szabott fejlécnek kell lennie, amit természetesen Wordben adtak meg. LaTeX-ben végül úgy oldottam meg, hogy egy picture környezeten belül \put parancsokkal pozicionáltam a fejléc sorait és a két szélére egy-egy logót.

Valahogy így:


\setlength{\unitlength}{1mm}
\begin{picture}(200,60)(40,-35)
	\put(43,50){\textbf{\large{Országos Zabhegyezési Intézet}}}
	\put(43,32){\textbf{Takarmányhegyezési Főosztály II: Zab- és Árpahegyező Osztály}}
	\put(39.5,20){Intézetvezető: Dr. Csúnya Bácsi, PhD }
	\put(54,13){\small{9999 Budapest, Fail u. 5. \hspace{0.5cm} 9999, Budapest Pf. 999}}
	\put(50,8){\small{Telefon: (+36--1) 999--9999 (+36--1) Fax: (+36--1) 999--9999}}
	\put(79,3){\footnotesize{E-mail: bush@whitehouse.gov}}
	\put(10,19){\line(1,0){185}}
	\put(170,21){\includegraphics[width=2.5cm]{logo1.pdf}}
	\put(0,2){\includegraphics[width=4cm]{logo2.pdf}}
\end{picture}

Külön csomagok betöltése nélkül is működik, viszont a \put-ok paramétereit kézzel kell belőni.

szerk:

google szerint a fancyhdr csomaggal egyszerűen is meg lehet oldani:
http://groups.google.com/group/latexusersgroup/browse_thread/thread/5c6…

Nálam a fejléc és lábléc "macerálása" mindig a fancyhdr csomaggal történik. Nem próbáltam még grafikát elhelyezni a láblécben, de talán ez a blog segít. A hozzászólások között van egy megoldás a fejlécbe helyezett grafikára. Talán működik a láblécre is. Nem próbáltam (még).

-----
"Én vagyok a hülye, hogy leállok magával vitatkozni."