[NTG-context] hyperlinks with special characters
I have already asked this question on Stackexchange. It appears that no one who has seen the question knows an answer. I figure I'll ask here too, just to cover all bases. I need to link to some online resources in my PDF file. Based on the official documentation, I have written: \useURL[dbdk] [http://dbpedia.org/page/The_Dark_Knight_(film)] [] [it's link to DBPedia] Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \from[dbdk] dolor sit amet. Note my code for the link to DBpedia: I had to write it in this convoluted way, instead of using my preferred \goto, because the link has the special characters, `(` and `)`. These characters interfered with `url()`. I can't use HTML's URL encoding scheme because the `%`s interfere with TeX. Is there another escape code format in ConTeXt for use within `\goto{...}[url(...)]`? Using the suggestion by @phg, I tried the following: \startasciimode Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \goto{it's link to DBPedia}[url(http://dbpedia.org/page/The_Dark_Knight_%28film%29)] dolor sit amet. \stopasciimode I still had to use escape codes, `%28` and `%29`, to keep it from interfering with url(). It turns out that DBpedia does not like these codes, and requires the actual characters. Is there another way I put them in `\goto{...}[url(...)]`? Thanks! Prash signature.asc Description: This is a digitally signed message part. ___ 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] hyperlinks with special characters
On Friday 29 August 2014 21:52:33 Hans Hagen wrote: On 8/29/2014 7:48 PM, Prashanth N Rao wrote: I have already asked this question on Stackexchange. It appears that no one who has seen the question knows an answer. I figure I'll ask here too, just to cover all bases. I need to link to some online resources in my PDF file. Based on the official documentation, I have written: \useURL[dbdk] [http://dbpedia.org/page/The_Dark_Knight_(film)] [] [it's link to DBPedia] Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \from[dbdk] dolor sit amet. Note my code for the link to DBpedia: I had to write it in this convoluted way, instead of using my preferred \goto, because the link has the special characters, `(` and `)`. These characters interfered with `url()`. I can't use HTML's URL encoding scheme because the `%`s interfere with TeX. Is there another escape code format in ConTeXt for use within `\goto{...}[url(...)]`? Hm, I can support properly nested () and {} but how about not balanced ... one way out is to support and '' special(operation) special(operation(whatever)) special(operation{argument,argument{whatever}}) special(operation{argument{whatever}}) special(operation() special(operation(whatever) special(operation{argument,argument{whatever}) special(operation{argument{whatever}) I'll add that but it needs testing because the ref parser is already somewhat complex. If I may make a suggestion, you could just support one escape character - \ That way, balanced or unbalanced, they just have to know one convention. If I understood your examples correctly, i.e. these are the strings one would write within url(), this is how they could do it: special\(operation\) special\(operation\(whatever\)\) special\(operation{argument,argument{whatever}}\) special\(operation{argument{whatever}}\) special\(operation\(\) special\(operation\(whatever\) special\(operation{argument,argument{whatever}\) special\(operation{argument{whatever}\) And if they ever need a literal \ in their URL, they would have to write \\ In my examples above, I have escaped only ( and ) because they interefere with url(). If the any other character interferes with your code, they could escape it as I have shown. Using the suggestion by @phg, I tried the following: \startasciimode Lorem ipsum \goto{the LinkedMDB.org entry on The Dark Knight}[url(http://data.linkedmdb.org/page/film/6224)], and \goto{it's link to DBPedia}[url(http://dbpedia.org/page/The_Dark_Knight_%28film%29)] dolor sit amet. \stopasciimode I still had to use escape codes, `%28` and `%29`, to keep it from interfering with url(). It turns out that DBpedia does not like these codes, and requires the actual characters. Is there another way I put them in `\goto{...}[url(...)]`? you can use: \letterpercent - 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 ___ signature.asc Description: This is a digitally signed message part. ___ 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] Simplefonts
Hi Wolfgang, Thanks for the update. I have a question, and I came across a bug. Question: I need some keywords in a distinctively different font, which I accomplished by defining \kword as \definesimplefont[kword][DejaVu Mono][size=13pt]. I looked through font-sel.mkvi, but I did not see any way of implementing equivalents. (I still haven't learnt macros properly, though.) Can you please give me a hint on how I can do this with the latest fonts interface? Bug: I prefer Euler font for math. This does not seem to work with the latest fonts interface. Best regards, Prash On 10/10/13 20:02, Wolfgang Schuster wrote: Hi all, I’m happy to announce a new version of the simplefonts code. Thew new version of the code is a complete rewrite and brings many changes. 1. The module is now part of the core and no external module is needed anymore. 2. The commands to select a font have changed to commands which fit better to context normal syntax. 3. I removed the keys to enable font expansion and protrusion, when you need them use \definefontfeature. To use a font with the simplefonts code two ways are available. The first method is to create one or more typefaces and load it with \setupbodyfont. A complete example for this is: \definefontfamily [mainface] [serif] [DejaVu Serif] \definefontfamily [mainface] [sans] [DejaVu Sans] \definefontfamily [mainface] [mono] [DejaVu Sans Mono] [feature=none] \definefontfamily [mainface] [math] [TeX Gyre Pagella Math] \setupbodyfont[mainface] \starttext \startlines \rm DejaVu Serif \ss DejaVu Sans \tt DejaVu Sans Mono \m{c^2 = a^2 + b^2} \stoplines \stoptext The second method is similar to the old commands of the simplefonts module (e.g. \setmainfont) where the font is enabled after it was set and no \setupbodyfont is necessary. Below is a example for this method but I recommend to avoid this method because it’s slow when you set font a font for each style in your document. \setupfontfamily [serif] [DejaVu Serif] \setupfontfamily [sans] [DejaVu Sans] \setupfontfamily [mono] [DejaVu Sans Mono] [feature=none] \setupfontfamily [math] [TeX Gyre Pagella Math] \starttext \startlines \rm DejaVu Serif \ss DejaVu Sans \tt DejaVu Sans Mono \m{c^2 = a^2 + b^2} \stoplines \stoptext Another feature of simplefonts is the ability to set a fallback font when you need certain glyphs from a different font (e.g. for cyrillic ) which aren’t available in the mainfont of the document. To set such a fallback font the code provides the \definefallbackfamily command where you can set in the fourth argument the range for the replacement characters. \definefallbackfamily [mainface] [serif] [DejaVu Serif] [range=cyrillic,force=yes] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setupbodyfont[mainface] \starttext \input knuth Традиционная систематика лишайников оказывается во многом условна и \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] bug with font
On 26/09/13 21:40, Wolfgang Schuster wrote: I can confirm and it will be fixed in the next version of the module but it will take a few days before I’m going to release it. Wolfgang Thanks, Wolfgang! Apparently, this problem started earlier than I thought yesterday. I have set Euler as my preferred font for math, and it used to work correctly in ConTeXt with the version timestamp, 2013.06.10 22:51. I hadn't looked closely earlier, but when I checked now, I discovered that this was not working even in the 2013.09.11 build of ConTeXt. I'm quite happy with the 2013.06.10 build, so I'll continue to use that for now. ___ 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] bug with font
Hello, I update my ConTeXt setup about every couple of weeks. I use Ubuntu font in some of my documents. My setup from 2013-09-11 was selecting the specified fonts correctly. However my setup from 2013-09-25 (today) selects Ubuntu Light when I specify just Ubuntu. When I specifically ask it to use Ubuntu Regular, it forces this weight everywhere (including places where I specify \em). I have attached a minimal example and sample PDF and log files from both versions. Best regards, Prashanth demo-20130911.tgz Description: GNU Zip compressed data demo-20130925.tgz Description: GNU Zip compressed data ___ 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] Kile for ConTeXt
Being lazy, I'll copy-paste an answer I wrote elsewhere: I use Kile. I found a syntax highlighter at KDE-files.org. I modified it based on the LaTeX highlighting file to (1) allow spell-checking only in text sections and (2) show section* headings in bold. I prefer to use the extensions, .mkii and .mkiv to prevent confusing the text editor. You may want to change that. You can find it at http://pastebin.com/Ac3Lt369. Save it as ~/.kde4/share/apps/katepart/syntax/context.xml. Auto-completion works on all words, including keywords, but it's not smart: the suggestions are based on what you have written so far. On 19/04/13 19:51, Jan Heinen wrote: Does anyone here uses Kile for ConTeXt? On contextgarden-wiki I read has native ConTeXt support as well. I installed Kile and as the only thing concerning ConTeXt II found Build - Compile - ConTeXt But no highlighting or autocompletion. Google gave no answer. Do I have to install an additional aplugin? Regards Janis ___ 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] Broken Nightly 2012.08.09 20:28 - \setupinteraction
Hi, I like clickable links in PDF files. However, the build from 2012.08.09 20:28 has a problem with it. Minimal example: \setupinteraction[status=start, state=start, % disabling this line makes it work title={Something}, subtitle={Something else}] \starttext \CONTEXT\ \footnote{http://wiki.contextgarden.net/} latest build. \stoptext ___ 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] Broken Nightly 2012.08.09 20:28 - \setupinteraction
On 10/08/12 14:37, Wolfgang Schuster wrote: Am 10.08.2012 um 14:23 schrieb Prashanth prash.n@gmail.com: Hi, I like clickable links in PDF files. However, the build from 2012.08.09 20:28 has a problem with it. Minimal example: \setupinteraction[status=start, state=start, % disabling this line makes it work title={Something}, subtitle={Something else}] \starttext \CONTEXT\ \footnote{http://wiki.contextgarden.net/} latest build. \stoptext Hyperlinks are added with \goto, \from etc., the link in your example which you get when you disabled the interaction option is only a feature of your pdf viewer. \setupinteraction[state=start] \starttext \CONTEXT\ \footnote{\goto{ConTeXt wiki}[url(http://wiki.contextgarden.net/}] latest build. \stoptext Wolfgang As soon as I had sent out the example, I realized my example was confusing. Links within PDF files don't work, and hyperlinks don't work either. This minimal example makes the compiler crash too: \setupinteraction[status=start, state=start, % disabling this line makes it compile title={Something}, subtitle={Something else}] \starttext \CONTEXT\ \footnote{XYZ} latest beta. \stoptext ___ 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] math formula linebreak
On 09/08/12 09:37, Steffen Wolfrum wrote: Hi, for nice linebreaking we can adjust math formulas by the use of NC, NR alignment. But if someone only wants long formulas to fit in a defined area, and want them to break automatically ... is there a handy solution? (Below are examples that don't work) Thanks, Steffen --- \starttext \placeformula \startformula[9pt] I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\}-\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. \stopformula \defineframedtext [defbackground] [width=10cm, frame=on, location=paragraph] \startdefbackground \placeformula \startformula[9pt] I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\} -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. \stopformula \stopdefbackground \definelayer[mylayer] \setlayerframed [mylayer] [x=25mm, y=85mm, height=43.5mm, width=10cm,align=block] { \placeformula \startformula[9pt] I=\big\{\lambda u(x_0-\pi^H K)+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'}) +(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\} -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'}) +(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}. \stopformula } \setupbackgrounds[page][background=mylayer] \stoptext When I needed something like that, I used \allowbreak with inlinemath. In your case, you could do: \bTABLE[frame=on,align=right,width=10cm] \bTR \bTD $I=\big\{\lambda u(x_0-\pi^H K)\allowbreak+(1-\lambda)[\pi^L u(x_0-K+(1-\pi^L)Z_{L'})\allowbreak+(1-\pi^L)u(x_0-\pi^L Z_{L'})]\big\}\allowbreak -\big\{\pi^U u(x_0-K+(1-\pi^U)Z_{U'})\allowbreak+(1-\pi^U)u(x_0-\pi^U Z_{U'})\big\}.$ \eTD \eTR \eTABLE This will just flow it like regular text. I don't know if this is good enough for your needs. If not, you can add another way to your list of ways ;-). -- Prash ___ 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] Broken Nightly 2012.07.08 20:02 - unpredictable errors on blank lines
Hi, I get mysterious error messages on blank lines or on lines that were completely innocuous a month ago. The error message I get is: system tex error on line 315 in file proposal-context.context: Extra ... 305 \bTR\bTDof \eTD\bTD73 \eTD\eTR 306 \bTR\bTDon \eTD\bTD71 \eTD\eTR 307 \bTR\bTDsay \eTD\bTD87 \eTD\eTR 308 \bTR\bTDto \eTD\bTD86 \eTD\eTR 309 \bTR\bTDup \eTD\bTD34 \eTD\eTR 310 \eTABLE 311 } 312 313 Comparing the accuracy of GMB tags of words against those generated by the CC parser (see \in{Table}[tab:tag-accuracy]) revealed some problematic words for the parser. 314 Specifically, other than PP attachments, it revealed faults in telling transitives and ditransitives apart. 315 316 317 \chapter{Evaluation} 318 The evaluation of the output would be similar to the methods we use for analyzing parses. Given sentences that have specific features that result in wrong parses, my software will be able to generate the correct parse trees. 319 320 \completepublications[criterium=text] 321 322 %\showfontstrip 323 %\showbodyfont 324 \stopbodymatter 325 \stoptext After trying to hunt down error messages on \startitemize[n] ... \item ... in some completely unrelated segment of the same file, the error message (essentially, the same) moved to this line. All the citations and cross-references in the document are broken too, but I suppose that's because the compiler fails at line 315. I'm sorry, no minimal example this time - I tried but I was unable to reproduce the problem in a minimal example. I have uploaded the entire set to https://rapidshare.com/files/3050234632/trial.tgz. I have included my build logs too. Best regards, Prash ___ 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] extra \fi
Looks like this is what triggers an error in my document too. [Ref. Broken Nightly 2012.07.08 20:02 - unpredictable errors on blank lines] Commenting out all floats got rid of the error. On 09/07/12 09:50, Meer, H. van der wrote: Is the following a known issue with this beta? When a float block moves the error appears: ConTeXt ver: 2012.07.04 23:48 MKIV fmt: 2012.7.6 int: english/english floatblocks 1 placed floatblocks 1 saved pagesflushing realpage 5, userpage 1 floatblocks 1 moved floatblocks 2 moved ! Extra \fi. A short example is difficult to procure, but adding one line of text, inducing the float to move, triggers the error. 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 ___ ___ 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] beta
Version 2012.07.09 20:28 seems to have fixed all my problems. Thank you! On 09/07/12 21:30, Hans Hagen wrote: On 9-7-2012 20:59, Meer, H. van der wrote: This new beta crashed here immidiately: how new? keep in mind that the garden needs to sync as well 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 ___ ___ 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] Broken Nightly 2012.07.06 22:37 - \startfloatcombination
Hi, I understand that \startfloatcombination was an experimental feature in the previous builds anyway, but it is broken in the latest nightly. Thank you for the rapid fixes so far! Best regards, Prash ___ 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] Broken Nightly 2012.07.06 22:37 - \startfloatcombination
Hi Hans (apologies for not hitting the right button to reply to the mailing list just before), I checked with context version 2012.07.07 15:04, and it is still broken. I have pasted a minimal example below. Another thing I noticed was that 'align' feature of \setupformulas is broken too. (It has been commented out below in case you want to test that too. Best regards, Prash %\setupformulas[align=right] \starttext \placeformula[eq:ate-intr] \startformula \text{Jane slept.} \stopformula \startfloatcombination [2*1] \placetable[force][tab:eq1]{Sentence 1}{ \bTABLE[frame=off,align=center] \bTR \bTD Jack \eTD \bTD ate \eTD \eTR \eTABLE } \placetable[force][tab:eq2]{Sentence 2}{ \bTABLE[frame=off,align=center] \bTR \bTD John \eTD \bTD ate \eTD \bTD a \eTD \bTD banana \eTD \eTR \eTABLE } \stopfloatcombination \stoptext On 07/07/12 15:23, Hans Hagen wrote: On 7-7-2012 15:18, Prashanth wrote: Hi, I understand that \startfloatcombination was an experimental feature in the previous builds anyway, but it is broken in the latest nightly. Thank you for the rapid fixes so far! I just did an upload ... if it still fails I need an example. 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] Broken Nightly 2012.07.04 23:48 - \xRightarrow
Hi, Some math symbols seem to be failing with the latest nightly build. Minimal example: \starttext \section{blah} A $a \xRightarrow b$ B. \stoptext I see this in the output: ConTeXt ver: 2012.07.04 23:48 MKIV fmt: 2012.7.6 int: english/english system tex error on line 3 in file demo.context: Undefined control sequence ... ... ... ... \math_arrows_construct_single ...s \p_mathspacing \endcsname \p_mathspacing ... \math_arrows_handle_finalize ...{#7}{#1}{#4}{}{#8} }\fi \else \ifsecondargume... to be read again b l.3 A $a \xRightarrow b $ B. ! Undefined control sequence. system tex error on line 3 in file demo.context: Undefined control sequence ... ___ 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] startalign broken in latest checkout
Hi, The latest checkout has a problem with even the most trivial example of \startalign (taken from the wiki): \starttext \startformula \startalign \NC v \NC = u + at \NR \NC h \NC= ut + \frac12 gt^2 \NR \stopalign \stopformula \stoptext % context --version mtx-context | ConTeXt Process Management 0.60 mtx-context | mtx-context | main context file: /opt/context-minimals/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2012.07.04 15:55 Output * * ConTeXt-IV output: * cd /home/3shared/Source/prash/doc/context-trials * context --nonstopmode demo.context * mtx-context | run 1: luatex --fmt=/home/prash/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en --interaction=nonstopmode --jobname=demo --lua=/home/prash/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui --no-parse-first-line --c:currentrun=1 --c:input=./demo.context --c:kindofrun=1 --c:nonstopmode cont-yes.mkiv This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012) \write18 enabled. (/opt/context-minimals/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2012.07.04 15:55 MKIV fmt: 2012.7.4 int: english/english system gt; cont-new.mkiv loaded (/opt/context-minimals/texmf-context/tex/context/base/cont-new.mkiv system gt; beware: some patches loaded from cont-new.mkiv ) fonts gt; latin modern fonts are not preloaded languages gt; language en is active (demo.context{/opt/context-minimals/texmf-fonts/fonts/map/pdftex/context/mkiv-base.map} fonts gt; preloading latin modern fonts (second stage) fonts gt; typescripts gt; unknown: library 'loc' {/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-math.map}{/opt/context-minimals/texmf-fonts/fonts/map/dvips/lm/lm-rm.map} fonts gt; virtual math gt; unable to resolve name mapsfromchar fonts gt; fallback modern rm 12pt is loaded ! Use of \expandafter doesn't match its definition. system gt; tex gt; error on line 4 in file demo.context: Use of ... 1 \starttext 2 3 \startformula \startalign 4 gt;gt; \NC v \NC = u + at \NR 5 \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 \math_both_eqalign_no_aligned ...andafter \bgroup \the \scratchtoks \crcr lt;to be read againgt; \NC l.4 \NC v \NC = u + at \NR ! Missing { inserted. system gt; tex gt; error on line 4 in file demo.context: Missing { inserted ... 1 \starttext 2 3 \startformula \startalign 4 gt;gt; \NC v \NC = u + at \NR 5 \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 lt;to be read againgt; \crcr lt;to be read againgt; \NC l.4 \NC v \NC = u + at \NR ! Missing # inserted in alignment preamble. system gt; tex gt; error on line 4 in file demo.context: Missing # inserted in alignment preamble ... 1 \starttext 2 3 \startformula \startalign 4 gt;gt; \NC v \NC = u + at \NR 5 \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 lt;to be read againgt; \crcr lt;to be read againgt; \NC l.4 \NC v \NC = u + at \NR ! Extra alignment tab has been changed to \cr. system gt; tex gt; error on line 4 in file demo.context: Extra alignment tab has been changed to \cr ... 1 \starttext 2 3 \startformula \startalign 4 gt;gt; \NC v \NC = u + at \NR 5 \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 lt;templategt; \endtemplate \math_alignment_NC -gt;\aligntab l.4 \NC v \NC = u + at \NR ! Extra alignment tab has been changed to \cr. system gt; tex gt; error on line 4 in file demo.context: Extra alignment tab has been changed to \cr ... 1 \starttext 2 3 \startformula \startalign 4 gt;gt; \NC v \NC = u + at \NR 5 \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 lt;templategt; \endtemplate \NR -gt;\aligntab \dostoptagged \dodoubleempty \math_alignment_NR_indeed l.4 \NC v \NC = u + at \NR ! Use of \expandafter doesn't match its definition. system gt; tex gt; error on line 5 in file demo.context: Use of ... 1 \starttext 2 3 \startformula \startalign 4 \NC v \NC = u + at \NR 5 gt;gt; \NC h \NC= ut + \frac12 gt^2 \NR 6 \stopalign \stopformula 7 8 \stoptext 9 \syst_helpers_inspect_next_optional_character ... \fi lt;to be read againgt; \NC l.5 \NC h \NC= ut + \frac12 gt^2 \NR ! Extra alignment tab has been changed to \cr. system gt; tex gt; error on line 5 in file demo.context: Extra alignment
Re: [NTG-context] Nested floats
Hi Marco, I hesitate to use combinations because Table 1.1 (a) and Table 1.1 (b) are not always related to each other. But I will use combinations if everything else fails. Do you have any intuitions as to why the numbering begins at 7? I tried to not use the outermost float (\placetable[here,none][]{}{ ) and it still started numbering at 7. I believe this is an issue with nested tables, not nested floats. Best regards, Prash On 10/03/12 14:29, Marco wrote: On 2012-03-09 Prashanthprash.n@gmail.com wrote: I need to create some small tables that are (possibly) next to each other. Though I could make text flow around tables and appear to the left or to the right of the table, I could not manage something like this: I would use combinations for that (see example below). So I tried to use nested floats to achieve this Nesting floats is not a good idea. (floats because I want each to have its own number and title). There are other ways to achieve that. \setupheads [chapter] [page=no] \startbuffer \bTABLE [frame=off, align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE \stopbuffer \starttext \startchapter [title=First] \startsection [title=1st Section] \startplacetable \startcombination [2*1] {\getbuffer} {(a)} {\getbuffer} {(b)} \stopcombination \stopplacetable \stopsection \stopchapter \startchapter [title=Second] \startplacetable [location=right] \setupcombination [distance=2cm] \startcombination [2*2] {\getbuffer} {(a)} {\getbuffer} {(b)} {\getbuffer} {(c)} {\getbuffer} {(d)} \stopcombination \stopplacetable \input knuth \stopchapter \stoptext 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] Nested floats
Hi Wolfgang, This is exactly what I was looking for. However, it works only in mkii, not in mkiv. Searching though the mailinglist for floatcombinations, I came across this discussion ( http://archive.contextgarden.net/message/20100601.084655.c7d6e858.en.html). Taco's solution works just like Hans' code, but again, only in mkii. Best regards, Prash On 10/03/12 14:49, Wolfgang Schuster wrote: Am 09.03.2012 um 17:38 schrieb Prashanth: Hi, I need to create some small tables that are (possibly) next to each other. Though I could make text flow around tables and appear to the left or to the right of the table, I could not manage something like this: +--+ | | | | Table 1 content | Table 2 content | | | | | Table 1 TITLE| Table 2 TITLE | | | | +--|---+ So I tried to use nested floats to achieve this (floats because I want each to have its own number and title). You can use floatcombinations: http://archive.contextgarden.net/message/20060411.201855.519a8b16.en.html 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] Nested floats
Hi, I need to create some small tables that are (possibly) next to each other. Though I could make text flow around tables and appear to the left or to the right of the table, I could not manage something like this: +--+ | | | | Table 1 content | Table 2 content | | | | | Table 1 TITLE| Table 2 TITLE | | | | +--|---+ So I tried to use nested floats to achieve this (floats because I want each to have its own number and title). Below my mail, I have pasted the code I used to accomplish this. I don't understand why, but it starts numbering with 7 onwards. Is there a way I can fix the numbering? Best regards, Prash \setupheads[chapter][page=no] \starttext \chapter{first} \section{1st section} hello \section{2nd section} hello again \placetable[here,none][]{}{ \bTABLE[frame=off] \bTR \bTD \placetable[force][tab:first]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \bTD \placetable[force][tab:second]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \eTR \eTABLE } \chapter{Second} \placetable[here,none][]{}{ \bTABLE[frame=off] \bTR \bTD \placetable[force][tab:third]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \bTD \placetable[force][tab:fourth]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \eTR \eTABLE } \placetable[here,none][]{}{ \bTABLE[frame=off] \bTR \bTD \placetable[force][tab:fifth]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \bTD \placetable[force][tab:sixth]{derivation for sentence}{ \bTABLE[frame=off,align=center] \bTR \bTD abc \eTD \bTD def \eTD \eTR \bTR \bTD ghi \eTD \bTD jkl \eTD \eTR \eTABLE } \eTD \eTR \eTABLE } \stoptext ___ 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 ___