Hello to all (please excuse my English, I’lm French…)
I’m just starting with LaTeX and I’m trying to create the structure of my future documents (physics & chemistry lessons).
I’m going for article class (one lesson at a time, so no chapters) and I want to create a box with text INCLUDED ON the upper line of the box.
I’ve found this code to format the title of chapters :
titleformat
{chapter}
[frame]
{normalsize}
{filrightlargequadbegin{cursive}Chapitre O&S 02-1end{cursive}quad}
{18pt}
{hugebfseriesfilcenter}`
(Chapter is named “Signaux et capteurs”)
I get exactly the graphical result I would like (title inside a box and the box as the reference number on it), but since it is a chapter and I dont want chapters in my document (problems with the table of contents), I’d like to find a code to have the same result, but for plain text (I don’t know if I’m really clear…)
enter image description here
On the image, up is what I want (I get it with titleformat), down is what I have with :
begin{framebox} {Signaux et capteurs}filcenter
end{frame}
{normalsize}
{filrightlargeenspacebegin{cursive}Chapitre O&S 02-1end{cursive}enspace}
{hugebfseriesfilcenter}`
Florinadje is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.