Changes

Jump to navigation Jump to search
3,455 bytes added ,  09:14, 6 March 2020
hint about export from output, minor enhancements
That means, you need to mark ''everything,'' from markup spans over paragraphs and enumeration items to chapters and parts with {{code|1=\start... … \stop...}}.
Also note that switches like {{cmd|em}} don’t translate into output structure, you need to {{cmd|definehighlight|2=[emph][style=italic{\em}]}} and use as {{code|1=\emph{emphasized}.}} '''Beware: The exported XML contains the structure of the ''output'', i.e. it lacks some information that might be in your code.''' E.g. {{cmd|index}} creates an empty <tt>registerlocation</tt> anchor, while the content appears in <tt>registerentry</tt> structures where you placed your index.
= More useful example =
]
\definehighlight[emph][style=italicitalicface] % use \emph{something} instead of {\em something}
\starttext
* svgstyle: maybe compression?
* cssfile: file name of ''additional'' CSS file
 
= Solutions =
 
==Missing Hyphens==
 
Problem: If you setup export, hyphen signs go missing.
 
Reason: Your font is missing a soft hyphen glyph at x00A0.
 
Workaround:
 
\enabledirectives[otf.checksofthyphen]
 
 
== Suppressing Presentation Forms in Arabic Script Fonts ==
 
As is well known, Arabic script requires contextual analysis: Given a character, it takes a different form depending on its position within a word or other continuous string of characters. Certain pre-Unicode conventions encoded each of these different forms for use in certain ancient typesetting applications. Those encodings are preserved as part of the Arabic Presentation Forms B block in Unicode (U+FE7 - U+FEF block). But this is a legacy encoding: These codepoints should <em>never</em> be used to prepare fresh Unicode documents. Rather, Arabic script characters should be encoded primarily using codepoints from the standard Arabic block (U+600-6FF). Contextual forms of these characters are called upon during OpenType processing, but they do not take separate codepoints.
 
Unfortunately, certain Arabic fonts such as Linotype Lotus – it is a staple of the Middle East publishing industry – give the contextual forms of standard Arabic-script characters Unicode names that correspond to codepoints from Arabic Presentation Forms B. This saves space in the font, and for some purposes it is innocuous. But for, e.g., ConTeXt processing, many of the original, standard codepoints in the input are replaced by presentation-form codepoints in the output. For example:
 
<texcode>مِّنَ السَّمَاءِ وَالْأَرْضِ</texcode>
 
becomes
 
<texcode>ﻣﱢﻦَ اﻟﺴﱠﻤَﺎءِ وَاﻷَْرْضِ</texcode>
 
If one looks carefully, one will see that there are errors in the output. (If one uses the font almfixed in a text editor that supports Unicode and Arabic script you will easily see the differences).
 
When exporting to XML, this issue become a serious problem, for the exported text will not use the same codepoints as the input. To get around this issue, use something along the lines of the following in your preamble:
 
<texcode>
% private typescript that combines TeX Gyre Termes for Latin with Linotype Lotus for Arabic
\usetypescriptfile[type-times-lotus]
\usetypescript[times-lotus]
 
% choose your desired features for pdf output
\definefontfeature
[lotus-default]
[mode=node,language=dflt,script=arab,
init=yes,medi=yes,fina=yes,isol=yes,
liga=no,rlig=yes,trep=yes,tlig=yes,
mark=yes,ccmp=yes]
 
% use this in export mode
 
\definefontfeature
[lotus-default]
[mode=none]
 
% setup the bodyfont last; the order is important!
\setupbodyfont[times-lotus,12pt]
</texcode>
 
So <tt>mode=none</tt> will suppress the contextual analysis, bypass the presentation-forms codepoints, and give the original input in the exported XML.
= More TODO =
= Open Issues =
as of 2014-01-20, updated 2015-08-08/-15and 2017-11-11
* FIXED <s>Structure bug: Metadata ends up within the first section instead of in front of everything</s>
* Firstpage/Lastpage (cover setup) is ignored in project structure
* Minimal example doesn’t create a cover at all
* {{cmd|color}} leaves no trace in export.
* Spacing characters like \, get lost.
* Additional commas in export of register ranges (1,–,5 instead of 1–5).
* There’s no marking of page breaks (ePub should have page break markers of the PDF for scientific quotability).

Navigation menu