I'm new to LaTeX but I'm starting to get a hang of it but I have some problems. I would like to have section number in my header but i don't know how to do it. I'm using the fancyhdr package and writing in article class. I have seen some solutions to make this work in book settings but I like the article class better.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
The fancyhdr manual has lots of examples which explain what to do in this case. One of the simplest looks like this. A click on "Open in writeLaTeX" in the head of the below code box will show you the output.
graphics is already loaded by graphicx and therefore doesn't need to be loaded explicitly
In general you should take a look at the manuals of the involved packages in your code. Or do you know from memory what eso-pic is for and what it does? Drop packages which you don't know (and therefore don't use anyway).
I should have been more accurate in my problem description but I thought i was doing something else wrong because I have been reading a lot in the manuel without getting anywhere..
The problem I have now is that when i run the document there are no problems but in my header it only says "contents" and nothing else. I tried calling the section with \fancyhead[C]{ \rightmark}
Do i need to call my sections in the document something else?
Unnumbered sections don't get an automated entry in the header. But you can try the command \markboth or migrate your document to the corresponding article class of the KOMA-Script bundle. It is much more flexible and offers lots of options and additional packages (e.g. also one for page styles). If that doesn't help, kindly prepare a minimal example (again).
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p