https://wiki.contextgarden.net/api.php?action=feedcontributions&user=Zenlima&feedformat=atomWiki - User contributions [en]2024-03-28T17:41:08ZUser contributionsMediaWiki 1.34.1https://wiki.contextgarden.net/index.php?title=References&diff=24132References2019-04-15T19:11:23Z<p>Zenlima: Added two reference modules</p>
<hr />
<div>< [[Structurals]] | [[Bibliography]] ><br />
<br />
==General Use==<br />
If you want to refer to any text element, you must first define the target's reference label. All titling commands and a lot of others take one as optional parameter, e.g.<br />
<texcode><br />
\chapter[preface]{Dear Reader}<br />
</texcode><br />
Then you can refer to this spot with<br />
<texcode><br />
As I told you in \in{chapter}[preface] on \at{page}[preface], I really like ConTeXt...<br />
</texcode><br />
That will typeset the text in braces and add the number of the refered element, e.g. "chapter 1 on page 1".<br />
<br />
To define a reference label anywhere you can also use {{cmd|pagereference|[reference]}} and {{cmd|textreference|[reference]{text}}}. Everwhere where you can define one label, you can also define more at once, if you separate them with commas. It's also possible to use "namespaces" like <code>[fig:cow]</code>.<br />
<br />
If you activated interaction, references become links automatically.<br />
<br />
Starting with ConTeXt 2012.06.22, there is a third command: {{cmd|contentreference|[reference][framedsettings]{text}}} which wraps the <code>text</code> argument inside a {{cmd|framed}}. The main difference with {{cmd|textreference}} where the <code>text</code> contains a {{cmd|framed}} itself is that, when interaction is enabled, {{cmd|contentreference}} places the top left of the target area at the top left of the framed box whereas {{cmd|textreference}} uses its baseline.<br />
<br />
===Example===<br />
<texcode><br />
\chapter[preface]{Dear Reader}<br />
<br />
\pagereference[zapfquote]\input zapf<br />
<br />
\dots<br />
<br />
As I have told you in \in{chapter}[preface] on \at{page}[preface], I really like \ConTeXt.<br />
And Mr.\,Zapf (see \at{page}[zapfquote]) at least likes \TeX\ in general.<br />
</texcode><br />
<context><br />
\chapter[preface]{Dear Reader}<br />
<br />
\pagereference[zapfquote]\input zapf<br />
<br />
\dots<br />
<br />
As I have told you in \in{chapter}[preface] on \at{page}[preface], I really like \ConTeXt. And Mr.\,Zapf (see \at{page}[zapfquote]) at least likes \TeX\ in general.<br />
</context><br />
<br />
== Different layouts for different kinds of references ==<br />
<br />
If you want less typing to get special formatting for the references to sections, equations, ... here's Aditya's recipe to do it.<br />
<br />
Suppose that you want to get<br />
:See ''equation (2.3)'' or ''section 4.2''.<br />
where the slanted content is typeset automatically. You first need to define the formatting with {{cmd|definereferenceformat}}:<br />
<texcode><br />
\definereferenceformat[insec][text=section]<br />
\definereferenceformat[ineq] [left=(,right=),text=equation]<br />
</texcode><br />
Then you can simply type<br />
<texcode><br />
See \ineq[eq:some equation] or \insec[sec:some section].<br />
</texcode><br />
<br />
A more automated solution uses the following macro:<br />
<br />
<texcode><br />
\def\myin[#1:#2]{%<br />
\expandafter\ifx\csname in#1\endcsname\relax<br />
\writestatus{warning}{referenceformat in#1 not defined}%<br />
\in[#1:#2]%<br />
\else<br />
\csname in#1\endcsname[#1:#2]%<br />
\fi}<br />
</texcode><br />
<br />
and requires you to write the following code:<br />
<br />
<texcode><br />
See \myin[eq:some equation] or \myin[sec:some section].<br />
</texcode><br />
<br />
{{todo|complete example would be better}}<br />
<br />
<br />
==Adjusting the level of referenced prefixes==<br />
<br />
When the default chapter and section prefixes are used, the chapters are<br />
prefixed by a number, so are the sections. When referring to a section using<br />
the command {{cmd|in|{section}[sec:foo]}} the chapter number is prefixed<br />
following by a dot and the according section number.<br />
<br />
However, some styles do not show the chapter prefix while displaying the<br />
sections. In this case the referencing commands, like {{cmd|in}} just output the<br />
section number, which is of course ambiguous.<br />
<br />
To fix this problem, the command {{cmd|setupreferencestructureprefix}} can be<br />
incorporated to adjust the prefixes displayed by the referencing commands.<br />
<br />
===Example===<br />
<br />
Given that {{cmd|start}}/{{cmd|stopchapter}} output <code>Romannumerals</code> prefixes (<tt>I,<br />
II, III, …</tt>) and {{cmd|start}}/{{cmd|stopsection}} output <code>Character</code> prefixes (<tt>A,B, C, …</tt>), the following commands give the results provided in the comments.<br />
<br />
<texcode><br />
\setupreferencestructureprefix [default] [prefixsegments=2:2] % nothing<br />
\setupreferencestructureprefix [default] [prefixsegments=2:3] % I<br />
\setupreferencestructureprefix [default] [prefixsegments=2:4] % I.A<br />
<br />
\setupreferencestructureprefix [default] [prefixsegments=3:4] % I.A<br />
\setupreferencestructureprefix [default] [prefixsegments=4:4] % A<br />
\setupreferencestructureprefix [default] [prefixsegments=5:4] % nothing<br />
</texcode><br />
<br />
<br />
==Adjusting the separator in between the referenced prefixes==<br />
<br />
To adjust the separator between the different structure<br />
levels in the referencing commands, like {{cmd|in}}, the command<br />
{{cmd|definestructureseparatorset}} is used.<br />
<br />
===Example===<br />
<br />
To change the separator between chapter and section from a dot to a hyphen use<br />
{{cmd|definestructureseparatorset}} as follows.<br />
<br />
<texcode><br />
\definestructureseparatorset [default] [,,-]<br />
</texcode><br />
<br />
==Putting a separator in the heading but not the reference==<br />
<br />
Sometimes you want to have a separator in the heading but not the reference. For example, you want section heading to look like "3. This is a new section" (with a dot after the section number), but references to the section should not have the dot (they should be like "In section 3 we found..."). Wolfgang Schuster gave a solution (for MkIV) [http://www.ntg.nl/pipermail/ntg-context/2013/072650.html on the list]:<br />
<br />
<texcode><br />
\defineprocessor[dostopper][right=.]<br />
\defineprocessor[nostopper][right=]<br />
<br />
\defineconversionset[stopperconversionyes][][dostopper->n]<br />
\defineconversionset[stopperconversionnop][][nostopper->n]<br />
<br />
\setuphead[chapter][sectionconversionset=stopperconversionyes]<br />
<br />
%\setupreferencestructureprefix[chapter][default][prefixconversionset=stopperconversionnop]<br />
\setupreferencestructureprefix[default][prefixconversionset=stopperconversionnop]<br />
<br />
\starttext<br />
<br />
\chapter[one]{First heading}<br />
<br />
\input knuth<br />
<br />
In \in{Chapter}[one] we learn.<br />
<br />
\stoptext<br />
<br />
</texcode><br />
<br />
==Related Modules==<br />
<br />
* [[Cross Referencing]]: Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
* [[Paragraph Referencing]]: The pararef module understands a paragraph as a full closed block of one thought.<br />
<br />
{{todo|Describe what the arguments of the commands do and how the commands work}}<br />
<br />
{{Getting started navbox}}</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Paragraph_Referencing&diff=24131Paragraph Referencing2019-04-15T16:24:43Z<p>Zenlima: Added temporary download url</p>
<hr />
<div>(This module is currently not in die distribution. Until it is, you can download it from [http://zenlima.com/context/t-pararef-0.8.2.zip here]).<br />
<br />
The [https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=1253027735/action=view/id=64 pararef] module understands a paragraph as a full closed block of one thought. This means that inside a paragraph enumerations, formulas etc. can appear. That is why a paragraph must be defined manually via <code>\startParagraph</code> and <code>\stopParagraph</code>.<br />
<br />
==Paragraphs==<br />
<br />
Each paragraph gets numbered started by each title. In order to link to a paragraph it can be reference by the optional parameter <code>reference=...</code> as a text reference.<br />
<br />
One or more paragraphs can be summarized by a low level title which is displayed as a margin note (margin title) via the optional parameter <code>title=...</code>.<br />
<br />
<texcode><br />
\startParagraph[reference=...,title=...]<br />
...<br />
\stopParagraph<br />
</texcode><br />
<br />
Here how a single paragraph with a title looks like:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
\startParagraph[title={Paragraph heading}]<br />
\input tufte<br />
\stopParagraph<br />
\stoptext<br />
</texcode><br />
<br />
[[Image:t-pararef-1.jpg]]<br />
<br />
<br />
==References==<br />
<br />
Now the more practical part: the paragraph referencing. To reference to an paragraph the package pararef makes use of the [[Cross Referencing|crossref]] module.<br />
<br />
Here a simple usage example:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
\usemodule[crossref]<br />
<br />
\starttext<br />
<br />
\startchapter[title={Lorem ipsum}]<br />
\startsection[title={Dolor sit}]<br />
<br />
\startParagraph<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph[reference=ref1]<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph<br />
Here are two references to destinations on the same page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
Here is one references with brakets:<br />
\startitemize[nowhite]<br />
\item ref1 should be: (para. 1.1/2) and is: \crossref[left={(},right={)},label={para.}][ref1]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Amet},reference=ref2]<br />
<br />
\page<br />
<br />
\startParagraph<br />
Here are two references to destinations on an other page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 on page 1 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 on page 1 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\stopchapter<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-2.jpg]]<br />
[[File:t-pararef-3.jpg]]<br />
<br />
==Text part divider==<br />
<br />
Each section (subsection, subsubsection etc.) has mostly three parts:<br />
* introduction part,<br />
* one or several main parts and<br />
* summary part.<br />
Each part contains one or more paragraphs. To make the logic parts visible the parts are divided by a line <code>\textpartdivider</code>.<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
<br />
\startsection[title={Lorem ipsum}]<br />
\startParagraph<br />
Some introduction text \input tufte<br />
\stopParagraph<br />
<br />
\textpartdivider<br />
<br />
\dorecurse{3}{<br />
\startParagraph<br />
Some main theme text \input tufte<br />
\stopParagraph<br />
}<br />
<br />
\textpartdivider<br />
<br />
\startParagraph<br />
Some section summarizing text \input tufte<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Doloris sit}]<br />
...<br />
\stopsection<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-4.jpg]]<br />
<br />
==Settings==<br />
<br />
In pararef the colors can be set via two paramters:<br />
* <code>textpartdividerColor</code> for the color of the line and<br />
* <code>paragraphNumberColor</code> for the number of the paragraph.<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[pararef][textpartdividerColor=...,paragraphNumberColor=...]<br />
...<br />
</texcode><br />
<br />
For now the color and style of the paragraph title has to be set via the normal outer margin settings.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=24130Cross Referencing2019-04-15T16:21:52Z<p>Zenlima: Added temporary download url</p>
<hr />
<div>(This module is currently not in die distribution. Until it is, you can download it from [http://zenlima.com/context/t-crossref-0.9.3.zip here]).<br />
<br />
Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>refColor</code> for the entire reference text,<br />
* <code>reffixColor</code> for the color of the prefix and suffix if different from <code>refColor</code><br />
* <code>refrefColor</code> for the detail, ref itself and ref details if different from <code>refColor</code><br />
<br />
They are defined as parameters of the [https://modules.contextgarden.net/cgi-bin/module.cgi/ruid=1253027735/action=view/id=67 module]:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
\setupcrossreftext[ru][atpageLeft={ на странице }]<br />
\setupcrossreftext[ru][atpageRight={}]<br />
\setupcrossreftext[uk][atpageLeft={ на сторінці }]<br />
\setupcrossreftext[uk][atpageRight={}]<br />
<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=24102Cross Referencing2019-04-08T17:28:28Z<p>Zenlima: Removed wrong statemente</p>
<hr />
<div>'''It was claimed that this module does not work with MkIV - what is totally wrong as it is still in daily use via MkIV. See discussion on mailing list.'''<br />
<br />
Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>refColor</code> for the entire reference text,<br />
* <code>reffixColor</code> for the color of the prefix and suffix if different from <code>refColor</code><br />
* <code>refrefColor</code> for the detail, ref itself and ref details if different from <code>refColor</code><br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
\setupcrossreftext[ru][atpageLeft={ на странице }]<br />
\setupcrossreftext[ru][atpageRight={}]<br />
\setupcrossreftext[uk][atpageLeft={ на сторінці }]<br />
\setupcrossreftext[uk][atpageRight={}]<br />
<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Paragraph_Referencing&diff=24101Paragraph Referencing2019-04-08T17:25:56Z<p>Zenlima: Removed wrong statemente</p>
<hr />
<div>'''It was claimed that this module does not work with MkIV - what is totally wrong as it is still in daily use via MkIV. See discussion on mailing list.'''<br />
<br />
The {{module|pararef}} module understands a paragraph as a full closed block of one thought. This means that inside a paragraph enumerations, formulas etc. can appear. That is why a paragraph must be defined manually via <code>\startParagraph</code> and <code>\stopParagraph</code>.<br />
<br />
==Paragraphs==<br />
<br />
Each paragraph gets numbered started by each title. In order to link to a paragraph it can be reference by the optional parameter <code>reference=...</code> as a text reference.<br />
<br />
One or more paragraphs can be summarized by a low level title which is displayed as a margin note (margin title) via the optional parameter <code>title=...</code>.<br />
<br />
<texcode><br />
\startParagraph[reference=...,title=...]<br />
...<br />
\stopParagraph<br />
</texcode><br />
<br />
Here how a single paragraph with a title looks like:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
\startParagraph[title={Paragraph heading}]<br />
\input tufte<br />
\stopParagraph<br />
\stoptext<br />
</texcode><br />
<br />
[[Image:t-pararef-1.jpg]]<br />
<br />
<br />
==References==<br />
<br />
Now the more practical part: the paragraph referencing. To reference to an paragraph the package pararef makes use of the [[Cross Referencing|crossref]] module.<br />
<br />
Here a simple usage example:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
\usemodule[crossref]<br />
<br />
\starttext<br />
<br />
\startchapter[title={Lorem ipsum}]<br />
\startsection[title={Dolor sit}]<br />
<br />
\startParagraph<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph[reference=ref1]<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph<br />
Here are two references to destinations on the same page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
Here is one references with brakets:<br />
\startitemize[nowhite]<br />
\item ref1 should be: (para. 1.1/2) and is: \crossref[left={(},right={)},label={para.}][ref1]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Amet},reference=ref2]<br />
<br />
\page<br />
<br />
\startParagraph<br />
Here are two references to destinations on an other page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 on page 1 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 on page 1 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\stopchapter<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-2.jpg]]<br />
[[File:t-pararef-3.jpg]]<br />
<br />
==Text part divider==<br />
<br />
Each section (subsection, subsubsection etc.) has mostly three parts:<br />
* introduction part,<br />
* one or several main parts and<br />
* summary part.<br />
Each part contains one or more paragraphs. To make the logic parts visible the parts are divided by a line <code>\textpartdivider</code>.<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
<br />
\startsection[title={Lorem ipsum}]<br />
\startParagraph<br />
Some introduction text \input tufte<br />
\stopParagraph<br />
<br />
\textpartdivider<br />
<br />
\dorecurse{3}{<br />
\startParagraph<br />
Some main theme text \input tufte<br />
\stopParagraph<br />
}<br />
<br />
\textpartdivider<br />
<br />
\startParagraph<br />
Some section summarizing text \input tufte<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Doloris sit}]<br />
...<br />
\stopsection<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-4.jpg]]<br />
<br />
==Settings==<br />
<br />
In pararef the colors can be set via two paramters:<br />
* <code>textpartdividerColor</code> for the color of the line and<br />
* <code>paragraphNumberColor</code> for the number of the paragraph.<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[pararef][textpartdividerColor=...,paragraphNumberColor=...]<br />
...<br />
</texcode><br />
<br />
For now the color and style of the paragraph title has to be set via the normal outer margin settings.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Math&diff=22613Math2014-08-31T16:17:44Z<p>Zenlima: Undo revision 22422 by Butoijoh (talk) - removed the spam</p>
<hr />
<div>< [[Main Page]] | [[Math with newmat]] | [[MathML]] | [[Math_structures]]><br />
<br />
== Introduction ==<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="font-size: 1.3em; fontweight: bold">Warning!</div><br />
If you consider using ConTeXt for a paper with a proper formula numbering please wait until it is implemented in mkiv. At the moment only a very limited formula numbering is possilbe:<br />
* number formula(s) with a plain number<br />
* number formula(s) with a subnumber<br />
Not possible is at the moment:<br />
* Table of formulas<br />
* Named subformulas<br />
* Mixure of formulas and subformulas in one block<br />
* Reference on a (sub-)formula without having it listed in the Table of formulas<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Summary of formula numbering problem].<br />
</div><br />
<br />
TeX was designed for ease of typesetting books that contained mathematics. As ConTeXt is built on top of TeX, it inherits all those features. In addition to these, ConTeXt adds lot of macros to make the typesetting of mathematics easier.<br />
<br />
There are '''two''' kinds of '''math modes''' --- '''inline math and display math'''. Mathematical expressions that are written with the running text are called inline math; while mathematical expressions that break the flow of the text (such as formulas or equations) are called display math. TeX takes care of proper spacing around expressions and provides macros to typeset most mathematical constructs.<br />
Complicated expressions can be built by working in steps---break down the expression into sub-expressions, build the sub-expressions and then combine them to get the complicated expression.<br />
<br />
The basics of typesetting math in ConTeXt is explained here.<br />
<br />
=== Display math mode ===<br />
Type<br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
to get display math mode.<br />
<br />
=== Inline math mode ===<br />
There are four equivalent commands to get inline math mode:<br />
<br />
<texcode><br />
$ ... $ % TeX style. Deprecated.<br />
\m{ ... } % one brief command<br />
\math{ ... } % two verbose commands<br />
\mathematics{ ... }<br />
</texcode><br />
<br />
=== Note to Plain TeX Users ===<br />
ConTeXt is plain TeX compatible. So, if you have any old document written in plain TeX, it will work with ConTeXt. This does not mean that you will get pixel by pixel identical output with ConTeXt. For inline math, everything that you learnt for plain TeX is also true for ConTeXt. However, display math is significantly different. '''Do not use <code>$$ .... $$</code>''' to write display math formulas in ConTeXt, since you will not get the correct spacing around the formulas. Instead use <br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
See [[Math/Display]] for more details on how to use display math in ConTeXt.<br />
<br />
=== Note to AMSTeX/LaTeX Users ===<br />
ConTeXt offers almost all the features that are present in AMSTeX and LaTeX. However, ConTeXt syntax is different. See this [http://dl.contextgarden.net/myway/context-latex-math.pdf My Way] for how to 'translate' from amsmath syntax to ConTeXt syntax. [[LaTeX_Math_in_ConTeXt]] gives some brief ideas on how to get the LaTeX syntax to run in ConTeXt.<br />
<br />
== The details ==<br />
<br />
=== Math symbols ===<br />
* [[Math/basic | How to input math]] (binary relations, greek letters, subscripts and superscripts)<br />
* Accents<br />
* underbrace, overbrace<br />
* [[Math/fractions | Fractions, Binomials, genfrac, continued fractions.]]<br />
* Delimiters (big, bigg, left, middle, right)<br />
* Integrals and Sums<br />
* ([[Math/functions|Log like]]) functions<br />
* dots<br />
* [[Multiline_equations#Cases|Cases]], matrices, bordermatrix<br />
* Arrows (see [http://dl.contextgarden.net/myway/matharrows.pdf Math Arrows])<br />
* [[Vectors]]<br />
* [[Product integral]]<br />
<br />
=== Display Math ===<br />
* [[Math/Display | Formula, formula number]]<br />
* [[Multiline equations]] (see [http://dl.contextgarden.net/myway/mathalign.pdf Using \mathalign and friends])<br />
* Math sub-alignment<br />
* [[Math spacing]]<br />
<br />
==Math Fonts==<br />
<br />
''See [[Math fonts]]'' for the main article about this subject.<br />
<br />
== Other Methods ==<br />
* There are two different math modules on [http://dante.ctan.org/tex-archive/macros/context/contrib/maths/ CTAN], [[Math with nath|nath]] and [[Math with amsl|amsl]]. And there's a [[Math with newmat|new math]] module in the distribution.<br />
* Context now has inbuilt support for [[Multiline equations]]<br />
* It is also possible to use most [[LaTeX Math in ConTeXt|LaTeX equations in ConTeXt]] with a relatively small set of supporting definitions.<br />
* The "native" ConTeXt way of math is [[MathML]], an application of [[XML]] - rather verbose but mighty.<br />
<br />
==Science==<br />
* Esp. for physics there’s the [[Units]] module.<br />
* Additions to [[MathML]] are PhysML and ChemML.<br />
* [[Chemistry]]<br />
* There's a module for chemical structure formulae: [[Chemistry|PPCHTeX]] (works also with LaTeX).<br />
<br />
==Number Formatting==<br />
There's a special command, {{cmd|digits}}, with its own manual about formatting numbers, see [http://www.pragma-ade.com/general/magazines/mag-0003.pdf Pasting digits together]<br />
<br />
==Evaluating expressions in ConTeXt==<br />
(i.e. ''doing'' math)<br />
* See also [[Expressions]].<br />
<br />
[[Category:Math]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=22212Cross Referencing2013-12-15T23:11:03Z<p>Zenlima: </p>
<hr />
<div>Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>refColor</code> for the entire reference text,<br />
* <code>reffixColor</code> for the color of the prefix and suffix if different from <code>refColor</code><br />
* <code>refrefColor</code> for the detail, ref itself and ref details if different from <code>refColor</code><br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
\setupcrossreftext[ru][atpageLeft={ на странице }]<br />
\setupcrossreftext[ru][atpageRight={}]<br />
\setupcrossreftext[uk][atpageLeft={ на сторінці }]<br />
\setupcrossreftext[uk][atpageRight={}]<br />
<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=22143User talk:Zenlima2013-10-16T22:24:59Z<p>Zenlima: /* Bug: Layoutchange inside page while duplexmode */</p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Layoutchange inside page while duplexmode=<br />
<br />
A both sided document in which the layout has to switch inside a page works fine with text only content, but as soon "bigger" objects (like a table) are involved the textarea get messed<br />
up (shifted horizontally).<br />
<br />
In the following example inner and outer margin notes are added to make it more obvious.<br />
<br />
<texcode><br />
\setuppapersize[A4][A4]<br />
<br />
\definelayout[WithoutMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=16cm,rightmargindistance=0cm,rightmargin=0cm]<br />
<br />
\definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm]<br />
<br />
\setuppagenumbering[alternative=doublesided,location=]<br />
<br />
\starttext<br />
<br />
\setuplayout[WithMarginnotes]<br />
<br />
\dorecurse {6} {<br />
\ininner[stack=yes]{\expanded{\dorecurse{2}{IM\recurselevel\space}}}%<br />
\inouter[stack=yes]{\expanded{\dorecurse{3}{OM\recurselevel\space}}}%<br />
\input tufte \par<br />
}<br />
<br />
\setuplayout[WithoutMarginnotes]<br />
<br />
\placetable[split][]{Big table object}<br />
{<br />
\setupTABLE[row][1][width=\textwidth]<br />
\bTABLE[split=repeat]<br />
\bTABLEhead<br />
\bTR \bTD XXX \eTD \eTR<br />
\eTABLEhead<br />
\bTABLEbody<br />
\dorecurse{20}{<br />
\bTR \bTD XXX \eTD \eTR}<br />
\eTABLEbody<br />
\eTABLE<br />
}<br />
<br />
\setuplayout[WithMarginnotes]<br />
<br />
\dorecurse {3} {<br />
\ininner[stack=yes]{\expanded{\dorecurse{2}{IM\recurselevel\space}}}%<br />
\inouter[stack=yes]{\expanded{\dorecurse{3}{OM\recurselevel\space}}}%<br />
\input tufte \par<br />
}<br />
<br />
\stoptext<br />
</texcode><br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
'''Open for discussion :-)'''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Simple===<br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
Expected formular number: (1.3) and list entry (1.3) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[sublevel={.3},reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2), (2.a), nothing and (3); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff", (2.a) -> "Great piece" and (3) -> "Last part"<br />
<br />
<texcode><br />
\placenamedformula[reference={eq:ax=b},listlabel={System of stuff}]<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\NC \NC \eq i \NR[listlabel={Last part}]<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
<br />
===eqalignno===<br />
<br />
Expected formular numbers (1), (1a), (1.c) and (2); reference on (2); list entries (1.c) -> "Yea!" and (2) -> "Ups"<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber[sublevel={a}]\cr<br />
a^2 + b^2 &= c^2 &\formulanumber[sublevel={.c},listlabel={Yea!}] \cr<br />
d^2 &= e^2 &\formulanumber[listlabel={Ups},reference={eq:ups}]\cr}<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Summary===<br />
<br />
All three commands:<br />
* \NR<br />
* \placeformula<br />
* \formualanumber <br />
will share the same attributes:<br />
* sublevel (maybe better: formulalevel or just level?)<br />to define and concrete the (sub-)level of the formula<br />
* listlabel (maybe textlabel? the numberlabel is still needed)<br /> to add a entry in the list of formulas<br />
* reference<br />just a classic reference in order to link to it<br />
so that the syntax is more intuitive during writing.<br />
<br />
Also. this way the commands:<br />
* placesubformula<br />
* placenamedformula<br />
* placenamedsubformula<br />
* startstopsubformulas<br />
* subformulanumber<br />
will become needless.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Page_Layout&diff=22142Page Layout2013-10-16T09:40:17Z<p>Zenlima: </p>
<hr />
<div>< [[Visuals]] | [[Layers]] | [[Columns]] | [[Visual Debugging]] ><br />
<br />
For more on [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf layout and page design] see the [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf manual chapter].<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="font-size: 1.3em; fontweight: bold">Warning!</div><br />
At the moment a layoutchange (setuplayout) inside a page is not proper working in mkiv duplex mode.<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Bug Layoutchange inside page while duplexmode].<br />
</div><br />
<br />
<br />
== Typesetting areas ==<br />
<br />
The 25 typesetting areas of a ConTeXt page are divided into 5 columns and 5 rows. From left to right, one encounters {{code|leftedge}}, {{code|leftmargin}}, {{code|text}}, {{code|rightmargin}}, and {{code|rightedge}}. From top to bottom, the areas are called: {{code|top}}, {{code|header}}, {{code|text}}, {{code|footer}}, {{code|bottom}}. E.g. {{code|leftmargin}} is the margin area to the left of the main text area; {{code|{leftmargin,bottom}|}} is below it, at the same height as the {{code|bottom}} area. In between the two lies the area {{code|{leftmargin,footer}|}}.<br />
<br />
The graphic below illustrates the areas and dimensions. The row and column names are written<br />
along the edges of the page. The arrows correspond to layout dimensions; the<br />
more important a dimension is (i.e. the more of the layout is pushed around<br />
when you change it), the thicker its arrow and the larger its name.<br />
<br />
[[Image:layout.svg||||Diagram of \setuplayout[] dimensions]]<br />
<br />
== Defining the layout ==<br />
<br />
Positioning the areas is by setting the following dimensions using {{cmd|setuplayout|[backspace=5cm,...]}}. The dimensions are mentioned in order of how ‘primitive’ they are: e.g. altering the {{code|topspace}} pushes around all other vertical dimensions, but altering the {{code|header}} affects only the {{code|headerdistance}} and the {{code|textheight}}.<br />
<br />
You always define a right page; if you use a double page layout, 'right' and 'left' values are mirrored on a left page. Doublesided typesetting is activated with {{cmd|setuppagenumbering|[alternative=doublesided]}}.<br />
<br />
# Set the {{code|backspace}} and {{code|width}}, and the {{code|topspace}} and {{code|height}}. The {{code|width}} is the width of the main typesetting area; the {{code|backspace}} is its distance from the left edge of the page. The {{code|height}} is the distance ''from the top of the header to the bottom of the footer''; the {{code|topspace}} is the distance from the top edge of the page to the top of the header.<br />
# Set the {{code|header}} and {{code|headerdistance}}, and the {{code|footer}} and {{code|footerdistance}}. The {{code|header}} is the vertical size of the header area; the {{code|headerdistance}} is the distance from the header area to the text area. The {{code|footer}} and {{code|footerdistance}} work likewise.<br />
# Once the header(distance) and footer(distance) are subtracted from the {{code|height}}, what remains is the {{code|textheight}}: the height of the main typesetting area. Although it would be very useful, you cannot set this dimension directly.<br />
# If you want to typeset anything above the header, define {{code|topdistance}} (the distance from the top of the header to the bottom of the topmost typesetting area) and {{code|top}} (the height of the topmost typesetting area). For typesetting below the footer, define {{code|bottomdistance}} and {{code|bottom}}.<br />
# As for the horizontal dimensions apart from the {{code|width}}: starting at the left edge of the main text area, and moving away from the center, one first sets the {{code|leftmargindistance}}; then one sets the width {{code|leftmargin}} of the margin typesetting area; then one sets the {{code|leftedgedistance}}; and then there is the {{code|leftedge}} typesetting area. On the right: {{code|rightmargindistance}}, {{code|rightmargin}}, {{code|rightedgedistance}}, {{code|rightedge}}.<br />
<br />
== Paper size ==<br />
<br />
Page size and paper size are set with {{cmd|setuppapersize}}. Many paper sizes are already defined by name; see the list of [[PaperSizes|paper sizes]]. To define a new paper size, use {{cmd|definepapersize}}.<br />
<br />
== Example layout ==<br />
<br />
<texcode><br />
\setuppapersize[A4][A4] % this is the default and may be omitted<br />
\setuplayout[backspace=20mm,<br />
width=160mm,<br />
topspace=20mm,<br />
header=0mm, <br />
footer=0mm,<br />
height=250mm]<br />
</texcode><br />
<br />
== Multiple layouts ==<br />
<br />
If you need to use different layouts in some parts of the document, you can set up a global layout, and then define additional named layouts for the deviating parts. You only need to specify the dimensions that differ: unspecified dimensions will be inherited from the global layout.<br />
<br />
To switch to a different layout, call it up in the appropriate place in the document. To revert back to the global layout, use {{cmd|setuplayout|[reset]}}.<br />
<br />
<texcode><br />
\setuplayout[...] % global layout<br />
\definelayout[wide][...] % layout of the first page<br />
<br />
\setuplayout[wide] % switch to layout called 'wide'<br />
\setuplayout[reset] % switch back to the global layout<br />
</texcode><br />
<br />
To specify in advance that you want to change layouts starting from page 4 (e.g.), use {{cmd|definelayout|[4][...]}}. Resetting the layout must be done explicitly; else, the new layout will be used until the end of the document.<br />
<br />
<texcode><br />
% different layout for first two pages<br />
\definelayout[1][wide]<br />
\definelayout[3][reset]<br />
</texcode><br />
<br />
== Advanced features ==<br />
<br />
* To allow Acrobat Reader users (among others?) to make layers visible/invisible at will, add the following command at the start of your file:<br />
<texcode><br />
\showlayoutcomponents<br />
</texcode><br />
<br />
* If you have a certain run of text that you want to keep together, you can test for the number of lines available on the current page with {{cmd|testpage|[''n'']}}, where ''n'' is the number of lines required. If there are not ''n'' lines available, a page break will be inserted at the location of the {{cmd|testpage}} command.<br />
<br />
* If you need absolute positioning of objects (text, pictures) on the page, but ad-hoc rather than systematic, the [[Layers]] mechanism is more suitable.<br />
<br />
* For layout from a [[Formatting Objects|XML/FO]] perspective, with some descriptive pictures, see At [http://getfo.sourceforge.net/context_xml/index.html Paul Tremblay's] [[XML]] ConTeXt site.<br />
<br />
== Table of Parameters ==<br />
<br />
The first colum is the name by which the variable is set in {{cmd|setuplayout}}. The second column is the name by which TeX stores the variable. This name is usually the same, but sometimes different; knowing it allows you to invoke it with code like <code>The paper's height is \the\paperheight.</code> Any remarks (usually a short description) are given in the third column.<br />
<br />
{| class=wikitable<br />
! \setuplayout[...] !! dimension !! Remarks<br />
|-<br />
| paperheight<br />
| {{cmd|paperheight}}<br />
| height of paper page<br />
|-<br />
| paperwidth<br />
| {{cmd|paperwidth}}<br />
| width of paper page<br />
|-<br />
| printpaperheight<br />
| {{cmd|printpaperheight}}<br />
| differs from paperheight when using [[Imposition]] (arranging)<br />
|-<br />
| printpaperwidth<br />
| {{cmd|printpaperwidth}}<br />
| differs from paperwidth when using [[Imposition]] (arranging)<br />
|-<br />
| topspace<br />
| {{cmd|topspace}}<br />
| above header: from top rim of paper to to top rim of header<br />
|-<br />
| backspace<br />
| {{cmd|backspace}}<br />
| from left rim of paper to left rim of main text area<br />
|-<br />
| height<br />
| {{cmd|makeupheight}}<br />
| sum of heights of text area, header and footer (plus distances)<br />
|-<br />
| width<br />
| {{cmd|makeupwidth}}<br />
| width of the main text area. {{cmd|makeupwidth}} is normally same as {{cmd|textwidth}}, but it can be different, for example in columns<br />
|-<br />
| top<br />
| {{cmd|topheight}}<br />
| height of the top area<br />
|-<br />
| topdistance<br />
| {{cmd|topdistance}}<br />
| between top and header<br />
|-<br />
| header<br />
| {{cmd|headerheight}}<br />
| height of header area<br />
|-<br />
| headerdistance<br />
| {{cmd|headerdistance}}<br />
| between header and text<br />
|-<br />
| textheight<br />
| {{cmd|textheight}}<br />
| height of text area<br />
|-<br />
| footerdistance<br />
| {{cmd|footerdistance}}<br />
| between text and footer<br />
|-<br />
| footer<br />
| {{cmd|footerheight}}<br />
| height of footer area<br />
|-<br />
| bottomdistance<br />
| {{cmd|bottomdistance}}<br />
| between footer and bottom<br />
|-<br />
| bottom<br />
| {{cmd|bottomheight}}<br />
| space below footer (but isn't calculated automatically)<br />
|-<br />
| bottomspace<br />
| {{cmd|bottomspace}}<br />
| space from bottom footer to bottom rim of paper<br />
|-<br />
| cutspace<br />
| {{cmd|cutspace}}<br />
| from right rim of paper to right rim of main text area<br />
|-<br />
| leftedge<br />
| {{cmd|leftedgewidth}}<br />
| from left rim of paper to left rim of left margin<br />
|-<br />
| leftedgedistance<br />
| {{cmd|leftedgedistance}}<br />
| between leftegde and left margin<br />
|-<br />
| leftmargin<br />
| {{cmd|leftmarginwidth}}<br />
| width of left margin (marginals space)<br />
|-<br />
| leftmargindistance<br />
| {{cmd|leftmargindistance}}<br />
| between left margin and text<br />
|-<br />
| textwidth<br />
| {{cmd|textwidth}}<br />
| width of text area. when columns are used, the value of {{cmd|textwidth}} can differ from {{cmd|makeupwidth}}<br />
|-<br />
| rightmargindistance<br />
| {{cmd|rightmargindistance}}<br />
| between text area and right margin<br />
|-<br />
| rightmargin<br />
| {{cmd|rightmarginwidth}}<br />
| width of right margin (marginals area)<br />
|-<br />
| rightedgedistance<br />
| {{cmd|rightedgedistance}}<br />
| between right margin and right edge<br />
|-<br />
| rightedge<br />
| {{cmd|rightedgewidth}}<br />
| from right margin to right rim of paper<br />
|}<br />
<br />
'''Note:'''<br />
<br />
*width=middle<br />
<code><br />
if cutspace == 0pt then<br />
cutspace = backspace<br />
end<br />
makeupwidth = paperwidth- backspace -cutspace<br />
</code><br />
*width=fit<br />
<code> <br />
if cutspace == 0pt then<br />
cutspace = backspace<br />
end<br />
makeupwidth = paperwidth-cutspace<br />
scratchdimen = backspace - leftedgewidth-leftedgedistance-leftmarginwidth-leftmargindistance<br />
if scratchdimen< 0pt then<br />
scratchdimen = 0pt<br />
end<br />
makeupwidth = makeupwidth - rightmargindistance-rightmarginwidth- rightedgedistance-rightedgewidth- scratchdimen<br />
</code><br />
* otherwise:<br />
<code><br />
makeupwidth=width<br />
if cutspace == 0pt then<br />
cutspace = paperwidth-makeupwidth-backspace<br />
else<br />
% A kind of inconsistent specification, but used<br />
% in for instance s-pre-19.tex; the cutspace is<br />
% used only for determining some kind of right<br />
% margin; don't use this in doublesided mode<br />
pass <br />
end<br />
</code><br />
(From {{src|page-lay.mkiv}}.)<br />
<br />
{{Getting started navbox}}<br />
<br />
[[Category:ConTeXt-Issues]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=22141User talk:Zenlima2013-10-16T09:39:41Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Layoutchange inside page while duplexmode=<br />
<br />
<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
'''Open for discussion :-)'''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Simple===<br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
Expected formular number: (1.3) and list entry (1.3) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[sublevel={.3},reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2), (2.a), nothing and (3); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff", (2.a) -> "Great piece" and (3) -> "Last part"<br />
<br />
<texcode><br />
\placenamedformula[reference={eq:ax=b},listlabel={System of stuff}]<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\NC \NC \eq i \NR[listlabel={Last part}]<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
<br />
===eqalignno===<br />
<br />
Expected formular numbers (1), (1a), (1.c) and (2); reference on (2); list entries (1.c) -> "Yea!" and (2) -> "Ups"<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber[sublevel={a}]\cr<br />
a^2 + b^2 &= c^2 &\formulanumber[sublevel={.c},listlabel={Yea!}] \cr<br />
d^2 &= e^2 &\formulanumber[listlabel={Ups},reference={eq:ups}]\cr}<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Summary===<br />
<br />
All three commands:<br />
* \NR<br />
* \placeformula<br />
* \formualanumber <br />
will share the same attributes:<br />
* sublevel (maybe better: formulalevel or just level?)<br />to define and concrete the (sub-)level of the formula<br />
* listlabel (maybe textlabel? the numberlabel is still needed)<br /> to add a entry in the list of formulas<br />
* reference<br />just a classic reference in order to link to it<br />
so that the syntax is more intuitive during writing.<br />
<br />
Also. this way the commands:<br />
* placesubformula<br />
* placenamedformula<br />
* placenamedsubformula<br />
* startstopsubformulas<br />
* subformulanumber<br />
will become needless.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Page_Layout&diff=22140Page Layout2013-10-16T09:38:06Z<p>Zenlima: </p>
<hr />
<div>< [[Visuals]] | [[Layers]] | [[Columns]] | [[Visual Debugging]] ><br />
<br />
For more on [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf layout and page design] see the [http://context.aanhet.net/svn/contextman/context-reference/en/co-pagedesign.pdf manual chapter].<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="font-size: 1.3em; fontweight: bold">Warning!</div><br />
At the moment a layoutchange (setuplayout) inside a page is not proper working in mkiv duplex mode.<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Bug Layoutchange in duplexmode].<br />
</div><br />
<br />
<br />
== Typesetting areas ==<br />
<br />
The 25 typesetting areas of a ConTeXt page are divided into 5 columns and 5 rows. From left to right, one encounters {{code|leftedge}}, {{code|leftmargin}}, {{code|text}}, {{code|rightmargin}}, and {{code|rightedge}}. From top to bottom, the areas are called: {{code|top}}, {{code|header}}, {{code|text}}, {{code|footer}}, {{code|bottom}}. E.g. {{code|leftmargin}} is the margin area to the left of the main text area; {{code|{leftmargin,bottom}|}} is below it, at the same height as the {{code|bottom}} area. In between the two lies the area {{code|{leftmargin,footer}|}}.<br />
<br />
The graphic below illustrates the areas and dimensions. The row and column names are written<br />
along the edges of the page. The arrows correspond to layout dimensions; the<br />
more important a dimension is (i.e. the more of the layout is pushed around<br />
when you change it), the thicker its arrow and the larger its name.<br />
<br />
[[Image:layout.svg||||Diagram of \setuplayout[] dimensions]]<br />
<br />
== Defining the layout ==<br />
<br />
Positioning the areas is by setting the following dimensions using {{cmd|setuplayout|[backspace=5cm,...]}}. The dimensions are mentioned in order of how ‘primitive’ they are: e.g. altering the {{code|topspace}} pushes around all other vertical dimensions, but altering the {{code|header}} affects only the {{code|headerdistance}} and the {{code|textheight}}.<br />
<br />
You always define a right page; if you use a double page layout, 'right' and 'left' values are mirrored on a left page. Doublesided typesetting is activated with {{cmd|setuppagenumbering|[alternative=doublesided]}}.<br />
<br />
# Set the {{code|backspace}} and {{code|width}}, and the {{code|topspace}} and {{code|height}}. The {{code|width}} is the width of the main typesetting area; the {{code|backspace}} is its distance from the left edge of the page. The {{code|height}} is the distance ''from the top of the header to the bottom of the footer''; the {{code|topspace}} is the distance from the top edge of the page to the top of the header.<br />
# Set the {{code|header}} and {{code|headerdistance}}, and the {{code|footer}} and {{code|footerdistance}}. The {{code|header}} is the vertical size of the header area; the {{code|headerdistance}} is the distance from the header area to the text area. The {{code|footer}} and {{code|footerdistance}} work likewise.<br />
# Once the header(distance) and footer(distance) are subtracted from the {{code|height}}, what remains is the {{code|textheight}}: the height of the main typesetting area. Although it would be very useful, you cannot set this dimension directly.<br />
# If you want to typeset anything above the header, define {{code|topdistance}} (the distance from the top of the header to the bottom of the topmost typesetting area) and {{code|top}} (the height of the topmost typesetting area). For typesetting below the footer, define {{code|bottomdistance}} and {{code|bottom}}.<br />
# As for the horizontal dimensions apart from the {{code|width}}: starting at the left edge of the main text area, and moving away from the center, one first sets the {{code|leftmargindistance}}; then one sets the width {{code|leftmargin}} of the margin typesetting area; then one sets the {{code|leftedgedistance}}; and then there is the {{code|leftedge}} typesetting area. On the right: {{code|rightmargindistance}}, {{code|rightmargin}}, {{code|rightedgedistance}}, {{code|rightedge}}.<br />
<br />
== Paper size ==<br />
<br />
Page size and paper size are set with {{cmd|setuppapersize}}. Many paper sizes are already defined by name; see the list of [[PaperSizes|paper sizes]]. To define a new paper size, use {{cmd|definepapersize}}.<br />
<br />
== Example layout ==<br />
<br />
<texcode><br />
\setuppapersize[A4][A4] % this is the default and may be omitted<br />
\setuplayout[backspace=20mm,<br />
width=160mm,<br />
topspace=20mm,<br />
header=0mm, <br />
footer=0mm,<br />
height=250mm]<br />
</texcode><br />
<br />
== Multiple layouts ==<br />
<br />
If you need to use different layouts in some parts of the document, you can set up a global layout, and then define additional named layouts for the deviating parts. You only need to specify the dimensions that differ: unspecified dimensions will be inherited from the global layout.<br />
<br />
To switch to a different layout, call it up in the appropriate place in the document. To revert back to the global layout, use {{cmd|setuplayout|[reset]}}.<br />
<br />
<texcode><br />
\setuplayout[...] % global layout<br />
\definelayout[wide][...] % layout of the first page<br />
<br />
\setuplayout[wide] % switch to layout called 'wide'<br />
\setuplayout[reset] % switch back to the global layout<br />
</texcode><br />
<br />
To specify in advance that you want to change layouts starting from page 4 (e.g.), use {{cmd|definelayout|[4][...]}}. Resetting the layout must be done explicitly; else, the new layout will be used until the end of the document.<br />
<br />
<texcode><br />
% different layout for first two pages<br />
\definelayout[1][wide]<br />
\definelayout[3][reset]<br />
</texcode><br />
<br />
== Advanced features ==<br />
<br />
* To allow Acrobat Reader users (among others?) to make layers visible/invisible at will, add the following command at the start of your file:<br />
<texcode><br />
\showlayoutcomponents<br />
</texcode><br />
<br />
* If you have a certain run of text that you want to keep together, you can test for the number of lines available on the current page with {{cmd|testpage|[''n'']}}, where ''n'' is the number of lines required. If there are not ''n'' lines available, a page break will be inserted at the location of the {{cmd|testpage}} command.<br />
<br />
* If you need absolute positioning of objects (text, pictures) on the page, but ad-hoc rather than systematic, the [[Layers]] mechanism is more suitable.<br />
<br />
* For layout from a [[Formatting Objects|XML/FO]] perspective, with some descriptive pictures, see At [http://getfo.sourceforge.net/context_xml/index.html Paul Tremblay's] [[XML]] ConTeXt site.<br />
<br />
== Table of Parameters ==<br />
<br />
The first colum is the name by which the variable is set in {{cmd|setuplayout}}. The second column is the name by which TeX stores the variable. This name is usually the same, but sometimes different; knowing it allows you to invoke it with code like <code>The paper's height is \the\paperheight.</code> Any remarks (usually a short description) are given in the third column.<br />
<br />
{| class=wikitable<br />
! \setuplayout[...] !! dimension !! Remarks<br />
|-<br />
| paperheight<br />
| {{cmd|paperheight}}<br />
| height of paper page<br />
|-<br />
| paperwidth<br />
| {{cmd|paperwidth}}<br />
| width of paper page<br />
|-<br />
| printpaperheight<br />
| {{cmd|printpaperheight}}<br />
| differs from paperheight when using [[Imposition]] (arranging)<br />
|-<br />
| printpaperwidth<br />
| {{cmd|printpaperwidth}}<br />
| differs from paperwidth when using [[Imposition]] (arranging)<br />
|-<br />
| topspace<br />
| {{cmd|topspace}}<br />
| above header: from top rim of paper to to top rim of header<br />
|-<br />
| backspace<br />
| {{cmd|backspace}}<br />
| from left rim of paper to left rim of main text area<br />
|-<br />
| height<br />
| {{cmd|makeupheight}}<br />
| sum of heights of text area, header and footer (plus distances)<br />
|-<br />
| width<br />
| {{cmd|makeupwidth}}<br />
| width of the main text area. {{cmd|makeupwidth}} is normally same as {{cmd|textwidth}}, but it can be different, for example in columns<br />
|-<br />
| top<br />
| {{cmd|topheight}}<br />
| height of the top area<br />
|-<br />
| topdistance<br />
| {{cmd|topdistance}}<br />
| between top and header<br />
|-<br />
| header<br />
| {{cmd|headerheight}}<br />
| height of header area<br />
|-<br />
| headerdistance<br />
| {{cmd|headerdistance}}<br />
| between header and text<br />
|-<br />
| textheight<br />
| {{cmd|textheight}}<br />
| height of text area<br />
|-<br />
| footerdistance<br />
| {{cmd|footerdistance}}<br />
| between text and footer<br />
|-<br />
| footer<br />
| {{cmd|footerheight}}<br />
| height of footer area<br />
|-<br />
| bottomdistance<br />
| {{cmd|bottomdistance}}<br />
| between footer and bottom<br />
|-<br />
| bottom<br />
| {{cmd|bottomheight}}<br />
| space below footer (but isn't calculated automatically)<br />
|-<br />
| bottomspace<br />
| {{cmd|bottomspace}}<br />
| space from bottom footer to bottom rim of paper<br />
|-<br />
| cutspace<br />
| {{cmd|cutspace}}<br />
| from right rim of paper to right rim of main text area<br />
|-<br />
| leftedge<br />
| {{cmd|leftedgewidth}}<br />
| from left rim of paper to left rim of left margin<br />
|-<br />
| leftedgedistance<br />
| {{cmd|leftedgedistance}}<br />
| between leftegde and left margin<br />
|-<br />
| leftmargin<br />
| {{cmd|leftmarginwidth}}<br />
| width of left margin (marginals space)<br />
|-<br />
| leftmargindistance<br />
| {{cmd|leftmargindistance}}<br />
| between left margin and text<br />
|-<br />
| textwidth<br />
| {{cmd|textwidth}}<br />
| width of text area. when columns are used, the value of {{cmd|textwidth}} can differ from {{cmd|makeupwidth}}<br />
|-<br />
| rightmargindistance<br />
| {{cmd|rightmargindistance}}<br />
| between text area and right margin<br />
|-<br />
| rightmargin<br />
| {{cmd|rightmarginwidth}}<br />
| width of right margin (marginals area)<br />
|-<br />
| rightedgedistance<br />
| {{cmd|rightedgedistance}}<br />
| between right margin and right edge<br />
|-<br />
| rightedge<br />
| {{cmd|rightedgewidth}}<br />
| from right margin to right rim of paper<br />
|}<br />
<br />
'''Note:'''<br />
<br />
*width=middle<br />
<code><br />
if cutspace == 0pt then<br />
cutspace = backspace<br />
end<br />
makeupwidth = paperwidth- backspace -cutspace<br />
</code><br />
*width=fit<br />
<code> <br />
if cutspace == 0pt then<br />
cutspace = backspace<br />
end<br />
makeupwidth = paperwidth-cutspace<br />
scratchdimen = backspace - leftedgewidth-leftedgedistance-leftmarginwidth-leftmargindistance<br />
if scratchdimen< 0pt then<br />
scratchdimen = 0pt<br />
end<br />
makeupwidth = makeupwidth - rightmargindistance-rightmarginwidth- rightedgedistance-rightedgewidth- scratchdimen<br />
</code><br />
* otherwise:<br />
<code><br />
makeupwidth=width<br />
if cutspace == 0pt then<br />
cutspace = paperwidth-makeupwidth-backspace<br />
else<br />
% A kind of inconsistent specification, but used<br />
% in for instance s-pre-19.tex; the cutspace is<br />
% used only for determining some kind of right<br />
% margin; don't use this in doublesided mode<br />
pass <br />
end<br />
</code><br />
(From {{src|page-lay.mkiv}}.)<br />
<br />
{{Getting started navbox}}<br />
<br />
[[Category:ConTeXt-Issues]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Math&diff=22139Math2013-10-16T09:33:52Z<p>Zenlima: </p>
<hr />
<div>< [[Main Page]] | [[Math with newmat]] | [[MathML]] | [[Math_structures]]><br />
<br />
== Introduction ==<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="font-size: 1.3em; fontweight: bold">Warning!</div><br />
If you consider using ConTeXt for a paper with a proper formula numbering please wait until it is implemented in mkiv. At the moment only a very limited formula numbering is possilbe:<br />
* number formula(s) with a plain number<br />
* number formula(s) with a subnumber<br />
Not possible is at the moment:<br />
* Table of formulas<br />
* Named subformulas<br />
* Mixure of formulas and subformulas in one block<br />
* Reference on a (sub-)formula without having it listed in the Table of formulas<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Summary of formula numbering problem].<br />
</div><br />
<br />
TeX was designed for ease of typesetting books that contained mathematics. As ConTeXt is built on top of TeX, it inherits all those features. In addition to these, ConTeXt adds lot of macros to make the typesetting of mathematics easier.<br />
<br />
There are '''two''' kinds of '''math modes''' --- '''inline math and display math'''. Mathematical expressions that are written with the running text are called inline math; while mathematical expressions that break the flow of the text (such as formulas or equations) are called display math. TeX takes care of proper spacing around expressions and provides macros to typeset most mathematical constructs.<br />
Complicated expressions can be built by working in steps---break down the expression into sub-expressions, build the sub-expressions and then combine them to get the complicated expression.<br />
<br />
The basics of typesetting math in ConTeXt is explained here.<br />
<br />
=== Display math mode ===<br />
Type<br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
to get display math mode.<br />
<br />
=== Inline math mode ===<br />
There are four equivalent commands to get inline math mode:<br />
<br />
<texcode><br />
$ ... $ % TeX style. Deprecated.<br />
\m{ ... } % one brief command<br />
\math{ ... } % two verbose commands<br />
\mathematics{ ... }<br />
</texcode><br />
<br />
=== Note to Plain TeX Users ===<br />
ConTeXt is plain TeX compatible. So, if you have any old document written in plain TeX, it will work with ConTeXt. This does not mean that you will get pixel by pixel identical output with ConTeXt. For inline math, everything that you learnt for plain TeX is also true for ConTeXt. However, display math is significantly different. '''Do not use <code>$$ .... $$</code>''' to write display math formulas in ConTeXt, since you will not get the correct spacing around the formulas. Instead use <br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
See [[Math/Display]] for more details on how to use display math in ConTeXt.<br />
<br />
=== Note to AMSTeX/LaTeX Users ===<br />
ConTeXt offers almost all the features that are present in AMSTeX and LaTeX. However, ConTeXt syntax is different. See this [http://dl.contextgarden.net/myway/context-latex-math.pdf My Way] for how to 'translate' from amsmath syntax to ConTeXt syntax. [[LaTeX_Math_in_ConTeXt]] gives some brief ideas on how to get the LaTeX syntax to run in ConTeXt.<br />
<br />
== The details ==<br />
<br />
=== Math symbols ===<br />
* [[Math/basic | How to input math]] (binary relations, greek letters, subscripts and superscripts)<br />
* Accents<br />
* underbrace, overbrace<br />
* [[Math/fractions | Fractions, Binomials, genfrac, continued fractions.]]<br />
* Delimiters (big, bigg, left, middle, right)<br />
* Integrals and Sums<br />
* ([[Math/functions|Log like]]) functions<br />
* dots<br />
* [[Multiline_equations#Cases|Cases]], matrices, bordermatrix<br />
* Arrows (see [http://dl.contextgarden.net/myway/matharrows.pdf Math Arrows])<br />
* [[Vectors]]<br />
* [[Product integral]]<br />
<br />
=== Display Math ===<br />
* [[Math/Display | Formula, formula number]]<br />
* [[Multiline equations]] (see [http://dl.contextgarden.net/myway/mathalign.pdf Using \mathalign and friends])<br />
* Math sub-alignment<br />
* [[Math spacing]]<br />
<br />
==Math Fonts==<br />
<br />
''See [[Math fonts]]'' for the main article about this subject.<br />
<br />
== Other Methods ==<br />
* There are two different math modules on [http://dante.ctan.org/tex-archive/macros/context/contrib/maths/ CTAN], [[Math with nath|nath]] and [[Math with amsl|amsl]]. And there's a [[Math with newmat|new math]] module in the distribution.<br />
* Context now has inbuilt support for [[Multiline equations]]<br />
* It is also possible to use most [[LaTeX Math in ConTeXt|LaTeX equations in ConTeXt]] with a relatively small set of supporting definitions.<br />
* The "native" ConTeXt way of math is [[MathML]], an application of [[XML]] - rather verbose but mighty.<br />
<br />
==Science==<br />
* Esp. for physics there’s the [[Units]] module.<br />
* Additions to [[MathML]] are PhysML and ChemML.<br />
* [[Chemistry]]<br />
* There's a module for chemical structure formulae: [[Chemistry|PPCHTeX]] (works also with LaTeX).<br />
<br />
==Number Formatting==<br />
There's a special command, {{cmd|digits}}, with its own manual about formatting numbers, see [http://www.pragma-ade.com/general/magazines/mag-0003.pdf Pasting digits together]<br />
<br />
==Evaluating expressions in ConTeXt==<br />
(i.e. ''doing'' math)<br />
* See also [[Expressions]].<br />
<br />
[[Category:Math]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Font_Switching&diff=21964Font Switching2013-08-04T14:55:15Z<p>Zenlima: </p>
<hr />
<div>< [[Basic Text Formatting]] | [[Fonts]] | [[Font Sizes]] ><br />
<br />
<br />
In ConTeXt there are four ways to switch fonts:<br />
<br />
* font style (<cmd>rm</cmd>, <cmd>ss</cmd>, etc.),<br />
* font size (<cmd>tfa</cmd>, <cmd>tfb</cmd>, etc.),<br />
* alternative font style (<cmd>bold</cmd>, <cmd>sans</cmd>, etc.),<br />
* a complete font change (<cmd>setupbodyfont</cmd>, <cmd>switchtobodyfont</cmd>).<br />
<br />
== Font styles ==<br />
<br />
There are three types of font families: serif, sans serif, and teletype. To<br />
switch between these families, use <cmd>rm</cmd> for serif, <cmd>ss</cmd> for<br />
sans serif, and <cmd>tt</cmd> for teletype.<br />
<br />
Each of these families come in different styles: upright, bold, italic,<br />
slanted, bold-italic, bold-slanted, and small-capped. To switch to a different<br />
style, use <cmd>tf</cmd> for upright, <cmd>bf</cmd> for bold, <cmd>it</cmd><br />
for italic, <cmd>sl</cmd> for slanted, <cmd>bi</cmd> for bold-italic,<br />
<cmd>bs</cmd> for bold-slanted, and <cmd>sc</cmd> for small-capped.<br />
<br />
You can generally combine font families and font styles, so if you want to<br />
switch to bold sans serif, you can use either <code>\bf\ss</code> or<br />
<code>\ss\bf</code>. <br />
<br />
There is a font switch <cmd>em</cmd> to ''emphasize'' text. This is somewhat<br />
special: it does automatic italic correction and changes the style depending<br />
on the current font style. For example, if the current font style is upright,<br />
<cmd>em</cmd> switches to slanted; and if the current font style is slanted,<br />
<cmd>em</cmd> switches to upright.<br />
<br />
ConTeXt uses the Latin Modern fonts by default; these fonts look<br />
similar to the original Computer Modern fonts, but have a much larger<br />
character repertoire. As it happens, in the Latin Modern (and Computer<br />
Modern) fonts, the slanted font does not stand out from the<br />
upright font enough for some tastes; so, many people prefer to use the<br />
italic font for emphasis. To do that use <br />
<texcode><br />
\definebodyfontenvironment[default][em=italic]<br />
</texcode><br />
<br />
A font switch remains valid for the rest of the group. So, if you want to<br />
temporarily switch to a different font, use the font style command inside a<br />
group. The easiest way to start a group is to enclose the text within braces<br />
(also called curly brackets), for example<br />
<br />
<texcode><br />
This is serif text<br />
{\ss This is sans serif}<br />
{\tt and this is typewriter}<br />
</texcode><br />
<br />
which gives (notice the braces in the above lines)<br />
<br />
<context><br />
This is serif text \crlf<br />
{\ss This is sans serif} \crlf<br />
{\tt and this is typewriter}<br />
</context><br />
<br />
== Font sizes ==<br />
<br />
Occasionally one needs to change the font size. ConTeXt provides two series<br />
of commands for that. To increase the font you can use <cmd>tfa</cmd> to scale<br />
the font size by a factor of <code>1.2</code>, <cmd>tfb</cmd> to scale by a factor of<br />
<code>(1.2)^2 = 1.44</code>, <cmd>tfc</cmd> to scale by <code>(1.2)^3 = 1.728</code> and <cmd>tfd</cmd> to<br />
scale by <code>(1.2)^4 = 2.074</code>.<br />
<br />
To decrease the font size, you can use <cmd>tfx</cmd><br />
to scale the font by a factor of <code>0.8</code> and <cmd>tfxx</cmd> to scale by a factor<br />
of <code>0.6</code>. The scale factors can be a function of the current font size and can<br />
be changed by <cmd>definebodyfontenvironment</cmd>.<br />
<br />
For example, if you want<br />
<cmd>tfa</cmd> to be equal to 12pt when you are using 10pt font, and be equal to<br />
14pt when you are using 11pt font, then add<br />
<texcode><br />
\definebodyfontenvironment [10pt] [a=12pt]<br />
\definebodyfontenvironment [11pt] [a=14pt]<br />
</texcode><br />
<cmd>definebodyfontenvironment</cmd> is described in detail in <br />
the ConTeXt manual and the [[source:font-ini.tex|font-ini.tex]] source file.<br />
<br />
Font size can be combined with font styles. As a shortcut, you can use<br />
<cmd>bfa</cmd> to get bold font scaled by <code>1.2</code>, <cmd>bfx</cmd> to get a bold font<br />
scaled by <code>0.8</code> and similar commands for other font styles.<br />
<br />
These font size switches are meant for changing the font size of a few<br />
words: they do not change the interline spacing and math font sizes. So, if<br />
you want to change the font size of an entire paragraph, use<br />
<cmd>switchtobodyfont</cmd> described below in [[Font_Switching#Complete_font_change|Complete Font Change]]. However, it<br />
is fine to use them as style directives in setup commands, that is, using them<br />
as an option for <code>style=...</code> in any setup command that accepts<br />
<code>style</code> option.<br />
<br />
== Alternative font styles ==<br />
<br />
While learning a document markup language like ConTeXt, it can be hard to<br />
remember all the commands. ConTeXt provides easy to remember alternative<br />
font styles. So for bold you can use <cmd>bold</cmd>, for italic you can use<br />
<cmd>italic</cmd>, for slanted you can use <cmd>slanted</cmd>, and so on. You can<br />
probably guess what the following do:<br />
<br />
{|<br />
| <cmd>normal</cmd> <br />
| <cmd>slanted</cmd><br />
|-<br />
| <cmd>boldslanted</cmd><br />
| <cmd>slantedbold</cmd><br />
|-<br />
| <cmd>bolditalic</cmd><br />
| <cmd>italicbold</cmd><br />
|-<br />
| <cmd>small</cmd><br />
| <cmd>smallnormal</cmd><br />
|-<br />
| <cmd>smallbold</cmd><br />
| <cmd>smallslanted</cmd><br />
|-<br />
| <cmd>smallboldslanted</cmd><br />
| <cmd>smallslantedbold</cmd><br />
|-<br />
| <cmd>smallbolditalic</cmd><br />
| <cmd>smallitalicbold</cmd><br />
|-<br />
| <cmd>sans</cmd><br />
| <cmd>sansserif</cmd><br />
|-<br />
| <cmd>sansbold</cmd><br />
| <cmd>smallcaps</cmd> <br />
|}<br />
<br />
In addition, the commands <cmd>smallbodyfont</cmd> and<br />
<cmd>bigbodyfont</cmd> can be used to change the font size.<br />
<br />
These alternative font styles are pretty smart. You can either use them as<br />
font style switches inside a group, or as a font changing command that takes an<br />
argument. For example,<br />
<br />
<context source="yes"><br />
This is {\bold bold} and so is \bold{this}.<br />
</context><br />
<br />
These alternative font styles can also be used for all <code>style=...</code><br />
options, and while using them as style options, you can just give the command<br />
name, for example:<br />
<texcode><br />
\setuphead[section][style=bold] <br />
</texcode><br />
<br />
== Complete font change ==<br />
<br />
If you need to change to a different font size and take care of interline<br />
spacing, you can use <cmd>switchtobodyfont</cmd>. For example, to switch to 12pt<br />
you can use <code>\switchtobodyfont[12pt]</code>.<br />
<br />
<br />
ConTeXt provides two relative sizes, called ''big'' and ''small''. So, to go to a<br />
bigger font size use <code>\switchtobodyfont[big]</code> and to use a<br />
smaller font size use <code>\switchtobodyfont[small]</code>. The exact<br />
size used for big and small can be set using <br />
<cmd>definebodyfontenvironment</cmd>.<br />
<br />
The <cmd>setupbodyfont</cmd> command accepts all the same arguments as<br />
<cmd>switchtobodyfont</cmd>. The difference between the two is that<br />
<cmd>setupbodyfont</cmd> also changes the font for headers, footers and other<br />
page markings, while <cmd>switchtobodyfont</cmd> does not. So you should use<br />
<cmd>setupbodyfont</cmd> for global font definitions to apply to the whole document, and<br />
<cmd>switchtobodyfont</cmd> for local font changes. The effect of<br />
<cmd>switchtobodyfont</cmd> can be localized within a group as usual.<br />
<br />
== Different typefaces ==<br />
<br />
So far we have discussed style and size changes within a given typeface<br />
family. If you want to use a different typeface altogether, such as Times or<br />
Palatino, the Pragma web site has recipes covering all the commonly available<br />
typefaces [http://pragma-ade.com/general/manuals/showfont.pdf], while a<br />
separate manual describes how to write support for new typefaces<br />
[http://pragma-ade.com/general/manuals/mfonts.pdf].<br />
<br />
The recipes as given work with the standalone ConTeXt distribution, but not<br />
with TeX Live et al. [http://pragma-ade.com/general/technotes/tfmetrics.pdf]<br />
explains why ConText uses separate font metrics, and gives some differences<br />
between the sets. To use the recipes with other distributions,<br />
try adding one of <code>\usetypescript[berry][ec]</code> or<br />
<code>\usetypescript[adobekb][ec]</code>.<br />
<br />
* [[Simple Typescript Example]]<br />
* [[Example with normal and condensed font variants]]<br />
* [[Linux Libertine on mkiv]]<br />
<br />
== Conclusion ==<br />
<br />
There are many other ways of choosing font styles in ConTeXt. If these<br />
basic styles do not satisfy your needs, have a look at the [[Manuals|manuals]],<br />
or ask on the [[ConTeXt Mailing Lists]].<br />
<br />
[[Category:Fonts]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Roboto_Typescript&diff=21962Roboto Typescript2013-08-02T18:05:11Z<p>Zenlima: </p>
<hr />
<div><p style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
In progress...<br />
</p><br />
<br />
<br />
== Task ==<br />
<br />
To map Roboto Slab on rm-fonts and Robonto (normal and condensed) on ss-fonts.<br />
<br />
== Requirements ==<br />
<br />
The Roboto fonts are installed at your System and also recognized by ConTeXt. If<br />
<br />
mtxrun --script fonts --list --all --pattern=roboto*<br />
<br />
does not shows you minimum:<br />
<br />
roboto robotoblack Roboto-Black.otf<br />
robotoblack robotoblack Roboto-Black.otf<br />
robotoblackitalic robotoblackitalic Roboto-BlackItalic.otf<br />
robotobold robotobold Roboto-Bold.otf<br />
robotobolditalic robotobolditalic Roboto-BoldItalic.otf<br />
robotocondensed robotocondensedbold RobotoCondensed-Bold.otf<br />
robotocondensedbold robotocondensedbold RobotoCondensed-Bold.otf<br />
robotocondensedbolditalic robotocondensedbolditalic RobotoCondensed-BoldItalic.otf<br />
robotocondenseditalic robotocondenseditalic RobotoCondensed-Italic.otf<br />
robotocondensedlight robotocondensedlight RobotoCondensed-Light.otf<br />
robotocondensedlightitalic robotocondensedlightitalic RobotoCondensed-LightItalic.otf<br />
robotocondensednormal robotocondenseditalic RobotoCondensed-Italic.otf<br />
robotocondensedregular robotocondensedregular RobotoCondensed-Regular.otf<br />
robotoitalic robotoitalic Roboto-Italic.otf<br />
robotolight robotolight Roboto-Light.otf<br />
robotolightitalic robotolightitalic Roboto-LightItalic.otf<br />
robotomedium robotomedium Roboto-Medium.otf<br />
robotomediumitalic robotomediumitalic Roboto-MediumItalic.otf<br />
robotonormal robotoitalic Roboto-Italic.otf<br />
robotoregular robotoregular Roboto-Regular.otf<br />
robotoslab robotoslabbold RobotoSlab-Bold.ttf<br />
robotoslabbold robotoslabbold RobotoSlab-Bold.ttf<br />
robotoslablight robotoslablight RobotoSlab-Light.ttf<br />
robotoslabnormal robotoslabregular RobotoSlab-Regular.ttf<br />
robotoslabregular robotoslabregular RobotoSlab-Regular.ttf<br />
robotoslabthin robotoslabthin RobotoSlab-Thin.ttf<br />
robotothin robotothin Roboto-Thin.otf<br />
robotothinitalic robotothinitalic Roboto-ThinItalic.otf<br />
<br />
please visit the instruction [[Fonts_in_LuaTeX#Building_the_font_database|how to install fonts to MkIV]].<br />
<br />
You can download the roboto fonts from google's webfonts and then convert them from woff into otf via fontforge.<br />
<br />
You do not have to use this Roboto fonts. For this example you can use any Unicode font you like. If you use different fonts do not forget to exchange the font names in the example script below.<br />
<br />
== Problem ==<br />
<br />
At this moment ConTeXt only offers two different font weights inside a typescript definition - roboto offers six different font weights. A typescript definiton also does not know font variants and roboto sans offers two (normal and condensed).<br />
<br />
== Script ==<br />
<br />
Solution: you need to pair the specific weight and variants you need in your document.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Roboto_Typescript&diff=21961Roboto Typescript2013-08-02T17:30:16Z<p>Zenlima: </p>
<hr />
<div><p style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
In progress...<br />
</p><br />
<br />
<br />
== Task ==<br />
<br />
To map Roboto Slab on rm-fonts and Robonto (normal and condensed) on ss-fonts.<br />
<br />
== Requirements ==<br />
<br />
The Roboto fonts are installed at your System and also recognized by ConTeXt. If<br />
<br />
mtxrun --script fonts --list --all --pattern=roboto*<br />
<br />
does not shows you minimum:<br />
<br />
roboto robotoblack Roboto-Black.otf<br />
robotoblack robotoblack Roboto-Black.otf<br />
robotoblackitalic robotoblackitalic Roboto-BlackItalic.otf<br />
robotobold robotobold Roboto-Bold.otf<br />
robotobolditalic robotobolditalic Roboto-BoldItalic.otf<br />
robotocondensed robotocondensedbold RobotoCondensed-Bold.otf<br />
robotocondensedbold robotocondensedbold RobotoCondensed-Bold.otf<br />
robotocondensedbolditalic robotocondensedbolditalic RobotoCondensed-BoldItalic.otf<br />
robotocondenseditalic robotocondenseditalic RobotoCondensed-Italic.otf<br />
robotocondensedlight robotocondensedlight RobotoCondensed-Light.otf<br />
robotocondensedlightitalic robotocondensedlightitalic RobotoCondensed-LightItalic.otf<br />
robotocondensednormal robotocondenseditalic RobotoCondensed-Italic.otf<br />
robotocondensedregular robotocondensedregular RobotoCondensed-Regular.otf<br />
robotoitalic robotoitalic Roboto-Italic.otf<br />
robotolight robotolight Roboto-Light.otf<br />
robotolightitalic robotolightitalic Roboto-LightItalic.otf<br />
robotomedium robotomedium Roboto-Medium.otf<br />
robotomediumitalic robotomediumitalic Roboto-MediumItalic.otf<br />
robotonormal robotoitalic Roboto-Italic.otf<br />
robotoregular robotoregular Roboto-Regular.otf<br />
robotoslab robotoslabbold RobotoSlab-Bold.ttf<br />
robotoslabbold robotoslabbold RobotoSlab-Bold.ttf<br />
robotoslablight robotoslablight RobotoSlab-Light.ttf<br />
robotoslabnormal robotoslabregular RobotoSlab-Regular.ttf<br />
robotoslabregular robotoslabregular RobotoSlab-Regular.ttf<br />
robotoslabthin robotoslabthin RobotoSlab-Thin.ttf<br />
robotothin robotothin Roboto-Thin.otf<br />
robotothinitalic robotothinitalic Roboto-ThinItalic.otf<br />
<br />
please visit the instruction how to install fonts to MkIV.<br />
<br />
You can download the roboto fonts from google's webfonts and then convert them from woff into otf via fontforge.<br />
<br />
You do not have to use this Roboto fonts. For this example you can use any Unicode font you like. If you use different fonts do not forget to exchange the font names in the example script below.<br />
<br />
== Problem ==<br />
<br />
At this moment ConTeXt only offers two different font weights inside a typescript definition - roboto offers six different font weights. A typescript definiton also does not know font variants and roboto sans offers two (normal and condensed).<br />
<br />
== Script ==</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Roboto_Typescript&diff=21960Roboto Typescript2013-08-02T16:52:05Z<p>Zenlima: Created page with "<p style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"> In progress... </p> == Task == To map Roboto Slab on rm-fonts and Robonto (normal and condensed) on ss-..."</p>
<hr />
<div><p style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
In progress...<br />
</p><br />
<br />
<br />
== Task ==<br />
<br />
To map Roboto Slab on rm-fonts and Robonto (normal and condensed) on ss-fonts.<br />
<br />
== Requirements ==<br />
<br />
The Roboto fonts are installed at your System and also recognized by ConTeXt. If<br />
<br />
mtxrun --script fonts --list --all --pattern=roboto*<br />
<br />
does not shows you minimum:</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Font_Switching&diff=21959Font Switching2013-08-02T16:23:54Z<p>Zenlima: </p>
<hr />
<div>< [[Basic Text Formatting]] | [[Fonts]] | [[Font Sizes]] ><br />
<br />
<br />
In ConTeXt there are four ways to switch fonts:<br />
<br />
* font style (<cmd>rm</cmd>, <cmd>ss</cmd>, etc.),<br />
* font size (<cmd>tfa</cmd>, <cmd>tfb</cmd>, etc.),<br />
* alternative font style (<cmd>bold</cmd>, <cmd>sans</cmd>, etc.),<br />
* a complete font change (<cmd>setupbodyfont</cmd>, <cmd>switchtobodyfont</cmd>).<br />
<br />
== Font styles ==<br />
<br />
There are three types of font families: serif, sans serif, and teletype. To<br />
switch between these families, use <cmd>rm</cmd> for serif, <cmd>ss</cmd> for<br />
sans serif, and <cmd>tt</cmd> for teletype.<br />
<br />
Each of these families come in different styles: upright, bold, italic,<br />
slanted, bold-italic, bold-slanted, and small-capped. To switch to a different<br />
style, use <cmd>tf</cmd> for upright, <cmd>bf</cmd> for bold, <cmd>it</cmd><br />
for italic, <cmd>sl</cmd> for slanted, <cmd>bi</cmd> for bold-italic,<br />
<cmd>bs</cmd> for bold-slanted, and <cmd>sc</cmd> for small-capped.<br />
<br />
You can generally combine font families and font styles, so if you want to<br />
switch to bold sans serif, you can use either <code>\bf\ss</code> or<br />
<code>\ss\bf</code>. <br />
<br />
There is a font switch <cmd>em</cmd> to ''emphasize'' text. This is somewhat<br />
special: it does automatic italic correction and changes the style depending<br />
on the current font style. For example, if the current font style is upright,<br />
<cmd>em</cmd> switches to slanted; and if the current font style is slanted,<br />
<cmd>em</cmd> switches to upright.<br />
<br />
ConTeXt uses the Latin Modern fonts by default; these fonts look<br />
similar to the original Computer Modern fonts, but have a much larger<br />
character repertoire. As it happens, in the Latin Modern (and Computer<br />
Modern) fonts, the slanted font does not stand out from the<br />
upright font enough for some tastes; so, many people prefer to use the<br />
italic font for emphasis. To do that use <br />
<texcode><br />
\definebodyfontenvironment[default][em=italic]<br />
</texcode><br />
<br />
A font switch remains valid for the rest of the group. So, if you want to<br />
temporarily switch to a different font, use the font style command inside a<br />
group. The easiest way to start a group is to enclose the text within braces<br />
(also called curly brackets), for example<br />
<br />
<texcode><br />
This is serif text<br />
{\ss This is sans serif}<br />
{\tt and this is typewriter}<br />
</texcode><br />
<br />
which gives (notice the braces in the above lines)<br />
<br />
<context><br />
This is serif text \crlf<br />
{\ss This is sans serif} \crlf<br />
{\tt and this is typewriter}<br />
</context><br />
<br />
== Font sizes ==<br />
<br />
Occasionally one needs to change the font size. ConTeXt provides two series<br />
of commands for that. To increase the font you can use <cmd>tfa</cmd> to scale<br />
the font size by a factor of <code>1.2</code>, <cmd>tfb</cmd> to scale by a factor of<br />
<code>(1.2)^2 = 1.44</code>, <cmd>tfc</cmd> to scale by <code>(1.2)^3 = 1.728</code> and <cmd>tfd</cmd> to<br />
scale by <code>(1.2)^4 = 2.074</code>.<br />
<br />
To decrease the font size, you can use <cmd>tfx</cmd><br />
to scale the font by a factor of <code>0.8</code> and <cmd>tfxx</cmd> to scale by a factor<br />
of <code>0.6</code>. The scale factors can be a function of the current font size and can<br />
be changed by <cmd>definebodyfontenvironment</cmd>.<br />
<br />
For example, if you want<br />
<cmd>tfa</cmd> to be equal to 12pt when you are using 10pt font, and be equal to<br />
14pt when you are using 11pt font, then add<br />
<texcode><br />
\definebodyfontenvironment [10pt] [a=12pt]<br />
\definebodyfontenvironment [11pt] [a=14pt]<br />
</texcode><br />
<cmd>definebodyfontenvironment</cmd> is described in detail in <br />
the ConTeXt manual and the [[source:font-ini.tex|font-ini.tex]] source file.<br />
<br />
Font size can be combined with font styles. As a shortcut, you can use<br />
<cmd>bfa</cmd> to get bold font scaled by <code>1.2</code>, <cmd>bfx</cmd> to get a bold font<br />
scaled by <code>0.8</code> and similar commands for other font styles.<br />
<br />
These font size switches are meant for changing the font size of a few<br />
words: they do not change the interline spacing and math font sizes. So, if<br />
you want to change the font size of an entire paragraph, use<br />
<cmd>switchtobodyfont</cmd> described below in [[Font_Switching#Complete_font_change|Complete Font Change]]. However, it<br />
is fine to use them as style directives in setup commands, that is, using them<br />
as an option for <code>style=...</code> in any setup command that accepts<br />
<code>style</code> option.<br />
<br />
== Alternative font styles ==<br />
<br />
While learning a document markup language like ConTeXt, it can be hard to<br />
remember all the commands. ConTeXt provides easy to remember alternative<br />
font styles. So for bold you can use <cmd>bold</cmd>, for italic you can use<br />
<cmd>italic</cmd>, for slanted you can use <cmd>slanted</cmd>, and so on. You can<br />
probably guess what the following do:<br />
<br />
{|<br />
| <cmd>normal</cmd> <br />
| <cmd>slanted</cmd><br />
|-<br />
| <cmd>boldslanted</cmd><br />
| <cmd>slantedbold</cmd><br />
|-<br />
| <cmd>bolditalic</cmd><br />
| <cmd>italicbold</cmd><br />
|-<br />
| <cmd>small</cmd><br />
| <cmd>smallnormal</cmd><br />
|-<br />
| <cmd>smallbold</cmd><br />
| <cmd>smallslanted</cmd><br />
|-<br />
| <cmd>smallboldslanted</cmd><br />
| <cmd>smallslantedbold</cmd><br />
|-<br />
| <cmd>smallbolditalic</cmd><br />
| <cmd>smallitalicbold</cmd><br />
|-<br />
| <cmd>sans</cmd><br />
| <cmd>sansserif</cmd><br />
|-<br />
| <cmd>sansbold</cmd><br />
| <cmd>smallcaps</cmd> <br />
|}<br />
<br />
In addition, the commands <cmd>smallbodyfont</cmd> and<br />
<cmd>bigbodyfont</cmd> can be used to change the font size.<br />
<br />
These alternative font styles are pretty smart. You can either use them as<br />
font style switches inside a group, or as a font changing command that takes an<br />
argument. For example,<br />
<br />
<context source="yes"><br />
This is {\bold bold} and so is \bold{this}.<br />
</context><br />
<br />
These alternative font styles can also be used for all <code>style=...</code><br />
options, and while using them as style options, you can just give the command<br />
name, for example:<br />
<texcode><br />
\setuphead[section][style=bold] <br />
</texcode><br />
<br />
== Complete font change ==<br />
<br />
If you need to change to a different font size and take care of interline<br />
spacing, you can use <cmd>switchtobodyfont</cmd>. For example, to switch to 12pt<br />
you can use <code>\switchtobodyfont[12pt]</code>.<br />
<br />
<br />
ConTeXt provides two relative sizes, called ''big'' and ''small''. So, to go to a<br />
bigger font size use <code>\switchtobodyfont[big]</code> and to use a<br />
smaller font size use <code>\switchtobodyfont[small]</code>. The exact<br />
size used for big and small can be set using <br />
<cmd>definebodyfontenvironment</cmd>.<br />
<br />
The <cmd>setupbodyfont</cmd> command accepts all the same arguments as<br />
<cmd>switchtobodyfont</cmd>. The difference between the two is that<br />
<cmd>setupbodyfont</cmd> also changes the font for headers, footers and other<br />
page markings, while <cmd>switchtobodyfont</cmd> does not. So you should use<br />
<cmd>setupbodyfont</cmd> for global font definitions to apply to the whole document, and<br />
<cmd>switchtobodyfont</cmd> for local font changes. The effect of<br />
<cmd>switchtobodyfont</cmd> can be localized within a group as usual.<br />
<br />
== Different typefaces ==<br />
<br />
So far we have discussed style and size changes within a given typeface<br />
family. If you want to use a different typeface altogether, such as Times or<br />
Palatino, the Pragma web site has recipes covering all the commonly available<br />
typefaces [http://pragma-ade.com/general/manuals/showfont.pdf], while a<br />
separate manual describes how to write support for new typefaces<br />
[http://pragma-ade.com/general/manuals/mfonts.pdf].<br />
<br />
The recipes as given work with the standalone ConTeXt distribution, but not<br />
with TeX Live et al. [http://pragma-ade.com/general/technotes/tfmetrics.pdf]<br />
explains why ConText uses separate font metrics, and gives some differences<br />
between the sets. To use the recipes with other distributions,<br />
try adding one of <code>\usetypescript[berry][ec]</code> or<br />
<code>\usetypescript[adobekb][ec]</code>.<br />
<br />
* [[Simple Typescript Example]]<br />
* [[Example with normal and condensed font variants]]<br />
<br />
== Conclusion ==<br />
<br />
There are many other ways of choosing font styles in ConTeXt. If these<br />
basic styles do not satisfy your needs, have a look at the [[Manuals|manuals]],<br />
or ask on the [[ConTeXt Mailing Lists]].<br />
<br />
[[Category:Fonts]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21359User talk:Zenlima2012-12-17T01:14:43Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
'''Open for discussion :-)'''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Simple===<br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
Expected formular number: (1.3) and list entry (1.3) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[sublevel={.3},reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2), (2.a), nothing and (3); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff", (2.a) -> "Great piece" and (3) -> "Last part"<br />
<br />
<texcode><br />
\placenamedformula[reference={eq:ax=b},listlabel={System of stuff}]<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\NC \NC \eq i \NR[listlabel={Last part}]<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
<br />
===eqalignno===<br />
<br />
Expected formular numbers (1), (1a), (1.c) and (2); reference on (2); list entries (1.c) -> "Yea!" and (2) -> "Ups"<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber[sublevel={a}]\cr<br />
a^2 + b^2 &= c^2 &\formulanumber[sublevel={.c},listlabel={Yea!}] \cr<br />
d^2 &= e^2 &\formulanumber[listlabel={Ups},reference={eq:ups}]\cr}<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Summary===<br />
<br />
All three commands:<br />
* \NR<br />
* \placeformula<br />
* \formualanumber <br />
will share the same attributes:<br />
* sublevel (maybe better: formulalevel or just level?)<br />to define and concrete the (sub-)level of the formula<br />
* listlabel (maybe textlabel? the numberlabel is still needed)<br /> to add a entry in the list of formulas<br />
* reference<br />just a classic reference in order to link to it<br />
so that the syntax is more intuitive during writing.<br />
<br />
Also. this way the commands:<br />
* placesubformula<br />
* placenamedformula<br />
* placenamedsubformula<br />
* startstopsubformulas<br />
* subformulanumber<br />
will become needless.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21358User talk:Zenlima2012-12-17T01:00:59Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
'''Open for discussion :-)'''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Simple===<br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
Expected formular number: (1.3) and list entry (1.3) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[sublevel={.3},reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2), (2.a), nothing and (3); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff", (2.a) -> "Great piece" and (3) -> "Last part"<br />
<br />
<texcode><br />
\placenamedformula[reference={eq:ax=b},listlabel={System of stuff}]<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\NC \NC \eq i \NR[listlabel={Last part}]<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
<br />
===eqalignno===<br />
<br />
Expected formular numbers (1), (1a), (1.c) and (2); reference on (2); list entries (1.c) -> "Yea!" and (2) -> "Ups"<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber[sublevel={a}]\cr<br />
a^2 + b^2 &= c^2 &\formulanumber[sublevel={.c},listlabel={Yea!}] \cr<br />
d^2 &= e^2 &\formulanumber[listlabel={Ups},reference={eq:ups}]\cr}<br />
\stopformula<br />
</texcode><br />
<br />
<br />
===Summary===<br />
<br />
All three commands:<br />
* \NR<br />
* \placeformula<br />
* \formualanumber <br />
share the same attributes:<br />
* sublevel (maybe better: formulalevel or just level?)<br />to define and concrete the (sub-)level of the formula<br />
* listlabel (maybe textlabel? the numberlabel is still needed)<br /> to add a entry in the list of formulas<br />
* reference<br />just a classic reference in order to link to it<br />
so that the syntax is more intuitive during writing.<br />
<br />
Also. this way the commands:<br />
* placesubformula<br />
* placenamedformula<br />
* placenamedsubformula<br />
* startstopsubformulas<br />
* subformulanumber<br />
will become needless.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21357User talk:Zenlima2012-12-17T00:51:05Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
''In progress...''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Simple===<br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Expected formular number: (1) and list entry (1) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
<br />
Expected formular number: (1.3) and list entry (1.3) -> "Der einfache Test"<br />
<br />
<texcode><br />
\placeformula[sublevel={.3},reference={one},listlabel={Der einfache Test}]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2), (2.a), nothing and (3); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff", (2.a) -> "Great piece" and (3) -> "Last part"<br />
<br />
<texcode><br />
\placenamedformula[reference={eq:ax=b},listlabel={System of stuff}]<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\NC \NC \eq i \NR[listlabel={Last part}]<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
===eqalignno===<br />
<br />
Expected formular numbers (1), (1a), (1.c) and (2); reference on (2); list entries (1.c) -> "Yea!" and (2) -> "Ups"<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber[sublevel={a}]\cr<br />
a^2 + b^2 &= c^2 &\formulanumber[sublevel={.c},listlabel={Yea!}] \cr<br />
d^2 &= e^2 &\formulanumber[listlabel={Ups},reference={eq:ups}]\cr}<br />
\stopformula<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21356User talk:Zenlima2012-12-17T00:39:45Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
''In progress...''<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2) and (2.a); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff" and (2.a) -> "Great piece"<br />
<br />
<texcode><br />
\placenamedformula[eq:ax=b]{System of stuff}<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21355User talk:Zenlima2012-12-17T00:35:26Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* simple, block and eqalignno<br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2) and (2.a); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff" and (2.a) -> "Great piece"<br />
<br />
<texcode><br />
\placenamedformula[eq:ax=b]{System of stuff}<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21354User talk:Zenlima2012-12-17T00:29:46Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''<br />
<br />
==Suggestion for new syntax==<br />
<br />
The needs out of existing syntax and my personal experience:<br />
* formulas and subformulas in the same block<br />
* referencing on a subformula does not include automaticly a entry in the list of formulas<br />
* <br />
<br />
===Block notation: NR===<br />
<br />
No specific values -> [+] otherwise classic attribute/value [...]<br />
<br />
Expected numbers: (1.a), nothing, (1.b), (2) and (2.a); with reference on (1) and (1.b); with list entries of (1) -> "System of stuff" and (2.a) -> "Great piece"<br />
<br />
<texcode><br />
\placenamedformula[eq:ax=b]{System of stuff}<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[sublevel={.a}]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[reference={eq:sub},sublevel={.b}]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[listlabel={Great piece},sublevel={.a}]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21353User talk:Zenlima2012-12-16T23:35:40Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<texcode><br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Math/Display&diff=21348Math/Display2012-12-16T21:23:12Z<p>Zenlima: </p>
<hr />
<div>< [[Math]]|<br />
<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="fontsize: 1.3em; fontweight: bold">Warning!</div><br />
If you consider using ConTeXt for a paper with a proper formula numbering please wait until it is implemented in mkiv. At the moment only a very limited formula numbering is possilbe:<br />
* number formula(s) with a plain number<br />
* number formula(s) with a subnumber<br />
Not possible is at the moment:<br />
* Table of formulas<br />
* Named subformulas<br />
* Mixure of formulas and subformulas in one block<br />
* Reference on a (sub-)formula without having it listed in the Table of formulas<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Summary of formula numbering problem].<br />
</div><br />
<br />
<br />
= Display Math =<br />
<br />
Display math is enclosed in a {{cmd|startformula}} / {{cmd|stopformula}} pair. Thus <br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
The famous result (once more) is given by<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
</td><td><br />
This, when typeset, produces the following:<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
The famous result (once more) is given by<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
= Numbering Formulae =<br />
<br />
ConTeXt provides an easy way to number the display maths equations. Simply, put {{cmd|placeformula}} before {{cmd|startformula}} and you will get numbered equations. Thus,<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
The famous result (once more) is given by<br />
\placeformula<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
</td><td><br />
This, when typeset, produces the following:<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
The famous result (once more) is given by<br />
\placeformula<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
The {{cmd|placeformula}} command is optional, and produces the equation number; leaving it off produces an unnumbered equation.<br />
<br />
== Changing format of numbers ==<br />
You can use {{cmd|setupformulas}} to change the format of numbers. For example to get bold numbers inside square brackets use<br />
<br />
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%"><br />
<texcode><br />
\setupformulas[left={[},right={]},numberstyle=bold]<br />
</texcode><br />
</td><br />
<br />
<td>which gives<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
\setupformulas[left={[},right={]},numberstyle=bold]<br />
The famous result (once more) is given by<br />
\placeformula<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
To get equations also numbered by section, add the command:<br />
<texcode><br />
\setupnumber[formula][way=bysection] <br />
</texcode><br />
To the start of your document.<br />
<br />
To get alphabets instead of numbers, use<br />
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%"><br />
<texcode><br />
\setupformulas[conversion=Character]<br />
</texcode><br />
</td><br />
<td>which gives<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
\setupformulas[conversion=Character]<br />
\placeformula<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
== Changing Formula alignment ==<br />
<br />
Normally a formula is centered, but in case you want to align it left or right, you can set up formulas to behave<br />
that way. Normally a formula will adapt its left indentation to the environment:<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
This is a bit of text for purpose of example.\epar<br />
\startitemize<br />
\item This is some other example text.\epar<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
\item This is yet other example text.\epar<br />
\stopitemize<br />
This is a bit more text for other purpose of example.\epar<br />
</context><br />
<br />
In the next examples we explicitly align formulas to the left ({{cmd|raggedleft}}), center and right ({{cmd|raggedright}}):<br />
<br />
<context source="yes" text="Or in print:"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\setupformulas[align=left]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=middle]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=right]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
With formula numbers the code is:<br />
<br />
<context source="yes" text="And the formulas look like:"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\setupformulas[align=left]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=middle]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=right]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
When tracing is turned on ({{cmd|tracemathtrue}}) you can visualize the bounding box of the formula,<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\tracemathtrue<br />
\setupformulas[align=left]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=middle]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
\setupformulas[align=right]<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
As you can see, the dimensions are the natural ones, but if needed you can force a normalized line:<br />
<br />
<context source="yes" text="This time we get a more spacy result. [Ed. Note: For this example equation, there appears to be no visible change.]"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\setupformulas[align=middle,strut=yes]<br />
\tracemathtrue<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
We will now show a couple of more settings and combinations of settings. In centered formulas, the number takes no space<br />
<br />
<context source="yes"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\tracemathtrue<br />
\setupformulas[align=middle]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
You can influence the placement of the whole box with the parameters <tt>leftmargin</tt> and <tt>rightmargin</tt>.<br />
<br />
<context source="yes"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
Some example text, again, to show where the right and left margins of the text block are.<br />
\tracemathtrue<br />
\setupformulas[align=right,leftmargin=3em]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
<br />
\setupformulas[align=left,rightmargin=1em]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
You can also inherit the margin from the environment.<br />
<br />
<context source="yes"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
Some example text, again, to show where the right and left margins of the text block are.<br />
\tracemathtrue<br />
\setupformulas[align=right,margin=standard]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
The distance between the formula and the number is only applied when the formula is left or right aligned.<br />
<br />
<context source="yes"><br />
\setuppapersize[A5]<br />
\setuplayout[textwidth=8cm]<br />
\tracemathtrue<br />
\setupformulas[align=left,distance=2em]<br />
\startformula c^2 = a^2 + b^2 \stopformula<br />
\placeformula \startformula c^2 = a^2 + b^2 \stopformula<br />
</context><br />
<br />
= Referencing formulae =<br />
Equations can be referred to by simply adding a label to {{cmd|placeformula}} and using {{cmd|ref}} to create the reference:<br />
<br />
<table width="100%" cols="2" cellpadding="5"><tr valign="top"><td width="50%"><br />
<texcode><br />
The famous result (and again) is given by<br />
\placeformula[formulalabel]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
And now we can refer to formula \ref[][formulalabel].<br />
</texcode><br />
</td><td><br />
This, when typeset, produces the following:<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
The famous result (and again) is given by<br />
\placeformula[formulalabel]<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
<br />
And now we can refer to formula \ref[][formulalabel].<br />
</context><br />
</td></tr></table><br />
<br />
Note, that {{cmd|ref}} expects two arguments, therefore you need the brackets twice.<br />
<br />
By default, only the formula number appears as a reference. This can be changed by using {{cmd|definereferenceformat}}. For example, to create a command <code>\eqref</code> which shows the formula number in brackets, use<br />
<texcode><br />
\definereferenceformat[eqref][left=(,right=)]<br />
</texcode><br />
See [[References]] for more examples of {{cmd|definereferenceformat}}.<br />
<br />
=Sub-Formula Numbering=<br />
<br />
== Automatic Sub-Formula Numbering ==<br />
<br />
To use subformula numbering, you can use {{cmd|startsubformulas}}/{{cmd|stopsubformulas}}. For example<br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
Examples:<br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
\stopsubformulas<br />
Formula (\in[eq:1]) states <br />
the Pythagora's Theorem twice,<br />
once in (\in[eq:first]) and <br />
again in (\in[eq:second]).<br />
</texcode><br />
</td><td><br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
Examples:<br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
\stopsubformulas<br />
Formula (\in[eq:1]) states the Pythagora's Theorem twice, once in (\in[eq:first]) and again in (\in[eq:second]).<br />
</context><br />
</td></tr></table><br />
<br />
<br />
== The Manual Method ==<br />
<br />
Sometimes, you need more fine grained control over numbering of subformulas. In that case one can make use of the optional agument of {{cmd|placeformula}} command and the related {{cmd|placesubformula}} commands which can be used to produce sub-formula numbering. For example:<br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
Examples:<br />
\placeformula{a}<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
<br />
\placesubformula{b}<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
</texcode><br />
</td><td><br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
Examples:<br />
\placeformula{a}<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
<br />
\placesubformula{b}<br />
\startformula<br />
c^2 = a^2 + b^2<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
What's going on here is simpler than it might appear at first glance. Both {{cmd|placeformula}} and {{cmd|placesubformula}} produce equation numbers with the optional tag added at the end; the sole difference is that the former increments the equation number first, while the latter does not (and thus can be used for the second and subsequent formulas that use the same formula number but presumably have different tags).<br />
<br />
This is sufficient for cases where the standard ConTeXt equation numbers suffice, and where only one equation number is needed per formula. However, there are many cases where this is insufficient, and {{cmd|placeformula}} defines {{cmd|formulanumber}} and {{cmd|subformulanumber}} commands, which provide hooks to allow the use of ConTeXt-managed formula numbers with plain TeX equation numbering. These, when used within a formula, simply return the formula number in properly formatted form, as can be seen in this simple example with plain TeX's {{cmd|eqno}}. Note that the optional tag is inherited from {{cmd|placeformula}}.<br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
More examples:<br />
\placeformula{c}<br />
\startformula<br />
\let\doplaceformulanumber\empty<br />
c^2 = a^2 + b^2 \eqno{\formulanumber}<br />
\stopformula<br />
</texcode><br />
</td><td><br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
More examples:<br />
\placeformula{c}<br />
\startformula<br />
\let\doplaceformulanumber\empty<br />
c^2 = a^2 + b^2 \eqno{\formulanumber}<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
In order for this to work properly, we need to turn off ConTeXt's automatic formula number placement; thus the {{cmd|let}} command to empty {{cmd|doplaceformulanumber}}, which must be placed <em>after</em> the start of the formula. In many practical examples, however, this is not necessary; ConTeXt redefines {{cmd|displaylines}} and {{cmd|eqalignno}} to do this automatically.<br />
<br />
For more control over sub-formula numbering, {{cmd|formulanumber}} and {{cmd|subformulanumber}} have an optional argument parallel to that of {{cmd|placeformula}}, as demonstrated in this use of plain TeX's {{cmd|eqalignno}}, which places multiple equation numbers within one formula.<br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
</td><td><br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
Note that both {{cmd|formulanumber}} and {{cmd|subformulanumber}} can be used within the same formula, and the formula number is incremented as expected. Also, if an optional argument is specified in both {{cmd|placefigure}} and {{cmd|formulanumber}}, the latter takes precedence.<br />
<br />
<table width="100%" cols="2"><tr valign="top"><td width="50%"><br />
<texcode><br />
More examples for left-located equation number:<br />
\setupformulas[location=left]<br />
\placeformula{d}<br />
\startformula<br />
\let\doplaceformulanumber\empty<br />
c^2 = a^2 + b^2 \leqno{\formulanumber}<br />
\stopformula<br />
and<br />
\placeformula<br />
\startformula<br />
\leqalignno{c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{b} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
</td><td><br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=8cm]<br />
More examples for left-located equation no.:<br />
\setupformulas[location=left]<br />
\placeformula{d}<br />
\startformula<br />
\let\doplaceformulanumber\empty<br />
c^2 = a^2 + b^2 \leqno{\formulanumber}<br />
\stopformula<br />
and<br />
\placeformula<br />
\startformula<br />
\leqalignno{c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{b} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</context><br />
</td></tr></table><br />
<br />
-- 23:46, 15 Aug 2005 (CEST) Prinse Wang<br />
<br />
=List of Formulas=<br />
<br />
You can have a list of the formulas contained in a document by using {{cmd|placenamedformula}} instead of {{cmd|placeformula}}. Only the formulas written with {{cmd|placenamedformula}} are not put in the list, so that you can control precisely the content of the list.<br />
<br />
{{cmd|placenamedformula}} takes as first parameter the name of the formula put in the list. The other {{cmd|placeformula}} features are still available. The list can be formatted like any other list.<br />
<br />
Example:<br />
<texcode><br />
\subsubject{List of Formulas}<br />
\placelist[formula][criterium=text,alternative=c]<br />
<br />
\subsubject{Formulas}<br />
\placenamedformula[one]{First listed Formula}<br />
\startformula a = 1 \stopformula \endgraf<br />
<br />
\placeformula<br />
\startformula a = 2 \stopformula \endgraf<br />
<br />
\placenamedformula{Second listed Formula}{b}<br />
\startformula a = 3 \stopformula \endgraf<br />
</texcode><br />
<br />
Gives:<br />
<br />
<context><br />
\setuppapersize[A5]<br />
\setuplayout[width=13cm]<br />
\subsubject{List of Formulas}<br />
\placelist[formula][criterium=text,alternative=c]<br />
<br />
\subsubject{Formulas}<br />
\placenamedformula[one]{First listed Formula}<br />
\startformula a = 1 \stopformula \endgraf<br />
<br />
\placeformula<br />
\startformula a = 2 \stopformula \endgraf<br />
<br />
\placenamedformula{Second listed Formula}{b}<br />
\startformula a = 3 \stopformula \endgraf<br />
</context><br />
<br />
= Shaded background for part of a displayed equation =<br />
(see also [[Framed]])<br />
<br />
To highlight part of a formula, you can give it a gray background using {{cmd|mframed}}:<br />
<br />
<context source="yes"><br />
\setuppapersize[A5]<br />
\setupcolors[state=start]<br />
\def\graymath{\mframed[frame=off,<br />
background=color,<br />
backgroundcolor=gray,<br />
backgroundoffset=3pt]}<br />
<br />
\startformula<br />
\ln (1+x) =\, \graymath{x - {x^2\over2}} \,+ {x^3\over3}-\cdots.<br />
\stopformula<br />
</context></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21347User talk:Zenlima2012-12-16T21:21:06Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
===align - subformular [+]===<br />
<br />
Expected numbers: (1.a), (1.b), (1.c), (1.d) and reference on (1) and (1.b)<br />
<br />
\startsubformulas[eq:ax=b]<br />
\placeformula<br />
\startformula \startalign<br />
\NC a \NC \eq b \NR[+]<br />
\NC c \NC \neq d \NR<br />
\NC \NC \neq f \NR[eq:sub]<br />
\NC \NC \geq g \NR[+]<br />
\NC \NC \leq h \NR[+]<br />
\NC \NC \eq i \NR<br />
\stopalign \stopformula<br />
\stopsubformulas<br />
<br />
Result: (1.a), (1.b), (1.c), (1.d) -> '''Works'''.<br />
<br />
BUT: Every formula with a reference is automatic listed in the table of formulas (nameless) - at the moment there is no possiblity to have a reference without listing the formula.<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21346User talk:Zenlima2012-12-16T21:17:08Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
===formula===<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
===align - formular [+]===<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
===eqalignno - formula===<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
===List of formulas===<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
===subformula===<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - formula (subformulas->formulas->formula)===<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
===align - subformula===<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
===eqalignno - subformula===<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21345User talk:Zenlima2012-12-16T21:15:11Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==What works==<br />
<br />
==formula==<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
==align - formular [+]==<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
==eqalignno - formula==<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==What does not work==<br />
<br />
<br />
==List of formulas==<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. Needs more investigation once some of the named formulas constructions are fixed.<br />
<br />
<br />
==subformula==<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
==align - formula==<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
==align - subformula==<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
==eqalignno - subformula==<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Math&diff=21344Math2012-12-16T21:03:42Z<p>Zenlima: Added warning to prevent frustration</p>
<hr />
<div>< [[Main Page]] | [[Math with newmat]] | [[MathML]] | [[Math_structures]]><br />
<br />
== Introduction ==<br />
<br />
<div style="border: 3px solid red; background: #ffaaaa; padding: 0.4em;"><br />
<div style="fontsize: 1.3em; fontweight: bold">Warning!</div><br />
If you consider using ConTeXt for a paper with a proper formula numbering please wait until it is implemented in mkiv. At the moment only a very limited formula numbering is possilbe:<br />
* number formula(s) with a plain number<br />
* number formula(s) with a subnumber<br />
Not possible is at the moment:<br />
* Table of formulas<br />
* Named subformulas<br />
* Mixure of formulas and subformulas in one block<br />
* Reference on a (sub-)formula without having it listed in the Table of formulas<br />
For more details and actual state see mailing list and [http://wiki.contextgarden.net/User_talk:Zenlima Summary of formula numbering problem].<br />
</div><br />
<br />
TeX was designed for ease of typesetting books that contained mathematics. As ConTeXt is built on top of TeX, it inherits all those features. In addition to these, ConTeXt adds lot of macros to make the typesetting of mathematics easier.<br />
<br />
There are '''two''' kinds of '''math modes''' --- '''inline math and display math'''. Mathematical expressions that are written with the running text are called inline math; while mathematical expressions that break the flow of the text (such as formulas or equations) are called display math. TeX takes care of proper spacing around expressions and provides macros to typeset most mathematical constructs.<br />
Complicated expressions can be built by working in steps---break down the expression into sub-expressions, build the sub-expressions and then combine them to get the complicated expression.<br />
<br />
The basics of typesetting math in ConTeXt is explained here.<br />
<br />
=== Display math mode ===<br />
Type<br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
to get display math mode.<br />
<br />
=== Inline math mode ===<br />
There are three equivalent commands to get inline math mode:<br />
<br />
<texcode><br />
$ ... $<br />
\math{ ... }<br />
\mathematics{ ... }<br />
</texcode><br />
<br />
=== Note to Plain TeX Users ===<br />
ConTeXt is plain TeX compatible. So, if you have any old document written in plain TeX, it will work with ConTeXt. This does not mean that you will get pixel by pixel identical output with ConTeXt. For inline math, everything that you learnt for plain TeX is also true for ConTeXt. However, display math is significantly different. '''Do not use <code>$$ .... $$</code>''' to write display math formulas in ConTeXt, since you will not get the correct spacing around the formulas. Instead use <br />
<br />
<texcode><br />
\startformula ... \stopformula<br />
</texcode><br />
<br />
See [[Math/Display]] for more details on how to use display math in ConTeXt.<br />
<br />
=== Note to AMSTeX/LaTeX Users ===<br />
ConTeXt offers almost all the features that are present in AMSTeX and LaTeX. However, ConTeXt syntax is different. See this [http://dl.contextgarden.net/myway/context-latex-math.pdf My Way] for how to 'translate' from amsmath syntax to ConTeXt syntax. [[LaTeX_Math_in_ConTeXt]] gives some brief ideas on how to get the LaTeX syntax to run in ConTeXt.<br />
<br />
== The details ==<br />
<br />
=== Math symbols ===<br />
* [[Math/basic | How to input math]] (binary relations, greek letters, subscripts and superscripts)<br />
* Accents<br />
* underbrace, overbrace<br />
* [[Math/fractions | Fractions, Binomials, genfrac, continued fractions.]]<br />
* Delimiters (big, bigg, left, middle, right)<br />
* Integrals and Sums<br />
* ([[Math/functions|Log like]]) functions<br />
* dots<br />
* [[Multiline_equations#Cases|Cases]], matrices, bordermatrix<br />
* Arrows (see [http://dl.contextgarden.net/myway/matharrows.pdf Math Arrows])<br />
* [[Vectors]]<br />
* [[Product integral]]<br />
<br />
=== Display Math ===<br />
* [[Math/Display | Formula, formula number]]<br />
* [[Multiline equations]] (see [http://dl.contextgarden.net/myway/mathalign.pdf Using \mathalign and friends])<br />
* Math sub-alignment<br />
* [[Math spacing]]<br />
<br />
==Math Fonts==<br />
<br />
''See [[Math fonts]]'' for the main article about this subject.<br />
<br />
== Other Methods ==<br />
* There are two different math modules on [http://dante.ctan.org/tex-archive/macros/context/contrib/maths/ CTAN], [[Math with nath|nath]] and [[Math with amsl|amsl]]. And there's a [[Math with newmat|new math]] module in the distribution.<br />
* Context now has inbuilt support for [[Multiline equations]]<br />
* It is also possible to use most [[LaTeX Math in ConTeXt|LaTeX equations in ConTeXt]] with a relatively small set of supporting definitions.<br />
* The "native" ConTeXt way of math is [[MathML]], an application of [[XML]] - rather verbose but mighty.<br />
<br />
==Science==<br />
* Esp. for physics there’s the [[Units]] module.<br />
* Additions to [[MathML]] are PhysML and ChemML.<br />
* [[Chemistry]]<br />
* There's a module for chemical structure formulae: [[Chemistry|PPCHTeX]] (works also with LaTeX).<br />
<br />
==Number Formatting==<br />
There's a special command, <cmd>digits</cmd>, with its own manual about formatting numbers, see [http://www.pragma-ade.com/general/magazines/mag-0003.pdf Pasting digits together]<br />
<br />
==Evaluating expressions in ConTeXt==<br />
(i.e. ''doing'' math)<br />
* See also [[Expressions]].<br />
<br />
[[Category:Math]]</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21343User talk:Zenlima2012-12-16T18:47:46Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering - subnumbers and list of formulas=<br />
<br />
''All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==List of formulas==<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. <br />
<br />
<br />
==formula==<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
<br />
==subformula==<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
==align - formula==<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
==align - subformula==<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
==eqalignno - formula==<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==eqalignno - subformula==<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=21342User talk:Zenlima2012-12-16T18:47:13Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug: Formula numbering=<br />
<br />
''All following example have following frame:<br />
<br />
<texcode><br />
\usemodule[newmath]<br />
<br />
\setupformulas[way=bytext,prefix=no]<br />
\setupsubformulas[conversion=romannumerals]<br />
<br />
\starttext<br />
...(example placed here)...<br />
\stoptext<br />
</texcode><br />
<br />
<br />
==List of formulas==<br />
<br />
<texcode><br />
\placelist[formula][criterium=all,alternative=c]<br />
</texcode><br />
<br />
The list of formulas seems to be totally out of order. Strange numbering and missing names. <br />
<br />
<br />
==formula==<br />
<br />
Expected formular number: (1)<br />
<br />
<texcode><br />
\placenamedformula[one]{Der einfache Test}<br />
\startformula<br />
c^2 = a^2 + b^2.<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) -> '''Works'''<br />
<br />
<br />
==subformula==<br />
<br />
Expected formular numbers: (1a) and (1b)<br />
<br />
<texcode><br />
\startsubformulas[eq:1]<br />
\placeformula[eq:first]<br />
\startformula<br />
PM \xrightarrow R_{PM} \xrightarrow PM<br />
\stopformula<br />
<br />
\placeformula[eq:second]<br />
\startformula<br />
R_{PM} = \{ K, F, Z, U, I, J\}<br />
\stopformula<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: (1a) and nothing -> '''Does not work.'''<br />
<br />
<br />
==align - formula==<br />
<br />
Expected formular numbers: (1a) and (1a) and a reference to formular (1b)<br />
<br />
<texcode><br />
\startsubformulas<br />
\startformulas<br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[a]<br />
\stopalign<br />
\stopformula<br />
\stopformulas<br />
\stopsubformulas<br />
</texcode><br />
<br />
Result: nothing and nothing -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1) and (2)<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Works'''<br />
<br />
<br />
==align - subformula==<br />
<br />
Expected formular numbers: (1.1), (1.2) and (1.c) plus reference on (1.1) and (1.2)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+][c]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2) and (3) -> '''Does not work.'''<br />
<br />
<br />
Expected formular numbers: (1a) and (1b) plus reference on (1a) and (1b)<br />
<br />
<texcode><br />
\placesubformula<br />
\startformula<br />
\startalign[n=3, align={right,middle,left}]<br />
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]<br />
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][]<br />
\stopalign<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1) and (2) -> '''Does not work.'''<br />
<br />
<br />
==eqalignno - formula==<br />
<br />
Taken from wiki and removed the subformulanumber. Expected formular numbers: (1), (2), (3) and (4):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\formulanumber\cr<br />
a^2 + b^2 &= c^2 &\formulanumber \cr<br />
d^2 &= e^2 &\formulanumber \cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: (1), (2), (3) and (4) -> '''Works'''<br />
<br />
<br />
==eqalignno - subformula==<br />
<br />
Directly taken form wiki. Expected formular numbers (1), (1a), (1b) and (2):<br />
<br />
<texcode><br />
\placeformula<br />
\startformula<br />
\eqalignno{<br />
c^2 &= a^2 + b^2 &\formulanumber{a} \cr<br />
c &= \left(a^2 + b^2\right)^{\vfrac{1}{2}} &\subformulanumber{b}\cr<br />
a^2 + b^2 &= c^2 &\subformulanumber{c} \cr<br />
d^2 &= e^2 &\formulanumber\cr}<br />
\stopformula<br />
</texcode><br />
<br />
Result: Does not compile Does as the command type{subformularnumber} is unknown -> '''Does not work.'''</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20997Simple Bibliography2012-11-03T22:45:43Z<p>Zenlima: </p>
<hr />
<div>Sometimes the bibliography needs to be more flexible in the bibliographic item description. Often the aviable data does not fit into the Bibtex schema; or text needs to be written inside the bibliography list. For this case exists the module simplebib.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[reference=,label=,author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[reference=bpf,label={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
If the label should be numbered automaticly just remove the <code>label</code> attribute of the <code>\bibitem</code> entity.<br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
To adjust the space for the bibitem labels you can specify the:<br />
<br />
* <code>labelSpace</code> with a natural number (the default is 12).<br />
<br />
They are defined as parameters of the module:<br />
<br />
<texcode><br />
\usemodule[crossref][labelSpace=...]<br />
...<br />
</texcode><br />
<br />
Depending on label definition or label numbering a text left and right of the label can be defined via <code>labelLeft</code> and <code>labelRight</code>. If brackets are needed they can be set with:<br />
<br />
<texcode><br />
\setupsimplebibtext[labelLeft={[}]<br />
\setupsimplebibtext[labelRight={]}]<br />
</texcode><br />
<br />
The language depending texts can be set via:<br />
<br />
<texcode><br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volume={volume}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volume={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20996Simple Bibliography2012-11-03T22:35:53Z<p>Zenlima: </p>
<hr />
<div>Sometimes the bibliography needs to be more flexible in the bibliographic item description. Often the aviable data does not fit into the Bibtex schema; or text needs to be written inside the bibliography list. For this case exists the module simplebib.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
To adjust the space for the bibitem labels you can specify the:<br />
<br />
* <code>labelSpace</code> with a natural number (the default is 12).<br />
<br />
They are defined as parameters of the module:<br />
<br />
<texcode><br />
\usemodule[crossref][labelSpace=...]<br />
...<br />
</texcode><br />
<br />
Depending on label definition or label numbering a text left and right of the label can be defined via <code>labelLeft</code> and <code>labelRight</code>. If brackets are needed they can be set with:<br />
<br />
<texcode><br />
\setupsimplebibtext[labelLeft={[}]<br />
\setupsimplebibtext[labelRight={]}]<br />
</texcode><br />
<br />
The language depending texts can be set via:<br />
<br />
<texcode><br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volume={volume}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volume={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20995Simple Bibliography2012-11-03T21:46:37Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
his bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
labelspace=12<br />
<br />
<texcode><br />
\setupsimplebibtext[labelLeft={[}]<br />
\setupsimplebibtext[labelRight={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volume={volume}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volume={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20994Simple Bibliography2012-11-03T21:40:35Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
labelspace=12<br />
<br />
<texcode><br />
\setupsimplebibtext[labelLeft={[}]<br />
\setupsimplebibtext[labelRight={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volumne={volume}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volumne={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20990Simple Bibliography2012-11-03T15:34:51Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
labelspace=12<br />
<br />
<texcode><br />
\setupsimplebibtext[labelLeft={[}]<br />
\setupsimplebibtext[labelRight={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volumne={volumne}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volumne={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20989Simple Bibliography2012-11-03T15:10:31Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[reference=brk,label={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[reference=bpf,label={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
<br />
\stopbibliography<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
labelspace=12<br />
<br />
<texcode><br />
\setupsimplebibtext[listBracketOpen={[}]<br />
\setupsimplebibtext[listBracketClose={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volumne={volumne}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volumne={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20988Simple Bibliography2012-11-02T11:46:19Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter):<br />
<br />
<texcode><br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
<br />
\startbibliography<br />
...<br />
\stopbibiography<br />
<br />
...<br />
</texcode><br />
<br />
Inside the bibliography environment you can specify bibliographic items via <code>\bibitem</code>.<br />
<br />
<texcode><br />
\bibitem[author=,editor=,year=,title=,in=,number=,series=,volume=,magazine=,edition=,revedition=,datedition=,publisher=,place=,isbn=,url=,pages=,access=]<br />
</texcode><br />
<br />
Most attributes should be self explaining. A speciality is the <code>in</code> attribute. Often you have to cite an article that is published in a journal, compendium etc. So you use the "normal" attributes to specify the article and via the <code>in</code> attribute you specify the book with the same attributes inside:<br />
<br />
<texcode><br />
\bibitem[key=bpf,abbr={BüPrFr},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\usemodule[simplebib]<br />
<br />
\starttext<br />
<br />
\bibref[brk]<br />
\bibref[detail={p. 275}][bpf]<br />
<br />
\starttext<br />
\startbibliography<br />
<br />
\bibitem[key=brk,abbr={Brk\-01},author={Brinker, Klaus},year={2001},title={Linguistische Textanalyse: Eine Einführung in Grundbegriffe und Methoden},series={Grundlagen der Germanistik},volume={29},revedition={5},publisher={Schmidt Verlag},place={Berlin},isbn={3-503-04995-9}]<br />
<br />
\bibitem[key=bpf,abbr={BüPrFr\-98},author={Büchel, Christian; Price, Cathy J und Friston, Karl},year={1998},title={A multimodal language region in the ventral visual pathway},in={{title=Nature},volume={394},pages={274-277}}]<br />
</texcode><br />
<br />
\stopbibliography<br />
\stoptext<br />
<br />
==Settings==<br />
<br />
[itemspace=12]<br />
<br />
<br />
<texcode><br />
\setupsimplebibtext[listBracketOpen={[}]<br />
\setupsimplebibtext[listBracketClose={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volumne={volumne}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volumne={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20987Simple Bibliography2012-11-02T10:08:22Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter). <br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the [[Cross Referencing|crossref]] module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossref</code> with <code>type=external</code> preset.<br />
<br />
So in following example both blocks do the same:<br />
<br />
<texcode><br />
\bibref[ref1]<br />
\bibref[detail={p. 38}][ref1]<br />
<br />
\crossref[type=external][ref1]<br />
\crossref[type=external,detail={p. 38}][ref1]<br />
</texcode><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
<br />
<br />
</texcode><br />
<br />
==Settings==<br />
<br />
[itemspace=12]<br />
<br />
<br />
<texcode><br />
\setupsimplebibtext[listBracketOpen={[}]<br />
\setupsimplebibtext[listBracketClose={]}]<br />
<br />
\setupsimplebibtext[en][editor={ed.}]<br />
\setupsimplebibtext[en][number={number}]<br />
\setupsimplebibtext[en][fromSeries={from series}]<br />
\setupsimplebibtext[en][volumne={volumne}]<br />
\setupsimplebibtext[en][magazine={magazine}]<br />
\setupsimplebibtext[en][edition={edition}]<br />
\setupsimplebibtext[en][revedition={reviewed edition}]<br />
\setupsimplebibtext[en][datedition={edition from}]<br />
\setupsimplebibtext[en][isbn={ISBN}]<br />
\setupsimplebibtext[en][pages={p.}]<br />
\setupsimplebibtext[en][access={last access}]<br />
\setupsimplebibtext[en][in={in}]<br />
<br />
\setupsimplebibtext[de][editor={Hrsg.}]<br />
\setupsimplebibtext[de][number={Nummer}]<br />
\setupsimplebibtext[de][fromSeries={aus der Reihe}]<br />
\setupsimplebibtext[de][volumne={Band}]<br />
\setupsimplebibtext[de][magazine={Heft}]<br />
\setupsimplebibtext[de][edition={Auflage}]<br />
\setupsimplebibtext[de][revedition={überarbeitete Auflage}]<br />
\setupsimplebibtext[de][datedition={Auflage vom}]<br />
\setupsimplebibtext[de][isbn={ISBN}]<br />
\setupsimplebibtext[de][pages={S.}]<br />
\setupsimplebibtext[de][access={letzter Zugriff}]<br />
\setupsimplebibtext[de][in={in}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Simple_Bibliography&diff=20986Simple Bibliography2012-11-02T03:50:04Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
Sometimes the bibliography needs to be more flexible in the bibliographic item description. For this case exists the module simplebib.<br />
<br />
But this bibliography module is more flexible than the "classic" bibliography module with its bibtex database.<br />
<br />
==Items==<br />
<br />
The bibliography can be listed in one block or distributed over several block in the document (e.g. at the end of every chapter). <br />
<br />
==Referencing==<br />
<br />
For referencing simplebib is using the crossref module. For the lazy ones it provides <code>\bibtex</code> what is nothing else than a <code>\crossred</code> with <code>type=external</code> preset.<br />
<br />
==Settings==</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Paragraph_Referencing&diff=20985Paragraph Referencing2012-11-02T00:46:16Z<p>Zenlima: </p>
<hr />
<div>The {{module|pararef}} module understands a paragraph as a full closed block of one thought. This means that inside a paragraph enumerations, formulas etc. can appear. That is why a paragraph must be defined manually via <code>\startParagraph</code> and <code>\stopParagraph</code>.<br />
<br />
==Paragraphs==<br />
<br />
Each paragraph gets numbered started by each title. In order to link to a paragraph it can be reference by the optional parameter <code>reference=...</code> as a text reference.<br />
<br />
One or more paragraphs can be summarized by a low level title which is displayed as a margin note (margin title) via the optional parameter <code>title=...</code>.<br />
<br />
<texcode><br />
\startParagraph[reference=...,title=...]<br />
...<br />
\stopParagraph<br />
</texcode><br />
<br />
Here how a single paragraph with a title looks like:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
\startParagraph[title={Paragraph heading}]<br />
\input tufte<br />
\stopParagraph<br />
\stoptext<br />
</texcode><br />
<br />
[[Image:t-pararef-1.jpg]]<br />
<br />
<br />
==References==<br />
<br />
Now the more practical part: the paragraph referencing. To reference to an paragraph the package pararef makes use of the [[Cross Referencing|crossref]] module.<br />
<br />
Here a simple usage example:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
\usemodule[crossref]<br />
<br />
\starttext<br />
<br />
\startchapter[title={Lorem ipsum}]<br />
\startsection[title={Dolor sit}]<br />
<br />
\startParagraph<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph[reference=ref1]<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph<br />
Here are two references to destinations on the same page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
Here is one references with brakets:<br />
\startitemize[nowhite]<br />
\item ref1 should be: (para. 1.1/2) and is: \crossref[left={(},right={)},label={para.}][ref1]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Amet},reference=ref2]<br />
<br />
\page<br />
<br />
\startParagraph<br />
Here are two references to destinations on an other page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 on page 1 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 on page 1 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\stopchapter<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-2.jpg]]<br />
[[File:t-pararef-3.jpg]]<br />
<br />
==Text part divider==<br />
<br />
Each section (subsection, subsubsection etc.) has mostly three parts:<br />
* introduction part,<br />
* one or several main parts and<br />
* summary part.<br />
Each part contains one or more paragraphs. To make the logic parts visible the parts are divided by a line <code>\textpartdivider</code>.<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
<br />
\startsection[title={Lorem ipsum}]<br />
\startParagraph<br />
Some introduction text \input tufte<br />
\stopParagraph<br />
<br />
\textpartdivider<br />
<br />
\dorecurse{3}{<br />
\startParagraph<br />
Some main theme text \input tufte<br />
\stopParagraph<br />
}<br />
<br />
\textpartdivider<br />
<br />
\startParagraph<br />
Some section summarizing text \input tufte<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Doloris sit}]<br />
...<br />
\stopsection<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-4.jpg]]<br />
<br />
==Settings==<br />
<br />
In pararef the colors can be set via two paramters:<br />
* <code>textpartdividerColor</code> for the color of the line and<br />
* <code>paragraphNumberColor</code> for the number of the paragraph.<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[pararef][textpartdividerColor=...,paragraphNumberColor=...]<br />
...<br />
</texcode><br />
<br />
For now the color and style of the paragraph title has to be set via the normal outer margin settings.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Paragraph_Referencing&diff=20984Paragraph Referencing2012-11-02T00:43:12Z<p>Zenlima: </p>
<hr />
<div>The {{module|pararef}} module understands a paragraph as a full closed block of one thought. This means that inside a paragraph enumerations, formulas etc. can appear. That is why a paragraph must be defined manually via <code>\startParagraph</code> and <code>\stopParagraph</code>.<br />
<br />
==Paragraphs==<br />
<br />
Each paragraph gets numbered started by each title. In order to link to a paragraph it can be reference by the optional parameter <code>reference=...</code> as a text reference.<br />
<br />
One or more paragraphs can be summarized by a low level title which is displayed as a margin note (margin title) via the optional parameter <code>title=...</code>.<br />
<br />
<texcode><br />
\startParagraph[reference=...,title=...]<br />
...<br />
\stopParagraph<br />
</texcode><br />
<br />
Here how a single paragraph with a title looks like:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
\startParagraph[title={Paragraph heading}]<br />
\input tufte<br />
\stopParagraph<br />
\stoptext<br />
</texcode><br />
<br />
[[Image:t-pararef-1.jpg]]<br />
<br />
<br />
==References==<br />
<br />
Now the more practical part: the paragraph referencing. To reference to an paragraph the package pararef makes use of the [[Cross Referencing|crossref]] module.<br />
<br />
Here a simple usage example:<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
\usemodule[crossref]<br />
<br />
\starttext<br />
<br />
\startchapter[title={Lorem ipsum}]<br />
\startsection[title={Dolor sit}]<br />
<br />
\startParagraph<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph[reference=ref1]<br />
\input tufte <br />
\stopParagraph<br />
<br />
\startParagraph<br />
Here are two references to destinations on the same page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
Here is one references with brakets:<br />
\startitemize[nowhite]<br />
\item ref1 should be: (para. 1.1/2) and is: \crossref[left={(},right={)},label={para.}][ref1]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Amet},reference=ref2]<br />
<br />
\page<br />
<br />
\startParagraph<br />
Here are two references to destinations on an other page:<br />
\startitemize[nowhite]<br />
\item ref1 should be: para. 1.1/2 on page 1 and is: \crossref[label={para.}][ref1]<br />
\item ref2 should be: sec. 1.2 on page 1 and is: \crossref[label={sec.}][ref2]<br />
\stopitemize<br />
\stopParagraph<br />
<br />
\stopsection<br />
\stopchapter<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-2.jpg]]<br />
[[File:t-pararef-3.jpg]]<br />
<br />
==Text part divider==<br />
<br />
Each section (subsection, subsubsection etc.) has mostly three parts:<br />
* introduction part,<br />
* one or several main parts and<br />
* summary part.<br />
Each part contains one or more paragraphs. To make the logic parts visible the parts are divided by a line <code>\textpartdivider</code>.<br />
<br />
<texcode><br />
\usemodule[pararef]<br />
<br />
\starttext<br />
<br />
\startsection[title={Lorem ipsum}]<br />
\startParagraph<br />
Some introduction text \input tufte<br />
\stopParagraph<br />
<br />
\textpartdivider<br />
<br />
\dorecurse{3}{<br />
\startParagraph<br />
Some main theme text \input tufte<br />
\stopParagraph<br />
}<br />
<br />
\textpartdivider<br />
<br />
\startParagraph<br />
Some section summarizing text \input tufte<br />
\stopParagraph<br />
<br />
\stopsection<br />
\startsection[title={Doloris sit}]<br />
...<br />
\stopsection<br />
\stoptext<br />
</texcode><br />
<br />
[[File:t-pararef-4.jpg]]<br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>textpartdividerColor</code> for the color of the line and<br />
* <code>paragraphNumberColor</code> for the number of the paragraph.<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[pararef][crossrefColor=...,textpartdividerColor=...,paragraphNumberColor=...]<br />
...<br />
</texcode><br />
<br />
The brakets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<br />
For now the color and style of the paragraph title has to be set via the normal outer margin settings.</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=User_talk:Zenlima&diff=20983User talk:Zenlima2012-11-01T23:57:49Z<p>Zenlima: </p>
<hr />
<div>Hi, I use this page to support my question regarding context and summarize the result. Once a problem is solved I will move that text into the "normal" wiki pages.<br />
<br />
=Bug(?): Formula numbering=<br />
<br />
(reviewing the bug atm)</div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20982Cross Referencing2012-11-01T23:35:32Z<p>Zenlima: </p>
<hr />
<div>Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>refColor</code> for the entire reference text,<br />
* <code>reffixColor</code> for the color of the prefix and suffix if different from <code>refColor</code><br />
* <code>refrefColor</code> for the detail, ref itself and ref details if different from <code>refColor</code><br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20981Cross Referencing2012-11-01T23:34:43Z<p>Zenlima: </p>
<hr />
<div>Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>refColor</code> for the entire reference text,<br />
* <code>reffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>refrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20980Cross Referencing2012-11-01T22:57:45Z<p>Zenlima: </p>
<hr />
<div>Cross references in a (academic) text are either internal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>crossreffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>crossrefrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20979Cross Referencing2012-11-01T22:56:48Z<p>Zenlima: </p>
<hr />
<div>References in a (academic) text are either interal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete examples of cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>crossreffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>crossrefrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need to add:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20978Cross Referencing2012-11-01T22:55:41Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
References in a (academic) text are either interal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete example cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
\setupcolors[state=start]<br />
<br />
\definecolor[red][r=1]<br />
\definecolor[green][g=1]<br />
\definecolor[blue][b=1]<br />
<br />
\setupinteraction[state=start,style=normal,color=red,contrastcolor=red]<br />
% color and contrastcolor must be the the final color of the refref area in crossref<br />
<br />
\usemodule[crossref][refColor=green,reffixColor=blue,refrefColor=red]<br />
<br />
\starttext<br />
<br />
\textreference[ref1]{1.1/3}<br />
<br />
Should be: 1.1/3 and is: \crossref[ref1]<br />
<br />
Should be: (Abs. 1.1/3) and is: \crossref[type=internal,left={(},label=Abs.,right={)}][ref1]<br />
<br />
Should be: [Zen12, p 23] and is: \crossref[type=external,detail={p. 23}][ref2]<br />
<br />
Should be: (nach [Zen12, S. 32-33] und weitere) and is: \crossref[type=external, left={(nach }, right={ und weitere)},detail={S. 32-33}][ref2]<br />
<br />
\textreference[ref2]{Zen12} Biblio blabla fasel<br />
<br />
\stoptext<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>crossreffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>crossrefrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={[}]<br />
\setupcrossreftext[externalSuffix={]}]<br />
\setupcrossreftext[refDetailDivider={\textcomma\space}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20977Cross Referencing2012-11-01T20:52:24Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
References in a (academic) text are either interal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete example cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>crossreffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>crossrefrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[crossref][refColor=...,reffixColor=...,refrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={\[}]<br />
\setupcrossreftext[externalSuffix={\]}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlimahttps://wiki.contextgarden.net/index.php?title=Cross_Referencing&diff=20976Cross Referencing2012-11-01T20:45:23Z<p>Zenlima: </p>
<hr />
<div><div style="color: red">Page in progress...</div><br />
<br />
References in a (academic) text are either interal (linking to an other point inside the same document) or external (linking to a entity of the bibliography that points to a different document). <br />
<br />
Here are some concrete example cross references:<br />
<br />
{| class=wikitable<br />
!"Classic" style<br />
!"New" style<br />(↑ = external link - ↗ = internal link)<br />
|-<br />
|[XYZ]<br />
|(↑XYZ) and <br />if directly addressed ↑XYZ<br />
|-<br />
|[XYZ, p. 23]<br />
|(↑XYZ, p. 23) <br />↑XYZ, p. 23,<br />
|-<br />
|[XYZ, p. 22] and [ABC, p. 22-45]<br />
|(↑XYZ, p. 22, and ↑ABC, p. 22-45)<br />
|-<br />
|<br />
|<br />
|-<br />
|<br />
|<br />
|-<br />
|Abbildung 2.2<br />
|↗Abbildung 2.2<br />
|-<br />
|Abbildung 2.2 auf Seite 23<br />
|↗Abbildung 2.2 auf Seite 23<br />
|-<br />
|(Absatz 2.4.9/12 auf Seite 23 bis 2.4.2/10 auf Seite 25)<br />
|(↗Absatz 2.4.9/12 auf Seite 23 bis ↗Absatz 2.4.2/10 auf Seite 25)<br />
|-<br />
|(siehe Abs. 3/21)<br />
|(siehe ↗Absatz 3/21)<br />
|-<br />
|(siehe Absätze 3.1/35 und 3.1/38)<br />
|(siehe Absätze ↗3.1/35 und ↗3.1/38)<br />
|-<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
This cross references have following structure in common:<br />
<br />
{|class=wikitable<br />
! left<br />
! refprefix<br />
! label<br />
! ref<br />
! detail<br />
! refsuffix<br />
! right<br />
|- valign=top<br />
| ( <br/> (siehe <br/> Absätze <br/> und <br/> bis<br />
| ↑ <br/> ↗ <br/> [<br />
| Abbildung<br/>Absatz<br/>Abs.<br />
| XYZ<br/>2.2<br/>2.2 auf Seite 23<br/>2.4.9/12 auf Seite 23<br />2.4.2/10 auf Seite 25<br/>3/21<br />
| , p. 23<br />
| ]<br />
| )<br />
|}<br />
<br />
==Referencing==<br />
<br />
For cross reference the method \crossref is created. It has follow syntax:<br />
\crossref[#2]<br />
\crossref[#1][#2]<br />
<br />
#1 type = *internal external none<br />
left = ..text..<br />
right = ..text..<br />
label = ..text..<br />
detail = ..text..<br />
<br />
#2 <reference><br />
<br />
Here a simple usage example: <br />
<br />
<texcode><br />
<br />
</texcode><br />
<br />
==Settings==<br />
<br />
Often references (or links) are printed in a different color than the normal text. In pararef the colors can be set via three paramters:<br />
* <code>crossrefColor</code> for the entire reference text,<br />
* <code>crossreffixColor</code> for the color of the prefix and suffix if different from <code>crossrefColor</code><br />
* <code>crossrefrefColor</code> for the detail, ref itself and ref details<br />
<br />
They are defined as parameters of the module:<br />
<texcode><br />
\usemodule[pararef][crossrefColor=...,crossreffixColor=...,crossrefrefColor=...]<br />
...<br />
</texcode><br />
<br />
The brackets and text part for <code>\crossref</code> can also be adjusted or extended with other languages:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={\[}]<br />
\setupcrossreftext[externalSuffix={\]}]<br />
\setupcrossreftext[cz][atpageLeft={ na straně }]<br />
\setupcrossreftext[cz][atpageRight={ }]<br />
\setupcrossreftext[de][atpageLeft={ auf Seite }]<br />
\setupcrossreftext[de][atpageRight={}]<br />
\setupcrossreftext[en][atpageLeft={ on page }]<br />
\setupcrossreftext[en][atpageRight={}]<br />
</texcode><br />
<br />
If you want to change the "classic" style of referencing to the "new" style you only need:<br />
<br />
<texcode><br />
\setupcrossreftext[internalPrefix={↗}]<br />
\setupcrossreftext[internalSuffix={}]<br />
\setupcrossreftext[externalPrefix={↑}]<br />
\setupcrossreftext[externalSuffix={}]<br />
</texcode></div>Zenlima