0

I've largely been borrowing the headers (and everything else) as defined in course .sty files. I've definitely been confused as to how to make the following:

enter image description here

It is a frame but has an (optional) gap in between where text input is inserted as well as other text inputs. Basically, the section header should look like so: enter image description here

I'd like to know how to create a similar frame and how I can recreate and design similar headings of my own, mostly with respect to the dynamic frame and custom text inputs. If someone knows how to do this, I would greatly appreciate it.

Sorry for the previous troubles with confusing question title.

Revise
  • 365
  • 3
    This is too many questions in one... what exact part of which header do you want to reproduce? (box with section? Bold text? "Heightened" text? Half-aligned text line? Black bar? – user202729 Nov 07 '21 at 06:07
  • Sorry for the confusion - those are just examples. If you could, Maybe the first one - the box with Lecture # and Lecture Topic as well as date would be a good one to start with. – Revise Nov 07 '21 at 06:10
  • 2
    Do you have their source code? It may be easier to just look at them to see how it's done. – user202729 Nov 07 '21 at 06:11
  • I found source code but the problem still stands - I tried taking the source code and editing it myself to no luck. I'll post it if it helps and maybe someone can help explain it to me. – Revise Nov 07 '21 at 17:53
  • The code that you show is missing many things that we would need to try it. The first bunch of code is related to \section but the second lot is related to footers. Nothing you show seems to be related to headers (at the top of a page). Nothing in the code you showed had anything to do with TikZ. – Peter Wilson Nov 07 '21 at 18:32
  • To be honest, I don't know if it is made with TikZ or if it's made some other way or how and why it works. This is why I'm asking for help and why I thought having source code wouldn't help any more than just graphical descriptions. Sorry for the confusion. – Revise Nov 07 '21 at 18:34
  • @Revise As i said, there is no TikZ code in what you showed so everything was made without TikZ. – Peter Wilson Nov 07 '21 at 19:24
  • @Revise I recently wrote a generic answer on how to understand some code you come across https://tex.stackexchange.com/questions/4327/where-do-i-find-out-how-a-command-environment-is-defined/621577#621577 . Hope it helps (and if it doesn't I'd like some feed back too) – user202729 Nov 08 '21 at 00:12
  • Also perhaps change the title to "How can I make the section title a frame with a cut in the top border for some text" or something, and there doesn't have a MWE either. – user202729 Nov 08 '21 at 01:16
  • Edited title and descriptions. That'll probably help make more sense and bring a better answer. Really appreciate the feedback. – Revise Nov 08 '21 at 01:57

1 Answers1

1
Regarding your second block of code. It is a revision of the `myheadings` page style.

However I think it might better be called something else, perhaps course?

This code sets up the text for odd and even page footers
\def\oddfoottext{\begin{footnotesize}\coursenumber, \semester, \title \hfill\qquad\thepage\end{footnotesize}}
\def\evenfoottext{\begin{footnotesize}\thepage \hfill\qquad\coursenumber, \semester, \title\end{footnotesize}}

Now defining the pagestyle.

\newcommand{ps@course}
%\def\ps@myheadings{\let\@mkboth\@gobbletwo % use nothing from sectional divisions
\def\@oddfoot{\oddfoottext}%      footer text on odd pages
\def\@evenfoot{\evenfoottext}%    footer text on even pages
\def\@evenhead{}\def\@oddhead{}}% empty odd and even headers

%\pagestyle{myheadings}          % use the `myheadings` page style
\pagestyle{course}               % use the `course` page style

The code you quote is from a package. If you wanted to use it in a document then surround it with \makeatletter... \makeatother

The code is essentially how the page styles are defined in the LaTeX kernel.

Peter Wilson
  • 28,066