Re: [NTG-context] Can't no break between a close punctuation and a open punctuation
> > doc for example: > > > > ```lmtx > > \setscript[hanzi] > > \usetypescriptfile[mscore] > > \usebodyfont [mschinese,20pt] > > can you upgrade the chiese section in that file for windows 10+ as the > old fonts are gone > > (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt]) I adapted type-imp-mscore.mkiv to the situation of the fonts in Win10, and made type-imp-notocjksc.mkiv according to the Notocjksc fonts. I refer to type-imp-ipaex.mkiv, and I don't know if the method in it is outdated. At least, the test results are fine, though the resulting PDF is a bit too large to be included in this email. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ font_testing.lmtx Description: Binary data type-imp-notocjksc.mkiv Description: Binary data type-imp-mscore.mkiv Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to make a reference go to an exact point of a section on a page?
\setupinteraction[state=start,focus=standard] was what I wanted. Thanks. --- Original Message --- On Thursday, September 1st, 2022 at 4:42 PM, Pablo Rodriguez via ntg-context wrote: > On 9/1/22 14:36, amano.kenji via ntg-context wrote: > > > I just created a reference to a \section with \in. > > > > Clicking the \in reference doesn't go to the \section, but to the > > page that has the \section. > > > > Does ConTeXt lack the ability to go to an exact point of a numbered > > element on a page? > > > Hi Amano, > > please, provide a minimal sample with your questions. > > Sometimes it is not easy for the rest of the world to figure out what > each of us may have in mind. > > I hope any of the options might help you: > > \setupinteraction[state=start,focus=standard] > \starttext > \chapter[one]{One} > in \in[two] or \about[two] > \chapter[two]{Two} > in \in[one] or \about[one] > \stoptext > > Just in case it helps, > > Pablo > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] setupexternalfigures and resoĺution
Am 02.09.22 um 10:39 schrieb Keith McKay via ntg-context: Thanks for this code Hraban. I tried this last night and it worked really well. I did have one stumbling block when I noticed that those image files with a space in their names were not found, however renaming without a space solved the problem. Is this a bug or a feature? The call to gm convert was lacking quoting of the file names. Fixed in attachment. While the code does some downsampling, the calculation is not always right, because it doesn’t consider scaling (or something like that). Hraban if not modules then modules = { } end modules ['grph-downsample'] = { version = 1.101, comment = "companion to grph-inc.mkiv", author= "Peter Münster", -- adapted to LMTX by Hraban copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } assert(not figures.getinfo2) figures.getinfo2 = function(name, page) -- [ [NTG-context] Pdf info with Lua/Ctx API ] if type(name) == "string" then name = { name = name, page = page } end if name.name then local data = figures.push(name) local info = figures.identify() if info.status.status ~= 0 then figures.check() -- !Counts pages here! end figures.pop() return --data info end end local format = string.format -- figures.cachepaths.path = "cache" -- should be setup-option local function sample_down(oldname, newname, resolution) print("DOWNSAMPLE sample_down " .. oldname .. " to " .. newname) local request = figures.current().request local width = request.width local height = request.height if resolution == "" then -- or (not width and not height) then print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %s x %s px", oldname, newname, resolution, width, height)) return end local TEXpt = 65536 local inch = 72.27 -- MkIV: -- local image = img.scan{filename = oldname} -- LMTX: local image = figures.getinfo(oldname,1) image = image.status.private local xy = image.xsize / image.ysize if (not width and not height) then -- no size requested? use default width width = 300 * TEXpt end if not width then height = height / TEXpt width = height * xy end if not height then width = width / TEXpt height = width / xy end width = math.floor(width) height = math.floor(height) print(format("DOWNSAMPLE image size %dx%dpx. requested %dx%d?", image.xsize, image.ysize, width, height)) local xsize = math.floor(resolution * width / inch) local ysize = math.floor(resolution * height / inch) print(format("DOWNSAMPLE size %d x %d to %d x %d", image.xsize, image.ysize, xsize, ysize)) if xsize < image.xsize or ysize < image.ysize then local s = format("gm convert -resize %dx%d -resample %dx%d \"%s\" \"%s\"", xsize, ysize, resolution, resolution, oldname, newname) print("DOWNSAMPLE Conversion: " .. s) os.execute(s) else print(format("DOWNSAMPLE Nothing to do: %s, %s, %s dpi, %d x %d px", oldname, newname, resolution, width, height)) print(format("DOWNSAMPLE xsize = %d, ysize = %d", xsize, ysize)) end end local formats = {"png", "jpg", "gif"} for _, s in ipairs(formats) do figures.converters[s] = figures.converters[s] or {} figures.converters[s]["lowres." .. s] = sample_down end ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Nested itemize
\starttext \startitemize[n] \item\godown[-\lineheight] \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] \item bla \item bla \item bla \item bla \stopitemize \item\godown[-\lineheight] \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] \item bla \item bla \item bla \item bla \item bla \item bla \stopitemize \item\godown[-\lineheight] \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] \item bla \item bla \item bla \item bla \item bla \item bla \item bla \item bla \stopitemize \stopitemize \stoptext Alexandre Christe via ntg-context 於 2022年9月2日 週五 下午5:08寫道: > Dear all, > > I'm struggling to setup a nested itemize with no blank line and several > columns. > > What I mean is something like > 1. a) bla c) bla > b) bla d) bla > > The following MWE is my starting point > > \starttext > \startitemize[n] > \item \blank[-line] > \startitemize[a,horizontal,two] [margin=2cm] > \item First > \item Second > \item Third > \item Fourth > \stopitemize > \item \blank[-line] > \startitemize[a,horizontal,columns,two] > \item First > \item Second > \item Third > \item Fourth > \stopitemize > \stopitemize > \stoptext > > Thanks in advance > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Nested itemize
Dear all, I'm struggling to setup a nested itemize with no blank line and several columns. What I mean is something like 1. a) bla c) bla b) bla d) bla The following MWE is my starting point \starttext \startitemize[n] \item \blank[-line] \startitemize[a,horizontal,two] [margin=2cm] \item First \item Second \item Third \item Fourth \stopitemize \item \blank[-line] \startitemize[a,horizontal,columns,two] \item First \item Second \item Third \item Fourth \stopitemize \stopitemize \stoptext Thanks in advance ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] setupexternalfigures and resoĺution
Thanks for this code Hraban. I tried this last night and it worked really well. I did have one stumbling block when I noticed that those image files with a space in their names were not found, however renaming without a space solved the problem. Is this a bug or a feature? Thanks Keith McKay On Thu, 1 Sep 2022, 09:52 Henning Hraban Ramm via ntg-context, < ntg-context@ntg.nl> wrote: > Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context: > > > > Hi, > > > > what is resolution meant to do? > > > > Whatever I insert as resolution, I get no change. > > > > \setupexternalfigure[location={default,local},resolution=30] > > \starttext > > \externalfigure[hacker] > > \stoptext > > > > What am I missing? > > The resolution parameter is still not used by default ConTeXt, sorry. > > But you can use it with the attached lua file like: > > > \loadluafile[grph-downsample] > \doifmodeelse{print}{% > \def\Resolution{300} > }{% > \def\Resolution{96} > }% > > \setupexternalfigures[ >%directory={./Logos,img}, >conversion=lowres.jpg, >resolution=\Resolution, > ] > > > Hraban > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___