Re: [NTG-context] Dirty trick / clean solution
Hans Hagen [EMAIL PROTECTED] writes: Antoine Junod wrote: Hello list, I've got a piece of code that is absolutely aful. Unfortunately (sic) it makes what I want. \defineparagraphs[p][n=2,before={},after={}] \setupparagraphs[p][1][width=.2\textwidth,style=bold] \definetyping [code] \setuptyping [code] [margin=.23\textwidth,before={},after={\vskip-10pt}] \startp Operation: \p AuctionClient::providePersData($p$: Person)\stopp \startp Description: \p Fournit les données personnelles nécessaires à la création d'un compte, encapsulées dans un objet $p$.\stopp \startp Messages: \p{\tt auctionServer\^{}createAccount(p: Person);}\stopp\startcode sender^message(msg: String); sender^requestPersData() \stopcode \startp Pre: \p {\tt true}\stopp \startp Post: \p{\tt if (self.checkPersData(p))}\stopp\startcode then self.auctionServer.createAccount(p) and not(sender.message('Malformed personal data')) and not(sender.requestPersData()) else not(auctionServer^createAccount(p)) and sender^message('Malformed personal data') and sender^requestPersData() endif \stopcode \blank How could I improve that? I've tried a lot of different things but the main problem is that i can't type in verbatim mode because i'm in reduced horizontal mode. Thanks a lot for you help -AJ \starttext \definedescription[procedure] [width=10em] \definedescription[operation] [procedure] \definedescription[description][procedure] \definedescription[post] [procedure] \setupdescriptions[operation] [title=no,text=Operation] \setupdescriptions[description][title=no,text=Description] \setupdescriptions[post] [title=no,text=Post] \definetyping[code][before=\vskip-\lineheight,after=] \startoperation AuctionClient::providePersData($p$: Person) \stopoperation \startdescription Fournit les données personnelles nécessaires à la création d'un compte, encapsulées dans un objet $p$. \stopdescription \startpost \startcode if (self.checkPersData(p)) then self.auctionServer.createAccount(p) and not(sender.message('Malformed personal data')) and not(sender.requestPersData()) else not(auctionServer^createAccount(p)) and sender^message('Malformed personal data') and sender^requestPersData() endif \stopcode \stoppost \stoptext please wikify this I'll as soon as possible. Thanks a lot for your help. -AJ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] crossref in bibtex
Dear ConText Users Being an age-old LaTeX user I thought I should give ConText a try. But then I stumbled over the first problem when trying to use BibTeX: Crossrefs don't seem to work properly. - the work that uses a crossref is listed incompletely in the publication list - the crossref'd work itself isn't included at all. I haven't found a solution on the web. * * * Details. I have a source file (cut for the relevant parts): -- start of content.tex -- \environment mainsetup \version[concept] \starttext Es wird eine \quotation{Übersichtliche Darstellung} angestrebt (vgl. \cite[wittgenstein-1997-philosophische-untersuchungen]\ §~132, S.~304f.). \completepublications \stoptext -- end of content.tex -- The setup file is in the directory above (for use in multiple docs, as suggested in the ConText documentation): -- start of mainsetup.tex -- \enableregime[utf] \usemodule[bib] \setuppublications[alternative=aps] \setuppublications[sorttype=bbl] \setupbibtex [database={~/Textsammlung/Central}, sort=author] \setupheadtext[de][pubs=Literatur] \startenvironment mainsetup \setupbodyfont[11pt] \mainlanguage[de] \stopenvironment -- end of mainsetup.tex -- The relevant part of the Central.bib is this (in this order, BibTeX expexts uses of crossrefs to appear before the resp. crossref'd entry): -- start of Central.bib -- @STRING{cy-fm = Frankfurt (Main)} @STRING{pb-skp = Suhrkamp} @STRING{wittgenstein = Wittgenstein, Ludwig} @incollection{wittgenstein-1997-philosophische-untersuchungen, Crossref ={wittgenstein-1984-werkausgabe}, Edition = 11, Note ={Text neu durchgesehen von Joachim Schulte}, Pages ={225-580}, Title = {Philosophische Untersuchungen}, Volume = 1, Year =1997 } @book{wittgenstein-1984-werkausgabe, Address = cy-fm, Author = wittgenstein, Booktitle = {Werkausgabe}, Isbn =3518099884, Publisher = pb-skp, Title = {Werkausgabe}, Year =1984 } -- end of Central.bib -- The PDF output file after % texexec --pdf content % bibtext content % texexec --pdf content yields something like (characters may be distrupted due to conversion from UTF-8): -- start of content.pdf rendered as plain text -- Es wird eine Übersichtliche Darstellung der relevanten Begriffe angestrebt (vgl. [1] § 132, S. 304f.). Literatur 1 L. WittgensteinIn [??], p. 225-580. Text neu durchgesehen von Joachim Schulte. -- end of context.pdf -- A hint to the solution for an expert could be the bbl file. Note that the order of the entries is turned around: -- start of content.bbl -- \startpublication[k=wittgenstein-1984-werkausgabe,t=book, a={Wittgenstein},y=1984, n=141,s=Wit84] \author[]{Ludwig}[L.]{}{Wittgenstein} \pubyear{1984} \title{Werkausgabe} \isbn{3518099884} \city{Frankfurt (Main)} \pubname{Suhrkamp} \stoppublication \startpublication[k=wittgenstein-1997-philosophische-untersuchungen,t=incollec% tion, a={Wittgenstein},y=1997, n=140,s=Wit97] \artauthor[]{Ludwig}[L.]{}{Wittgenstein} \pubyear{1997} \arttitle{Philosophische untersuchungen} \crossref{wittgenstein-1984-werkausgabe} \pages{225-580} \pages{225-580} \pubname{Suhrkamp} \note{Text neu durchgesehen von Joachim Schulte} \stoppublication -- end of content.bbl -- So: - The reference as such is found correctly. - The entry in the References has note and pages but not title, edition and volume, and year. - The crossreference is not properly processed. (and, actually, multiple pages should produce pp. not p.) It should be something like 1 L. Wittgenstein (1984) Werkausgabe. Frankfurt (Main): Suhrkamp. 2 L. Wittgenstein (1997) Philosophische Untersuchungen. In [1], Bd. 1, S. 225-580. Text neu durchgesehen von Joachim Schulte. (If ordered by author first, then year. Note also that in \language[de] vol. should be Bd. and p. be S..) Coding for all files is UTF-8, things works as it they should in LaTeX. Any ideas of what to do or hints where to find more info? * * * Additional question: what is the best way to generate the bbl file in the project directory? (I use Central.bib for all my documents). Using % texexec mainsetup in the projects directory produces many unnecessary files (e.g. a dvi file) as it is only meant as a setup file. * * * I general, I like ConText. Strangely, it plays well with my mindset, as does the whole layout orientation with my taste. However, proper bibliography processing is a killer feature for me -- I have virtually no document whithout references. (I wonder, what the direction of the ConText development here is; arguably, odd old BibTeX has reached an end of its history and support for more modern and complete, e.g. XML-based formats would be preferable (say, MODS) -- considering the seeminly nice XML support that is already there.) Cheers Thanks in advance! Ulf Martin ___ ntg-context mailing list ntg-context@ntg.nl
Re: [NTG-context] crossref in bibtex
Hi Ulf, Ulf Martin wrote: Crossrefs don't seem to work properly. There isn't one, only a partial workaround: manually add a line of \nocite[crossref-ed entry] in your source somewhere, and at least the module will typeset the cross-referenced item itself. I will reconsider fixing this, but it is one of the more annoying things to get right. A hint to the solution for an expert could be the bbl file. Note that the order of the entries is turned around: No, that is absolutely unrelated. The .bbl file in context is nothing else than a representation in TeX macros of the original .bib file(s). (If ordered by author first, then year. Note also that in \language[de] vol. should be Bd. and p. be S..) Someone could create a bibl-aps-de.tex file, but I can not. It would just be a copy of bibl-aps.tex, but with german strings instead of english ones. You would still need to use an explicit language like \setuppublications[alternative=aps-de] though (because switching based on the current document language is not necessarily correct and is therefore unsupported). Any ideas of what to do or hints where to find more info? Rgiht here, on this list. * * * Additional question: what is the best way to generate the bbl file in the project directory? (I use Central.bib for all my documents). Using % texexec mainsetup in the projects directory produces many unnecessary files (e.g. a dvi file) as it is only meant as a setup file. You only have to generate the bbl file once, so that should not be a big burden. You could feasibly create a dummy file that is 4 or 5 lines long and has nothing but the \usemodule \setupbibtex lines, run that, and rename the resulting bbl file. However, proper bibliography processing is a killer feature for me -- I have virtually no document whithout references. (I wonder, what the direction of the ConText development here is; arguably, odd old BibTeX has reached an end of its history and support for more modern and complete, e.g. XML-based formats would be preferable (say, MODS) -- considering the seeminly nice XML support that is already there.) Bibtex is a rather idiosyncratic and LaTeX-centric program, and it already takes some effort to make bibtex believe that ConTeXt is enough like LaTeX to make it work. I do not wish to spend much more time catering for the bizarreness that is bibtex than I already have. The next major release of the module (but don't expect a release anywhere this year) will indeed support MODS through citeproc: http://xbiblio.sourceforge.net/citeproc/ Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] New tree in minimal context
Hello all, I am trying the minimal ConTeXt distribution. Ok, so I downloaded justtex.zip and linuztex.zip to /tex... and followed the instructions and all worked out well. However, I have another tree I want to use aswell, say /usr/local/texmf-wolfram. However, when I add entries in one of the following: /tex/texmf/web2c/texmf.cnf /tex/texmf-local/web2c/texmf.cnf /tex/texmf-local/web2c/context.cnf like: TEXMFWOLFRAM = /usr/local/texmf-wolfram and then add to TEXMF the TEXMFWOLFRAM TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST,$TEXMFWOLFRAM} the new tree is still not found when doing a mktexlsr. It just shows: mktexlsr: Updating /tex/texmf/ls-R... mktexlsr: Updating /tex/texmf-extra/ls-R... mktexlsr: Updating /tex/texmf-fonts/ls-R... mktexlsr: Updating /tex/texmf-linux/ls-R... mktexlsr: Updating /tex/texmf-local/ls-R... mktexlsr: Done. So, where should I add a new tree? (is it possible in the minimal version?) The procedure I did above worked well for TeXLive 2004. Best regards, Mikael Persson ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Unwanted indenting on first line of bibtex entries
Hello, I get a small indentation for the entries in the bibliography, but only on the first line! I am right now running the minimal ConTeXt distr, but it was the same with newest ConTeXt on a TeXLive 2004... Example: \usemodule[bib] \setuppublications[ alternative=num, refcommand=num, numbering=yes, ] \setupbibtex[ database=fejk, ] \starttext Bla bla \cite[ab,akgl,kato]. \placepublications[criterium=artikel] \stoptext The files are available at http://www.math.chalmers.se/~mickep/bibproblem/ Especially the resulting pdf is at http://www.math.chalmers.se/~mickep/bibproblem/bibprob.pdf My guess is that there is a \setupbib... something to get the entries without the indentation on the first line. Best regards, Micke P ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Unwanted indenting on first line of bibtex entries
Mikael Persson wrote: Hello, I get a small indentation for the entries in the bibliography, but only on the first line! I am right now running the minimal ConTeXt distr, but it was the same with newest ConTeXt on a TeXLive 2004... Please update to the latest version of the module, this is a known bug. You can get it here: http://modules.contextgarden.net/bib Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] crossref in bibtex
Taco Hoekwater taco at elvenkind.com writes: [.. snip ...] The next major release of the module (but don't expect a release anywhere this year) will indeed support MODS through citeproc: http://xbiblio.sourceforge.net/citeproc/ As the author of citeproc (hi Taco!), let me just update people on recent developments there, which are currently in the project subversion repository*, but not yet officially released. First, I have switched to using a particular RDF/XML as the internal representation, and also therefore the primary input format. I will likely be adding back a MODS input driver when I get a chance, but it's no longer the focus. I will also be releasing a schema for this RDF representation for people that need it. The primary reason for this change is that in comparison to MODS, RDF has a consistent model that makes it easier to model reference metadata. It's also fundamentally a relational model, and so easier to integrate with relational databases where needed. Also, I am working with the OpenDocument Technical Committee on a plan to add extensible metadata support using this RDF-based approach, so we hope to adopt this in OpenOffice as well (I am co-project lead for the OOo bib project). Second, I have started porting CiteProc to Ruby (and put a citeproc-py directory in the repo for those python coders that might want to contribute), which might integrate better with ConTeXt. (I suppose Lua might also be an option given the integration with pdftex?) In any case, this will take me a bit of time as a) I don't have much of it, and b) my coding skills aren't that great. But the actual formatting code (Ruby, XSLT, etc.) is to my mind less important than the logic as embedded in the XML citation style language I wrote to configure the formatting. http://xbiblio.sourceforge.net/csl/ Bruce * http://svn.sourceforge.net/viewcvs.cgi/xbiblio/ ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] New tree in minimal context
Mikael Persson wrote: Hello all, I am trying the minimal ConTeXt distribution. Ok, so I downloaded justtex.zip and linuztex.zip to /tex... and followed the instructions and all worked out well. However, I have another tree I want to use aswell, say /usr/local/texmf-wolfram. However, when I add entries in one of the following: /tex/texmf/web2c/texmf.cnf /tex/texmf-local/web2c/texmf.cnf /tex/texmf-local/web2c/context.cnf like: TEXMFWOLFRAM = /usr/local/texmf-wolfram and then add to TEXMF the TEXMFWOLFRAM TEXMF = {!!$TEXMFCONFIG,!!$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST,$TEXMFWOLFRAM} the new tree is still not found when doing a mktexlsr. It just shows: mktexlsr: Updating /tex/texmf/ls-R... mktexlsr: Updating /tex/texmf-extra/ls-R... mktexlsr: Updating /tex/texmf-fonts/ls-R... mktexlsr: Updating /tex/texmf-linux/ls-R... mktexlsr: Updating /tex/texmf-local/ls-R... mktexlsr: Done. So, where should I add a new tree? (is it possible in the minimal version?) The procedure I did above worked well for TeXLive 2004. you should patch the 'setuptex' script in teh root of the minimal tree; env vars overload settings in texmf.cnf another option is to: export TEXMFPROJECT = /usr/local/texmf-wolfram since this is what the project entry is for Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] What is the third parameter in \useURL for?
For \useURL the first parameter identifies the statement, the second defines the url, the third is usually blank and the fourth gives the text to appear in the clickable area. What is that third parameter for? -- John Culleton Books with answers to marketing and publishing questions: http://wexfordpress.com/tex/shortlist.pdf Book coaches, consultants and packagers: http://wexfordpress.com/tex/packagers.pdf ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] XML and title page rule
Hello, I'm trying to make the following work: 1) XML: titlepage authors=Autor Autor title=Something emdash; or iSomething else/i subtitle=Much Fun publisher=Somebody / 2) ConTeXt translation rule: \defineXMLargument[titlepage]{% \startstandardmakeup \vfil \bfd \setupinterlinespace Whatever \par \bfb \setupinterlinespace You Want \par \vfil \vfil \stopstandardmakeup } I was intending to feed the variables in through '\XMLvar', but can't get the start working (see 2).). I would be grateful if someone could nudge me into the right direction ... Is it even possible to have XML nodes in the variables evaluated (i)? If the above isn't feasible: how would I write an import rule for something like: titlepage authorsAutor Autor/authors titleSomething emdash; or iSomething else/i/title subtitleMuch Fun/subtitle publisherSomebody/publisher /titlepage Thanks for any hints - need sleep now ... Joh -- +--+ | Johannes Graumann, Dipl. Biol. | | | | Graduate StudentTel.: ++1 (626) 395 6602| | Deshaies LabFax.: ++1 (626) 395 5739| | Department of Biology | | CALTECH, M/C 156-29 | | 1200 E. California Blvd.| | Pasadena, CA 91125 | | USA | +--+ pgpLaYWPlYZaz.pgp Description: PGP signature ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context