Page LayoutIs it possible to use titlesec to create custom title views.

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
max
Posts: 1
Joined: Sat Feb 24, 2024 12:51 am

Is it possible to use titlesec to create custom title views.

Post by max »

Is it possible to use titlesec to create custom title views with numbering independent of other sections.

For example

Code: Select all

\section{properties of anions}
\experiment{Cl^- + Zn}
\experiment{2}
\section{other}
\experiment{3}
And in result get

Code: Select all

1 propertys of anions
Experiment 1 ...
Experiment 2 ...
2 other
Experiment 3 ...
I tried to use \@startsection but some errors keep popping up

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Is it possible to use titlesec to create custom title views.

Post by Stefan Kottwitz »

Hi Max,

welcome to the forum!
max wrote:Is it possible to use titlesec to create custom title views
You could use \titleformat to change the \subsection format so it looks like your experiment section.
max wrote:with numbering independent of other sections.
You can use the \counterwithout command of the chngctr package.
max wrote:I tried to use \@startsection but some errors keep popping up
If you don't tell us the error messages and what you tried, we cannot help with them. ;-)

Instead of (sub) sections, you could make an experiment environment as a theorem environment, that's the classic way of having numbered environments (theorems, definitions, experiments, ...)

Stefan
LaTeX.org admin
Post Reply