@mickep -- Micropress "vanished" some years ago; the latest date on their website is 2004, and I don't know of anyone who has been in contact since then. The email address found by @DavidCarlisle is, I'm sure, the same person; a different page at CCNY gives the information that he was involved with VTeX.
@JosephWright After breaking my head a couple of days and reading some LUA and looking at l3build's code I understood what was going on and why my basic example didn't work :(. Here's how it goes:
@JosephWright The files declared in typesetdemofiles = { "example.tex" } and typesetfiles = { "demopkg.dtx" } remain in the variable` (file)` that uses typeset (file), this means that the default behaviour for example.tex and demopkg.dtx is the same, no matter how much you customize typeset_demo_tasks (), the typeset (file) function will recompile example.tex.
@JosephWright Solution (one more trick than anything else), put `if file == "example.tex" then return 0 end` within `typeset (file)` The problem with this is that it forces me to write the entire `typeset (file)`, but it solves my problem.
@JosephWright Here I have a question (idea), you can add a variable typesetdemoauto = true|false, with default value true (the current behaviour) and false that will remove the files in typesetdemofiles from (file)? or add the variable samplefiles = { ... } that behaves the same as typesetdemofiles and the function `typeset_sample_tasks () to control the execution?
@JosephWright and that the files are not added to (file) of course.
@PabloGonzálezL Ah, right, I see why you are confused: the hook is really for files that are not listed as all in typesetfiles or typesetdemofile: I'll clarify
@PauloCereda -- Oh, that's very beautiful! The amazing tail on the "Q" makes the purpose of kerning quite clear. It is good to know that such resources are now online.
@JosephWright But if I remove typesetdemofiles = {"example.tex" }, example.pdf will not be installed locally (l3build install --full --dry-run) and will not be attached to the .zip file :(
Hello all. I'm going to try to tackle solving this question myself and it seems like l3regex might do the trick in a hack way by scanning a .bib file for all instance of keyword="$1" and then invoking a command on each $1 (i.e. the capture group).
At the CTAN package repository, the only documentation available seems to be comments in the .dtx file. Is this file readable by TeXDoc? DocTeX? Some obscure command line utility?
The reason I ask is because figuring out what the actual regex syntax is and what's simply formatting for the syntax is a wee bit of a nightmare.
@COTO There isn't an l3regex standalone package anymore. l3regex is contained in expl3, so \usepackage{expl3} already loads l3regex. You can see the documentation with texdoc interface3.
@COTO dtx files are latex documents, but typically you can just use texdoc packagename to get the doc (but l3regex is now documented in interface3 as Phelype says)
Just reading through the documentation now. The regex utilities appear to have what I'm looking for, but I'm wondering how well they'll work with commands in pgfkeys. Which is going to be my next problem: figuring out how to build string-valued lists and compute their intersection. But... this is for later. One nightmare at a time. @___@
@COTO I don't think I'd use l3regex or pgfkeys for that (and certainly not both of them together) The natural way would be to use a bibtex style that only adds entries that have a specific keyword
@DavidCarlisle: I'm aware that bibtex does that for inserting the references themselves, but I'm looking at it for citations. For example, \citetopic{dogs,cats} would find all bibtex entries that include either "dogs" or "cats" (or both) in their keyword list and then reference these documents. The equivalent list of bibtex keys could be anywhere from 1 to 10 items long.
The idea is that I want to be able to add in new references ex post facto, tag them with specific keywords, and then not have to worry about going through the document hunting for all the \cite commands where the new document should be referenced in existing references.
@COTO ah sorry I misread the question, still regex seems the wrong thing as you want exact string matches against a list of strings don't you? rather than regex matching
The regex matching is just so I can manually parse the bibtex file and basically turn each match of the string template @book{ (thekey) ..., keyword="(thetopics)" } into an equivalent command \topicsforbibtexkey{(thekey)}{(thetopics)}.
Then the \topicsforbibtexkey would handle splitting the thetopics list into individual topics (a split on the character ; since some topics would include a comma) and for each topic, invoke some command \registerkeyfortopic{(thekey)}{(topic}} which would build a list of keys for each topic.
Finally, the command \citetopic{topic1,topic2} would compute the union of the keyword lists for topics topic1 and topic2, and behave equivalently to a \cite command with this keyword list.
@COTO the file you referenced with \bibliographystyle{plain} so plain.bst in your case, which for me is: kpsewhich plain.bst /usr/local/texlive/2019/texmf-dist/bibtex/bst/base/plain.bst
Oh wow. OK. LaTeX style files. I get cross-eyed trying to interpret thems. With the time I have, I think I'm just going to write something in node.js that parses the .bib file and spits out a refbytopic.tex file with all the key lists by topic hard-coded.
If I have something like \cite{\topics{a},\topics{b}} that expands to \cite{a,b,a,c}, it won't give me the a reference twice, no? It will treat it like \cite{a,b,c} or some permutation of a, b and c, right?
That way, \topics could be a simple key-value lookup that returns a string. Easy peasy.
I'll have to rerun the application every time I update the .bib file, but no big deal. :)
@JosephWright Fantastic...you can give me a "dummy" example for my 'example.pdf' file with the new version of 'l3build'... I'll wait anxiously until tomorrow to try it out :)