## LaTeX programming question (or perhaps TeX, I'm not too sure...)

### LaTeX programming question (or perhaps TeX, I'm not too sure...)

Hello!

I've met something that I don't understand.
I would be very grateful if somebody could explain
it to me. (I doubt it though)

Using the package fancyheadings, I've defined two
pagestyles {fancy} and {plain}. I switch between
them using \thispagestyle.

automatically set to the {plain}. I needed them
to be {fancy}.

So I renamed report.cls, and tried to modify it.
I found the following definition:

-----

\thispagestyle{plain}%

-----

It seemed very simple. All I had to do was to change the {plain}
to {fancy} and it would work the way I wanted. Nope. Still in {plain}.

Confused, I tried to add a \thispagestyle{fancy} at the

So I tried to see where it was set to {plain} in-between.
After a few tries I located the problem on the last line.
Since \secdef is defined as

----

----

I finally replaced the last line of the definition

(Well, the pagestyle was correct, even if all the
calls to \chapter were going wrong...)

So basically:
----
\thispagestyle{fancy}
if (..) \A else \B
----
gives {plain} pagestyle, but:
----
\thispagestyle{fancy}
\A
----
and:
----
\thispagestyle{fancy}
\B
----
both give {fancy} pagestyle.

I don't understand.

If you're still reading, congratulations! And if you
can explain it to me, congratulations^{2} and

### LaTeX programming question (or perhaps TeX, I'm not too sure...)

> Using the package fancyheadings, I've defined two
> pagestyles {fancy} and {plain}. I switch between
> them using \thispagestyle.

Use package fancyhdr because fancyheadings is obsolete.
Then see the section about "redefining the plain style"

Quote:> So basically:
>    \thispagestyle{fancy}
>    if (..) \A else \B
> gives {plain} pagestyle, but:
>    \thispagestyle{fancy}
>    \A
> gives {fancy} pagestyle.

This document gives all fancy pages.

\documentclass{book}

\makeatletter

\thispagestyle{fancy}%

\pagestyle{fancy}
\begin{document}
Test

\chapter{Test}
more test
\newpage

more test

\end{document}

I'm searching for a converter, which converts C sources to TeX or LaTeX.
Anybody out there who knows a converter, so please post on me.

Also i'm searching a converter bourne shell to TeX/LaTex.