Re: [NTG-context] Multiline cell in spreadsheettable
Am Thu, Nov 18, 2021 at 07:08:12PM +0100 schrieb Hans Hagen: > maybe something > > \setupTABLE[c][1][width=4cm] > \setupTABLE[c][3][width=4cm] I discovered that \startcell[align=flushleft,width=4cm] A very long line that breaks \stopcell does the same trick. While the parameter width is mentioned in spreadsheet-mkiv.pdf there is no hint that it gives you line breaking cells. And in https://wiki.contextgarden.net/Command/setupTABLE the parameter width is not mentioned at all. Maybe I knew this but forgot it. And when I searched the wiki I could not find a hint to this. I would like to improve the wiki, any hint where a hint to this would fit? TIA juh -- Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: . http://www.sudelbuch.de Privater Blog: http://www.hasecke.eu Netzliteratur-Projekt: http://www.generationenprojekt.de signature.asc Description: PGP signature ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using old fonts
On Thu, 2021-11-18 at 18:57 +0100, Hans Hagen wrote: > Are you talking type 1 fonts? These should just work, assuming that you > have the afm files installed. You need to define them with the right > features enabled (just like opentype fonts). Ok, yes this works (for kerning and the standard ligatures). liga=no, however does not disable ligatures. I had slight practical problem with Type 1 fonts, in that the OSFONTDIR variables needs to be set while running context. For TTF and OTF this appears only to be needed while refreshing the cache. Since I am not yet familiar with typescript I use \definefontfamily. Here I needed to set \definefontfamily[mainfont][serif][Bembo][tf=Bembo,...] instead of just \definefontfamily[mainfont][serif][Bembo]. Are there any other features than apply to Type 1 fonts? > The fallback mechanism does that (you can define a collection that > way). > One can also try to make features (there are examples in the te st > suite). Have you got any pointer to such an example? ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Errors in source files return success
Hi! ConTeXt can detect issues in the sources and report them on the console with the argument --errors or with \enabledirectives [logs.errors]. The return value is still “0” (=success) even with errors present. Right now I use a script that parses the log file and lets me know if a run has issues. However, it would be great if context could return a non-zero value if errors are present. I've found that \enabledirectives [logs.errors=missing characters] returns “1” if characters are missing. Lovely! Undefined control sequences always return 1 (a TeX thing I believe and not related to the macro package). But undefined control sequences don't show up on the console as the other errors do if general output (except errors) is silenced e.g. with context --silent --noconsole --nostatistics --errors The question is, what other directives can be enabled that make context return a failure? Is there a way to return failure if *any* error is encountered or do they need to be enabled each individually? And is there a way to show hard TeX errors as undefined control sequences as a “possible issue” if output is silenced? MWE: %% enables logging of errors same as --errors AFAIK \enabledirectives [logs.errors] %% makes context return 1 on missing chars, great! %% \enabledirectives %% [logs.errors=missing characters] \starttext %% missing characters 풜 %% missing figure \externalfigure [foo] %% \end occurred inside a group at level 1 %% ### semi simple group … entered at line \startalignment [middle] foo %% missing references See \in{section}[sec:none]. %% undefined control sequence %% \undefined \stoptext Marco ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multiline cell in spreadsheettable
On 11/18/2021 5:07 PM, juh via ntg-context wrote: Am Thu, Nov 18, 2021 at 12:56:33PM +0100 schrieb Hans Hagen: On 11/18/2021 10:29 AM, juh via ntg-context wrote: Hi all, is there a parameter to have multiple lines in a cell in a spreadsheettable? see end of m-spreadsheet ... they are just natural tables I found this code on the wiki % mode=mkiv \setuppapersize[A5] \bTABLE \setupTABLE[c][each][alignmentcharacter={number->.},aligncharacter=yes,align=middle] \bTABLEhead \bTR \bTH Same-Width Prefix \eTH \bTH Varying-Width Prefix \eTH \bTH Same-Width Suffix \eTH \bTH Varying-Width Suffix \eTH \eTR \eTABLEhead \bTABLEbody \bTR \bTD \$1.00 \eTD \bTD\$1.00 \eTD \bTD 1.00\% \eTD \bTD 1.00\% \eTD \eTR \bTR \bTD \$10.00 \eTD \bTD \$\$10.00 \eTD \bTD 10.00\% \eTD \bTD 10.00\%\% \eTD \eTR \bTR \bTD \$1.0 \eTD \bTD\$1.0 \eTD \bTD 1.0\% \eTD \bTD 1.0\% \eTD \eTR \bTR \bTD \$10.0 \eTD \bTD \$\$10.0 \eTD \bTD 10.0\% \eTD \bTD 10.0\%\% \eTD \eTR \eTABLEbody \eTABLE It sets the text of bTH like p{4cm} in LaTeX in several lines. maybe something \setupTABLE[c][1][width=4cm] \setupTABLE[c][3][width=4cm] or otherwise more cells with a span (nx=...) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Using old fonts
On 11/18/2021 5:36 PM, Gérard Milmeister via ntg-context wrote: Using old fonts Around 2000 I acquired a collection of fonts, mostly Type 1 and some TrueType. As it appears they are not fully usable in ConTeXt. The two main issues are: 1. Kerning and ligatures These features can be only be used, if the GPOS and GSUB tables are present and adequately filled. Now, the old font files do not have these tables, but instead use some obsolete (?) form of kerning table, and ligatures are not qualified as such, but only trough their Unicode point and name (most commonly fi and fl). I used fontforge, which creates the GPOS table automatically, added the liga table manually, and generated an OTF font file. Is there a way to automate this (possibly a fontforge script)? The script should also find the ligatures (there may also be frac substitutions). Or is there another way which leaves the files unchanged? Are you talking type 1 fonts? These should just work, assuming that you have the afm files installed. You need to define them with the right features enabled (just like opentype fonts). 2. Selecting glyphs from multiple font files Often there are additional font files which contain small caps (in place of lowercase characters) and old style figures (in place of digits), and other variant glyphs and additional ligatures (usually the font name contains OsF, SC, Alt, or Exp). Sometimes these are not allocated to a Unicode point, but only identified by name (e.g. "threeoldstyle" or "Esmall"). Is it possible to create some sort of virtual feature (such as onum), that will cause ConTeXt to take glyphs from another file (but only for specified Unicode ranges)? I suppose this can be done with a Lua goody. The fallback mechanism does that (you can define a collection that way). One can also try to make features (there are examples in the te st suite). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Using old fonts
Using old fonts Around 2000 I acquired a collection of fonts, mostly Type 1 and some TrueType. As it appears they are not fully usable in ConTeXt. The two main issues are: 1. Kerning and ligatures These features can be only be used, if the GPOS and GSUB tables are present and adequately filled. Now, the old font files do not have these tables, but instead use some obsolete (?) form of kerning table, and ligatures are not qualified as such, but only trough their Unicode point and name (most commonly fi and fl). I used fontforge, which creates the GPOS table automatically, added the liga table manually, and generated an OTF font file. Is there a way to automate this (possibly a fontforge script)? The script should also find the ligatures (there may also be frac substitutions). Or is there another way which leaves the files unchanged? 2. Selecting glyphs from multiple font files Often there are additional font files which contain small caps (in place of lowercase characters) and old style figures (in place of digits), and other variant glyphs and additional ligatures (usually the font name contains OsF, SC, Alt, or Exp). Sometimes these are not allocated to a Unicode point, but only identified by name (e.g. "threeoldstyle" or "Esmall"). Is it possible to create some sort of virtual feature (such as onum), that will cause ConTeXt to take glyphs from another file (but only for specified Unicode ranges)? I suppose this can be done with a Lua goody. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multiline cell in spreadsheettable
Am Thu, Nov 18, 2021 at 12:56:33PM +0100 schrieb Hans Hagen: > On 11/18/2021 10:29 AM, juh via ntg-context wrote: > > Hi all, > > > > is there a parameter to have multiple lines in a cell in a spreadsheettable? > see end of m-spreadsheet ... they are just natural tables I found this code on the wiki % mode=mkiv \setuppapersize[A5] \bTABLE \setupTABLE[c][each][alignmentcharacter={number->.},aligncharacter=yes,align=middle] \bTABLEhead \bTR \bTH Same-Width Prefix \eTH \bTH Varying-Width Prefix \eTH \bTH Same-Width Suffix \eTH \bTH Varying-Width Suffix \eTH \eTR \eTABLEhead \bTABLEbody \bTR \bTD \$1.00 \eTD \bTD\$1.00 \eTD \bTD 1.00\% \eTD \bTD 1.00\% \eTD \eTR \bTR \bTD \$10.00 \eTD \bTD \$\$10.00 \eTD \bTD 10.00\% \eTD \bTD 10.00\%\% \eTD \eTR \bTR \bTD \$1.0 \eTD \bTD\$1.0 \eTD \bTD 1.0\% \eTD \bTD 1.0\% \eTD \eTR \bTR \bTD \$10.0 \eTD \bTD \$\$10.0 \eTD \bTD 10.0\% \eTD \bTD 10.0\%\% \eTD \eTR \eTABLEbody \eTABLE It sets the text of bTH like p{4cm} in LaTeX in several lines. But this does not work with my invoice code: \startspreadsheettable[test][frame=off] \setupTABLE[c][each][alignmentcharacter={number->.},aligncharacter=yes,align=middle] \startrow[topframe=off,bottomframe=on] \startcell[align=flushleft] "Anz" \stopcell \startcell[align=flushleft, width=9cm] "Beschreibung" \stopcell \startcell[align=flushleft] "MwSt" \stopcell \startcell[align=flushright] "Einzeln" \stopcell \startcell[align=flushright] "Gesamt" \stopcell \stoprow $for(positions)$ \startrow \startcell[align=center] @ "0.2f h" $it.stunden$ \stopcell \startcell[align=flushleft] "$it.name$" \stopcell %<-- this cell should be like p{4cm} \startcell[align=flushright] @ "0.2f \percent" $it.mwst$ \stopcell \startcell[align=flushright] @ "0.2f €" $it.stundensatz$ \stopcell \startcell[align=flushright] @ "0.2f €" (A[row] * D[row]) \stopcell \stoprow $endfor$ \startrow[topframe=on] \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft, style=bold] "Gesamt netto" \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushright, style=bold] @ "0.2f €" sum(E) \stopcell \stoprow \startrow[topframe=off] \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft] "Mehrwertsteuer" \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushright] @ "0.2f €" 0.19 * E[row-1] \stopcell \stoprow \startrow[topframe=off] \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft, style=bold] "Gesamtsumme" \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushleft] " " \stopcell \startcell[align=flushright, style=bold] @ "0.2f €" E[row-1]+E[row-2] \stopcell \stoprow \stopspreadsheettable The key between $ are variables which get filled by pandoc. signature.asc Description: PGP signature ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Multiline cell in spreadsheettable
On 11/18/2021 10:29 AM, juh via ntg-context wrote: Hi all, is there a parameter to have multiple lines in a cell in a spreadsheettable? see end of m-spreadsheet ... they are just natural tables - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Multiline cell in spreadsheettable
Hi all, is there a parameter to have multiple lines in a cell in a spreadsheettable? TIA juh -- Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: . http://www.sudelbuch.de Privater Blog: http://www.hasecke.eu Netzliteratur-Projekt: http://www.generationenprojekt.de signature.asc Description: PGP signature ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___