https://wiki.contextgarden.net/api.php?action=feedcontributions&user=130.133.8.114&feedformat=atomWiki - User contributions [en]2024-03-29T12:19:10ZUser contributionsMediaWiki 1.34.1https://wiki.contextgarden.net/index.php?title=Description&diff=9102Description2008-12-07T18:02:27Z<p>130.133.8.114: /* ConTeXt */</p>
<hr />
<div>< [[From LaTeX to ConTeXt]] | [[Structurals]] ><br />
<br />
= Basic Description Lists =<br />
<br />
== LaTeX ==<br />
<br />
LaTeX provides a <tt>description</tt> environment, which works just like an itemized or enumerated list except that the item labels are specified by an (optional) argument to the <tt>\item</tt> command, rather than being automatically generated. This is useful for making lists of definitions and other sorts of descriptions that are headed by a keyword.<br />
<br />
<texcode><br />
\documentclass{article}<br />
\begin{document}<br />
\begin{description}<br />
\item[Short] This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
\item[Rather longer label] This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
\end{description}<br />
\end{document}<br />
</texcode><br />
<br />
== ConTeXt ==<br />
<br />
ConTeXt provides a similar mechanism. Unlike the LaTeX version, ConTeXt's description mechanism does not enclose the items in an environment, but instead formats them independently according to formats given in <cmd>setupdescriptions</cmd> or <cmd>definedescription</cmd>. The <cmd>definedescription</cmd> latter command is used to define a named description class, which can later be called using its name. This example defines a <tt>latexdesc</tt> description, with parameters that roughly approximate the LaTeX defaults.<br />
<br />
<texcode><br />
\definedescription[latexdesc][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=broad,margin=1cm]<br />
<br />
\starttext<br />
\latexdesc{Short} This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
\latexdesc{Rather longer label} This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
<br />
\stoptext<br />
</texcode><br />
<br />
<context><br />
\setuplayout[width=13cm]<br />
\definedescription[latexdesc][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=broad,margin=1cm]<br />
<br />
\starttext<br />
\latexdesc{Short} This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
\latexdesc{Rather longer label} This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
<br />
\stoptext<br />
</context><br />
<br />
The empty lines (or <cmd>par</cmd>) after each description (here, <tt>\latexdesc</tt>) line are required.<br />
<br />
The <tt>margin=<i>dimension</i></tt> key specifies the hanging indentation for lines after the first line. In addition, the separation between the label and the text can be specified using a <tt>distance=<i>dimension</i></tt> key.<br />
<br />
= Multi-Paragraph Descriptions =<br />
<br />
== LaTeX ==<br />
<br />
Because the LaTeX description mechanism is an environment, it is simple to include multiple paragraphs in a description environment, or even to embed sub-lists. For instance, consider the following example:<br />
<br />
<texcode><br />
\documentclass{article}<br />
\begin{document}<br />
\begin{description}<br />
\item[Para] This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
This is another paragraph under the "Para" item.<br />
<br />
\begin{description}<br />
\item[Sub-Item] This is a description of an item which is within the<br />
"Para" item.<br />
<br />
\item[Sub-Item] Another sub-item.<br />
\end{description}<br />
\item[Short] A short item that's not part of that really long "Para" item.<br />
\end{description}<br />
\end{document}<br />
</texcode><br />
<br />
In this example, the code indentation has been used to illustrate the alignment of the typeset output. Everything between <code>\item[Para]</code> and <code>\item[Short]</code> is part of the "Para" item, and is indented by the same amount. The embedded description then embeds any following lines on the "Sub-Item"s by an additional indentation, as one would expect.<br />
<br />
== ConTeXt ==<br />
<br />
Multiple paragraphs (without first line indenting) can be created as follows:<br />
<br />
<texcode><br />
\definedescription[descr][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=broad,margin=1cm]<br />
<br />
\starttext<br />
\startdescr{Para}<br />
This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
This is another paragraph under the "Para" item.<br />
\startdescr{Sub Item} <br />
This is a description of an item which is within the<br />
"Para" item.<br />
\stopdescr<br />
\startdescr{Sub Item} <br />
Another Sub Item <br />
\stopdescr<br />
\stopdescr<br />
\startdescr{Short}<br />
A short item that's not part of that really long "Para" item.<br />
\stopdescr<br />
<br />
\stoptext<br />
</texcode><br />
<br />
<context><br />
\setuplayout[width=13cm]<br />
\definedescription[descr][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=broad,margin=1cm]<br />
<br />
\starttext<br />
\startdescr{Para}<br />
This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
This is another paragraph under the "Para" item.<br />
\startdescr{Sub Item} <br />
This is a description of an item which is within the<br />
"Para" item.<br />
\stopdescr<br />
\startdescr{Sub Item} <br />
Another Sub Item <br />
\stopdescr<br />
\stopdescr<br />
\startdescr{Short}<br />
A short item that's not part of that really long "Para" item.<br />
\stopdescr<br />
<br />
\stoptext<br />
</context><br />
<br />
= Descriptions with Fixed Label Width =<br />
<br />
== LaTeX ==<br />
<br />
In LaTeX, the <tt>mdwlist</tt> package can be used to set a fixed label width.<br />
<br />
<texcode><br />
\documentclass{article}<br />
\usepackage{mdwlist}<br />
\begin{document}<br />
\begin{basedescript}{\desclabelstyle{\pushlabel}\desclabelwidth{6em}}<br />
\item[Short] This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
\item[Rather longer label] This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
\end{basedescript}<br />
\end{document}<br />
</texcode><br />
<br />
<br />
== ConTeXt ==<br />
<br />
Using an explicit dimension as argument for the 'width' parameter<br />
sets the label to 5em:<br />
<br />
<texcode><br />
\definedescription[notation][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=5em]<br />
</texcode><br />
<br />
<context><br />
\definedescription[notation][<br />
headstyle=bold,style=normal,align=left,location=hanging,<br />
width=5em]<br />
<br />
\starttext<br />
\notation{Short} This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
\notation{Rather longer label} This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
<br />
\stoptext<br />
</context><br />
<br />
Another example:<br />
<texcode><br />
\definedescription<br />
[Desc]<br />
[location=top,hang=20,<br />
headstyle={\bf\color[blue]},<br />
command=\hskip-1cm,margin=1cm]<br />
</texcode><br />
<br />
Gives the result:<br />
<br />
<context><br />
\definedescription[Desc][location=top,hang=20,<br />
headstyle={\bf\color[blue]},<br />
command=\hskip-1cm,margin=1cm]<br />
<br />
\starttext<br />
\Desc{Short} This is a shorter item label, and some text that talks about it.<br />
The text is wrapped into a paragraph, with successive lines indented.<br />
<br />
\Desc{Rather longer label} This is a longer item label. As you can see, the<br />
text is not started a specified distance in -- unlike with other lists -- but<br />
is spaced a fixed distance from the end of the label.<br />
<br />
\stoptext<br />
</context></div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Floating_Objects&diff=8596Floating Objects2008-04-27T09:10:08Z<p>130.133.8.114: Add "split"</p>
<hr />
<div>< [[Visuals]] | [[Graphics]] | [[Using Graphics]] ><br />
<br />
Floats are elements like tables or figures that are placed (and numbered) automatically by TeX. They are so called as they can ''float'' around the output pages to a place where TeX thinks they are appropriate (You can influence what TeX thinks as appropriate).<br />
<br />
Floats are ConTeXt's "base class" for everything that uses a <tt>\place...</tt> command (table, figure, own floats).<br />
<br />
If you search options of e.g. <cmd>placeexternalfigure</cmd> you must look after <cmd>placefloat</cmd> in the manual! (same for <tt>\setup...</tt> etc.)<br />
<br />
The float types "graphic", "figure", "table" and "intermezzo" are readily defined. If you need more (i.e. if you need another numbering or table of something), you can easily define your own floats with <cmd>definefloat</cmd>.<br />
<br />
<texcode><br />
\placefloat[place][reference]{caption}{some float}<br />
</texcode><br />
<br />
'''place''' is one or several (comma separated) of:<br />
<table><br />
<tr bgcolor="#AAAAAA"><th>preference</th><th align="left">result</th></tr><br />
<tr bgcolor="#DDDDDD"><td>left</td><td>left of text</td></tr><br />
<tr><td>right</td><td>right of text</td></tr><br />
<tr bgcolor="#DDDDDD"><td>here</td><td>preferably here</td></tr><br />
<tr><td>top</td><td>at top of page</td></tr><br />
<tr bgcolor="#DDDDDD"><td>bottom</td><td>at bottom of page</td></tr><br />
<tr><td>inleft</td><td>in left margin</td></tr><br />
<tr bgcolor="#DDDDDD"><td>inright</td><td>in right margin</td></tr><br />
<tr><td>inmargin</td><td>in the margin (left or right)</td></tr><br />
<tr bgcolor="#DDDDDD"><td>margin</td><td>in the margin (margin float)</td></tr><br />
<tr><td>page</td><td>on a new (empty) page</td></tr><br />
<tr bgcolor="#DDDDDD"><td>opposite</td><td>on the left page</td></tr><br />
<tr><td>always</td><td>precedence over stored floats</td></tr><br />
<tr bgcolor="#DDDDDD"><td>force</td><td>per se here</td></tr><br />
<tr><td>split</td><td>(For TABLES only) split tables</td></tr><br />
</table><br />
(table copied from the manual)<br />
<br />
<cmd>placefigure</cmd> and <cmd>placetable</cmd> also accept the same set of options, and allow to create floating figures and captions respectively.<br />
<br />
'''reference'''<br />
<br />
If you don't need to refer to your float, you can leave this parameter out.<br />
<br />
== Examples ==<br />
I will explain the examples in terms of <cmd>placefigure</cmd> but the same set of options are also valid for other floats.<br />
<br />
* If you do not want a caption<br />
<texcode><br />
\placefigure {none} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
or<br />
<br />
<texcode><br />
\placefigure[none] {} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
<br />
* If you do not want the figure to be numbered (but still want the caption)<br />
<br />
<texcode><br />
\placefigure [nonumber] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
* Suppose you want the figure to be placed on the right side of the page, a few lines into the paragraph, and want the rest of the paragraph to warp around the figure<br />
<br />
<texcode><br />
\placefigure [right,2*line] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
or <br />
<br />
<texcode><br />
\placefigure [right,2*hang] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
This does not want correctly at a page boundary. The <tt>line</tt> options leaves the space above the figures empty, while the <tt>hang</tt> option also wraps texts above the figure.<br />
<br />
==Floats and columns==<br />
<br />
This special case is discussed [[Columns#Floats_and_other_limitations_of_columns|here]].<br />
<br />
==Protruding Floats in Double-Sided Documents==<br />
<br />
If you have a double-sided document with wide outer margins then you might want your figures to protrude into the margin. In a double-sided document you need to tell ConTeXt to decide whether to make the figure protrude to the left or the right. This can be done as follows:<br />
<br />
<texcode><br />
\definefloat[textmarginfigure][textmarginfigures]<br />
\setupfloat[textmarginfigure][location=inner]<br />
\placetextmarginfigure{\externalfigure[figurename]}<br />
</texcode><br />
<br />
The following code gives a full example that can be pasted into live ConTeXt:<br />
<br />
<texcode><br />
\setuppagenumbering [alternative=doublesided]<br />
\setuplayout[location=middle,backspace=2pc, width=20pc]<br />
\definefloat[textmarginfigure][textmarginfigures]<br />
\setupfloat[textmarginfigure][location=inner]<br />
\starttext<br />
\input knuth<br />
\placetextmarginfigure[here]{}{\externalfigure[figurename][width=30pc]}<br />
\input knuth<br />
\placetextmarginfigure[here]{}{\externalfigure[figurename][width=30pc]}<br />
\input knuth<br />
\stoptext<br />
</texcode></div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Extended_description&diff=8572Extended description2008-04-18T11:39:06Z<p>130.133.8.114: /* Example setup for epigraphs */ Add conditional for years in [epigraph][short]</p>
<hr />
<div>< [[Modules]]<br />
<br />
The '''xdesc''' module by Giuseppe Bilotta (Oblomov) provides a means to treat special descriptions such as epigraphs. In this case the object has several attributes, which can be typeset in several ways. The module can be downloaded from the [[modules:xdesc]] site.<br />
<br />
== Example setup for epigraphs ==<br />
An epigraph (sometimes also wrongly called epigram) is a concise and witty saying or a short witty poem. An example would be<br />
<br />
: We haven't got the money, so we've got to think!<br />
: &mdash; ''Ernest Rutherford, 1871&ndash;1937''<br />
<br />
We first load now the module and setup a new description<br />
<br />
<texcode><br />
\usemodule[xdesc]<br />
\defineextendeddescription[epigraph][epigraphs]%<br />
[author,years,source,note,whois]<br />
</texcode><br />
<br />
We now define the commands to typeset the epigraphs, one short version which is useful for production<br />
<br />
<texcode><br />
\starttemplate[epigraph][short]<br />
\startframedtext[right][frame=off,offset=none,background=none,<br />
width=0.65\textwidth,top=,bottom=]<br />
\small{\it \getslot{content}}<br />
\unskip\nobreak\hfil\penalty50\hskip1em\hbox{}\nobreak\hfil<br />
\hbox{\small{--- \getslot{author}%<br />
\doifelse{\getslot{years}}{}{}{, \getslot{years}}}}<br />
\parfillskip=0pt \finalhyphendemerits=0<br />
\stopframedtext<br />
\stoptemplate<br />
</texcode><br />
<br />
and a medium long version. which is a bit lengthier,<br />
<br />
<texcode><br />
\starttemplate[epigraph][medium]<br />
\startframedtext[right][frame=off,offset=none,background=none]<br />
{\it \getslot{content}}\par<br />
\rightaligned{--- \getslot{author}, \getslot{years}}\par<br />
\startalignment[left]<br />
\small \getslot{source}<br />
\stopalignment<br />
\stopframedtext<br />
\stoptemplate<br />
</texcode><br />
<br />
The version we want to use can be set via<br />
<br />
<texcode><br />
\selecttemplate[epigraph][short] % medium,short<br />
</texcode><br />
<br />
It is now time to get type in a quote<br />
<br />
<texcode><br />
\startepigraph[epg:Rutherford]<br />
[author={Ernest Rutherford},<br />
years={1871--1937},<br />
whois={New Zealand physicist},<br />
source={in {\it Bulletin of the Institute of Physics} (1962) vol. 13}]<br />
We haven't got the money, so we've got to think!<br />
\stopepigraph<br />
</texcode><br />
<br />
To typeset the epigraph, simply call:<br />
<br />
<texcode><br />
\getepigraph[epg:Rutherford]<br />
</texcode></div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Chinese_Japanese_and_Korean&diff=7831Chinese Japanese and Korean2007-06-22T21:38:37Z<p>130.133.8.114: typo</p>
<hr />
<div>< [[Fonts]] | [[Encodings and Regimes]] ><br />
<br />
* old introduction [[Uptodate]] by Pragma: [http://www.pragma-ade.com/general/uptodate/up-007-s.pdf screen] and [http://www.pragma-ade.com/general/uptodate/up-007-p.pdf paper] version<br />
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt]<br />
<br />
=Chinese in ConTeXt (ConTeXt 2005.12.19 and newer)=<br />
<br />
If you have [[Context 2005.12.19]], you only have to get the fonts.<br />
<br />
# You need some Chinese (TrueType) fonts; you may want to get [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf FangSong], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf HeiTi], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf KaiTi] and [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htsong.ttf SongTi]. Put those e.g. into $TEXMF/fonts/truetype/chinese/.<br />
# Use Hans Hagen's experimental [http://www.physik.fu-berlin.de/~tburnus/ttf2uni.rb ttf2uni.rb] script to create .map, .tmf and .enc files. You can then put the files e.g. to $TEXMF/fonts/tfm/chinese/ (*.tmf files), $TEXMF/fonts/enc/chinese/ (*.enc files, they are basically the same for all fonts) and to $TEXMF/fonts/map/chinese/.<br />
# You may now need to update the hash TeX uses to find the files; using teTeX this is done by running <tt>texhash</tt>.<br />
# How you can run your Hello World program:<br />
<texcode><br />
\enableregime[utf]<br />
\usemodule[chi-00]<br />
\starttext<br />
你好!<br />
\stoptext<br />
</texcode><br />
<br />
If you only want to access a few Chinese characters, you should use <code>\input font-chi.tex</code> instead of <code>\usemodule[chinese]</code> as the latter changes also the default language and some of the numberation/section settings (see [http://source.contextgarden.net/tex/context/base/s-chi-00.tex s-chi-00.tex]).<br />
<br />
If you want to typset vertical text, use <tt>\startvertical ... \stopvertical</tt>, if you want to use Chinese numbers, you can use e.g. <tt>\startitemize[c]</tt>; possible options are <tt>c</tt> or <tt>cn</tt> for normal Chinese numbers (一, 二, 三, 四, 五, 六 etc.), <tt>cc</tt> for the capitalized (or financial) Chinese numbers (壹, 贰, 叁 etc.), <tt>ec</tt> for an extended version which uses 廿 and 卅 (instead of 二十 and 三十), and <tt>ac</tt> for using the Chinese numbers zero (零, 〇) to nine (九) in the same way one does with the Arabic digits 0 to 9.<br />
<br />
<br />
//added by Xiao Jianfeng<br />
<br />
As far as I know, it is wrong to use "零" with "一,二,....,十".<br />
Following is the corresponding relationships between lower case and upper case Chinese numbers and arabic numbers.<br />
<br />
Chinese lower:〇,一,二,三,四,五,六,七,八,九,十,百,千<br />
<br />
Chinese upper:零,壹,贰,叁,肆,伍,陆,柒,捌,玖,拾,佰,仟<br />
<br />
Arabic :0, 1, 2,3, 4,5, 6, 7,8, 9,10,100,1000<br />
<br />
"零" is a upper case Chinese number, so it should not be mixed with other lower case Chinese numbers. Although in China, it is sometimes wrongly used.<br />
<br />
The reason why numbers in Chinese has lower case and upper case in Chinese is for accounting safety. Lower case numbers are simple to write and far more often used in daily life, while upper case numbers are almost exclusively used in accouting. <br />
<br />
We can see that every upper case Chinese number are very different from the others, hence cannot be easily modified to the other . But the lower case Chinese number or Arabic numbers are sometime easily to be modified. For example, "一", "二" and "三" are similar so one can easily modify a "一" to "二" or "三".And one can also modify "1" to "7" or "11", or one can modify "6" to "8".<br />
<br />
In China, numbers must be written in both Chinese upper case and Arabic form together in accounting.<br />
<br />
=Chinese in ConTeXt (before 2005.12.19)=<br />
[[User:Xiaojf|Xiao Jianfeng]] wrote in a [http://archive.contextgarden.net/message/20050606.080842.5e1c2057.en.html mail to the mailing list on 2005-06-06]:<br />
<br />
Here is my way of Chinese setup in ConTeXt. I hope this can be of any help to some newbies like me who have problems in processing Chinese.<br />
<br />
# Get the truetype fonts <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htfs.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf hthei.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf htkai.ttf]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htsong.ttf htsong.ttf]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/<br />
# Get corresponding tfm files <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbfs.zip gbfs.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbhei.zip gbhei.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbkai.zip gbkai.zip]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbsong.zip gbsong.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/<br />
# Get the enc file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/Gbk.zip Gbk.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Get the map file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/map.zip map.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Put the ttf font files you got in step 1 to <tt>texmf-fonts/fonts/truetype/chinese</tt><br />
# Unzip the files you got in step 2 and you get four corresponding directories (which contain tfm files), then put them in <tt>texmf-fonts/fonts/tfm/chinese</tt><br />
# Unzip <tt>Gbk.zip</tt>, you will get a directory named <tt>Gbk</tt> which contains many enc files. Put the directory to <tt>texmf-fonts/fonts/enc/chinese</tt><br />
# Unzip <tt>map.zip</tt>, you will get many map files, you need just the <tt>gbk.map</tt>. You need to edit <tt>gbk.map</tt>, delete entries of gbli* at the end of the file (lines 505-629). Then, put the modified <tt>gbk.map</tt> to <tt>texmf-fonts/fonts/map/chinese</tt>. Note that newer pdfetex don't read [[pdftex.cfg]] so better use <cmd>loadmapfile[gbk]</cmd> in your document.<br />
# Your document should be compilable now. See sample below.<br />
# I haven't tried to compile Traditional Chinese documents. Maybe just get corresponding files for Traditional Chinese and put there to the right location will work. I'm not sure.<br />
<br />
Sample Code (save in cp936 encoding):<br />
<texcode><br />
\loadmapfile[gbk]<br />
\usemodule[chinese]<br />
\setuppagenumbering[state=stop]<br />
\starttext<br />
\tfd<br />
这里什么饮料也没有真不像话!<br />
\stoptext<br />
</texcode><br />
<br />
If you want to use UTF-8, the [http://www.ntg.nl/pipermail/ntg-context/2005/013542.html script by Lutz Haseloff] might of interest to you; the needed perl module Encode::HanConvert is [http://search.cpan.org/dist/Encode-HanConvert/ available at CPAN]. Note, however, that you may only use characters representable in gbk, German umlauts for instance are converted into ??.<br />
[[Category:Fonts]]<br />
[[Category:International]]</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Chinese_Japanese_and_Korean&diff=7830Chinese Japanese and Korean2007-06-22T21:38:04Z<p>130.133.8.114: Add tip when only few chinese is wanted</p>
<hr />
<div>< [[Fonts]] | [[Encodings and Regimes]] ><br />
<br />
* old introduction [[Uptodate]] by Pragma: [http://www.pragma-ade.com/general/uptodate/up-007-s.pdf screen] and [http://www.pragma-ade.com/general/uptodate/up-007-p.pdf paper] version<br />
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt]<br />
<br />
=Chinese in ConTeXt (ConTeXt 2005.12.19 and newer)=<br />
<br />
If you have [[Context 2005.12.19]], you only have to get the fonts.<br />
<br />
# You need some Chinese (TrueType) fonts; you may want to get [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf FangSong], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf HeiTi], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf KaiTi] and [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htsong.ttf SongTi]. Put those e.g. into $TEXMF/fonts/truetype/chinese/.<br />
# Use Hans Hagen's experimental [http://www.physik.fu-berlin.de/~tburnus/ttf2uni.rb ttf2uni.rb] script to create .map, .tmf and .enc files. You can then put the files e.g. to $TEXMF/fonts/tfm/chinese/ (*.tmf files), $TEXMF/fonts/enc/chinese/ (*.enc files, they are basically the same for all fonts) and to $TEXMF/fonts/map/chinese/.<br />
# You may now need to update the hash TeX uses to find the files; using teTeX this is done by running <tt>texhash</tt>.<br />
# How you can run your Hello World program:<br />
<texcode><br />
\enableregime[utf]<br />
\usemodule[chi-00]<br />
\starttext<br />
你好!<br />
\stoptext<br />
</texcode><br />
<br />
If you only want to access a few Chinese characters, you should use <code>\input font-chi.tex</code> instead of <code\usemodule[chinese]</code> as the latter changes also the default language and some of the numberation/section settings (see [http://source.contextgarden.net/tex/context/base/s-chi-00.tex s-chi-00.tex]).<br />
<br />
If you want to typset vertical text, use <tt>\startvertical ... \stopvertical</tt>, if you want to use Chinese numbers, you can use e.g. <tt>\startitemize[c]</tt>; possible options are <tt>c</tt> or <tt>cn</tt> for normal Chinese numbers (一, 二, 三, 四, 五, 六 etc.), <tt>cc</tt> for the capitalized (or financial) Chinese numbers (壹, 贰, 叁 etc.), <tt>ec</tt> for an extended version which uses 廿 and 卅 (instead of 二十 and 三十), and <tt>ac</tt> for using the Chinese numbers zero (零, 〇) to nine (九) in the same way one does with the Arabic digits 0 to 9.<br />
<br />
<br />
//added by Xiao Jianfeng<br />
<br />
As far as I know, it is wrong to use "零" with "一,二,....,十".<br />
Following is the corresponding relationships between lower case and upper case Chinese numbers and arabic numbers.<br />
<br />
Chinese lower:〇,一,二,三,四,五,六,七,八,九,十,百,千<br />
<br />
Chinese upper:零,壹,贰,叁,肆,伍,陆,柒,捌,玖,拾,佰,仟<br />
<br />
Arabic :0, 1, 2,3, 4,5, 6, 7,8, 9,10,100,1000<br />
<br />
"零" is a upper case Chinese number, so it should not be mixed with other lower case Chinese numbers. Although in China, it is sometimes wrongly used.<br />
<br />
The reason why numbers in Chinese has lower case and upper case in Chinese is for accounting safety. Lower case numbers are simple to write and far more often used in daily life, while upper case numbers are almost exclusively used in accouting. <br />
<br />
We can see that every upper case Chinese number are very different from the others, hence cannot be easily modified to the other . But the lower case Chinese number or Arabic numbers are sometime easily to be modified. For example, "一", "二" and "三" are similar so one can easily modify a "一" to "二" or "三".And one can also modify "1" to "7" or "11", or one can modify "6" to "8".<br />
<br />
In China, numbers must be written in both Chinese upper case and Arabic form together in accounting.<br />
<br />
=Chinese in ConTeXt (before 2005.12.19)=<br />
[[User:Xiaojf|Xiao Jianfeng]] wrote in a [http://archive.contextgarden.net/message/20050606.080842.5e1c2057.en.html mail to the mailing list on 2005-06-06]:<br />
<br />
Here is my way of Chinese setup in ConTeXt. I hope this can be of any help to some newbies like me who have problems in processing Chinese.<br />
<br />
# Get the truetype fonts <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htfs.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf hthei.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf htkai.ttf]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htsong.ttf htsong.ttf]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/<br />
# Get corresponding tfm files <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbfs.zip gbfs.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbhei.zip gbhei.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbkai.zip gbkai.zip]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbsong.zip gbsong.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/<br />
# Get the enc file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/Gbk.zip Gbk.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Get the map file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/map.zip map.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Put the ttf font files you got in step 1 to <tt>texmf-fonts/fonts/truetype/chinese</tt><br />
# Unzip the files you got in step 2 and you get four corresponding directories (which contain tfm files), then put them in <tt>texmf-fonts/fonts/tfm/chinese</tt><br />
# Unzip <tt>Gbk.zip</tt>, you will get a directory named <tt>Gbk</tt> which contains many enc files. Put the directory to <tt>texmf-fonts/fonts/enc/chinese</tt><br />
# Unzip <tt>map.zip</tt>, you will get many map files, you need just the <tt>gbk.map</tt>. You need to edit <tt>gbk.map</tt>, delete entries of gbli* at the end of the file (lines 505-629). Then, put the modified <tt>gbk.map</tt> to <tt>texmf-fonts/fonts/map/chinese</tt>. Note that newer pdfetex don't read [[pdftex.cfg]] so better use <cmd>loadmapfile[gbk]</cmd> in your document.<br />
# Your document should be compilable now. See sample below.<br />
# I haven't tried to compile Traditional Chinese documents. Maybe just get corresponding files for Traditional Chinese and put there to the right location will work. I'm not sure.<br />
<br />
Sample Code (save in cp936 encoding):<br />
<texcode><br />
\loadmapfile[gbk]<br />
\usemodule[chinese]<br />
\setuppagenumbering[state=stop]<br />
\starttext<br />
\tfd<br />
这里什么饮料也没有真不像话!<br />
\stoptext<br />
</texcode><br />
<br />
If you want to use UTF-8, the [http://www.ntg.nl/pipermail/ntg-context/2005/013542.html script by Lutz Haseloff] might of interest to you; the needed perl module Encode::HanConvert is [http://search.cpan.org/dist/Encode-HanConvert/ available at CPAN]. Note, however, that you may only use characters representable in gbk, German umlauts for instance are converted into ??.<br />
[[Category:Fonts]]<br />
[[Category:International]]</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=TeXnicCenter&diff=7826TeXnicCenter2007-06-19T07:39:09Z<p>130.133.8.114: /* Adapting TeXnicCenter for processing ConTeXt documents */ Linkify</p>
<hr />
<div>== Adapting TeXnicCenter for processing ConTeXt documents ==<br />
<br />
You can build and view a ConTeXt document in [http://www.toolscenter.org/ TeXnicCenter] as follows:<br />
* Follow the instructions for [[Windows Installation|installing ConTeXt under Windows]].<br />
* Make sure that ruby and perl are in your PATH ''(Start menu -> Settings -> Control Panel -> System -> Advanced -> Environment Variables; then edit PATH)''. In my system (root = C:\ConTeXt) the first items are: C:\ConTeXt\usr\local\context\ruby\bin; C:\ConTeXt\usr\local\context\ruby\lib; C:\ConTeXt\usr\local\context\perl\bin; C:\ConTeXt\usr\local\context\perl\lib<br />
* Start TeXnicCenter. From the menu select: Build -> Define Output Profiles.<br />
* Add a Profile with the name ConTeXt.<br />
* Check "Run (La)TeX in this profile".<br />
* Under "Path to the (La)TeX compiler" enter: <br />
C:\ConTeXt\usr\local\context\tex\setuptex.bat & C:\ConTeXt\usr\local\context\tex\texmf-mswin\bin\texmfstart <br><br />
If you have another root, then change C:\ConTeXt accordingly.<br />
* Under "Command line arguments to pass to the compiler" enter:<br />
texexec.rb, the parameters and "%bm" for the file to be compiled.<br />
In my case this line reads as follows:<br><br />
texexec.rb --bat --nonstop --pdf --interface=nl --color "%bm" <br />
<br />
Now your ConTeXt file should compile after selecting "Build -> Build" from the menu or pressing Ctrl+F7 or clicking on the corresponding toolbar icon.<br />
<br />
* For installing Acrobat Reader as your viewer again select: Build -> Define Output Profiles.<br />
* Select the tab "Viewer".<br />
* Under "Path of Executable" you enter the path to the program AcroRd32.exe<br />
* Under "View project's output" select: "DDE command".<br />
* The Command should be: [DocOpen("%bm.pdf")][FileOpen("%bm.pdf")]<br />
* Server is "acroview" and Topic: "control"<br />
* Same choices for "Forward Search" and "Close document before running (La)TeX", except for the Command which in the latter case should be: [DocClose("%bm.pdf")]<br />
<br />
Automatically deleting unnecessary auxiliary files after compilation is realised as follows:<br />
* Select: Build -> Define Output Profiles.<br />
* Select the tab "Postprocessor".<br />
* Create a new item "cleanup" by clicking on the first icon after the text "Postprocessors to run after the (La)TeX-compiler".<br />
* In the edit line after "Executable" enter:<br><br />
C:\ConTeXt\usr\local\context\tex\setuptex.bat & C:\ConTeXt\usr\local\context\tex\texmf-mswin\bin\texmfstart.exe<br />
<br><br />
And in the edit line after "Arguments" enter:<br><br />
texutil.rb --purgeall.<br><br />
If you have another root, then change C:\ConTeXt accordingly.</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Linetable&diff=7640Linetable2007-05-02T16:42:16Z<p>130.133.8.114: Better souce link</p>
<hr />
<div>< [[Tables Overview]]<br />
<br />
There's no docs about this new mode besides in the sources ([[source:core-ltb.tex|core-ltb.tex]]).<br />
It uses eTeX and is for huge tables that can spread over several pages horizontally and vertically.<br />
It can repeat not only rows (headers, footers) but even columns.<br />
<br />
<texcode><br />
\setuplinetable[n=6,m={2,2,2},regels=25]<br />
<br />
\startlinetable<br />
\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR<br />
\dorecurse{10}<br />
{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}<br />
\stoplinetable<br />
<br />
\startlinetable<br />
\NC[style=slanted,color=green,background=color,backgroundcolor=darkred,nx=2,uitlijnen=middle] xxx<br />
\NC yy \NC ddddd \NC eeee \NC ff \NC \NR<br />
\dorecurse{10}<br />
{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}<br />
\stoplinetable<br />
</texcode><br />
<br />
The sample looks like this:<br />
<br />
<context><br />
\setupcolors[state=start]<br />
\setuplinetable[n=6,m={2,2,2},regels=25]<br />
<br />
\startlinetable<br />
\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR<br />
\dorecurse{10}<br />
{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}<br />
\stoplinetable<br />
<br />
\startlinetable<br />
\NC[style=slanted, color=green, background=color, backgroundcolor=darkred, nx=2, uitlijnen=middle] xxx<br />
\NC yy \NC ddddd \NC eeee \NC ff \NC \NR<br />
\dorecurse{10}<br />
{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}<br />
\stoplinetable<br />
</context><br />
<br />
Another sample, posted by Hans to the mailing list on 2004-12-14:<br />
<br />
<texcode><br />
\setuplinetable[n=6,lines=40]<br />
<br />
\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]<br />
\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]<br />
\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]<br />
\setuplinetable[r][odd] [background=color,backgroundcolor=gray]<br />
\setuplinetable[r][even][background=color,backgroundcolor=green]<br />
<br />
\starttext<br />
<br />
\showframe \showstruts<br />
<br />
\setupcolors[state=start]<br />
<br />
\startlinetable<br />
\dorecurse{5}{\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff} \NC \NR<br />
\dorecurse{100}{\dorecurse{5}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff} \NC \NR}<br />
\stoplinetable<br />
<br />
\stoptext<br />
</texcode><br />
<br />
looks like:<br />
<br />
<context><br />
\setuplinetable[n=6,lines=40]<br />
<br />
\setuplinetable[c][1] [width=2cm,background=color,backgroundcolor=red]<br />
\setuplinetable[c][4] [width=3cm,background=color,backgroundcolor=yellow]<br />
\setuplinetable[c][6] [width=3cm,background=color,backgroundcolor=magenta]<br />
\setuplinetable[r][odd] [background=color,backgroundcolor=gray]<br />
\setuplinetable[r][even][background=color,backgroundcolor=green]<br />
<br />
\starttext<br />
<br />
\showframe \showstruts<br />
<br />
\setupcolors[state=start]<br />
<br />
\startlinetable<br />
\dorecurse{5}{\NC aaa\crlf aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff} \NC \NR<br />
\dorecurse{20}{\dorecurse{5}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff} \NC \NR}<br />
\stoplinetable<br />
<br />
\stoptext<br />
</context><br />
<br />
{{todo|write documentation}}<br />
<br />
[[Category:Tables]]</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Extended_description&diff=7533Extended description2007-04-04T09:13:22Z<p>130.133.8.114: Change epigram into epigraph as this is the proper name</p>
<hr />
<div>< [[Modules]]<br />
<br />
The '''xdesc''' module by Giuseppe Bilotta (Oblomov) provides a means to treat special descriptions such as epigraphs. In this case the object has several attributes, which can be typeset in several ways. The module can be downloaded from the [[modules:xdesc]] site.<br />
<br />
== Example setup for epigraphs ==<br />
An epigraph (sometimes also wrongly called epigram) is a concise and witty saying or a short witty poem. An example would be<br />
<br />
: We haven't got the money, so we've got to think!<br />
: &mdash; ''Ernest Rutherford, 1871&ndash;1937''<br />
<br />
We first load now the module and setup a new description<br />
<br />
<texcode><br />
\usemodule[xdesc]<br />
\defineextendeddescription[epigraph][epigraphs]%<br />
[author,years,source,note,whois]<br />
</texcode><br />
<br />
We now define the commands to typeset the epigraphs, one short version which is useful for production<br />
<br />
<texcode><br />
\starttemplate[epigraph][short]<br />
\startframedtext[right][frame=off,offset=none,background=none,<br />
width=0.65\textwidth,top=,bottom=]<br />
\small{\it \getslot{content}}<br />
\unskip\nobreak\hfil\penalty50\hskip1em\hbox{}\nobreak\hfil<br />
\hbox{\small{--- \getslot{author}, \getslot{years}}}<br />
\parfillskip=0pt \finalhyphendemerits=0<br />
\stopframedtext<br />
\stoptemplate<br />
</texcode><br />
<br />
and a medium long version. which is a bit lengthier,<br />
<br />
<texcode><br />
\starttemplate[epigraph][medium]<br />
\startframedtext[right][frame=off,offset=none,background=none]<br />
{\it \getslot{content}}\par<br />
\rightaligned{--- \getslot{author}, \getslot{years}}\par<br />
\startalignment[left]<br />
\small \getslot{source}<br />
\stopalignment<br />
\stopframedtext<br />
\stoptemplate<br />
</texcode><br />
<br />
The version we want to use can be set via<br />
<br />
<texcode><br />
\selecttemplate[epigraph][short] % medium,short<br />
</texcode><br />
<br />
It is now time to get type in a quote<br />
<br />
<texcode><br />
\startepigraph[epg:Rutherford]<br />
[author={Ernest Rutherford},<br />
years={1871--1937},<br />
whois={New Zealand physicist},<br />
source={in {\it Bulletin of the Institute of Physics} (1962) vol. 13}]<br />
We haven't got the money, so we've got to think!<br />
\stopepigraph<br />
</texcode><br />
<br />
To typeset the epigraph, simply call:<br />
<br />
<texcode><br />
\getepigraph[epg:Rutherford]<br />
</texcode></div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Fonts_-_Old_Content&diff=6585Fonts - Old Content2006-09-21T14:26:39Z<p>130.133.8.114: /* Available Free Fonts */</p>
<hr />
<div>< [[Visuals]] | [[Symbols]] ><br />
<br />
Font handling in ConTeXt is “strange” for LaTeX users. It’s a system of abstraction and aliases, complex and mighty… But there’s help. If you happen to use [[XeTeX]], then you can forget almost all the magic and start using your system fonts (see [[Fonts_in_XeTeX]]). If you want to keep using [[pdfTeX]], read on:<br />
<br />
* '''The ConTeXt way of using fonts are [[TypeScripts]].'''<br />
* [http://www.pragma-ade.com/general/manuals/mtexfont.pdf font installation with texfont] by Pragma<br />
* [http://www.pragma-ade.com/general/manuals/mfonts.pdf ConTeXt's font mechanism in detail] by Pragma<br />
* [http://www.pragma-ade.com/general/manuals/mmakempy.pdf making outlines] by Pragma<br />
* [http://pragma-ade.nl/fonttest.pdf Here] you can try out several TeX fonts online (PDF interface!)<br />
* Troubleshooting: solving [[TeXfont]] problems.<br />
* Character [[Protrusion]] (also known as hanging or font handling) is a more subtle typographic effect.<br />
* [[Font Handling Internals]]<br />
* [http://homepage.mac.com/atl/tex/ Adam Lindsay's page] focuses on typography (OpenType, Unicode etc.), esp. on MacOS X<br />
* [http://home.salamander.com/~wmcclain/context-help.html Bill McClain's ConTeXt beginners page] has also a lot about fonts<br />
* [http://tug.org/pracjourn/2005-2/schmitz/schmitz.pdf Integrating TrueType Fonts into ConTeXt] by Thomas A. Schmitz (PracTeX Journal)<br />
* [[Installing a TrueType font, step by step]]. If you just need to install a TrueType font, this may be what you are looking for.<br />
* [http://dl.contextgarden.net/myway/expertfonts.pdf Installing Expert Fonts: Minion Pro] by Idris Samawi Hamid; contains step-by-step instructions, from preinstallation to writing typescripts<br />
* [[Pseudo Small Caps]] by Vit Zyka<br />
* Matt Gushee's introduction to [http://havenrock.com/textips/bookfonts.html virtual fonts], especially for getting expert fonts to work.<br />
* [[URW Garamond]]<br />
<br />
=Basic Hints=<br />
<br />
''Some hints by Taco from the mailing list on 2005-11-20:''<br />
<br />
Q: How up to date or out of date is the information in [http://www.pragma-ade.com/general/manuals/mfonts.pdf mfonts manual]?<br />
<br />
A: It looks like it is still quite up-to-date, but some of the examples it gives may no longer be the very best and latest way of doing things, and possibly there are some new developments that do not get as much attention as desired (like [http://www.pragma-ade.com/general/manuals/mtexfont.pdf texfont], and the issues arising from font map files). Overall, the document appears accurate, though.<br />
<br />
An important thing to remember is this:<br />
<br />
'''ConTeXt does not share font metric conventions with LaTeX.'''<br />
<br />
(at one point it started doing so, like supporting the ''Karl Berry naming scheme'' and the ''PSNFSS'' style font family names, but that has since been abandoned).<br />
<br />
Another important thing is that it also does not share font map files with LaTeX and, specifically,<br />
<br />
'''ConTeXt does not make pdfetex read <tt>pdftex.map</tt>.'''<br />
<br />
(this is at the root of a great many problems reported by users only familiar with PSNFSS)<br />
<br />
The preferred format for metric files in ConTeXt is<br />
<br />
<tt><vendor>/<familyname>/<encoding>-<fontname>.tfm</tt><br />
<br />
for metrics and<br />
<br />
<tt><encoding>-<vendor>-<familyname>.map</tt><br />
<br />
for the mapping files.<br />
<br />
* <fontname> is usually derived from the font source (afm or ttf),<br />
* <encoding> is a 'controlled' list, (see [[Encodings and Regimes]])<br />
* <vendor> and <familyname> are user-supplied (at install time).<br />
<br />
There are ways to trick ConTeXt into using different conventions, but if you do that you are likely to run into trouble.<br />
<br />
=Configuration=<br />
* Using [[psnfss]] metrics in ConTeXt<br />
* Matt Gushee about [http://havenrock.com/textips/bookfonts.html virtual fonts]<br />
* Fonts rely on [[Encodings and Regimes]], and it helps to know what happens underneath the hood, from time to time.<br />
* In newer distributions, map files belong in <tt>&hellip;/fonts/map/pdftex/context</tt>!<br />
* Don't forget to look at [[cont-sys.tex]]!<br />
<br />
= Available Free Fonts =<br />
* [http://ctan.tug.org/tex-archive/info/Free_Math_Font_Survey/survey.html Free Math Fonts] : overview of different free Math fonts; [http://www.math.uiuc.edu/~hartke/computer/latex/freefonts.php links to other free fonts]<br />
* [http://greekfontsociety.org/ GFS Didot] : Latin, full set of polytonik Greek, small caps, oldstyle figures, full f-ligatures ([http://modules.contextgarden.net/gfsdidot Module for ConTeXt])<br />
* [http://www.janusz.nowacki.strefa.pl/kurier.html Foto Alfa] : some TeX related fonts from Poland (Antykwa Toruńska. Antykwa Półtawskiego, Kurier, Iwona...)<br />
* [http://linuxlibertine.sourceforge.net Libertine Open Fonts Project]: GPL/OFL serif font<br />
* [http://scripts.sil.org SIL International] : great Unicode fonts for scholars by SIL (Gentium, Doulos, Charis, etc.)<br />
* [http://ist-socrates.berkeley.edu/~pinax/greekkeys/GreekKeys.html GreekKeys] : links to polytonic Greek fonts<br />
* [http://scholarsfonts.net Scholar's Fonts] : Font for Scholars (Latin, Germanic languages, Greek, Hebrew and Linguistics)<br />
* [http://www.engl.virginia.edu/OE/junicode/junicode.html Junicode] : Junius-Unicode, a font for medievalists<br />
* [http://www.freelang.net/fonts/index.html FreeLang fonts] : fonts for exotic languages<br />
* [http://www.blambot.com Blambot] : Comic fonts<br />
* [http://www.chank.com/freefonts.php Chank] : some free Chank fonts<br />
* [http://www.fontface.com/fonts/ FontFace] : free fonts<br />
* [http://www.dafont.com DaFont] : more free fonts<br />
* [http://fonts.tom7.com/fonts98.html Divide by Zero] : more fonts<br />
* [http://moorstation.org/typoasis/typoasis1.htm TypOasis] : lots of nice fonts, but a bit hard to find (have a look at designers Apostrophic Lab, Manfred Klein and Dieter Steffmann)<br />
* [http://kadyellebee.com/fonts/ Kristine's Font Organization] : find a font in a sorted directory<br />
* [http://www.fontlover.com FontLover] : font news portal site<br />
* [http://www.pismolijna.cz/free.html Lido] : OpenType and TrueType typeface by Storm Type Foundry, free for non-commercial use.<br />
* ''... many more to be added ...''<br />
<br />
=Hints by Language=<br />
* general: [[Encodings and Regimes]]<br />
* [[Arabian and Hebrew]] (Idris? other ArabTeX specialists?)<br />
* [[Chinese]]<br />
* [[Greek]]<br />
* [[Russian]]<br />
* [[Vietnamese]]<br />
<br />
[[Category:Fonts]]</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Floating_Objects&diff=6438Floating Objects2006-08-15T09:29:52Z<p>130.133.8.114: /* Examples */ fix usage</p>
<hr />
<div>< [[Visuals]] | [[Graphics]] | [[Using Graphics]] ><br />
<br />
Floats are elements like tables or figures that are placed (and numbered) automatically by TeX. They are so called as they can ''float'' around the output pages to a place where TeX thinks they are appropriate (You can influence what TeX thinks as appropriate).<br />
<br />
Floats are ConTeXt's "base class" for everything that uses a <tt>\place...</tt> command (table, figure, own floats).<br />
<br />
If you search options of e.g. <cmd>placeexternalfigure</cmd> you must look after <cmd>placefloat</cmd> in the manual! (same for <tt>\setup...</tt> etc.)<br />
<br />
The float types "graphic", "figure", "table" and "intermezzo" are readily defined. If you need more (i.e. if you need another numbering or table of something), you can easily define your own floats with <cmd>definefloat</cmd>.<br />
<br />
<texcode><br />
\placefloat[place][reference]{caption}{some float}<br />
</texcode><br />
<br />
'''place''' is one or several (comma separated) of:<br />
<table><br />
<tr bgcolor="#AAAAAA"><th>preference</th><th align="left">result</th></tr><br />
<tr bgcolor="#DDDDDD"><td>left</td><td>left of text</td></tr><br />
<tr><td>right</td><td>right of text</td></tr><br />
<tr bgcolor="#DDDDDD"><td>here</td><td>preferably here</td></tr><br />
<tr><td>top</td><td>at top of page</td></tr><br />
<tr bgcolor="#DDDDDD"><td>bottom</td><td>at bottom of page</td></tr><br />
<tr><td>inleft</td><td>in left margin</td></tr><br />
<tr bgcolor="#DDDDDD"><td>inright</td><td>in right margin</td></tr><br />
<tr><td>inmargin</td><td>in the margin (left or right)</td></tr><br />
<tr bgcolor="#DDDDDD"><td>margin</td><td>in the margin (margin float)</td></tr><br />
<tr><td>page</td><td>on a new (empty) page</td></tr><br />
<tr bgcolor="#DDDDDD"><td>opposite</td><td>on the left page</td></tr><br />
<tr><td>always</td><td>precedence over stored floats</td></tr><br />
<tr bgcolor="#DDDDDD"><td>force</td><td>per se here</td></tr><br />
</table><br />
(table copied from the manual)<br />
<br />
<cmd>placefigure</cmd> and <cmd>placetable</cmd> also accept the same set of options, and allow to create floating figures and captions respectively.<br />
<br />
'''reference'''<br />
<br />
If you don't need to refer to your float, you can leave this parameter out.<br />
<br />
== Examples ==<br />
I will explain the examples in terms of <cmd>placefigure</cmd> but the same set of options are also valid for other floats.<br />
<br />
* If you do not want a caption<br />
<texcode><br />
\placefigure {none} {\externalfigure{figurename}}<br />
</texcode><br />
<br />
or<br />
<br />
<texcode><br />
\placefigure[none] {} {\externalfigure{figurename}}<br />
</texcode><br />
<br />
<br />
* If you do not want the figure to be numbered (but still want the caption)<br />
<br />
<texcode><br />
\placefigure [nonumber] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
* Suppose you want the figure to be placed on the right side of the page, a few lines into the paragraph, and want the rest of the paragraph to warp around the figure<br />
<br />
<texcode><br />
\placefigure [right,2*line] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
or <br />
<br />
<texcode><br />
\placefigure [right,2*hang] {caption} {\externalfigure[figurename]}<br />
</texcode><br />
<br />
This does not want correctly at a page boundary. The <tt>line</tt> options leaves the space above the figures empty, while the <tt>hang</tt> option also wraps texts above the figure.</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Chinese_Japanese_and_Korean&diff=4520Chinese Japanese and Korean2005-12-06T16:56:14Z<p>130.133.8.114: linkify - missing one</p>
<hr />
<div>< [[Fonts]] | [[Encodings and Regimes]] ><br />
<br />
* old introduction [[Uptodate]] by Pragma: [http://www.pragma-ade.com/general/uptodate/up-007-s.pdf screen] and [http://www.pragma-ade.com/general/uptodate/up-007-p.pdf paper] version<br />
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt]<br />
<br />
<br />
Xiao Jianfeng wrote in a mail to the mailing list on 2005-06-06:<br />
<br />
Here is my way of Chinese setup in ConTeXt. I hope this can be of any help to some newbies like me who have problems in processing Chinese.<br />
<br />
# Get the truetype fonts <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htfs.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf hthei.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf htkai.ttf]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htsong.ttf]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/<br />
# Get corresponding tfm files <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbfs.zip gbfs.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbhei.zip gbhei.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbkai.zip gbkai.zip]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbsong.zip gbsong.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/<br />
# Get the enc file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/Gbk.zip Gbk.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Get the map file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/ map.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Put the ttf font files you got in step 1 to <tt>texmf-fonts/fonts/truetype/chinese</tt><br />
# Unzip the files you got in step 2 and you get four corresponding directories (which contain tfm files), then put them in <tt>texmf-fonts/fonts/tfm/chinese</tt><br />
# Unzip <tt>Gbk.zip</tt>, you will get a directory named <tt>Gbk</tt> which contains many enc files. Put the directory to <tt>texmf-fonts/fonts/enc/chinese</tt><br />
# Unzip <tt>map.zip</tt>, you will get many map files, you need just the <tt>gbk.map</tt>. You need to edit <tt>gbk.map</tt>, delete entries of gbli* at the end of the file (lines 505-629). ((sample deleted)). Then, put the modified <tt>gbk.map</tt> to <tt>texmf-fonts/fonts/map/chinese</tt>. Note that newer pdfetex don't read [[pdftex.cfg]] so better use <cmd>loadmapfile[gbk]</cmd> in your document.<br />
# Your document should be compilable now. ((Attached is a test file from Lutz, so you can test your ConTeXt.))<br />
# I haven't tried to compile Traditional Chinese documents. Maybe just get corresponding files for Traditional Chinese and put there to the right location will work. I'm not sure.<br />
<br />
[[Category:Fonts]]<br />
[[Category:International]]</div>130.133.8.114https://wiki.contextgarden.net/index.php?title=Chinese_Japanese_and_Korean&diff=4519Chinese Japanese and Korean2005-12-06T16:54:34Z<p>130.133.8.114: Linkify</p>
<hr />
<div>< [[Fonts]] | [[Encodings and Regimes]] ><br />
<br />
* old introduction [[Uptodate]] by Pragma: [http://www.pragma-ade.com/general/uptodate/up-007-s.pdf screen] and [http://www.pragma-ade.com/general/uptodate/up-007-p.pdf paper] version<br />
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt]<br />
<br />
<br />
Xiao Jianfeng wrote in a mail to the mailing list on 2005-06-06:<br />
<br />
Here is my way of Chinese setup in ConTeXt. I hope this can be of any help to some newbies like me who have problems in processing Chinese.<br />
<br />
# Get the truetype fonts <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htfs.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf hthei.ttf], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf htkai.ttf]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf htsong.ttf]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/<br />
# Get corresponding tfm files <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbfs.zip gbfs.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbhei.zip gbhei.zip], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbkai.zip gbkai.zip]</tt> and <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/gbsong.zip gbsong.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm/<br />
# Get the enc file <tt>[ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/Gbk.zip Gbk.zip]</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Get the map file <tt>map.zip</tt> from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map/<br />
# Put the ttf font files you got in step 1 to <tt>texmf-fonts/fonts/truetype/chinese</tt><br />
# Unzip the files you got in step 2 and you get four corresponding directories (which contain tfm files), then put them in <tt>texmf-fonts/fonts/tfm/chinese</tt><br />
# Unzip <tt>Gbk.zip</tt>, you will get a directory named <tt>Gbk</tt> which contains many enc files. Put the directory to <tt>texmf-fonts/fonts/enc/chinese</tt><br />
# Unzip <tt>map.zip</tt>, you will get many map files, you need just the <tt>gbk.map</tt>. You need to edit <tt>gbk.map</tt>, delete entries of gbli* at the end of the file (lines 505-629). ((sample deleted)). Then, put the modified <tt>gbk.map</tt> to <tt>texmf-fonts/fonts/map/chinese</tt>. Note that newer pdfetex don't read [[pdftex.cfg]] so better use <cmd>loadmapfile[gbk]</cmd> in your document.<br />
# Your document should be compilable now. ((Attached is a test file from Lutz, so you can test your ConTeXt.))<br />
# I haven't tried to compile Traditional Chinese documents. Maybe just get corresponding files for Traditional Chinese and put there to the right location will work. I'm not sure.<br />
<br />
[[Category:Fonts]]<br />
[[Category:International]]</div>130.133.8.114