* Temporary spacing between letters
@ 2015-07-18 7:45 Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-18 10:11 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-07-18 7:45 UTC (permalink / raw)
To: ConTeXt
[-- Attachment #1: Type: text/plain, Size: 816 bytes --]
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
[-- Attachment #2: LetSpac.mkiv --]
[-- Type: application/octet-stream, Size: 412 bytes --]
\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
[-- Attachment #3: LetSpac.pdf --]
[-- Type: application/pdf, Size: 5104 bytes --]
[-- Attachment #4: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Temporary spacing between letters
2015-07-18 7:45 Temporary spacing between letters Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-07-18 10:11 ` Hans Hagen
2015-07-18 10:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-19 12:59 ` footnotes in floating tables Henry House
0 siblings, 2 replies; 5+ messages in thread
From: Hans Hagen @ 2015-07-18 10:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Temporary spacing between letters
2015-07-18 10:11 ` Hans Hagen
@ 2015-07-18 10:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-19 12:59 ` footnotes in floating tables Henry House
1 sibling, 0 replies; 5+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2015-07-18 10:22 UTC (permalink / raw)
To: mailing list for ConTeXt users
Great, thank you! Lukas
On Sat, 18 Jul 2015 12:11:26 +0200, Hans Hagen <pragma@wxs.nl> wrote:
>
> \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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* footnotes in floating tables
2015-07-18 10:11 ` Hans Hagen
2015-07-18 10:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2015-07-19 12:59 ` Henry House
2015-07-20 14:01 ` Alan BRASLAU
1 sibling, 1 reply; 5+ messages in thread
From: Henry House @ 2015-07-19 12:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: footnotes in floating tables
2015-07-19 12:59 ` footnotes in floating tables Henry House
@ 2015-07-20 14:01 ` Alan BRASLAU
0 siblings, 0 replies; 5+ messages in thread
From: Alan BRASLAU @ 2015-07-20 14:01 UTC (permalink / raw)
To: Henry House; +Cc: mailing list for ConTeXt users
On Sun, 19 Jul 2015 05:59:43 -0700
Henry House <hajhouse@hajhouse.org> wrote:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-20 14:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-18 7:45 Temporary spacing between letters Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-18 10:11 ` Hans Hagen
2015-07-18 10:22 ` Procházka Lukáš Ing. - Pontex s. r. o.
2015-07-19 12:59 ` footnotes in floating tables Henry House
2015-07-20 14:01 ` Alan BRASLAU
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).