[NTG-context] Can I just put a footnote without marking in the main text?
Hi everybody, After some attempts to put footnotes in a mixed 1&2 columns layout, I decide to put marks in the one-column environment and flush them when entering the two-column environment. The code is ugly but the result is acceptable. Except that the invisible footnote marks do generate something in the main text, so there's a blank line for each footnote. Here's an MWE: = \definenote[address] \setupnote[address][rule=off,location=text] \definenote[putjustmark] \setupnote[putjustmark][location=none] \setupnotation[putjustmark][numberconversion=set 2] \definenote[putjustnote]%[footnote] % if footnotes need to be grouped, uncomment the second argument and the line after \the\titlefootnotes \setupnote[putjustnote][textcommand=\gobbleoneargument] \setupnotation[putjustnote][numberconversion=set 2] \newtoks\titlefootnotes \def\thanks#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to \titlefootnotes} \def\email#1{\putjustmark{#1}\appendtoks \putjustnote{#1} \to \titlefootnotes} \appendtoks \setcounter[footnote][0] % this looks stupid because it has no effect %\setupnotation[footnote][numberconversion=numerals] \to \titlefootnotes \definenamespace [addr] [type=module, name=address, command=yes, setup=list, parent=addr, ] \define[1]\useaddress {\setnotetext[address][#1]{\namedaddressparameter{#1}{name}}} \starttext \defineaddress[fst][name={Name of Institute or Affiliation, City, Country}] \defineaddress[snd][name={Name of Secondary Institute or Affiliation, City, Country}] \processcommacommand[fst,snd]\useaddress The Title\thanks{Work supported by somebody.} Me\email{myemail@some.where}\high{,}\note[address][fst]\high{,}\note[address][snd] \placenotes[address] \blank[medium] \startcolumns \the\titlefootnotes %\setcounter[footnote][0] % why it's necessary to set the counter outside the token if I define [putjustnote] as [footnote]? test\footnote{test} \input knuth \stopcolumns \stoptext = ___ 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] List of publications…
On 5/18/22 12:02 AM Damien Thiriet via ntg-context wrote: > Unfortunately, commenting out all occurrences of those two lines > didn't make the job for me. > And using lowercase characters is unfortunately a no-op as far as > I'm concerned: my bib files have been filled with CamelCase for years, > and are loaded by dozens of other files… > > is there something I missed? > current version: 2022.05.02 16:19 That's strange: I have LMTX 2022.05.11 11:36 and have no issues with this 'patch'. I too have thousands of references across documents, so could not convert the tags to lowercase, and this patch works for me. I am attaching a diff here. I hope you made the format (context --make) after applying the changes. Sreeram--- publ-ini-1.lua 2022-05-04 08:07:01.410444702 +0530 +++ publ-ini.lua 2022-04-24 09:28:56.499009761 +0530 @@ -22,7 +22,7 @@ -- gain is not that large anyway because not much publication stuff is flushed. local next, rawget, type, tostring, tonumber = next, rawget, type, tostring, tonumber -local match, find, gsub, lower = string.match, string.find, string.gsub, string.lower +local match, find, gsub = string.match, string.find, string.gsub local concat, sort, tohash = table.concat, table.sort, table.tohash local mod = math.mod local formatters = string.formatters @@ -1316,12 +1316,6 @@ local typesetters= { } publications.typesetters = typesetters -local lowered = setmetatableindex(function(t,k) -k = lower(k) -t[k] = k -return k -end) - local function defaulttypesetter(field,value,manipulator) if value and value ~= "" then value = tostring(value) @@ -1428,8 +1422,6 @@ local function get(dataset,tag,field,what,check,catspec) -- somewhat more extensive local current = rawget(datasets,dataset) if current then -tag = lowered[tag] -field = lowered[field] local data = current.luadata[tag] if data then local category = data.category @@ -1479,8 +1471,6 @@ local function btxflush(name,tag,field) local dataset = rawget(datasets,name) if dataset then -tag = lowered[tag] -field = lowered[field] local fields = dataset.luadata[tag] if fields then local manipulator, field = splitmanipulation(field) @@ -1507,8 +1497,6 @@ local function btxfield(name,tag,field) local dataset = rawget(datasets,name) if dataset then -tag = lowered[tag] -field = lowered[field] local fields = dataset.luadata[tag] if fields then local category = fields.category @@ -1534,8 +1522,6 @@ local function btxdetail(name,tag,field) local dataset = rawget(datasets,name) if dataset then -tag = lowered[tag] -field = lowered[field] local fields = dataset.luadata[tag] if fields then local details = dataset.details[tag] @@ -1566,11 +1552,8 @@ local function btxdirect(name,tag,field) local dataset = rawget(datasets,name) if dataset then -tag = lowered[tag] -field = lowered[field] local fields = dataset.luadata[tag] if fields then -field = lowered[field] local manipulator, field = splitmanipulation(field) local value = fields[field] if value then @@ -1589,8 +1572,6 @@ local function okay(name,tag,field) local dataset = rawget(datasets,name) if dataset then -tag = lowered[tag] -field = lowered[field] local fields = dataset.luadata[tag] if fields then local category = fields.category ___ 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] ignore not closed tags in XML input
> I wanted to write an introduction on how to typeset XML sources with > ConTeXt (at least, in Spanish). > See: https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/ It's English, but describes a fair amount of what you're probably looking to accomplish, and there are all sorts of free translation services now. > One of the main issues I face is to find examples. > See: https://wiki.contextgarden.net/XML https://wiki.contextgarden.net/Getting_Started_with_XML_and_ConTeXt_using_TEXML And themes for my text editor, KeenWrite, in particular: https://github.com/DaveJarvis/keenwrite-themes/tree/main/xhtml https://github.com/DaveJarvis/keenwrite-themes/tree/main/tarmes https://github.com/DaveJarvis/keenwrite-themes/tree/main/boschet > Maybe all XML handling is way more complex than I originally thought. > It takes some elbow grease. Conceptually, it's essentially mapping XML elements to xmlsetups, which are used to apply typesetting instructions. Cheers! ___ 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] List of publications…
> Till there is a fix, I am able to workaround it by: > • using only lowercase characters (a-z) in the item tags > • comment out all occurrences of > tag = lowered[tag] > field = lowered[field] >in publ-ini.lua > > Sreeram Unfortunately, commenting out all occurrences of those two lines didn't make the job for me. And using lowercase characters is unfortunately a no-op as far as I'm concerned: my bib files have been filled with CamelCase for years, and are loaded by dozens of other files… is there something I missed? current version: 2022.05.02 16:19 Damien ___ 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] ConTeXt meeting 2023(!)
Hi, Being a teacher, I would indeed prefer a meeting during holidays, that would give me a chance to attend sometimes, and meeting locations are often mid-way between France and Poland… Greetings, Damien Thiriet ___ 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] ignore not closed tags in XML input
On 5/16/22 20:13, Taco Hoekwater via ntg-context wrote: >> On 16 May 2022, at 18:50, Pablo Rodriguez via ntg-context >> wrote: >> [...] >> If I want to typeset the whole book >> (https://seumasjeltzz.github.io/LinguaeGraecaePerSeIllustrata/), I will >> have to download and sanitize over 20 HTML files. > > Which can be done with a couple of command lines. Xmllint usually does a good > job of cleaning up dodgy html input: > > xmllint --html --xmlout > Many thanks for your reply, Taco. Since I have to recursively download the site (with "wget -r"), I hope I can find a way to pipe and get all in a single invocation. >> It is really a pity that ConTeXt cannot totally ignore any given XML >> elements. > > This statement is a little unfair: the problem is exactly that your input is > NOT proper XML. My apologies. I really think ConTeXt rocks. I wanted to write an introduction on how to typeset XML sources with ConTeXt (at least, in Spanish). One of the main issues I face is to find examples. It seemed natural to me to use HTML edited texts. But it turned out, it’s way trickier than I first thought. HTML edited texts could be an eye-candy for some potential interested people. But if one has to add web crawler plus XML sanitizer to the dependencies, this makes it way harder (even for myself). > If it was proper XML, ConTeXt would not have problems with it. ConTeXt > explicitly has > the capability to handle XML files, which your input simply is not. In fact, > it is > sloppy HTML-esque data that modern webbrowsers happen to be able to handle > more or less > correctly. It is not valid HTML either, because valid HTML has to be valid > SGML, which your > input clearly is not. I agree my input isn’t proper XML, but it is valid SGML. One of the main differences between both is that SGML allows unclosed tags. This is why cases such as this one are corner-cases: https://validator.w3.org/nu/?doc=https%3A%2F%2Fseumasjeltzz.github.io%2FLinguaeGraecaePerSeIllustrata%2F. Since I considered this a corner-case, I thought that a command such as \xmlignore{#1}{head/(meta|link)} would make sense. > That said, Tools like xmllint exist for this stuff. Just write a small batch > driver file in > some scripting language ((power)shell, lua, python, perl, etc.) to preprocess > the HTML > stuff into clean XML, and you should be fine. Many thanks for your for your reply again. Maybe all XML handling is way more complex than I originally thought. Many thanks for your help, Pablo ___ 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] List of publications...
Hello everybody, sorry for not being responsive in recent days. — I have not been working on the computer in recent days… Thank you so much for all your testing and help for finding a fix for the time being! — I will look into the lua file and apply your suggestion. Many thanks Best Willi > On 11 May 2022, at 11:53, śrīrāma via ntg-context wrote: > > On 5/11/22 2:24 PM Willi Egger via ntg-context wrote: >> I ws trying to finish my list of publications. How ever I now get a very >> strange list. >> >> Could someone compile the attached tex-sample-file and see? >> >> I have ConTeXt ver: 2022.04.20 19:18 LMTX fmt: 2022.4.22 > > Yes: this issue has been there for some time now. Please see: > https://mailman.ntg.nl/pipermail/ntg-context/2022/105649.html, and, > https://mailman.ntg.nl/pipermail/ntg-context/2022/105585.html > > Till there is a fix, I am able to workaround it by: > • using only lowercase characters (a-z) in the item tags > • comment out all occurrences of > tag = lowered[tag] > field = lowered[field] > in publ-ini.lua > > Sreeram > > > ___ > 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 > ___ ___ 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] ConTeXt meeting 2023(!)
Hi y’all, at the latest online meeting as well as within the CG board, we were discussing the ConTeXt meeting in 2023, since nothing is planned yet. [date] The usual fall date makes it difficult for students and teachers to attend. We were discussing a date in August (or even July). Would that make a difference for you? What would you prefer? One argument against a date within the summer holidays is that many venues are booked for years in advance, but we got at least one offer (see below). [place] While we were due to go to Eastern Europe again, it looks like Jano as well as Mojca are too busy to organize a meeting. (And I’m very sorry if I misunderstood!) Please stand up whoever would like to organize next year’s meeting! Otherwise I might invite you to Maibach again (where we were in 2017), they told me they still have open slots in summer. Hoping for many more exciting ConTeXt meetings, Hraban https://meeting.contextgarden.net ___ 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 ___