Code: Select all
2.4 sometext pagenumber
Code: Select all
pagenumber 2.4 sometext
Code: Select all
2.4 sometext pagenumber
Code: Select all
pagenumber 2.4 sometext
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
Code: Select all
\documentclass[twoside]{article}
Code: Select all
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LE,RO]{\leftmark} % sectiontitle
\fancyhead[CE,CO]{\thepage} % pagenumbering
\fancyhead[RE,LO]{} % empty
\fancyfoot[C]{} % empty
Code: Select all
\documentclass[11pt,a4paper,twoside,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includehead,nofoot,margin=3cm]{geometry}
\usepackage[pagestyles,raggedright]{titlesec}
\usepackage{blindtext}
\newpagestyle{main}{%
\sethead[\thepage][][\thesection\quad\sectiontitle]{\thesection\quad\sectiontitle}{}{\thepage}
\headrule
}
\pagestyle{main}
\begin{document}
\blinddocument
\end{document}
Where is the problem? Did you test my example? Just replace this command with the content you want to write (sections, subsections, …). The command only creates a whole document for demonstration purposes in order to check whether all settings are right (see package manual). This is a common practise instead of tediously inserting some text. Therefore I remarked that the package is not part of the solution.jaybz wrote:[…] I don't understand, where do I actually insert my text? Could you remove the \blinddocument and put in some text as I showed please.
Code: Select all
1 Heading on level 1 (section) 1
Code: Select all
2.3 polynomials 1
Posting questions here is OK (of course). But you can't always expect to get a full elaborated example. Especially in the case when you have not been proactive and at least presented a minimal example (like here). You should always be aware of the fact that those who try to give help just don't have the time to build complete examples on their own and instead refer to manuals which explain things best. And these manuals are still the best source for information (and always will be).jaybz wrote:[…] I'm aware of several common packages the problem is the manuals have no working examples. If I could just read and understand the manual I wouldn't have to ask here. Everybody just wants to post "Oh just use the XXX.. package" and post a link to it. […]
For the majority of the manuals I can't share this opinion. However, there are some exceptions. But the fact that you don't understand manuals will turn out to be a big hurdle when working with LaTeX.jaybz wrote:[…] The manuals are terrible especially for beginners, I don't understand them. […]
Code: Select all
\documentclass[11pt,a4paper,twoside,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includehead,nofoot,margin=3cm]{geometry}
\usepackage[pagestyles,raggedright]{titlesec}
\usepackage{blindtext}
\newpagestyle{main}{%
\sethead[\thepage][][\thesection\quad\sectiontitle]{\thesection\quad\sectiontitle}{}{\thepage}
}
\pagestyle{main}
\begin{document}
\section{Your section title here}
\blindtext
\subsection{Your subsection title here}
\blindtext
\end{document}
Code: Select all
\documentclass[11pt]{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\headheight 15pt
\rhead{\thepage}
\chead{\hspace*{70mm} 2.3 Polynomials}
%\lhead{}
%\rfoot{}
%\cfoot{}
%\lfoot{}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
This is some text here.
\end{document}
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