Temporary spacing between letters
Hello, is it possible to affect the space between letters temporarily? The following code provides it, but I guess there is a better ConTeX way: ---- \starttext \startluacode t = function(str, filler) return str:gsub("(.)", "%1" .. (filler or "~"), #str - 1) end \stopluacode Doslov\par \cldcontext{t("Doslov", "\\,")}\par \cldcontext{t("Doslov", "\\;")}\par \cldcontext{t("Doslov")}\par \cldcontext{t("Doslov", "~~")}\par \cldcontext{t("Doslov", "\\quad ")}\par \cldcontext{t("Doslov", "\\qquad ")}\par \stoptext ---- Best regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 7/18/2015 9:45 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
is it possible to affect the space between letters temporarily?
The following code provides it, but I guess there is a better ConTeX way:
---- \starttext \startluacode t = function(str, filler) return str:gsub("(.)", "%1" .. (filler or "~"), #str - 1) end \stopluacode
Doslov\par \cldcontext{t("Doslov", "\\,")}\par \cldcontext{t("Doslov", "\\;")}\par \cldcontext{t("Doslov")}\par \cldcontext{t("Doslov", "~~")}\par \cldcontext{t("Doslov", "\\quad ")}\par \cldcontext{t("Doslov", "\\qquad ")}\par \stoptext ----
\kerncharacters[.5] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Great, thank you! Lukas
On Sat, 18 Jul 2015 12:11:26 +0200, Hans Hagen
\kerncharacters[.5]
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
I am using the following to style floating tables and am having some difficulties with footnotes in the tables. \enableregime[utf] \setupbodyfont[modern] \setupbodyfont[11pt] \setupfloats[location=middle,spacebefore=0ex,spaceafter=8ex] \setupcaptions[location=top,inbetween={\blank[0cm]},spaceafter=2ex,spacebefore=1ex,headstyle=\sc] \setupTABLE[frame=off,offset=0ex] \setupTABLE[c][distance=0.6em] \def\tableheadrulethickness{1.0pt} \defineframed[footnoteframed]\setupframed[footnoteframed][width=\hsize,frame=off,align=right,top=\hbox\bgroup,bottom=\egroup] % Use the set of symbols that has become customary in many publications for footnote marks, whose % origin seems to be lost in the misty dawn of history: \defineconversion[tablefootnoteconversion][*,†,‡,§,\textbar\textbar,¶] \starttext %%% Begin title page. \startalignment[center] {\ssb Title} \stopalignment %%% End title page. Hello. { \placetable[top,page][table]{ Caption 1. }{ \bTABLE% \bTR{}\bTD{}X \eTD\bTD{}Y\eTD\eTR% \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR% \eTABLE% } } { \setupfootnotes[conversion=tablefootnoteconversion] % MkII % \setupnotation[footnote][numberconversion=tablefootnoteconversion] % MkIV \startlocalfootnotes \setupTABLE[r][1][bottomframe=on,align=low,rulethickness=\tableheadrulethickness] \setupTABLE[r][each][align={flushleft,verytolerant,hyphenated}] % Hyphenate words in table body \setupTABLE[r][1][align={flushleft,low,verytolerant,nothyphenated}] % but not in header row. \placetable[top,page][table]{ Table 2 caption.\footnote{Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. Footnote in caption. }\footnote{Second footnote in caption.} \placelocalfootnotes }{ \placelegend{ \bTABLE% \bTR{}\bTD{}A\note[Footnote_mark_1] \eTD\bTD{}B\note[Footnote_mark_2]\eTD\eTR% \bTR{}\bTD{}1 \eTD\bTD{}2\eTD\eTR% \eTABLE% \footnotetext[Footnote_mark_1]{Footnote to column A. Footnote to column A. Footnote to column A. Footnote to column A.}\footnotetext[Footnote_mark_2]{Footnote to column B.} }{ \footnoteframed{\placelocalfootnotes} \stoplocalfootnotes } } } \stoptext MkII --- this comes close to what I want. - Captions are centered above the TABLE, more or less, and long captions are constrained to a width having reasonable relationship to the width of the TABLE. - Footnotes in the caption appear in a block of reasonable width at the bottom of the caption above the TABLE. - Footnotes in the TABLE appear in a block below the TABLE whose left margin matches the TABLE's left margin. - Symbols are being used for footnote marks. Problems: - I'd like the very short caption of the first table to be centered above the TABLE, but what I actually get seems to be paragraph with an invisible right margin that is centered over the TABLE, but at the text does not reach the paragraph's right margin, it looks misaligned. The same misaligment occurs in the second table's caption, though it is not so objectionable there as the footnotes' texts fill the width. - The block of footnote texts of the TABLE is not wrapped at a reasonable width --- they seem to be left-aligned, but their right margin runs off the page. - I'd like one numbering scheme for the for the whole table (caption and TABLE), such that the caption's notes are numbered *, † and the TABLE's notes are ‡, §. What I actually get is *, † for both, i.e., the numbering resets between caption and TABLE. - I'd like commas separating multiple footnote marks next to each other, as in the caption in the example. - Minor: I'd like to suppress the table from being placed on the the first page of the document as it floats above the title block, confusingly. A minor problem as realstically a table is unlikely to be placed this early in a real document. MkIV (with change from \setupfootnotes to \setupnotation[footnote] as noted) --- there are several new problems. - The caption's footnotes are not printed, though their marks are. - The TABLE's footnote marks are not printed (unknown references), but the notes themselves are (though wrongly). - The texts of all the footnotes in the TABLE are run together into a single line that doesn't break at all.
On Sun, 19 Jul 2015 05:59:43 -0700
Henry House
MkIV (with change from \setupfootnotes to \setupnotation[footnote] as noted) --- there are several new problems.
- The caption's footnotes are not printed, though their marks are. - The TABLE's footnote marks are not printed (unknown references), but the notes themselves are (though wrongly). - The texts of all the footnotes in the TABLE are run together into a single line that doesn't break at all.
There is a magic command that is needed in order to have footnotes appear within a box in mkiv: \automigrateinserts According to node-mig.mkiv, however, "soon default but does not work (yet) for notes in captions (themselves inserts)". Maybe somebody else can enlighten you on the placement of footnotes in table captions. Alan
participants (4)
-
Alan BRASLAU
-
Hans Hagen
-
Henry House
-
Procházka Lukáš Ing. - Pontex s. r. o.