On 23/05/2011 2:42 PM, Paul Rubin wrote:
Csikos Bela<bcsikos425<at>  freemail.hu>  writes:


Hello lyx users:

My question is not specific to lyx but as I use lyx as a latex "frontend" I
guess it is appropriate to ask it here.

I would like to make a specific page numbering style in the footer,
something like:

---------------- page-number -------------------

A horizontal line in the footer which is interrupted by the page number
in the center. Is this possible in lyx/latex? How?


If you have the mboxfill package installed, you can change the page style to
"fancy" (Document>  Settings...>  Page Layout>  Headings style) and add the
following to the preamble of your document:

\usepackage{mboxfill}
\cfoot{\mboxfill[2\width][c]{-}\thepage\mboxfill[2\width][c]{-}}

Paul







Another solution also using fancy page headers in the document settings but plain tex otherwise. Put this in the preamble.

\def\hlinefill{\leavevmode\cleaders\hbox{\rule[0.6ex]{1em}{0.4pt}}\hfill}
\fancyfoot{\hlinefill~~~\thepage~~~\hlinefill}

In the above:
- 0.6ex is the height of the line (looks kind of centered)
- 1em is the width of a line segment which gets repeated to fill space
- 0.4pt is the thickness of the line (this particular choice is a default value elsewhere in tex)

By the way, using fancy headers will add default headers, if you don't want them you get rid of them with

\fancyhead{}

--
Julien

Reply via email to