I would like to start to experiment some metafun "decoration around(over)" section head and/or page number. Something similar, just for example but I do not want to copy the style, to the one used to produce the metafun manual. From the (small "scale") drawing primitives to the (large "scale") \setuphead I miss an howto that combine the two (specifically I was thinking at a (non-existent) background keyword in \setup to pass an overlay...but likely I am far off) I don't want to be lazy, maybe it is already written in the manuals, but I still miss a certain kick.... so to say... Regards.
Hello, [...]
I don't want to be lazy, maybe it is already written in the manuals, but I still miss a certain kick.... so to say...
go to http://levana.de/context/ and down to the last item and take a look at http://levana.de/emacs/refcard/emacs.pdf The sources are avialable there. I have made some MP graphic around the section heading. I will add this to the wiki soon. Patrick -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net
Patrick Gundlach wrote:
and down to the last item and take a look at
http://levana.de/emacs/refcard/emacs.pdf
The sources are avialable there.
I have made some MP graphic around the section heading.
Thanks a lot. I think I start to grasp. I have experimented with some other graphics but if I use "chapter" instead of "subject" as section heading the result is different. I believe it depends on your \def\HeadTitle#1#2{\hbox to \hsize% {\hfil% \framed[frame=off, background=myhead, offset=overlay, align=middle]{#1#2}\hfil}} tighted to the latter heading and not to the former . Am I right? Deeply down to low level TeX at this point? Is just a question to redefine a command adding background=something-of-mine ? Then where these command are discribed? regards
Hello, [...]
I have experimented with some other graphics but if I use "chapter" instead of "subject" as section heading the result is different. I believe it depends on your
Here is the important stuff:
\def\HeadTitle#1#2{% .... \framed[background=myhead]{#1#2}}
(which is the command without spacing)
tighted to the latter heading and not to the former . Am I right?
you should use something like \setuphead[chpater][command=\HeadTitle]
Deeply down to low level TeX at this point?
This is partly high level ConTeXt (\framed, background) and low level TeX (hfill,...).
Is just a question to redefine a command adding background=something-of-mine ?
background has to be a color or an overlay or ...
Then where these command are discribed?
They should be described in the main manual or the metafun manual. Summary: define a metapost graphic, use \defineoverlay to access the mp graphic and use \framed{} to access the overlay (background=...) and use \setuphead (command=somecommand) to define your own command that acesses the \framed[background=...]. Patrick -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net
thanks again for the summary. hope this back and forth will not be just a waste, but something out of which we can both/all learned to improuve. Patrick Gundlach wrote:
This is partly high level ConTeXt (\framed, background) and low level TeX (hfill,...).
"partially high and low"... Here laid my question not easy to untungle for a beginner (and believe me I have read the docs, although I do not claim to remember or understand all)
Summary: define a metapost graphic, use \defineoverlay to access the mp graphic and use \framed{} to access the overlay (background=...) and use \setuphead (command=somecommand) to define your own command that acesses the \framed[background=...].
"define your own command" , but you have to know THE (default) command fist, otherwise it is hard to obtain a result (.pdf) from something that is not just a copy of someonelse .tex let me start basic, ex-1 \starttext \chapter{ciao} \stoptext let me remove \framed from your command, ex-2 \def\HeadTitle#1#2{\hbox to \hsize% {\hfil% {#1#2}\hfil}} \setuphead [chapter] [command=\HeadTitle] \starttext \chapter{ciao} \stoptext the two ex-s are not the same , because spacing between the number and the title and allignment, why? Moving your howto overlay example, indeed very useful, from subject to chapter seems to me more subtle than just changing section names
Hello, [...]
hope this back and forth will not be just a waste, but something out of which we can both/all learned to improuve.
I think so, too. It has been a long time since I used ConTeXt. So I have to refresh my rusty knowledge :-)
"define your own command" , but you have to know THE (default) command fist, otherwise it is hard to obtain a result (.pdf) from something that is not just a copy of someonelse .tex
Right, but I'd guess that the default command is quite tricky. All ConTeXt commands are quite tricky.
\def\HeadTitle#1#2{\hbox to \hsize% {\hfil% {#1#2}\hfil}}
\setuphead [chapter] [command=\HeadTitle]
\starttext \chapter{ciao} \stoptext
the two ex-s are not the same , because spacing between the number and the title and allignment, why?
There is no horizontal "space" command between #1 (number) and #2 (title). But "space" is not just a simple " ". It can be many things. I don't know if there is any good reading about these kind of spaces, but let me show you a few: ( ) regular space is pretty small, but can be stretched \enspace fixed space 0.5em \enskip space .5em (so called "skip") \quad space 1em " \qquad space 2em " \kern xx space xx \hfil, \hfill "very long" and "very very long" space
Moving your howto overlay example, indeed very useful, from subject to chapter seems to me more subtle than just changing section names
It is more a matter of section numbers/no section numbers. Patrick -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net
Hello, one addition, you can always use the great debugging commands like \showframe and \showmakeup The latter is pretty complex to read, but in many cases you get a grasp of what is going on without understanding every detail. Patrick -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net
participants (2)
-
Eros Albertazzi
-
Patrick Gundlach