I have a general question which I couldn't solve so far. It came up a few days ago, while I was trying to redefine the different parts of the footer of the scrlayer-scrpage package (this still isn't solved for me).
But i want to understand it in general. So far, I've read a lot of (basic) documentation (source2e, scrlayer-scrpage.dtx etc.) and still couldn't figure it out:
In some command/environment-definitons there appear "elements" which have no backslash at the start of the name. For example the elements even, left and foot in the definition of the \lefoot command from scrlayer-scrpage:
$ latexdef -p scrlayer-scrpage -f lefoot
\lefoot first defined in "scrlayer-scrpage.sty".
\lefoot:
macro:->\sls@renewelement {even}{left}{foot}
or the element labelitem (inside the curly brackets, first word) in the general definition of the itemize environment:
$ latexdef -f itemize
\itemize is defined by (La)TeX.
\itemize:
macro:->\ifnum @itemdepth >\thr@@ @toodeep \else \advance @itemdepth @ne
\edef @itemitem {labelitem\romannumeral \the @itemdepth }\expandafter \list
\csname @itemitem \endcsname {\def \makelabel ##1{\hss \llap {##1}}}\fi
How can i find out what they mean/how they are defined? So far, i have no real clue.
I'm aware that the answer may be really simple, but right now I am at a loss...
Thanks for all replies!
\@itemiteminside the\csnamecommand results in\labelitemii. Latex is just so different from other programming languages... Thefootthing also makes some sense, but i still don't fully understand how the standard layout of the commands\lefoot,\cefootand\refootare defined (e.g. as centered\mboxor something else) and where to find it. There has to be one. E.g. if i use the package without edits the pagenumber appears at the outside of the footer (which should be\rofootor\lefoot). – lukeflo Jun 07 '23 at 08:32\lefootetc are just wrappers for commands to _re_define the pagestyle. Each ofscrreprt.cls,scrartcl.cls, andscrbook.clssets the footers using direct calls to those\<loc>footcommands; for example, they all have somewhere\cfoot[\pagemark]{}to have the page number appear centered in the footer. – Willie Wong Jun 07 '23 at 13:34scrlayer-scrpagepackage sets the "defaults", you need to look for where those commands are called, and not where they are defined. For example, if your load the package not from one of the KOMA document classes, it will default to thestandardpage style; looking at where\sls@ps@style@standardis defined, you see that it calls\ohead{\pagemark}and\cfoot[\if@twoside\else\pagemark\fi]{}. Note that these just says what goes where; the actual formatting is done by whatever sets\pagemark. – Willie Wong Jun 07 '23 at 13:45