https://wiki.contextgarden.net/api.php?action=feedcontributions&user=Mroge02&feedformat=atomWiki - User contributions [en]2024-03-29T14:40:59ZUser contributionsMediaWiki 1.34.1https://wiki.contextgarden.net/index.php?title=User_talk:Mroge02&diff=24292User talk:Mroge022019-09-06T11:44:06Z<p>Mroge02: Broken source code link</p>
<hr />
<div>The ConTeXt source code link is broken (or the source repo has changed). I don't know how to fix it. Help?</div>Mroge02https://wiki.contextgarden.net/index.php?title=Command/setupfootertexts&diff=21428Command/setupfootertexts2013-03-01T13:52:33Z<p>Mroge02: Added \setupheadertexts to See Also</p>
<hr />
<div>{{Reference<br />
|name=setupfootertexts<br />
|attributes=<br />
}}<br />
<br />
== [[Help:Reference|Syntax]] ==<br />
<table cellspacing="4" cellpadding="2" class="cmd"><br />
<tr><br />
<td colspan="2" class="cmd">\setupfootertexts<span class="first" style="color:red;">[...]</span><span class="second" >[...]</span><span class="third" >[...]</span></td><br />
</tr><br />
<tr valign="top" class="first"><br />
<td class="cmd">[...]</td><br />
<td><strong>text</strong> margin edge </td><br />
</tr><br />
<tr valign="top" class="second"><br />
<td class="cmd">[...]</td><br />
<td>text section date mark pagenumber </td><br />
</tr><br />
<tr valign="top" class="third"><br />
<td class="cmd">[...]</td><br />
<td>text section date mark pagenumber </td><br />
</tr><br />
</table><br />
<br />
<br />
== Description == <br />
<br />
<br />
<br />
== Example ==<br />
<br />
This example adds 3 points of padding inside the frame, and if you<br />
set up double-sided numbering, then the following will add the version <br />
in the footer on each page (right on odd pages, left on even pages).<br />
<br />
<texcode><br />
\setuppagenumbering[state=start,alternative=doublesided]<br />
<br />
\setupfootertexts<br />
[]<br />
[{\framed[offset=3pt]{Version: Fall 2007}}]<br />
[{\framed[offset=3pt]{Version: Fall 2007}}]<br />
[]<br />
<br />
\starttext<br />
\stoptext<br />
</texcode><br />
<br />
== See also ==<br />
<!-- something like {{cmd|goto}} --><br />
<br />
*{{cmd|setupheadertexts}}<br />
<br />
== Help from ConTeXt-Mailinglist/Forum ==<br />
All issues with:<br />
{{Forum|{{SUBPAGENAME}}}}<br />
<br />
[[Category:Command/Texts|setupfootertexts]]</div>Mroge02https://wiki.contextgarden.net/index.php?title=Command/setupheadertexts&diff=21427Command/setupheadertexts2013-03-01T13:51:45Z<p>Mroge02: Added \setupfootertexts to See Also</p>
<hr />
<div>{{Reference<br />
|name=setupheadertexts<br />
|attributes=<br />
}}<br />
<br />
== [[Help:Reference|Syntax]] ==<br />
<table cellspacing="4" cellpadding="2" class="cmd"><br />
<tr><br />
<td colspan="2" class="cmd">\setupheadertexts<span class="first" style="color:red;">[...]</span><span class="second" >[...]</span><span class="third" >[...]</span><span class="fourth" style="background-color:yellow;">[...]</span></td><br />
</tr><br />
<tr valign="top" class="first"><br />
<td class="cmd">[...]</td><br />
<td><strong>text</strong> on the left handed side of odd pages </td><br />
</tr><br />
<tr valign="top" class="second"><br />
<td class="cmd">[...]</td><br />
<td><strong>text</strong> on the right handed side of odd pages </td><br />
</tr><br />
<tr valign="top" class="third"><br />
<td class="cmd">[...]</td><br />
<td><strong>text</strong> on the right handed side of even pages </td><br />
</tr><br />
<tr valign="top" class="fourth" style="background-color:yellow;"><br />
<td class="cmd">[...]</td><br />
<td><strong>text</strong> on the left handed side of even pages </td><br />
</tr><br />
</table><br />
<br />
<br />
== Description ==<br />
Place headers and footers with the commands \setupheadertexts and {{cmd|setupfootertexts}}.<br />
<br />
These commands take 4 arguments. The first is for the left handed side on odd pages, the second for the right handed side on odd pages, the third for the right handed side on even pages, and the fourth for the left handed side on even pages.<br />
<br />
== Example ==<br />
<!-- Please fill in an example if you can --><br />
<br />
This example produces the same header on odd and even pages.<br />
<br />
<texcode><br />
\setupheadertexts<br />
[{\getmarking[chapter]}] [{page \pagenumber}]<br />
[{page \pagenumber}] [{\getmarking[chapter]}]<br />
\setuppagenumbering[location=]<br />
</texcode><br />
<br />
'''Note:''' '''\setuppagenumbering[location=]''' supresses the default output (i.e. centered in header) of the page number on every page.<br />
<br />
== See also ==<br />
<!-- something like {{cmd|goto}} --><br />
<br />
*{{cmd|setupfootertexts}}<br />
*{{cmd|setupheader}}<br />
<br />
== Help from ConTeXt-Mailinglist/Forum ==<br />
All issues with:<br />
{{Forum|{{SUBPAGENAME}}}}<br />
<br />
[[Category:Command/Texts|setupheadertexts]]</div>Mroge02https://wiki.contextgarden.net/index.php?title=Command/switchtobodyfont&diff=21401Command/switchtobodyfont2013-01-28T00:43:12Z<p>Mroge02: Added example</p>
<hr />
<div>{{Reference<br />
|name=switchtobodyfont<br />
|attributes=<br />
}}<br />
<br />
== [[Help:Reference|Syntax]] ==<br />
<table cellspacing="4" cellpadding="2" class="cmd"><br />
<tr><br />
<td colspan="2" class="cmd">\switchtobodyfont<span class="first" >[...,...,...]</span></td><br />
</tr><br />
<tr valign="top" class="first"><br />
<td class="cmd">[...,...,...]</td><br />
<td>5pt ... 12pt small big global </td><br />
</tr><br />
</table><br />
<br />
<br />
== Description == <br />
<br />
Use {{cmd|setupbodyfont}} to change the font size for whole document, {{cmd|switchtobodyfont}} doesn’t change the size for the header/footer.<br />
<br />
== Example ==<br />
<br />
<context source=yes><br />
<br />
\switchtobodyfont[pagella,small]<br />
\input ward<br />
<br />
</context><br />
<br />
== See also ==<br />
<!-- something like {{cmd|goto}} --><br />
<br />
== Help from ConTeXt-Mailinglist/Forum ==<br />
All issues with:<br />
{{Forum|{{SUBPAGENAME}}}}<br />
<br />
[[Category:Command/Fonts|switchtobodyfont]]</div>Mroge02https://wiki.contextgarden.net/index.php?title=Lua&diff=20180Lua2012-07-28T23:18:01Z<p>Mroge02: Filename l-dimen.lua seems to have changed to util-dim.lua</p>
<hr />
<div>=Introduction=<br />
[[Mark IV|MkIV]] is the current branch of the ''Context'' typesetting<br />
environment.<br />
As its underlying engine is supposed to be ''Luatex'', MkIV is to<br />
a large extent implemented in ''Lua'', as opposed to the legacy MkII<br />
which was written for Pdftex and Xetex as target engines.<br />
<br />
As of now, documentation on the Lua guts of Context is somewhat<br />
rare.<br />
The definite guide is still the source code itself which,<br />
unfortunately, tends to be undercommented in many places.<br />
This portal-like wiki page is meant to gather links to existing<br />
documentation on Lua programming for Context/Luatex.<br />
<br />
=Documentation Links=<br />
==General==<br />
* ''Recommended reading'': current [http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf Luatex manual];<br />
* Luatex [http://tug.org/pipermail/luatex/ mailing list];<br />
* Metalink to all [[:Category:Lua|Lua]] topics;<br />
* Some additional pointers may be found browsing [[:Category:LuaTeX|Luatex]].<br />
<br />
==Programming==<br />
* [[Programming_in_LuaTeX|Introduction]] to Context’s interface to Lua;<br />
* official [http://www.lua.org/docs.html Lua docs];<br />
* the [http://wiki.luatex.org/index.php/Main_Page Luatex Wiki];<br />
* [[cld|Context Lua Documents]];<br />
* [[Running Lua Code Externally]].<br />
<br />
==ConTeXt Lua Extensions==<br />
Context MkIV extends the vanilla Lua libraries by some very<br />
useful functionality.<br />
This pertains mostly to stuff people tend to implement over and<br />
over again because it is provided by default with other scripting<br />
languages.<br />
Thus, before you reimplement, say, a string stripping function<br />
for the thousandth time &ndash; have a look at these files:<br />
<br />
{|cellpadding="10" style="border:2px solid #addeff"<br />
! style="background:#addeff;" | File !! Content<br />
<!--|---><br />
<!--|{{src|l-aux.lua}} || only intermediary--><br />
|-<br />
|{{src|l-boolean.lua|l-boolean.lua}}|| <tt>toboolean()</tt> &ndash; equivalent of <tt>tonumber()</tt> and <tt>tostring()</tt>;<br />
|-<br />
|{{src|util-dim.lua|util-dim.lua}} || Tex dimensions (accessible as ''number.*'' namespace);<br />
|-<br />
|{{src|l-dir.lua|l-dir.lua}} || directory handling (globbing &c., namespace: ''dir.*'');<br />
|-<br />
|{{src|l-file.lua|l-file.lua}} || filesystem related functions (namespace: ''file.*'');<br />
|-<br />
|{{src|l-io.lua|l-io.lua}} || [[Extensions_to_the_Lua_I/O_library|file/stream handling]];<br />
|-<br />
|{{src|l-lpeg.lua|l-lpeg.lua}} || [[String_Manipulation#l-lpeg.lua|pattern helpers]];<br />
|-<br />
|{{src|l-math.lua|l-math.lua}} || extra functions for the Lua ''math'' library;<br />
|-<br />
|{{src|l-md5.lua|l-md5.lua}} || checksum comparison, loading and saving;<br />
|-<br />
|{{src|l-number.lua|l-number.lua}} || additions to the ''number.*'' namespace &ndash; bitset handling;<br />
|-<br />
|{{src|l-os.lua|l-os.lua}} || additions to the ''os.*'' library, platform initialization;<br />
|-<br />
|{{src|l-pdfview.lua|l-pdfview.lua}}|| <tt>--autopdf</tt> handling of ''mtxrun'';<br />
|-<br />
|{{src|l-set.lua|l-set.lua}} || set handling (''set.*'' namespace);<br />
|-<br />
|{{src|l-string.lua|l-string.lua}} || [[String_Manipulation#l-string.lua|string manipulation]];<br />
|-<br />
|{{src|l-table.lua|l-table.lua}} || [[table manipulation]];<br />
|-<br />
|{{src|l-unicode.lua|l-unicode.lua}}|| extensions to the ''sln-unicode'' lib, converters for character encodings;<br />
|-<br />
|{{src|l-url.lua|l-url.lua}} || URI matching (namespace: ''url.*''; also a nice tutorial on lpeg).<br />
<!--|{{src|l-utils.lua|l-utils.lua}} || only intermediary--><br />
<!--|{{src|l-xml.lua|l-xml.lua}} || only intermediary--><br />
|+ style="font-style:italic; font-size:83.3333%;" | Lua Library Extensions.<br />
|}<br />
<br />
=Further Links=<br />
Places worth a visit when hunting for answers.<br />
==General==<br />
* http://www.luatex.org &ndash; the Luatex homepage;<br />
* http://www.lua.org &ndash; the Lua homepage;<br />
* http://www.ntg.nl/pipermail/ntg-context/ &ndash; the Context list archives;<br />
* http://lua-users.org/lists/lua-l &ndash; ''lua-l'', the Lua list;<br />
* http://tex.stackexchange.com &ndash; some Questions might be answered here;<br />
* '''[DE]''' http://www.luatex.de &ndash; Patrick’s blog.<br />
<br />
==Luatex Libs==<br />
* http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html &ndash; Roberto’s ''lpeg''-page;<br />
* http://www.keplerproject.org/luazip/ &ndash; Luazip;<br />
* http://keplerproject.github.com/luafilesystem/ &ndash; Luafs;<br />
* http://www.keplerproject.org/md5/ &ndash; Lua-md5;<br />
* http://w3.impa.br/~diego/software/luasocket/ &ndash; LuaSocket;<br />
* http://luaforge.net/projects/sln/ &ndash; Slnunicode;<br />
* http://luaforge.net/projects/lzlib/ &ndash; Lua-Zlib.<br />
<br />
==Miscellanea==<br />
* Context may please everyone, but still it can’t hurt to occasionally visit the [http://news.gmane.org/gmane.comp.tex.lualatex.devel lualatex mailing list].<br />
<br />
[[Category:Lua]]<br />
[[Category:LuaTeX]]<br />
<br />
<!-- vim:fo=cot:tw=65:sw=2:ts=2 --></div>Mroge02https://wiki.contextgarden.net/index.php?title=Module_Parameters&diff=19572Module Parameters2012-06-06T16:40:23Z<p>Mroge02: Fix: \getmoduleparameter -> \moduleparameter</p>
<hr />
<div>===Module parameters===<br />
<br />
As of April 2006, ConTeXt provides a new mechanism for defining parameters<br />
when calling a module. This is interesting for all those who consider<br />
writing their own modules. It allows you to set variables in the call and<br />
use them '''within''' the module's code; this was possible, but much less<br />
convenient before. <br />
<br />
Here's a brief sample explaining how this mechanism works. It consists <br />
of a test module and an example file; they are dull (I admit) but <br />
instructive (I hope). In real life, this example module could be a whole <br />
lot shorter, but that would defeat the educational value :)<br />
<br />
Our module will allow users to set the background color for a document. So<br />
we call it <tt>t-bgcolor</tt>. <br />
<br />
The module starts, surprisingly enough, with a line saying <br />
<br />
<texcode><br />
\startmodule[bgcolor]<br />
</texcode><br />
<br />
Since we need to use some internal parameters, we have to "unprotect" the<br />
contents of the module:<br />
<br />
<texcode><br />
\unprotect<br />
</texcode><br />
<br />
The next step is to set up the module's variables with default parameters <br />
the settings asked for by the user. This is handled by a single command <br />
that first processes its own argument list, and then it fetches the option<br />
list the input file that loaded the module has asked for (such<br />
user options overrule the default settings in the argument list):<br />
<br />
<texcode><br />
\setupmodule[color=newman]<br />
</texcode><br />
<br />
Our strategy will be to define a variable <tt>\BColor</tt> for the background color <br />
which will be set by the module; for this, we will use the<br />
[[Commands_with_KeyVal_arguments|processaction]] mechanism. <br />
<br />
So we define a macro <tt>\BColor</tt>, like this:<br />
<br />
<texcode><br />
\processaction[\currentmoduleparameter{color}]<br />
[ newman=>\def\BColor{red},<br />
gottlieb=>\def\BColor{yellow},<br />
rothko=>\def\BColor{blue},<br />
\v!unknown=>\def\BColor{white},<br />
\v!default=>\def\BColor{red}]<br />
</texcode><br />
<br />
We then use this variable to define the background of our document:<br />
<br />
<texcode><br />
\setupbackgrounds[page][background=color,backgroundcolor=\BColor]<br />
</texcode><br />
<br />
And that's it! We now just have to finish the module with these lines:<br />
<br />
<texcode><br />
\protect<br />
\stopmodule<br />
\endinput<br />
</texcode><br />
<br />
A simple test document will look like this:<br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
\usemodule[bgcolor][color=rothko]<br />
<br />
\starttext<br />
<br />
Hello world!<br />
<br />
\stoptext<br />
</texcode><br />
<br />
This is just meant as a first example; of course, there are many more possibilities to use this mechanism. If you want to use the parameters directly in your code, you can use the form <tt>\currentmoduleparameter{color}</tt>, or alternatively, <tt>\moduleparameter{bgcolor}{color}</tt>. <br />
<br />
-- [[User:Thomas|Thomas]] 18:28, 26 April 2006 (CEST) --<br />
-- [[User:Taco|Taco]] 12:46, 27 April 2006 (CEST) --<br />
<br />
[[Category:Modules]]<br />
[[Category:Inside ConTeXt]]</div>Mroge02