[NTG-context] Re: making TABLE spacing match tabulate/halign spacing
Am 14.10.24 um 20:09 schrieb Kirill Davidov: i should have probably mentioned ahead of time that i needed this since i wanted to replicate a booktabs style table layout with normal text spacing, like one would have in LaTeX with the appropriate package. the plan was to have a top/bottom rule enabled for a row. sadly it seems like with this solution rule thickness is added no matter if the frame is on or off. is an equivalent negative offset added to the appropriate rows a proper way around this? i measured the baseline skip in Inkscape, and it seems to be correct. To avoid the rule thickness, you usually use offset=overlay; I don’t know if it works with TABLE cells. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
Well, The command \setupexternalfigures is an alias of \setupexternalfigure (https://wiki.contextgarden.net/Command/setupexternalfigures) So, it basically says that the available options in the alias commands are the same as in the original command. David Roderickhat am 14.10.2024 21:19 CEST geschrieben: I have 22 image_000?? directories and file names start as image1, image2 in each one, so even if this path permitted globbing, or regexps, the filenames would clobber each other. should image1 be in image_0006 or image_00019 directory, for example? Incidentally the definition is: \setupexternalfigures [...,...] [..,..=..,..] 1 NAME OPT 2 inherits: \setupexternalfigure Does this mean \setupexternalfigure (single) inherits from \setupexternalfigures (plural)? Yes or no? To say \setupexternalfigures (plural) inherits \setupfigure (single) means that the child (\setupexternalfigures --plural) inherits from the parent (\setupexternalfigure -- singular). Is this a grammatical mistake? e.g. if I inherit 10^6 Euros from my father than I as the benefactor inherit what the deceased has bequeathed to me. Here, my father would here be the plural and I the singular: I would "inherit from" my father, and I would inherit 10^ Euros. The way this stands as it is written means that my father inherits me: which is that I am inherited by my father. Should the definition actually be (?): \setupexternalfigures [...,...] [..,..=..,..] 1 NAME OPT 2 inherited by: \setupexternalfigure David Roderick ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
I have 22 image_000?? directories and file names start as image1, image2 in each one, so even if this path permitted globbing, or regexps, the filenames would clobber each other. should image1 be in image_0006 or image_00019 directory, for example? Incidentally the definition is: \setupexternalfigures [...,...] [..,..=..,..] 1 NAME OPT 2 inherits: \setupexternalfigure Does this mean \setupexternalfigure (single) inherits from \setupexternalfigures (plural)? Yes or no? To say \setupexternalfigures (plural) inherits \setupfigure (single) means that the child (\setupexternalfigures --plural) inherits from the parent (\setupexternalfigure -- singular). Is this a grammatical mistake? e.g. if I inherit 10^6 Euros from my father than I as the benefactor inherit what the deceased has bequeathed to me. Here, my father would here be the plural and I the singular: I would "inherit from" my father, and I would inherit 10^ Euros. The way this stands as it is written means that my father inherits me: which is that I am inherited by my father. Should the definition actually be (?): \setupexternalfigures [...,...] [..,..=..,..] 1 NAME OPT 2 inherited by: \setupexternalfigure David Roderick ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
Am 14.10.24 um 18:17 schrieb Wolfgang Schuster: You don't have to include the subdirectory in \externalfigure when you set the search path at the begin of the document with Even the file extension can be left out. I know, but for the generated code it makes sense to include both, IMO. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
Thank you for fixing this. I espy another feature which is required. I save the png's into a subdirectory called images_0007 which is a subdirectory of where my tex files are located. I run context from the latter (main or lower) working directory. Your script looks for the png's in this lower (main) directory: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[image1.png] \stopplacefigure should be: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[images_7/image1.png][hfactor=fit] \stopplacefigure If you could fix this it would be greatly appreciated, and methinks useful. David Roderick ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] making TABLE spacing match tabulate/halign spacing
Greetings, TABLE uses framed extensively to make its cells. it adds all sorts of offsets and paddings (especially vertical) to cells that annoy me greatly. i'd like to set up TABLEs to have the same vertical spacing as a regular tabulate table or even halign, but i keep getting lost in the options for both TABLE and framed. which ones do i need? i'd like it to play nice with interline spacing options as well. MWE: % === mwe start === \startsetups document:start \setupinterlinespace[line=3.5ex] \stopsetups %\showboxes \startdocument \startcolumns[n=4] text\blank[none] more text\blank[none] \columnbreak \unprotect \halign{% \hss#\tabskip=1em&\tabskip=0pt#\cr text&more text\cr more text&text\cr }% \protect \columnbreak \starttabulate[|r|l|] \NC text \NC more text \NC\AR \NC more text \NC text \NC\AR \stoptabulate \columnbreak \start \setupTABLE[column][1][align=flushright]% \setupTABLE[column][2][align=flushleft]% \bTABLE \bTR \bTD text \eTD \bTD more text \eTD \eTR \bTR \bTD more text \eTD \bTD text \eTD \eTR \eTABLE \stop \stopcolumns \stopdocument % === mwe end === Kirill ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
Am 14.10.24 um 13:12 schrieb David Roderick: Thank you for fixing this. I espy another feature which is required. I save the png's into a subdirectory called images_0007 which is a subdirectory of where my tex files are located. I run context from the latter (main or lower) working directory. Your script looks for the png's in this lower (main) directory: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[image1.png] \stopplacefigure should be: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[images_7/image1.png][hfactor=fit] \stopplacefigure If you could fix this it would be greatly appreciated, and methinks useful. You’re right, that makes sense. I added the path, but not the width setting. I never used extracted images unchanged; usually the result of the script is just raw material for me, so I can live with imperfections. Perhaps it would make sense to use adaptable templates for all constructs (paragraph, itemization, table, image…); for me, the main missing feature is splitting by chapter. This little script won’t become something like Pandoc. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: creating a printed book
David Roderick schrieb am 14.10.2024 um 13:12: Thank you for fixing this. I espy another feature which is required. I save the png's into a subdirectory called images_0007 which is a subdirectory of where my tex files are located. I run context from the latter (main or lower) working directory. Your script looks for the png's in this lower (main) directory: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[image1.png] \stopplacefigure should be: \startplacefigure[location=here,reference=Picture 1178610960,title={}]% rId6 \externalfigure[images_7/image1.png][hfactor=fit] \stopplacefigure If you could fix this it would be greatly appreciated, and methinks useful. You don't have to include the subdirectory in \externalfigure when you set the search path at the begin of the document with \setupexternalfigures[directory=images_7] Even the file extension can be left out. begin example \setupexternalfigures[directory=images_7] \starttext \startplacefigure[reference=Picture 1178610960] \externalfigure[image1][hfactor=fit] \stopplacefigure \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: GB7714-2015 of author-year format
wangzhongtian schrieb am 14.10.2024 um 01:51: sorry,corrected the title . I am trying to implement bibliography management in GB/T 7714-2015 (Chinese bibliography style standard), of Author-Year format. The bib list should be sorted by language, author, year, and then the title of the book. The sorting algorithm should use PinYin of Chinese characters to compare the order. I am wondering is this feature already implemented for LuaMetatex? Or if not, any suggestions on how can I implemented this? Like 1. How to implement the sorting algorithm? 2. Which part of the source code can I rewrite to implement this feature? Take a look into sort-lan.lua. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: making TABLE spacing match tabulate/halign spacing
Kirill Davidov schrieb am 14.10.2024 um 10:12: Greetings, TABLE uses framed extensively to make its cells. it adds all sorts of offsets and paddings (especially vertical) to cells that annoy me greatly. i'd like to set up TABLEs to have the same vertical spacing as a regular tabulate table or even halign, but i keep getting lost in the options for both TABLE and framed. which ones do i need? i'd like it to play nice with interline spacing options as well. You can improve the layout of natural tables (and extreme tables) when you set the offset value to 0pt. Horizontal space between the columns can be either added with the columndistance key or by adding loffset and roffset values. To use \halign use \aligntab as replacement for &. begin example \setupinterlinespace[line=3.5ex] \startdocument \halign\bgroup \hss\aligncontent\removeunwantedspaces\tabskip\emwidth\aligntab\tabskip\zeropoint\aligncontent\cr text \aligntab more text\cr more text\aligntab text \cr \egroup \starttabulate[|r|l|] \NC text \NC more text \NC\NR \NC more text \NC text \NC\NR \stoptabulate \setupTABLE[frame=off,offset=0pt,columndistance=1em,rulethickness=0pt] \setupTABLE[column][1][align=flushright] \setupTABLE[column][2][align=flushleft] \bTABLE \bTR \bTD text \eTD \bTD more text \eTD \eTR \bTR \bTD more text \eTD \bTD text \eTD \eTR \eTABLE \stopdocument end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: making TABLE spacing match tabulate/halign spacing
i should have probably mentioned ahead of time that i needed this since i wanted to replicate a booktabs style table layout with normal text spacing, like one would have in LaTeX with the appropriate package. the plan was to have a top/bottom rule enabled for a row. sadly it seems like with this solution rule thickness is added no matter if the frame is on or off. is an equivalent negative offset added to the appropriate rows a proper way around this? i measured the baseline skip in Inkscape, and it seems to be correct. Kirill ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: making TABLE spacing match tabulate/halign spacing
Kirill Davidov schrieb am 14.10.2024 um 20:09: i should have probably mentioned ahead of time that i needed this since i wanted to replicate a booktabs style table layout with normal text spacing, like one would have in LaTeX with the appropriate package. the plan was to have a top/bottom rule enabled for a row. sadly it seems like with this solution rule thickness is added no matter if the frame is on or off. is an equivalent negative offset added to the appropriate rows a proper way around this? i measured the baseline skip in Inkscape, and it seems to be correct. You can use MetaPost to draw the table rules and keep the default lines at 0pt, to add additional vertical space when needed you can use the toffset and boffset keys. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: making TABLE spacing match tabulate/halign spacing
On 10/14/24 23:20, Wolfgang Schuster wrote: > You can use MetaPost to draw the table rules and keep the default > lines at 0pt, to add > additional vertical space when needed you can use the toffset and > boffset keys. > > Wolfgang oh, that's wonderful. just followed the wiki tutorial on making metapost rules and made a \toprule equivalent, thickness and all. now i just need to put the other rules and put the whole TABLE setup into a, well, setup. this helps greatly so far, thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___