Re: [NTG-context] Epub woes
Please try the following example: -- start code -- \setupbackend[export=yes,xhtml=test_00.xhtml] \mainlanguage[de] \language[de] \setupexport [title={A nice book}, author={Andy Tom}, firstpage={huhn.jpg}, ] \starttext Hello world! \stoptext -- end code -- The firstpage export value (huhn.jpg) is your cover image. Please put huhn.jpg or something else in the same directory as your tex file. I named the tex=file test_00.tex in my case. After compiling with the latest context, you can run 'mtxrun --script epub --make test_00.specification' to generate the epub file. Please note two more things: (1) The mtx-epub script was broken a couple of days ago. Well not actually broken, but somehow an old version sneaked in. If the author names and such do not get exported into the epub, this might as well be the case for you. The latest one (ver: 2012.11.14 11:37 MKIV fmt: 2012.11.16) works fine again. (2) Calibre and other readers as well as e.g. the ipad have some nasty caching feature. In case you change little things and try to reload the same book in your reader, it might still show the old one from the cache. I found, that deleting the 'old' book first works most of the times. I just started working on the epub output of my lecture notes again, since there were no readers able to output math until 2 weeks ago. If I find some time later, I will update the epub page in the wiki. I hope that helps. Andy On Nov 15, 2012, at 7:58 PM, Bill Meahan wrote: I tried to generate an epub document using ConTeXt following the recipe on the wiki. Didn't work. So, I tried running the export-example.tex file that comes with the distribution, unmodified. Same bad results. Cover is not generated TOC is not generated (though it is noted this might be the state of the export) Sectioning doesn't happen. Paragraphing doesn't happen. The resultant epub file cannot even be opened with FBReader. Importing the epub into Sigil shows one big blob of text, with only the between word spacing that's present in the source file. The \quotation{} markup did get turned into quotation marks, chapter numbers were generated and the rest of the markup was stripped out. Same behavior with both the TeXLive 2012 version of ConTeXt and a quite recent beta. Up-to-date Ubuntu 12.04 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 i686 i686 i386 GNU/Linux What am I doing wrong? -- Bill Meahan Westland, Michigan USA ___ 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 ___ ___ 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] Epub woes
Supposedly. I did not try it yet. http://support.apple.com/kb/HT5321 Andy On Nov 16, 2012, at 8:13 AM, luigi scarso wrote: On Fri, Nov 16, 2012 at 7:49 AM, Andy Thomas andytho...@web.de wrote: I just started working on the epub output of my lecture notes again, since there were no readers able to output math until 2 weeks ago. Is there any reader able to read mathml ? -- 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 ___ ___ 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] images and text stacked in the margin
Dear list, I am still struggling to achieve the page layout/look that I am trying to get. For an image of the desired page spread please look here: https://dl.dropbox.com/u/9089117/tufte-spread.png The design is using the ample margin to place text (sidenotes), figures (images) and tables in the margin. I am unable to get both (images and text) to work properly. (1) put all in a \margintext \margintext{...} for text \margintext{\placefigure...} for external images This option does not work if the position is close to a page break (cp. http://archive.contextgarden.net/message/2012.191529.3fbef120.en.html) (2) use two different macros \margintext{...} for text and \placefigure[location=margin]{}{...} for external images This option does not work because they are placed on top of each other. I also tried \startplacefigure, but also no luck. (3) put all in a \placefigure \placefigure[margin,none]{}{Text Text} for text \placefigure[margin,none]{}{...} for external images This works best, because it starts from the top and nicely stacks the marginals. But it introduces a paragraph break where the sidenote is called. This does not work, it defeats the purpose (imagine a paragraph after every footnote). (4) use (3) and postponing \startpostponing [+1]% \startplacefigure[location={margin,none}]% Text text\stopplacefigure% \stoppostponing% Now, the paragraph break is gone, but the sidenote is on the next page, which does not make sense in our case (cp. http://tex.stackexchange.com/questions/56388/avoid-line-break-after-macro). In general, I do not understand, where the paragraph break at the \placefigure... comes from. It does not seam necessary in most cases (e.g. location=top) and postponing does avoid it. Can I 'gobble' it somehow? Does anyone have an idea, how to make it work for images as well as text combined? Andy ___ 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] images and text stacked in the margin
On Nov 12, 2012, at 3:10 PM, Marco Patzer wrote: You need to put the \placemargintext at the beginning of a paragraph, otherwise it will cause an unwanted break. :( Unfortunately, this is not an option. The citations have to be referenced at the end of particular sentences. The first link (showing the spread) makes it more obvious. Also, I tried marginblocks now, but they show the same bug as margintext if a page break occurs close by. ___ 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] margintext and placefigure
Dear all. I am having some trouble with figure placement in the margin. If you use the following code, please try to comment out first one and then both '\input knuth'. Somehow, the figure is not placed in the margin, but the center of the page, if a page breaks occurs close by. Is there a way to avoid that and have the figure always placed in the margin? Thanks, Andy -- code starts --- \useMPlibrary[dum] % To get dummy figures \definepapersize[wissenschaft][width=170mm, height=240mm] \setuppapersize [wissenschaft] \setuplayout[topspace=40pt, header=0pt, headerdistance=0pt, height=560pt, footer=0pt, % backspace=42pt, leftmargin=0pt, width=280pt, rightmargindistance=20pt, rightmargin=100pt] \setupmargindata [margintext] [location=outer, width=100pt, stack=continue] \starttext % \chapter{One} \input tufte \input knuth \input knuth \section{Figures} % \margintext {\startplacefigure[ title={A small rectangle put in the margin.}] \externalfigure[dummy] \stopplacefigure} \input tufte \stoptext -- code ends --- background: I started working on my module (caesar) again, since the ipad is supposed to render mathml now. That means, I could try the context epub output with formulas on an actual device (cp. http://support.apple.com/kb/HT5321) ___ 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] margintext and placefigure
That was my first choice as well. But it does not play nice with margintext. Try putting \margintext{bla} directly after the chapter. stack=continue is somehow ignored. Also, the figure is moved all the way up, which is strange. On Nov 11, 2012, at 8:52 PM, Marco Patzer wrote: 2012-11-11 Andy Thomas: Is there a way to avoid that and have the figure always placed in the margin? \startplacefigure [title=Foo, location=margin] \stopplacefigure Marco ___ 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 ___ ___ 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] margintext and placefigure
On Nov 11, 2012, at 9:23 PM, Marco Patzer wrote: 2012-11-11 Andy Thomas: That was my first choice as well. But it does not play nice with margintext. The both use two different mechanisms AFAIK, and there's no or not much communication between them. Mixing both leads to overprinted content. So, can I modify the original code to work as intended? Also, the figure is moved all the way up, which is strange. That's intended. The margin texts stack up from the top to the bottom. For figures this usually does makes sense since the figures are referred to by number anyway. That would even be preferred, if all marginals stack from the top down (http://archive.contextgarden.net/message/20120529.093731.5306286a.en.html) Andy ___ 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] How to put a \placefigure with no caption?
Yes. \placefigure is the old syntax. \start…\stopplacefigure the new one. The new one uses a the key=value syntax also present in other MkIV commands. Compare: \startplacefigure [title=Lorem, reference=fig:lorem] … \stopplacefigure \startchapter [title=Lorem, reference=sec:lorem] … \stopchapter They are both supported, I personally stick to the new variant. I find the interface much more memorable. I guess, I do not understand the relation completely. Please compare the following -- startcode -- \starttext % \chapter{One} \input tufte \placefigure[margin,none]{}{Let's put some text of at least two lines.} \placefigure[none,margin]{}{Let's put some text of at least two lines.} \input tufte \stoptext -- stopcode -- The first one works as intended, the second one does not. Also, I cannot figure out the equivalent new syntax. I tried 'caption=none' and 'location=none'. But even if the latter one would work, having a caption (or not) and placing the figure on the page are two different things? Andy ___ 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] back-up.lua; mtx-epub.lua
On Jun 11, 2012, at 12:21 AM, Hans Hagen wrote: The validator likes it, next is the hard part: generating a valid xhtml. Is the xhtml generator only for the epub, i.e. can it be changed or is another output file just for the epub appropriate? the only issue is that css has no method for mapping a link which is why the exporter produces two files (xml and xhtml) I get an error by the epub validator if I feed it the generated epub. The content file is: -START ?xml version='1.0' encoding='UTF-8' standalone='yes' ? !-- input filename : test_00 -- !-- processing date : Mon Jun 11 07:03:39 2012 -- !-- context version : 2012.06.11 00:21 -- !-- exporter version : 0.30 -- document xmlns:m=http://www.w3.org/1998/Math/MathML; version=0.30 language=de date=Mon Jun 11 07:03:39 2012 file=test_00 context=2012.06.11 00:21 xmlns:xhtml=http://www.w3.org/1999/xhtml; Hello world! /document -END the error is: -START Epubcheck Version 3.0b5 Validating against EPUB version 2.0 ERROR: test_00.epub/OEBPS/test_00.xhtml(9,202): elements from namespace are not allowed Check finished with warnings or errors -END A possible validatable file would be -START ?xml version=1.0 encoding=UTF-8 ? !-- input filename : test_00 -- !-- processing date : Sat Jun 9 14:36:39 2012 -- !-- context version : 2012.06.09 01:22 -- !-- exporter version : 0.30 -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head titleTITLE/title /head body div id=test_00 Hello world! /div /body /html -END It just wraps the filename without extension in title plus head and the main part in body plus a div. However, I did not try, yet, how many or which devices can read it just fine. Calibre is already happy with it and shows it just fine. Please note that some ebook readers (e.g. apple devices, calibre) have a nasty caching mechanism. If you want to see the new changes, I found that it is best to delete the old book before replacing it. Andy https://dl.dropbox.com/u/9089117/mtx-epub_4.lua xmlns + doctype is probably a bit over the top for the coverpage I slavishly follow the mandatory epub specification and then add some things to make common devices work. Calibre, Adobe Digital Editions and Apple devices want a xhtml cover page in a very special way and ignore the cover image otherwise. The next thing I would add is a toc.xhtml. Here, a Kindle ignores the toc.ncx and wants a html toc as well. Unfortunately, this blows up mtx-epub, but at least that is the last issue with reading devices that I know. Andy ___ 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] back-up.lua; mtx-epub.lua
On Jun 9, 2012, at 1:31 AM, Hans Hagen wrote: On 8-6-2012 23:28, Andy Thomas wrote: Thank you for the suggestions. I will try to implement it, but might need until Sunday. - I've added some keys to \setupexport: author title subtitle firstpage (also new key in mult) lastpage (aso new key in mult) - The title, subtitle and author inherit from \setupinteraction which already inherits from \setupdocument (metadata namespace). - In mtx-epub these variables are picked up (from the epub job specification) and firstpage / lastpage are added to the images list. Nothing has been checked and the firstpage/lastpage image names have to be pushed into some epub metadata blob I guess but that's for you to figure out in mtx-epub. It's probably best to assume that the images are present and suitable for epub. I took the new keys and added the cover (page) generator to mtx-epub.lua. The name is hard coded (cover.xhtml), so if a user decides on naming the original file cover.tex... The validator likes it, next is the hard part: generating a valid xhtml. Is the xhtml generator only for the epub, i.e. can it be changed or is another output file just for the epub appropriate? Calibre is already happy with it and shows it just fine. Please note that some ebook readers (e.g. apple devices, calibre) have a nasty caching mechanism. If you want to see the new changes, I found that it is best to delete the old book before replacing it. Andy https://dl.dropbox.com/u/9089117/mtx-epub_4.lua P.S. I have no clue, why 'images[firstpage] = firstpage' works. I would expect 'images[#images+1] = firstpage' 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 ___
[NTG-context] first-setup.sh
Hi all, after a lot of confusion I discovered that first-setup.sh is not Andy-proof. If there is a broken internet connection, the update lua process works and pushes the rsync error message very quickly out of the terminal. I propose to change the rsync line to rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . || { echo Cannot reach the repository; exit 1; } Andy P.S. Someone already did the same to the ruby error message, it is copied a second time at the end. ___ 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] back-up.lua; mtx-epub.lua
Hello all, I am thinking about the best way to implement the cover image for the epub. This is a mandatory requirement to work properly. The cover image is not necessarily present in the pdf version of the document and it might be the only item where that is true. So I tried to sort out the options. 1) Always take cover.png in the current directory; not very elegant 2) add cover={…} to \setupinteraction; hijacks the pdf interaction macro 3) add a \setupepub; might be overkill, but maybe more options are added later 4) ? Then, the image is taken, renamed and copied in the image folder and finally a html page containing the cover is created. This part is straightforward. It would be great, if someone could come up with an elegant idea how to add the cover image file that is compatible with the context style. Andy On Jun 7, 2012, at 2:48 PM, Henning Hraban Ramm wrote: Am 2012-06-07 um 00:00 schrieb Andy Thomas: Hello all, I do not know, how many people are using the epub export, but here are two more changes in order to achieve a valid epub file with information from the context source: Since I need ePub for my current project (even if th eprint version is much more important), I’m very grateful for your enhancements! I hope they end up in the distro ASAP. Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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 ___ ___ 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] back-up.lua; mtx-epub.lua
Hello all, I do not know, how many people are using the epub export, but here are two more changes in order to achieve a valid epub file with information from the context source: On Jun 5, 2012, at 9:09 PM, Andy Thomas wrote: Hi all, in my attempts to validate epub export from my context source, I made the following changes to back-up.lua and mtx-epub.lua 1) the actual context language is put in the epub 2) changed the OPS directory to OEBPS. The 2.0.1 Standard does not actually say that is has to have that name, but I only found examples using that one, including the sample documents in the 2.0.1 white paper. 3) changed opf:scheme to UUID, since that is used and not a ISBN number 4) added the encoding info in the opf file 5) changed the single in double-quotes in the opf file manifest. I do not know if it is necessary, but this seams to be more consistent 6) the title is taken from \setupinteraction 7) the author is taken from \setupinteraction Andy The diff against the actual standalone is diff back-exp_old.lua back-exp_2.lua 2364a2365,2378 local identity = interactions.general.getidentity() local title local author for i=1,#fields do local key = fields[i] local value = identity[key] if value and value ~= then if key==title then title = value elseif key==author then author = value end end end 2370a2385,2387 language = languagenames[tex.count.mainlanguagenumber], title = title, author = author, and the epub make script diff mtx-epub_old.lua mtx-epub_2.lua 46c46 ?xml version=1.0 encoding=UTF-8 ? --- ?xml version=1.0 encoding=UTF-8? 50c50 rootfile full-path=OPS/%s media-type=application/oebps-package+xml/ --- rootfile full-path=OEBPS/%s media-type=application/oebps-package+xml/ 56c56 ?xml version=1.0? --- ?xml version=1.0 encoding=UTF-8? 61,64c61,64 dc:titleMy Title/dc:title dc:languageen/dc:language dc:identifier id=%s urn:uuid:%s/dc:identifier dc:creator opf:file-as=Self, My opf:role=autMySelf/dc:creator --- dc:title%s/dc:title dc:language%s/dc:language dc:identifier id=%s opf:scheme=UUIDurn:uuid:%s/dc:identifier dc:creator%s/dc:creator 79c79 local item = [[item id='%s' href='%s' media-type='%s'/]] --- local item = [[item id=%s href=%s media-type=%s/]] 196a197,199 local language = specification.language or en local creator= specification.author or My Self local title = specification.title or My Title 211c214 lfs.mkdir(file.join(epubpath,OPS)) --- lfs.mkdir(file.join(epubpath,OEBPS)) 220c223 local target = file.join(epubpath,OPS,filename) --- local target = file.join(epubpath,OEBPS,filename) 256,257c259,260 package = format(package,identifier,identifier,os.uuid(),os.date(!%Y-%m-%dT%H:%M:%SZ),concat(used,\n),idmaker(root)) toc = format(toc,identifier,title,root) --- package = format(package,identifier,title,language,identifier,os.uuid(),creator,os.date(!%Y-%m-%dT%H:%M:%SZ),concat(used,\n),idmaker(root)) toc = format(toc,identifier,title,root) 261,262c264,265 io.savedata(file.join(epubpath,OPS,epubroot),package) io.savedata(file.join(epubpath,OPS,epubtoc),toc) --- io.savedata(file.join(epubpath,OEBPS,epubroot),package) io.savedata(file.join(epubpath,OEBPS,epubtoc),toc) 275c278 os.execute(format(zipper.compressed,epubfile,OPS)) --- os.execute(format(zipper.compressed,epubfile,OEBPS)) ___ 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] back-up.lua; mtx-epub.lua
Hi all, in my attempts to validate epub export from my context source, I made the following changes to back-up.lua and mtx-epub.lua 1) the actual context language is put in the epub 2) changed the OPS directory to OEBPS. The 2.0.1 Standard does not actually say that is has to have that name, but I only found examples using that one, including the sample documents in the 2.0.1 white paper. 3) changed opf:scheme to UUID, since that is used and not a ISBN number 4) added the encoding info in the opf file 5) changed the single in double-quotes in the opf file manifest. I do not know if it is necessary, but this seams to be more consistent Andy diff back-exp_old.lua back-exp.lua 2370a2371 language = languagenames[tex.count.mainlanguagenumber], diff mtx-epub_old.lua mtx-epub.lua 46c46 ?xml version=1.0 encoding=UTF-8 ? --- ?xml version=1.0 encoding=UTF-8? 50c50 rootfile full-path=OPS/%s media-type=application/oebps-package+xml/ --- rootfile full-path=OEBPS/%s media-type=application/oebps-package+xml/ 56c56 ?xml version=1.0? --- ?xml version=1.0 encoding=UTF-8? 62,63c62,63 dc:languageen/dc:language dc:identifier id=%s urn:uuid:%s/dc:identifier --- dc:language%s/dc:language dc:identifier id=%s opf:scheme=UUIDurn:uuid:%s/dc:identifier 79c79 local item = [[item id='%s' href='%s' media-type='%s'/]] --- local item = [[item id=%s href=%s media-type=%s/]] 196a197 local language = specification.language or en 211c212 lfs.mkdir(file.join(epubpath,OPS)) --- lfs.mkdir(file.join(epubpath,OEBPS)) 220c221 local target = file.join(epubpath,OPS,filename) --- local target = file.join(epubpath,OEBPS,filename) 256c257 package = format(package,identifier,identifier,os.uuid(),os.date(!%Y-%m-%dT%H:%M:%SZ),concat(used,\n),idmaker(root)) --- package = format(package,identifier,language,identifier,os.uuid(),os.date(!%Y-%m-%dT%H:%M:%SZ),concat(used,\n),idmaker(root)) 261,262c262,263 io.savedata(file.join(epubpath,OPS,epubroot),package) io.savedata(file.join(epubpath,OPS,epubtoc),toc) --- io.savedata(file.join(epubpath,OEBPS,epubroot),package) io.savedata(file.join(epubpath,OEBPS,epubtoc),toc) 275c276 os.execute(format(zipper.compressed,epubfile,OPS)) --- os.execute(format(zipper.compressed,epubfile,OEBPS)) ___ 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] ebook from project: hyphenation lost
Hello, I followed Marco's description on tex.sx with quite good results. http://tex.stackexchange.com/q/43052/8631 He explicitly states: Hyphenation is also present. ConTeXt inserts soft hyphen (0x00AD) characters where hyphenation is possible, which enables the browser to justify the paragraphs. Although a quick check of my xml file shows, that there is no hyphenation in Safari and there are no 0x00AD characters I can find with a Hex-Editor. Maybe you could try with different viewers/browsers, because if there is an 0x00AD in the source, doesn't the viewer have to take care of the actual hyphenation? Andy On 04.06.2012, at 10:55, Henning Hraban Ramm wrote: Ahoi, I never managed to get a proper eBook from a project, the content was mostly missing, a whole while even \setupbackend[export=yes] led to an error. At least that I don’t get an error any more, I’ll try to debug the missing content later. One bug I can nail down is: As soon as I add \setupbackend[export=yes] to my environment, all hyphens are lost! I.e. hyphenation takes place, but there’s no hyphen (an no space left for it). That doesn’t happen in a single document, so I can’t provide a minimal example. (Yesterday’s beta MkIV on OSX-Intel) Greetlings, Hraban ___ 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 ___ ___ 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] ebook from project: observations/oddities
I might not be able to help you with an automated output using context, but I can recommend a very good book on e-book creation. Elizabeth Castro (ISBN 978-0321734686) discusses a sample e-book line by line of the source code, how to create it, validate it (http://code.google.com/p/epubcheck/) etc. You can find the sources of her sample e-book online at: http://www.elizabethcastro.com/epub/examples/ . There is some other useful stuff, too. I just started to implement some of the info I gathered in my context module for my book project, so I cannot give concrete advise,yet :( But I made the TOC etc. 'by hand' to to try if it would work with the validator, kindle, calibre and so on. Just the xhtml was automatically created (and tweaked a little). It does not take as much time as it seems, we were able to have a validated e-pub with a sample chapter in a day. Hope this help a little, Andy On 04.06.2012, at 12:24, Henning Hraban Ramm wrote: (Yesterday’s beta in suite=minimals, OSX-Intel) With \setupbackend[export=example.xml,xhtml=example.xhtml,css=example.css] in my project’s environment, I get both example.xml and example.xhtml (as well as example-images.css and example-style.css), starting with the same content (up to line 857 in my case), but the .xhtml stops after the first \stoppart, while the .xml contains all four parts. mtxrun --script epub --make example insists on copying a file named exactly example.xhtml to the ePub tree. Using \setupbackend[export=example.xhtml,xhtml=test.xhtml,css=example.css] both example.xhtml and test.xhtml are identical, complete *and* both copied to the epub tree (ToC refers to test.xhtml, the other is ignored). Since none of my browsers or epub readers likes this XML format, I guess I’ll need to apply a XSL transformation to create HTML. Ok... Looking at mtx-epub.lua I understand why none of my setups (i.e. author, title) has any effect on the output. Seems like we need to fix that manually - unzip the epub, fix it, re-pack... But create the ToC manually?? Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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 ___ ___ 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] setupcaptions stopper and separator
Hi all, while trying to figure out all the functions that setupcaptions has, I stumbled trying to make stopper and separator work. MnWE: \useMPlibrary[dum] \starttext \section{One} \setupcaptions [figure] [way=bysection,prefixsegments=section,separator={A},stopper={B},suffix={C}] \startplacefigure[title={A rectangle with a caption. Not very interesting.},reference=fig1] \externalfigure[dummy][width=0.5\textwidth] \stopplacefigure \in{Figure}[fig1] \stoptext As far as I understand it, the separator changes the dot between the section and the figure number and the stopper is placed right after the figure number and used in references as well (which is different from suffix). Is that correct? Andy ___ 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] mtx-epub.lua
Hello all, while working on my ebook, I found the following issues in mtx-epub.lua. Once a successful run is done, there is no need to try the other zippers. It also gives error messages, although everything is already done. Fix is attached. Then, I got confused about the error messages appearing 3 times and found an issue in texlua of TL2011 (beta-0.70.1-2011062107) as well as the newest standalone (beta-0.70.2-2012052309). Consider the following example: print(os.execute(abcxyz)) This gives in Lua 5.2: sh: abcxyz: command not found nil exit127 But in texlua it does: sh: abcxyz: command not found 32512 This breaks the if conditional which becomes true, although there is no abcxyz command. If there are if statements such as this one in other places, they would not work as intended either. Andy 274,279c274,281 if os.execute(format(zipper.uncompressed,epubfile,mimetype)) then os.execute(format(zipper.compressed,epubfile,META-INF)) os.execute(format(zipper.compressed,epubfile,OPS)) done = zipper.name else list[#list+1] = zipper.name --- if not done then if os.execute(format(zipper.uncompressed,epubfile,mimetype)) then os.execute(format(zipper.compressed,epubfile,META-INF)) os.execute(format(zipper.compressed,epubfile,OPS)) done = zipper.name else list[#list+1] = zipper.name end ___ 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] Caption next to figure
Hello all, I am trying to convert a document with a lot of small figures in the margin into a more kindle friendly format. In order to do that, I want to have a small figure in the text with an adjacent figure caption. How can I achieve that? I attached an example and a link how it is supposed to look like. \useMPlibrary[dum] \starttext \input tufte \startplacefigure[title={A rectangle with a caption.}] \externalfigure[dummy][width=0.5\textwidth] \stopplacefigure \input knuth \stoptext Andy https://dl.dropbox.com/u/9089117/small_figure_context.png ___ 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] Caption next to figure
Thank you. Can I have the bottom of the caption in line with the bottom of the figure instead of centered? Andy On Jun 3, 2012, at 7:48 PM, Marco wrote: On 2012-06-03 Andy Thomas andytho...@web.de wrote: I want to have a small figure in the text with an adjacent figure caption. How can I achieve that? \setupcaptions [figure] [location=right] Marco ___ 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 ___ ___ 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] Caption next to figure
Thank you both, works great now. Andy Am 03.06.2012 um 20:56 schrieb Wolfgang Schuster schuster.wolfg...@googlemail.com: Am 03.06.2012 um 20:44 schrieb Andy Thomas: Thank you. Can I have the bottom of the caption in line with the bottom of the figure instead of centered? \setupcaption[figure][location={right,low}] 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 ___ ___ 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] how to write two or three single hyphens?
Hello, is this what you are looking for? \starttext rwx\,-\,-\,-\,-\,-\,- \stoptext I tried the small space macro from LaTeX and it works here, too, so i suspect it is more a TeX macro. Andy On 31.05.2012, at 11:16, Jan Pohanka wrote: Hello, describing linux file permissions I would like to write rwx-- As I expected the hyphens are converted to two long dashes (excuse me if I missed the correct name), so I tried something like this rwx{-}{-}{-}{-}{-}{-} or rwx{}-{}-{}-{}-{}-{}- which works in latex, but in context I'm still getting the long dashes. How can I prevent this conversion, please? regards Jan -- Tato zpráva byla vytvořena převratnou poštovní aplikací 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 ___ ___ 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] A bibliography difficulty
Hello, I am not sure if I understand you correctly, but do you directly edit a bbl file? Normally, a .bib file is made by the user and ConTeXt (and LaTeX as well) generate the .bbl file for you. Your example works for me using the following code \setupbibtex[database={library}] \setuppublications[alternative=ams] \starttext Bla\cite{birn06} \placepublications[criterium=all] \stoptext with a .bib file containing @article{birn06, author = {Dieter Birnbache}, title = {The Socratic method in teaching medical ethics: Potentials and limitations}, year = {1999}, journal = {Medicine, Health Care and Philosophy}, volume = {2}, issue = {3}, pages = {219-224} } More information is on the wiki page: http://wiki.contextgarden.net/Bibliography, e.g. why you do not need to use a module any more. On May 30, 2012, at 6:58 AM, Alasdair McAndrew wrote: In my list of references, I can't get the author or title (of journal article) to print. In my .tex file, I have the following lines: \usemodule[bib] \setuppublications[alternative=ams,refcommand=num,numbering=yes] and in my .bbl file the (so far) only reference is: \startpublication[k=birn06, t=article, a=D.~Birnbache, y=1999] \author{Dieter}{}{Birnbache} \title{The Socratic method in teaching medical ethics: Potentials and limitations} \pubyear{1999} \journal{Medicine, Health Care and Philosophy} \volume{2} \issue{3} \pages{219-224} \stoppublication However, when I typeset the file, the reference list consists of [1] , Medicine, Health Care and Philosophy 2, 219 (1999). I'm a little confused about all the variables, commands and parameters. So - first, what am I doing wrong? Second, are there somewhere out there some example files of bibliography usage (I learn best by seeing what other people have done, and adapting that to my own ends)? Third: can I include the references in the body of the .tex file (as you can do with LaTeX and the thebibliography environment)? Thanks, Alasdair -- Blog: http://amca01.wordpress.com Web: http://sites.google.com/site/amca01/ Facebook: http://www.facebook.com/alasdair.mcandrew ___ 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 ___ ___ 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] bibtex sample file and possible bibtex bug
Hello, I apologize to bumb my own post, but does anyone know, where to put sample.bib? Or did the default search path for bibtex change? The basic example on http://wiki.contextgarden.net/Bibliography_mkiv does not work as well, because of the same reason. I would then try to update the wiki. Thanks, Andy On 27.05.2012, at 20:39, Andy Thomas wrote: Hello, while looking to include a citation in a sample document, I was wondering if the 'sample.bib' in 'standalone/tex/texmf-context/tex/context/bib/sample.bib' can be used the same way as e.g. '\input tufte', but I could not make it work. example document: \setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa] \starttext document.\cite[Eijkhout1991] \placepublications[criterium=all] \stoptext Also note that the 'alternative=apa' line leads to 'publications warning: unknown cite argument Eijkhout1991 on line \the\inputlineno' instead of the actual number. Andy ___ 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 ___ ___ 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] pushing margintext up
On 28.05.2012, at 19:02, Hans Hagen wrote: On 28-5-2012 18:44, Philipp Gesang wrote: Hi Andy, On 2012-05-27 17:57, Andy Thomas wrote: Hello, could someone point out to me, where in the standalone installation the 'margin float placement' algorithm lives. it depends: Floats: strc-flt.mkvi Side floats: page-sid.mkiv Margin data (as in your example): typo-mar.mkiv and their respective .lua companions. I suspect you will be interested in the function „inject()“ (part of the finalizer) in typo-mar.lua. keep in mind that this is not finished yet i.e. there is no api at the lua end yet is there a way for margintext to 'respect' the lower border of the page and push the margintext up, pushing other margintexts upwards while doing so? +1, I’m curious too whether this can be done. maybe some day when I'm looking into the page builder code Hans Is it possible, as a workaround for now, to make every \margintext call to virtually occur at the first line of the page? Then, they are stacked in sequence in the margin from the top of the page down, but on the page they occur. Thank you for help, Andy - 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 ___ ___ 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] Spacing for {\cal P} in XITS
Hello, it looks off on my computer (Mac 10.6 with preview and acrobat) and with the context-standalone (from 1 hour ago). However, it does work with TL2011 (not 12). Then, I copied (overwrote) the fonts from TL into the standalone (from /Library/TeX/Root/texmf-dist/fonts/opentype/public/xits/ to ~/context/tex/texmf/fonts/opentype/public/xits/) and deleted the cache. But that did not help, the context standalone still produces the 'too-close P'. I also tried the newest font files from yesterday, but still no luck. Hope that help finding the bug. Andy P.S. Is there more to be considered than only the font files (the .otf s)? On 29.05.2012, at 14:39, Khaled Hosny wrote: On Tue, May 29, 2012 at 12:29:02PM +, Rogers, Michael K wrote: On May 29, 2012, at 8:13 AM, Khaled Hosny wrote: On Tue, May 29, 2012 at 01:19:00PM +0300, Janne Junnila wrote: Hi, I just noticed that the spacing after ${\cal P}$ looks a bit too tight (non-existent?) while using XITS fonts. ... Looks fine here (in my eyes at least), can you attach the resulting PDF? Regards, Khaled On this input: \setupbodyfont[xits] \starttext The spacing of ${\cal P}$ looks like this.\par The spacing of \vrule${\cal P}$\vrule looks like this. \stoptext I got similar to what Janne described. See attached (beta ver. 2012.05.29 00:12). Looks like the kerning might be a little off? Looks fine here, bot TL 2012 presets and up to date minimals. Regards, Khaled x.pdf___ 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 ___ ___ 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] Is there some easy way to do tufte-style side note?
Hello Jano, On May 26, 2012, at 2:12 PM, Jano Kula wrote: Hello Andy, On 05/23/2012 04:09 PM, Andy Thomas wrote: I finished a first version of a tufte style sample document that is based on a predecessor in another macro language. The auto alignment of the marginals has to be improved, but the rest looks already quite decent. Please see: https://pub.uni-bielefeld.de/luur/download?func=downloadFilerecordOId=2303165fileOId=2303168 for a full sample document. Nice work! Decent and nice design, good typesetting, I assume some hand work which of course cannot be avoided to make the result pleasing. thank you for the positive feedback. The example thesis has a lot of hand work. However, in the end I would like to have something that looks 95% instead of 100%, but fully automatic. Then, I could output the same text in different output formats (book, handouts for every chapter, e-reader, ...), tweaking every file would cost too much time. Just two remarks to the layout. Figure descriptions set in to the block (narrow column) produces too large spaces in the lines often. Ragged text would suit it better, I think. Seven Thesis were made, so far, and everyone plays a little with the overall design to see how things look when tweaked a little. But justified is not ideal, I agree. Side notes set ragged left (rigth justyfied) on left pages are quite difficult to read, I would make them ragged right (left justified) on all pages and. I guess you want to say [...] it would [not] break the overall design at all ;) I like the look of ragged outer when just looking at a double page from far. It does make reading more difficult. I still cannot decide. In the end legibility should be more important, so ragged right is better like you said. Just wondering, why is Optima-Regular embeded so many times? We wanted to have a sans serif font for the viewgraphs that matches the Palatino (orig. 1948). So we went for Optima (1952-1955 and also from Hermann Zapf). Wikipedia says Optima's capitals (like Palatino's) are directly derived from the classic Roman monumental capital model [...]. I think, it does look good together. We also wanted a TeX Gyre font as main font, so that it is available on every system. Regards, Jano Aditya Mahajan contextified the github sources. It might be good to download the new stuff. Thanks for the help. Andy ___ 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 ___ ___ 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] pushing margintext up
Hello, could someone point out to me, where in the standalone installation the 'margin float placement' algorithm lives. Thanks, Andy On May 23, 2012, at 4:34 PM, Andy Thomas wrote: Hello all, is there a way for margintext to 'respect' the lower border of the page and push the margintext up, pushing other margintexts upwards while doing so? example: \definepapersize[wissenschaft][width=170mm,height=240mm] \setuppapersize [wissenschaft] \setuplayout [topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] \setuppagenumbering[alternative=doublesided] \setupmargindata [margintext] [location=outer, width=100pt, align=flushouter] \starttext \showframe \input tufte \input tufte \input tufte\margintext{This is too low, if there are many words in this note.} \stoptext Kind of hard to explain, I hope the example makes everything clear. Andy ___ 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 ___ ___ 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] bibtex sample file and possible bibtex bug
Hello, while looking to include a citation in a sample document, I was wondering if the 'sample.bib' in 'standalone/tex/texmf-context/tex/context/bib/sample.bib' can be used the same way as e.g. '\input tufte', but I could not make it work. example document: \setupbibtex[database=sample,sort=author] \setuppublications[alternative=apa] \starttext document.\cite[Eijkhout1991] \placepublications[criterium=all] \stoptext Also note that the 'alternative=apa' line leads to 'publications warning: unknown cite argument Eijkhout1991 on line \the\inputlineno' instead of the actual number. Andy ___ 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] Is there some easy way to do tufte-style side note?
I finished a first version of a tufte style sample document that is based on a predecessor in another macro language. The auto alignment of the marginals has to be improved, but the rest looks already quite decent. Please see: https://pub.uni-bielefeld.de/luur/download?func=downloadFilerecordOId=2303165fileOId=2303168 for a full sample document. Simpler example code and the module is on github: https://github.com/andythomas/TeX-sidenotes/tree/master/context Cheers, Andy Am 2012-04-22 um 18:30 schrieb Yue Wang: There are many styles available on the context-garden site (http://wiki.contextgarden.net/Sample_documents) which are really helpful to help newcomers to learn how to define styles in context. Wouldn't it be great to add tufte's and bringhurst's as extra examples? Of course - just do it. Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@??? / 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 ___ 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] pushing margintext up
Hello all, is there a way for margintext to 'respect' the lower border of the page and push the margintext up, pushing other margintexts upwards while doing so? example: \definepapersize[wissenschaft][width=170mm,height=240mm] \setuppapersize [wissenschaft] \setuplayout [topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] \setuppagenumbering[alternative=doublesided] \setupmargindata [margintext] [location=outer, width=100pt, align=flushouter] \starttext \showframe \input tufte \input tufte \input tufte\margintext{This is too low, if there are many words in this note.} \stoptext Kind of hard to explain, I hope the example makes everything clear. Andy ___ 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] stack marginals: text and figures
I made a small example to show the behavior: […] This is a sentence.\margintext{This is a note in the margin.} Another sentence.\margintext{Another note.} \placefigure[margin][fig:one]{This is a small figure.}{\externalfigure[test][width=100pt]} \placefigure[margin][fig:two]{This is another small figure.}{\externalfigure[test][width=100pt]} \stoptext I also tried to do things such as \margintext{\placefigure...}}, but had no success. Why not? The following works here: This is a sentence. \margintext{This is a note in the margin.} Another sentence. \margintext{Another note.} \margintext {\placefigure[here][fig:one] {This is a small figure.} {\externalfigure[test][width=100pt]}} \margintext {\placefigure[here][fig:two] {This is another small figure.} {\externalfigure[test][width=100pt]}} Marco \margintext{\placefigure[here]…} does indeed work. I cannot even reproduce why I was not able to do it, but I assume I tried \margintext{\placefigure[margin]…} which does not make much sense... Dear ConTeXt group, I am trying to stack text and figures in the margin. After getting some help, I am able to setup the text just fine, the notes do not overlap. I am also able to stack figures, they also do not overlap. But figures and text does not 'know of each other'. They do overlap. I made a small example to show the behavior: […] \definemargindata [margintext] [ location=outer, width=100pt, align=flushouter, stack=continue, % or yes ] Use \setupmargindata to change the values of a existing command. In this example it doesn’t matter but that’s not always the case. Wolfgang I also changed \definemargindata to \setumargindata. Andy___ 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] doublesided wider paragraphs
Hello, I am trying to change the width of a paragraph on a page. I found \defineparagraphs and \setupparagraphs and it almost works. But for doublesided documents the text on verso pages is incorrectly aligned. I tried [location=inner], but the macros do not seem to be aware of that. I also found \startlocal (\startlokaal) in the ConTeXt getting started pdf, but Mk IV does not know \startlocal (any more?). My example: % setup the page format \definepapersize[wissenschaft][width=170mm,height=240mm] % use the new page format \setuppapersize[wissenschaft] % shape the page \setuplayout[topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] %\showframe \setuppagenumbering[alternative=doublesided] \defineparagraphs [fullwidth][n=1,before={\blank},after={\blank}] \setupparagraphs [fullwidth][1][width=400pt] \starttext \input tufte \startfullwidth \input tufte \stopfullwidth \input knuth \startfullwidth \input tufte \stopfullwidth \input tufte \stoptext My questions are: Is there no more \startlocal, how to locally adjust the layout on a page and how to make the example work? Thanks, Andy ___ 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] doublesided wider paragraphs
Protrude in the margin, total width 400pt. Andy On May 22, 2012, at 6:52 PM, Marco wrote: On 2012-05-22 Andy Thomas andytho...@web.de wrote: But for doublesided documents the text on verso pages is incorrectly aligned. How should the paragraphs look like on even pages? As wide as the text or should they protrude into the left margin? Marco ___ 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 ___ ___ 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] doublesided wider paragraphs
It only works without my page layout. Did I make a mistake using \setuplayout? With \showframe it looks fine though. Andy On May 22, 2012, at 7:04 PM, Wolfgang Schuster wrote: Am 22.05.2012 um 18:11 schrieb Andy Thomas: Hello, I am trying to change the width of a paragraph on a page. I found \defineparagraphs and \setupparagraphs and it almost works. But for doublesided documents the text on verso pages is incorrectly aligned. I tried [location=inner], but the macros do not seem to be aware of that. I also found \startlocal (\startlokaal) in the ConTeXt getting started pdf, but Mk IV does not know \startlocal (any more?). My example: % setup the page format \definepapersize[wissenschaft][width=170mm,height=240mm] % use the new page format \setuppapersize[wissenschaft] % shape the page \setuplayout[topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] %\showframe \setuppagenumbering[alternative=doublesided] \defineparagraphs [fullwidth][n=1,before={\blank},after={\blank}] \setupparagraphs [fullwidth][1][width=400pt] \starttext \input tufte \startfullwidth \input tufte \stopfullwidth \input knuth \startfullwidth \input tufte \stopfullwidth \input tufte \stoptext My questions are: Is there no more \startlocal, how to locally adjust the layout on a page and how to make the example work? \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-\the\dimexpr\rightmarginwidth+\rightmargindistance\relax}} {\doadaptleftskip {-\the\dimexpr\leftmarginwidth +\leftmargindistance \relax}}% #2} \defineannotation[fullwidth][alternative=command,command=\FullwidthCommand] \setuppagenumbering[alternative=doublesided] \starttext \showframe \input tufte \startfullwidth \input tufte \stopfullwidth \input knuth \startfullwidth \input tufte \stopfullwidth \input tufte \startfullwidth \input tufte \stopfullwidth \input tufte \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 ___ ___ 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] doublesided wider paragraphs
This works. Thank you for help. Andy On May 22, 2012, at 7:44 PM, Wolfgang Schuster wrote: Am 22.05.2012 um 19:29 schrieb Andy Thomas: It only works without my page layout. Did I make a mistake using \setuplayout? With \showframe it looks fine though. You’re setting leftmargin to 0pt but I used in my example this value to calculate the additional space. When you set the argument for \doadapt… to a fixed value it will produce the right output but you can get an unexpected output when the fullwidth environment appears at the start of a new page. \definepapersize[wissenschaft][width=170mm,height=240mm] \setuppapersize [wissenschaft] \setuplayout [topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] \setuppagenumbering[alternative=doublesided] \usemodule[annotation] \define[2]\FullwidthCommand {\doifoddpageelse {\doadaptrightskip{-120pt}} {\doadaptleftskip {-120pt}}% #2} \defineannotation [fullwidth] [alternative=command, command=\FullwidthCommand] \starttext \showframe \input tufte \startfullwidth \input tufte \stopfullwidth \input knuth \startfullwidth \input tufte \stopfullwidth \input tufte \startfullwidth \input tufte \stopfullwidth \input tufte \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 ___ ___ 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] stack marginals: text and figures
Dear ConTeXt group, I am trying to stack text and figures in the margin. After getting some help, I am able to setup the text just fine, the notes do not overlap. I am also able to stack figures, they also do not overlap. But figures and text does not 'know of each other'. They do overlap. I made a small example to show the behavior: % setup the page format \definepapersize[wissenschaft][width=170mm,height=240mm] % use the new page format \setuppapersize[wissenschaft] % shape the page \setuplayout[topspace=40pt, header=0pt, headerdistance=0pt, backspace=42pt, leftmargin=0pt, width=280pt, height=560pt, rightmargindistance=20pt, rightmargin=100pt, footer=0pt] %\showframe \setuppagenumbering[alternative=doublesided] \definemargindata [margintext] [ location=outer, width=100pt, align=flushouter, stack=continue, % or yes ] \starttext This is a sentence.\margintext{This is a note in the margin.} Another sentence.\margintext{Another note.} \placefigure[margin][fig:one]{This is a small figure.}{\externalfigure[test][width=100pt]} \placefigure[margin][fig:two]{This is another small figure.}{\externalfigure[test][width=100pt]} \stoptext I also tried to do things such as \margintext{\placefigure...}}, but had no success. Is there a way to achieve a 'stacking' of all marginals? Andy ___ 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 ___