* No bibliography in the output, depends on file name @ 2014-01-15 14:02 Nicola 2014-01-17 12:15 ` Marco Patzer 0 siblings, 1 reply; 3+ messages in thread From: Nicola @ 2014-01-15 14:02 UTC (permalink / raw) To: ntg-context Hi, maybe this is a known issue, but I couldn't find anything about it, so I'm reporting it. I'm writing a ConTeXt document called modern-c++.tex (in OS X 10.7.5). The content of the file is: \setupbibtex[database={modern-c++}, sort=author] \setuppublications[numbering=yes] \starttext \completepublications[criterium=all] \stoptext (Well, I haven't started to write my notes yet.) When typesetting it, though, no bibliography is printed (I've tried with Mark II/IV from MacTeX and with the latest Mark IV stable/beta). Renaming the .tex file to cplusplus.tex solves the problem (there is no need to rename the .bib file). Nicola ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No bibliography in the output, depends on file name 2014-01-15 14:02 No bibliography in the output, depends on file name Nicola @ 2014-01-17 12:15 ` Marco Patzer 2014-01-17 13:34 ` Hans Hagen 0 siblings, 1 reply; 3+ messages in thread From: Marco Patzer @ 2014-01-17 12:15 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1537 bytes --] On 2014–01–15 Nicola wrote: > maybe this is a known issue, It's a known fact that context has a different notion of valid file names than your operating system does. This is by design. To quote the manual: “It is highly recommended, that all input files, i.e. the ConTEXt source and other included files such as image files, have only the letters a–z, digits and dashes in their names, that is in the names of their full paths, otherwise you can easily get into problems.” > I'm writing a ConTeXt document called modern-c++.tex (in OS X 10.7.5). The > content of the file is: > > \setupbibtex[database={modern-c++}, sort=author] > \setuppublications[numbering=yes] > \starttext > \completepublications[criterium=all] > \stoptext Especially since c++ didn't work out, I expected dropping the “++” would work (“modern-c”), but it didn't. So I ran some tracing: \enabletrackers [resolvers.readfile] \starttext \readfile{file++.ext}{}{} \stoptext This reports: files > readfile > not found by tree lookup: file .ext Which means the “++” is replaced by two spaces, instead of searching for “file++.ext” or “file.ext” which is what I had expected. I didn't dig into the code to check where the spaces creep in. Regardless if this particular issue gets fixed or not, I doubt that Hans will put much effort into general support for “esoteric” file names. So, it's best to avoid plus signs in file names. Marco [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No bibliography in the output, depends on file name 2014-01-17 12:15 ` Marco Patzer @ 2014-01-17 13:34 ` Hans Hagen 0 siblings, 0 replies; 3+ messages in thread From: Hans Hagen @ 2014-01-17 13:34 UTC (permalink / raw) To: mailing list for ConTeXt users On 1/17/2014 1:15 PM, Marco Patzer wrote: > On 2014–01–15 Nicola wrote: > >> maybe this is a known issue, > > It's a known fact that context has a different notion of valid file > names than your operating system does. This is by design. To quote > the manual: > > “It is highly recommended, that all input files, i.e. the ConTEXt > source and other included files such as image files, have only the > letters a–z, digits and dashes in their names, that is in the > names of their full paths, otherwise you can easily get into > problems.” > >> I'm writing a ConTeXt document called modern-c++.tex (in OS X 10.7.5). The >> content of the file is: >> >> \setupbibtex[database={modern-c++}, sort=author] >> \setuppublications[numbering=yes] >> \starttext >> \completepublications[criterium=all] >> \stoptext > > Especially since c++ didn't work out, I expected dropping the “++” > would work (“modern-c”), but it didn't. So I ran some tracing: > > \enabletrackers [resolvers.readfile] > \starttext > \readfile{file++.ext}{}{} > \stoptext > > This reports: > > files > readfile > not found by tree lookup: file .ext > > Which means the “++” is replaced by two spaces, instead of searching > for “file++.ext” or “file.ext” which is what I had expected. I > didn't dig into the code to check where the spaces creep in. > > Regardless if this particular issue gets fixed or not, I doubt that > Hans will put much effort into general support for “esoteric” file > names. So, it's best to avoid plus signs in file names. indeed. names are parsed as url's (so + become space) so a possible fix is: function getreadfilename(scheme,path,name) local fullname if hasscheme(name) or is_qualified_path(name) then fullname = name else name = url.escape(name) -- yes or no ? fullname = ((path == "") and format("%s:///%s",scheme,name)) or format("%s:///%s/%s",scheme,path,name) end return resolvers.findtexfile(fullname) or "" -- can be more direct end but one cannot predict how this passes further on through the system also, because one can say: \readfile{file\letterpercent2B\letterpercent2B.ext}{}{} the hack in fact should be: if not string.find(name,"%%") then name = url.escape(name) -- if no % in names end which then handles both \readfile{file\letterpercent2B\letterpercent2B.ext}{}{} \readfile{file++.ext}{}{} ok. Of course, when moving from c++ to c# one gets things like \readfile{file\letterhash.ext}{}{} where the # will sometimes confuses macros later on. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-17 13:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-01-15 14:02 No bibliography in the output, depends on file name Nicola 2014-01-17 12:15 ` Marco Patzer 2014-01-17 13:34 ` Hans Hagen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).