[NTG-context] simple bibliography and dots after section numbering
G'Day, I'm trying out ConTeXt and have come up with 2 questions. 1. How does one add a dot after the numerals in headings, so that \section{First} becomes 1. First instead of 1 First ? 2. I would like to use something like this for bibliography: http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach but adapting it seems too hard for me. Perhaps someone could help? A very crude example: --- People are writing about this \cite[ref1], (\cite[ref2] - page 25). \startbibliography \bibitem[ref1] This is the first reference. \bibitem[Daniel, 2004][ref2] This is the second reference. \stopbibliography --- should be rendered as: --- People are writing about this [1], (Daniel, 2004 - page 25) 1. This is the first reference. 2. This is the second reference. --- That is, I want an environment and 2 commands: \startbibliography \cite [key] \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key] Thank you very much, -- Rogutės Sparnuotos P.S. Is there a paragraph somewhere describing the logic under the use of [] and {} for different commands (it seemed somehow more intuitive in LaTeX). What would a ConTeXt developer choose, \cite[x] or \cite{x} and why? ___ 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 ___
Re: [NTG-context] tooltips and glossary
Michael Saunders wrote: Wolfgang Schuster: http://pragma-ade.com/general/manuals/cont-enp.pdf - page 159 That rambling entry is like the webpage but worse. It still doesn't say what arguments 2--4 do, why \infull is necesarry, or anything else with any clarity. It's just another bundle of bad writing concealing what may be (but probably isn't) something useful. plonk. ___ 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 ___
Re: [NTG-context] tooltips and glossary
Hello again, On 2010-05-04 23:36:17, Michael Saunders wrote: III. Philipp Gesang's lua-based solution connects headwords to entries just as \definesynonyms[gentry][gentries][\infull][\inshort] does, and it produces something that looks like a glossary, but the entries have no link back to the text. Also, I don't see the point of the \usegloss{word} command unless it references the substantive discussion(s) of the word. I think that is what his \usegloss[exp]{word} is for, but then there should be a reference to it in the entry. Something like: {\bd headword}---entry text, p.\at[g:headword] Here you are! Now the link back to the main explanation (yes, that's what \usegloss[#1]#2 with a nonempty first argument does) is carried by a page reference at the end of the entry. Let me know if you want me to change the formatting. There probably is some advantage in using the lua script for this, but I don't know what it is. No advantage other than time saving … About tooltips: \tooltip surprised me, and I was impressed that it appears to typeset the tooltip text with Context, but there are some problems with it: 1. It's stretched horizontally. 2. The active area begins at the baseline and stretches about 1 ex _under_ the word. 3. It appears without a border and under the cursor. I have seen tooltips in pdf files before, and they looked better than this. I suspect the reason is that, as you say, \tooltip uses Javascript, and the ones I saw use a different mechanism. I dug around and found this reference which describes how it's done with form fields and invisible buttons: http://gilbertconsulting.com/pdf/Build_tool_tips_in_InDesign.pdf I had a look at that, he is creating pdf forms and uses them as tooltips -- consequentially I couldn't even see them in xpdf. (Notice how tidy the tooltips in it look.) That document describes setting them up manually in a point-and-click interface, but surely Context could automate this by putting an invisible frame around the word and creating a form field/button over it? And, correct me if I'm wrong, but that mechanism is not Javascript-based at all, is it? Well, it is form-(“widget”-)based and at least some forms use js. The omniscient landfill has some info about this: http://en.wikipedia.org/wiki/Pdf#Interactive_elements But with those elements not even working I have no way to tell them apart. You might be interested in a thread on c.t.t. where widgets and the phantom-box approach are used to accomplish the same in latex: http://groups.google.com/group/comp.text.tex/browse_thread/thread/863613f3d13337f1/989369a06aaf7a34?lnk=raot (by the way: I've not broken the thread again, have I?) Unfortunately, yes, gmail is again misbehaving. Phg -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp9RMNd0tUfn.pgp Description: PGP signature ___ 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 ___
Re: [NTG-context] tooltips and glossary
On Wed, May 5, 2010 at 7:36 AM, Michael Saunders odrad...@gmail.com wrote: II. Marius's modified index solution is the only one to successfully link the entry back to a point in the text, but the resulting glossary really just looks like an index. You can modify the look of an index with \setupregister http://wiki.contextgarden.net/Reference/en/setupregister test2.pdf Description: Adobe PDF document test2.tex Description: TeX document ___ 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 ___
Re: [NTG-context] tooltips and glossary
... forgot the attachment. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments -- -- FILE: glossarium.lua --USAGE: ConTeXt MkIV only -- DESCRIPTION: ad-hoc glossary -- AUTHOR: Philipp Gesang (Phg), megas.kapan...@gmail.com -- VERSION: 1.0 -- CREATED: 04/05/10 13:00:54 CEST -- REVISION: 1 -- gloss = {} gloss.tracker, gloss.content = {}, {} function gloss.warn( text ) context.message( == GLOSSARY: .. text ) end function gloss.newgloss( keyword, entry ) if gloss.content[keyword] then gloss.warn( Entry for .. keyword .. exists. Skipping. ) else gloss.content[keyword] = entry end end function gloss.usegloss( keyword, explained_here) if gloss.content[keyword] then local indstring = glossind: .. keyword if explained_here ~= and not gloss.tracker[keyword] then local refstring = gloss: .. keyword context.reference({ refstring }, ) gloss.tracker[keyword] = true end context.goto(keyword, {indstring}) else gloss.warn( No entry for .. keyword .. . Skipping. ) end end function gloss.place_glossary () -- get all keywords and sort them local sort_me = {} for key, _ in pairs(gloss.content) do table.insert(sort_me, key) end table.sort(sort_me) -- pretty print them somehow for _, keyword in ipairs(sort_me) do local refstring = gloss:.. keyword local indstring = glossind: .. keyword context.noindentation() context.reference({ indstring }, ) context.bgroup() context.bf() --context.goto( keyword, { refstring } ) context(keyword) context.egroup() -- leave some space before entry context.hskip1em() context(gloss.content[keyword]) context.unskip() context(, () context.at( v.s. on p., { refstring } ) context().) context.par() end end \setupinteraction[state=start] \ctxlua{dofile(glossarium.lua)} % Use \gloss#1#2 somewhere before \starttext, in a secondary file if you like. % #1: gloss reference key (used as index) % #2: the entry (explanation) \def\gloss#1#2{% \ctxlua{gloss.newgloss(#1, \luaescapestring{#2})} } \def\dousegloss[#1]#2{% \ctxlua{gloss.usegloss(#2, #1)}% } % Use this in your text to create a reference to the glossary. % #1: optional, If this is the main passage where you explain the entry in detail, % the glossary will link back here. (Just make it non-empty.) % #2: the gloss key \unexpanded\def\usegloss{\dosingleempty\dousegloss} % This is meant to create the glossary after the text: % The gloss key is typeset in bold face and will reference the point in the % main text where \usegloss was called with a nonempty first arg. \def\placeglossary{\ctxlua{gloss.place_glossary()}} \starttext \gloss{glossary}{% A collection of glosses; a list with explanations of abstruse, antiquated, dialectal, or technical terms; a partial dictionary. (As defined by M.~Saunders)% } \gloss{index}{% An index (plural: indexes) is a list of words or phrases ('headings') and associated pointers ('locators') to where useful material relating to that heading can be found in a document. (As def'ed by the English Wikipedia) } test \usegloss{glossary} test. \page Here \usegloss{index} just occurs. \page The glossary entry \usegloss[exp]{index} is explained here. \page Here \usegloss{index} just occurs again. \footnote{Here \usegloss{index} just occurs again.} \page Here we'll deal with \usegloss[exp]{glossary} in detail. \page Here \usegloss{index} just occurs again. \page Here \usegloss{index} just occurs again. \page Here we mention \usegloss{glossary}. \page Here \usegloss{index} just occurs again. \page \placeglossary \stoptext pgpL0Mg1DKcQ3.pgp Description: PGP signature ___ 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 ___
Re: [NTG-context] simple bibliography and dots after section numbering
On Wed, May 5, 2010 at 5:12 AM, rogu...@googlemail.com wrote: G'Day, I'm trying out ConTeXt and have come up with 2 questions. 1. How does one add a dot after the numerals in headings, so that \section{First} becomes 1. First instead of 1 First ? \setupheads[sectionstopper=.] ___ 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 ___
Re: [NTG-context] simple bibliography and dots after section numbering
On 5 mai 2010, at 09:25, Marius wrote: On Wed, May 5, 2010 at 5:12 AM, rogu...@googlemail.com wrote: G'Day, I'm trying out ConTeXt and have come up with 2 questions. 1. How does one add a dot after the numerals in headings, so that \section{First} becomes 1. First instead of 1 First ? \setupheads[sectionstopper=.] Actually this works only in mkiv, and implies also a dot after the chapter numbers and so on. If you want only a dot after the section number you may say \setuphead[section][sectionstopper={.}] The same thing is possible in mkii, but I don't remember how to do it right now… Best regards: OK ___ 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 ___
[NTG-context] existence of file
Is there a ConTeXt macro that can tell me if a certain file exists? If not, may I ask what Lua-call could be made in mkiv? I looked into the wiki but was not able to find the answer, allthough it probably is buried somewhere in it. Thanks beforhand. Hans van der Meer ___ 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 ___
Re: [NTG-context] existence of file
On May 5, 2010, at 11:05 AM, Hans van der Meer wrote: Is there a ConTeXt macro that can tell me if a certain file exists? \doiffileelse{}{}{} HTH Thomas ___ 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 ___
Re: [NTG-context] strange page break
Peter Münster wrote: Hello, Here is a strange page break (version 2010.04.29 22:30): Looks rather normal here, see attached (ver: 2010.05.02 16:43) Best wishes, Taco strangebreak.pdf Description: Adobe PDF document ___ 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 ___
[NTG-context] \installlanguage questions
Hello, I have few questions about command \installlanguage. First, in file lang-ini is command \setuplanguage for default language. It has parameters lefthyphen, righthyphen and hyphen. I would like to ask if these parameters can be used in command \installlanguage or not and what is their funcionality becouse I have tried use command: \setuplanguage[cz][lefthyphen=@,righthyphen=@,hyphen=€] and I didn't see any changes. I thought it's used to setup hyphen mark when the word is spilt at the end of line but I still get symbol - Also I would like to know whats the difference in \date and parameter date in \installlanguage? In parameter date in \installlanguage are curly backets, it's just some mask for command \date? Or those two are entirely different? Thank you answers. Tomas Pustelnik ___ 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 ___
Re: [NTG-context] strange page break
On Wed, May 05 2010, Taco Hoekwater wrote: Looks rather normal here, see attached (ver: 2010.05.02 16:43) A better page break would be after the last line of section 7: \def\mySection{\section{bla}\dorecurse{30}{text }} \starttext \dorecurse8{ \mySection\par bla \doif{\recurselevel}{7}{\page}} \stoptext This is just a minimal example. In my real life documents I have a lot of situations like this, and often it's not just one line that has to be moved to the previous page, but a lot more. So I have now a lot of \page commands in my documents... :( If needed, I'll try to make a better minimal example tomorrow. Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___
Re: [NTG-context] strange page break
Peter Münster wrote: On Wed, May 05 2010, Taco Hoekwater wrote: Looks rather normal here, see attached (ver: 2010.05.02 16:43) A better page break would be after the last line of section 7: Oh, I see. Yes, it is odd that that last line is taken over to the second page in the original test file. But the same thing happens in mkii, so I suspect this is an unavoidable side-effect of page breaking. What happens is that TeX first attempts the break after two lines into section 7 and finds a badness value for that. Then it tries the third line, and finds another badness value for that. Normally, TeX considers the break after the second line better, but in your second example the \page adds a big negative penalty for the third line which skews the result in favor of that line. (TeX's page break algorithm is not all that smart really, because it does not know about sectioning at all: it only sees lines and penalties). Best wishes, Taco ___ 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 ___
Re: [NTG-context] strange page break
On Wed, May 5, 2010 at 4:50 PM, Taco Hoekwater t...@elvenkind.com wrote: Peter Münster wrote: On Wed, May 05 2010, Taco Hoekwater wrote: Looks rather normal here, see attached (ver: 2010.05.02 16:43) A better page break would be after the last line of section 7: Oh, I see. Yes, it is odd that that last line is taken over to the second page in the original test file. But the same thing happens in mkii, so I suspect this is an unavoidable side-effect of page breaking. in mkii the same example looks ok but I suppose it doesn't really matter -- luigi ___ 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 ___
Re: [NTG-context] strange page break
On Wed, May 05 2010, Taco Hoekwater wrote: (TeX's page break algorithm is not all that smart really, because it does not know about sectioning at all: it only sees lines and penalties). So the question is: what can be done? I know, that LaTeX doesn't suffer from such problems... Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___
Re: [NTG-context] strange page break
Am 05.05.10 17:33, schrieb Peter Münster: On Wed, May 05 2010, Taco Hoekwater wrote: (TeX's page break algorithm is not all that smart really, because it does not know about sectioning at all: it only sees lines and penalties). So the question is: what can be done? I know, that LaTeX doesn't suffer from such problems... Without setting your own penalty values you can do this: \setuplayout[setups=*strict] Wolfgang ___ 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 ___
Re: [NTG-context] strange page break
On Wed, May 05 2010, Wolfgang Schuster wrote: Without setting your own penalty values you can do this: \setuplayout[setups=*strict] I'm sorry Wolfgang, I don't understand this command. In the following example, there is still a bad page break: \setuplayout[setups=*strict] \def\mySection{\section{bla}\dorecurse{30}{text }\par bla} \starttext \dorecurse8{\mySection} \stoptext Perhaps, there is a possibility to check easily what LaTeX does with penalties and sections and apply it to ConTeXt? Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___
Re: [NTG-context] strange page break
Am 05.05.10 18:23, schrieb Peter Münster: On Wed, May 05 2010, Wolfgang Schuster wrote Without setting your own penalty values you can do this: \setuplayout[setups=*strict] I'm sorry Wolfgang, I don't understand this command. In the following example, there is still a bad page break: The problem is in your example the page happens between two separate paragraphs and not in a paragraph where a penalty values is available. Wolfgang ___ 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 ___
Re: [NTG-context] strange page break
On Wed, May 05 2010, Wolfgang Schuster wrote: The problem is in your example the page happens between two separate paragraphs and not in a paragraph where a penalty values is available. What is setups=*strict supposed to do? In the following example, the page break is even before section 7: \showframe \setuplayout[setups=*strict] \def\mySection{\section{bla}\dorecurse{40}{text }} \starttext \dorecurse8{\mySection} % try \dorecurse7 here \stoptext I would really like to solve this problem: read the relevant chapters in my TeXbook, take a look into latex-code and then patch context, but unfortunately I don't have time for this right now, so any help is really welcome. Currently I'm working on two documents, where I have a lot of \page commands as workaround. Tomorrow, I'll try to make a better example, where page-breaks are really bad... Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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 ___
Re: [NTG-context] strange page break
Am 05.05.10 19:21, schrieb Peter Münster: What is setups=*strict supposed to do? In the following example, the page break is even before section 7: \showframe \setuplayout[setups=*strict] \def\mySection{\section{bla}\dorecurse{40}{text }} \starttext \dorecurse8{\mySection} % try \dorecurse7 here \stoptext The *strict prevents widows and orphans (comment \setuplayout in this example) but the important setting here is \setupalign[line]. \showframe \setuplayout[setups=*strict] \setupalign[line] \def\mySection{\section{bla}\dorecurse{40}{text }} \starttext \dorecurse8{\mySection} % try \dorecurse7 here \vfil\stoptext Wolfgang ___ 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 ___
[NTG-context] Article titles not capitalized in bibliography
Book titles retain proper capitalization from the .bib file but articles from periodicals do not. Only the first word of an article title is capitalized in the .bbl file. Even proper names in titles lose their capitalization. Is there an option that needs to be set to cause article titles to retain proper capitalization? MKII Tom Benjey 717-258-9733 voice 717-243-0074 fax Twitter: @TomBenjey ___ 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 ___
[NTG-context] Chapter headers variation
Hello, i realy like the example of the wiki about chapter headers, but i wonder if it is possible to have a deeptext only on the first letter? thanks _ Hotmail et MSN dans la poche? HOTMAIL et MSN sont dispo gratuitement sur votre téléphone! http://www.messengersurvotremobile.com/?d=Hotmail___ 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 ___
[NTG-context] Columnset with defined height
Hello, is it possible to somehow define certain height of a columnset? I have tried to put it into the frame, but it does not work. I'm trying to create a conference poster and I think it could be useful for it. greetings Jan -- Tato zpráva byla vytvořena převratným poštovním klientem Opery: http://www.opera.com/mail/ ___ 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 ___