[NTG-context] Re: Help with Metapopst code
It is rotated with respect to the origin (that is (0,0)). If you want to rotate around another point you have rotatedaround. /Mikael On Wed, Aug 28, 2024 at 12:27 PM Shiv Shankar Dayal wrote: > > > I don't know where you found the code, but the answer to "What is (0, > > r) rotated (a *i) doing?" is that it takes the point (0,r) and rotates > > it a*i degrees. > > I do not understand the concept of rotating a point. It is rotated with > respect > to what reference? > > > > > For your labeling problem, see the last example of section 2.9 of > > > > https://www.pragma-ade.com/general/manuals/metafun-p.pdf > > > > Thanks, I am reading that. > > > /Mikael > > > > PS Please do not cross post here and on stackexchange (at least not > > without telling). > > > > I will keep this in mind. > > -- > Respect, > Shiv Shankar Dayal > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Help with Metapopst code
> I don't know where you found the code, but the answer to "What is (0, > r) rotated (a *i) doing?" is that it takes the point (0,r) and rotates > it a*i degrees. I do not understand the concept of rotating a point. It is rotated with respect to what reference? > > For your labeling problem, see the last example of section 2.9 of > > https://www.pragma-ade.com/general/manuals/metafun-p.pdf > Thanks, I am reading that. > /Mikael > > PS Please do not cross post here and on stackexchange (at least not > without telling). > I will keep this in mind. -- Respect, Shiv Shankar Dayal ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Help with Metapopst code
Hi, I don't know where you found the code, but the answer to "What is (0, r) rotated (a *i) doing?" is that it takes the point (0,r) and rotates it a*i degrees. For your labeling problem, see the last example of section 2.9 of https://www.pragma-ade.com/general/manuals/metafun-p.pdf /Mikael PS Please do not cross post here and on stackexchange (at least not without telling). On Wed, Aug 28, 2024 at 11:12 AM Shiv Shankar Dayal wrote: > > I think it works like (0, r) rotated (a) -- (0, r) rotated (a * 2) -- > ... (0, r) rotated (a*20) -- cycle > > Is my understanding correct? Also, how can I label these vertices in a for > loop? > > On Wed, Aug 28, 2024 at 2:25 PM Shiv Shankar Dayal > wrote: > > > > Hi, > > > > Consider following code: > > > > vardef polygon_with_side(expr n, s) = > > save a, b, r; numeric a, b, r; > > a * n = 360; a + 2b = 180; r = s * sind(b) / sind(a); > > for i = 0 upto n-1: (0, r) rotated (a * i) -- endfor cycle > > enddef; > > > > beginfig(1); > > path p; p = polygon_with_side(21, 20); > > draw p; > > endfig; > > bye; > > > > It draws a polygon with 21 sides with radius 20. I understand all of > > it except the for loop. > > > > What is (0, r) rotated (a *i) doing? > > > > -- > > Respect, > > Shiv Shankar Dayal > > > > -- > Respect, > Shiv Shankar Dayal > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
Re: [NTG-context] labeling in meta post
Dear Henri Menke, I always use “btex etex” for labeling math. But “…..” is simpler and it works fine. Thank you. Best regards, Dalyoung >> >> \startbuffer[delta] >> label.bot(btex ${\delta}$ etex, (1cm,0));% >> %label.bot(btex $\delta$ etex, (3cm,0)); > > Why not just > > label.bot("$\delta$", (3cm,0)); ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] labeling in meta post
> On 7 Sep 2018, at 01:02, Henri Menke wrote: > >> label.bot(btex ${\delta}$ etex, (1cm,0));% >> %label.bot(btex $\delta$ etex, (3cm,0)); > > Why not just > > label.bot("$\delta$", (3cm,0)); Sometimes, one might want to use btex ... etex to produce a picture object, for example: label.lft(btex $\delta$ etex rotated 90, frame) ; A few notes: 1) Hans has recently rewritten btex ... etex so there may be a bug 2) I recently rewrote label to accept a closed path or a picture in addition to a location (a pair), in which case it places the label relative to the bounding box (by default, at the center). I illustrate this above above. Alan ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] labeling in meta post
On 07/09/18 10:55, Jeong Dal wrote: > Hi, > > What is the difference between {\delta} and \delta? > Former is OK, but the second is not compiled. > > Here is a MWE. > > > \startbuffer[delta] > label.bot(btex ${\delta}$ etex, (1cm,0)); % > %label.bot(btex $\delta$ etex, (3cm,0)); Why not just label.bot("$\delta$", (3cm,0)); > label.bot(btex $\frac{2-\delta}{2}$ etex, (5cm,0)); % > \stopbuffer > \starttext > \processMPbuffer[delta] > \stoptext > > Best regards, > > Dalyoung > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] labeling in meta post
Hi, What is the difference between {\delta} and \delta? Former is OK, but the second is not compiled. Here is a MWE. \startbuffer[delta] label.bot(btex ${\delta}$ etex, (1cm,0)); % %label.bot(btex $\delta$ etex, (3cm,0)); label.bot(btex $\frac{2-\delta}{2}$ etex, (5cm,0)); % \stopbuffer \starttext \processMPbuffer[delta] \stoptext Best regards, Dalyoung ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Changing font for math function
On Tue, 12 May 2015, Maggyero wrote: Hans Hagen wrote: for functions one can now use: \setupmathematics [functionstyle=\rm] Fantastic! Thank you Hans, it is way better than the old mechanism \setmathfunctionstyle. Now I have a few suggestions to improve the consistency of this new mechanism. First, I think this functionstyle key a) should be better called 'mathlabelstyle'; No. The style applies to anything called using \mfunction{...}, so functionstyle and functioncoloar are appropriate keys. b) be default to \tf to make the FONT ALTERNATIVE always upright; I disagree. The default should be \mathupright (as is the case in amstex and latex, and probably also plaintex). We now have the option to change it to \tf if desired. c) be linked to this following new definition in math-ini.mkiv: + \unexpanded\def\mathlabel#1{\text{\mathlabelstyle #1}} so that \mathlabel can be used for labeling math objects like functions but ALSO for labeling variables with subscripts (e.g., \rho_{\mathlabel{air}}). The hardcoded \text in the definition of \mathlabel is used here for these 5 reasons: Hans already replied to that. That \mathlabel should replace \mfunction which should be removed, and \mfunctionlabeltext should be removed as well and one should directly use the already defined \mathlabeltext instead, for these 3 reasons: I strongly disagree to this. These are two completely different issues (wanting a macro to tag multiletter variable names vs a macro to tag log-like operators). 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction and \mfunctionlabeltext do not create a \mathop atom and it makes the user believe its usage is restricted for labeling functions while the command should also be used for labeling variable with subscripts (e.g., \rho_{\mathlabel{air}} is far better than \rho_\mfunction{air}). 3. Using only \mathlabeltext with \setuplabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. Thus the function definitions in math-def.mkiv should be changed: - \definemathcommand [arccos] [nolop] {\mfunctionlabeltext{arccos}} + \definemathcommand [arccos] [nolop] {\mathlabel{\mathlabeltext{arccos}}} etc. I don't see the rationale for this. And I think you should add in this file the definition of the differential operator which is so widely used in mathematics, so that users have at their disposal once for all a proper implementation of this operator and don't have to make their own hack: + \definemathcommand[diff]{\mathop{\mathlabel{d}}\mathopen{}} Note that there is no consensus on how the `d` in calculus should be typeset. There are also \differentiald and \differentialD that map to unicode slots. \definemathcommand[arsinh][nolop]{\mathlabel{arsinh}} \starttext $\arsinh z = \ln\bigl(z + \sqrt{z^2 + 1}\bigr)$\par $\rho_{\mathlabel{air}} = \frac{p}{R_{\mathlabel{specific}}T}$\par \stoptext \mfunction already does that. I'll reply to the rest of the message later. Aditya ___ 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] Changing font for math function
On 5/12/2015 4:19 PM, Maggyero wrote: >Hans Hagen wrote: >for functions one can now use: >\setupmathematics > [functionstyle=\rm] Fantastic! Thank you Hans, it is way better than the old mechanism \setmathfunctionstyle. Now I have a few suggestions to improve the consistency of this new mechanism. First, I think this functionstyle key a) should be better called 'mathlabelstyle'; b) be default to \tf to make the FONT ALTERNATIVE always upright; c) be linked to this following new definition in math-ini.mkiv: + \unexpanded\def\mathlabel#1{\text{\mathlabelstyle #1}} so that \mathlabel can be used for labeling math objects like functions but ALSO for labeling variables with subscripts (e.g., \rho_{\mathlabel{air}}). The hardcoded \text in the definition of \mathlabel is used here for these 5 reasons: 1. It CAN make the FONT STYLE adaptative to the surrounding style (if the \mathlabelstyle inside—defined by the user in \setupmathematics[mathlabelstyle=]—does not specify another FONT STYLE like \rm, \ss or \tt). 2. It uses proper mathcodes (hyphens are not converted to minus binary operators—useful if one wants to call its function or subscript 'low-frequency' for instance—, apostrophes are not converted to primes—useful if one wants to call its function 'Riemann's function' for instance). 3. It uses proper kerning (if one wants to call its function or subscript 'WALL' for instance). 4. It uses proper ligatures (if one wants to call its function or subscript 'efficiency' for instance). 5. It avoids the user having to add \kern\zeropoint to prevent vertical alignment to the middle of the fraction bar when used inside \mathop for one-character function names (if one wants to call its function 'd' for instance). That \mathlabel should replace \mfunction which should be removed, and \mfunctionlabeltext should be removed as well and one should directly use the already defined \mathlabeltext instead, for these 3 reasons: 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction and \mfunctionlabeltext do not create a \mathop atom and it makes the user believe its usage is restricted for labeling functions while the command should also be used for labeling variable with subscripts (e.g., \rho_{\mathlabel{air}} is far better than \rho_\mfunction{air}). 3. Using only \mathlabeltext with \setuplabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. mfunction will stay as it is also needed for tagged pdf and exporting (basically it's an apply math function thing) so if something else is needed another name/mechanism have to be made (with appropriate tagging) the label itself is a special case as it's optional (and is just there for cultural differences as not all countries use the english names) so, \rho_{\mathlabel{air}} is something different then, some kind of multi-character variable? Thus the function definitions in math-def.mkiv should be changed: - \definemathcommand [arccos] [nolop] {\mfunctionlabeltext{arccos}} + \definemathcommand [arccos] [nolop] {\mathlabel{\mathlabeltext{arccos}}} etc. And I think you should add in this file the definition of the differential operator which is so widely used in mathematics, so that users have at their disposal once for all a proper implementation of this operator and don't have to make their own hack: + \definemathcommand[diff]{\mathop{\mathlabel{d}}\mathopen{}} i can add a 'diff' With this new \mathlabel command, the user now have a convenient and consistent way to label its math objets (functions and variables with subscripts): \definemathcommand[arsinh][nolop]{\mathlabel{arsinh}} \starttext $\arsinh z = \ln\bigl(z + \sqrt{z^2 + 1}\bigr)$\par $\rho_{\mathlabel{air}} = \frac{p}{R_{\mathlabel{specific}}T}$\par \stoptext >Hans Hagen wrote: >\unprotect >\def\v!sansnormal {sansnormal} >%def\v!sansbold {sansbold} >\def\v!serifnormal{serifnormal} >\def\v!serifbold {serifbold} >\definealternativestyle [\v!sansnormal] [\ss\tf] >%definealternativestyle [\v!sansbold][\ss\bf] >\definealternativestyle [\v!serifnormal] [\rm\tf] >\definealternativestyle [\v!serifbold] [\rm\bf] >\protect In this case, for completeness, I would also add the definitions for the remaining style \tt: \def\v!mononormal {mononormal} \def\v!monobold {monobold} \definealternativestyle [\v!mononormal] [\tt\tf] \definealternativestyle [\v!monobold][\tt\bf] ok >Aditya Mahajan wrote: >\sin etc should not behave like \text{...}. \text should adapt to the surrounding style while \mathoptext should not. In particular, in the following > {\ss $\sin x$} > {\bf $\sin x$} >\sin should be in normal text upright font and not adapted to the surrounded text.
[NTG-context] Changing font for math function
>Hans Hagen wrote: >for functions one can now use: >\setupmathematics > [functionstyle=\rm] Fantastic! Thank you Hans, it is way better than the old mechanism \setmathfunctionstyle. Now I have a few suggestions to improve the consistency of this new mechanism. First, I think this functionstyle key a) should be better called 'mathlabelstyle'; b) be default to \tf to make the FONT ALTERNATIVE always upright; c) be linked to this following new definition in math-ini.mkiv: + \unexpanded\def\mathlabel#1{\text{\mathlabelstyle #1}} so that \mathlabel can be used for labeling math objects like functions but ALSO for labeling variables with subscripts (e.g., \rho_{\mathlabel{air}}). The hardcoded \text in the definition of \mathlabel is used here for these 5 reasons: 1. It CAN make the FONT STYLE adaptative to the surrounding style (if the \mathlabelstyle inside—defined by the user in \setupmathematics[mathlabelstyle=]—does not specify another FONT STYLE like \rm, \ss or \tt). 2. It uses proper mathcodes (hyphens are not converted to minus binary operators—useful if one wants to call its function or subscript 'low-frequency' for instance—, apostrophes are not converted to primes—useful if one wants to call its function 'Riemann's function' for instance). 3. It uses proper kerning (if one wants to call its function or subscript 'WALL' for instance). 4. It uses proper ligatures (if one wants to call its function or subscript 'efficiency' for instance). 5. It avoids the user having to add \kern\zeropoint to prevent vertical alignment to the middle of the fraction bar when used inside \mathop for one-character function names (if one wants to call its function 'd' for instance). That \mathlabel should replace \mfunction which should be removed, and \mfunctionlabeltext should be removed as well and one should directly use the already defined \mathlabeltext instead, for these 3 reasons: 1. Every command containing the word 'labeltext' should not have a style attached to it. 2. The word 'function' is misleading because \mfunction and \mfunctionlabeltext do not create a \mathop atom and it makes the user believe its usage is restricted for labeling functions while the command should also be used for labeling variable with subscripts (e.g., \rho_{\mathlabel{air}} is far better than \rho_\mfunction{air}). 3. Using only \mathlabeltext with \setuplabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. Thus the function definitions in math-def.mkiv should be changed: - \definemathcommand [arccos] [nolop] {\mfunctionlabeltext{arccos}} + \definemathcommand [arccos] [nolop] {\mathlabel{\mathlabeltext{arccos}}} etc. And I think you should add in this file the definition of the differential operator which is so widely used in mathematics, so that users have at their disposal once for all a proper implementation of this operator and don't have to make their own hack: + \definemathcommand[diff]{\mathop{\mathlabel{d}}\mathopen{}} With this new \mathlabel command, the user now have a convenient and consistent way to label its math objets (functions and variables with subscripts): \definemathcommand[arsinh][nolop]{\mathlabel{arsinh}} \starttext $\arsinh z = \ln\bigl(z + \sqrt{z^2 + 1}\bigr)$\par $\rho_{\mathlabel{air}} = \frac{p}{R_{\mathlabel{specific}}T}$\par \stoptext >Hans Hagen wrote: >\unprotect >\def\v!sansnormal {sansnormal} >%def\v!sansbold {sansbold} >\def\v!serifnormal{serifnormal} >\def\v!serifbold {serifbold} >\definealternativestyle [\v!sansnormal] [\ss\tf] >%definealternativestyle [\v!sansbold][\ss\bf] >\definealternativestyle [\v!serifnormal] [\rm\tf] >\definealternativestyle [\v!serifbold] [\rm\bf] >\protect In this case, for completeness, I would also add the definitions for the remaining style \tt: \def\v!mononormal {mononormal} \def\v!monobold {monobold} \definealternativestyle [\v!mononormal] [\tt\tf] \definealternativestyle [\v!monobold][\tt\bf] >Aditya Mahajan wrote: >\sin etc should not behave like \text{...}. \text should adapt to the surrounding style while \mathoptext should not. In particular, in the following > {\ss $\sin x$} > {\bf $\sin x$} >\sin should be in normal text upright font and not adapted to the surrounded text. >Is it possible to set a value of functionstyle so that the surrounding text font styles are ignored (but the font size is not). You should try \mathop{\text{\rm\tf sin}} or \mathoptext{\rm\tf sin} (Hans defined this \mathoptext in math-ini.mkiv as equal to \mathop#1{\text{1#}}), or equivalently but better: \mathop{\mathlabel{sin}} with \setupmathematics[mathlabelstyle=\rm\tf] with the new command \mathlabel that I have defined above. And in my opinion, names for operators and subscripts should all be upright, that is adaptative to the surrounding TEXT STYLE
[NTG-context] Word wrap around framed text.
This passage works OK except for the lack of word wrap around for the framed text. -- \starttext \chapter{Introduction} The specialty food market has exploded. A combination of factors has led to exciting opportunities for food entrepreneurs. Retail sales of all specialty foods are generating revenues of more than 88 billion a year and averaging annual growth of more than 8 percent. To some, this means great opportunity. To others, it represents a formidable challenge. Your ability to grab a slice of this pie and make your mark, establish your independence, achieve success, and acquire wealth will depend on how effectively you prepare-and prepare you must! How to prepare for the opportunities and challenges of taking your food products to the appropriate store shelves is the subject of this guide. You need not know the basics of small business operations just yet. For now, success will depend on your personal and business vision, drive, talent, and the amount of capital you can raise. Let's put that last item into perspective: the average cost of getting national grocery store shelf exposure for a new product by a branded manufacturer has been estimated at more than \$6 million. Still reading? Take heart. There is a proven alternative: the specialty food industry. It has become the proven vehicle for entry-level food distribution in the United States. Different market segments and new products can be tested in the specialty food industry without the initial investment required of the major food producers. The secret has to do with superior execution of often ordinary ideas \section{How Long Does It Take to Be Successful?} \section{How Much Will It Cost You?} Depending on your approach, you can expect to incur minimum start-up costs of approximately \$35,000 to \$100,000 and more each year for the first three to five years. This includes production, packaging, labeling, advertising, and promotion of one product. It does {\it not} \setupframed[framecorner=round, frameradius=1em, background=screen, backgroundscreen=0.70, backgroundcorner=round, backgroundradius=1em, corner=round, radius=1em] \startframedtext[right][width=3.2in] \centerline{\ss\tfb Life Before Specialty} \centerline{\ss\tfb Food Marketing} What food entrepeneurs did before starting a specialty food firm (in order of prevalence): \startitemize[1] \item Other business non-food-related (52\%) \item food-related business (14\%) \item Medical profession (11\%) \item Education (8\%) \item Nonprofit Charity (8\%) \item Entertainment (3.6\%) \stopitemize ---{Food Entrepeneur Magazine 2014 pool responses} \stopframedtext include the cost of success. Many firms that won "Outstanding Product Awards" were ill prepared for the next move. Not all of them succeeded in profiting from their good fortune. This estimated cost also assumes that you will be doing a lot of the leg work (administrative, invoicing, database management, and so on). Our purpose is to explore the inner workings of {\bf niche marketing.} Niche marketing entails finding the best combination of product packaging, pricing, positioning, and promotion that will encourage the consumer to purchase a product not otherwise offered by the major suppliers. Imagination is a key ingredient, but adequate funding is essential. \stoptext - -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html Updated PDF e-book: "Create Book Covers with Scribus 1.4.5" coming soon at http://www.booklocker.com/! ___ 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] Citing a PhD dissertation
On Sun, 01 Feb 2015 07:24:00 -0700, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, ConTeXt currently follows archaic BibTeX conventions in labeling doctoral dissertations for bibliography. So we have the tag 'phdthesis' as in \startpublication[k=hamid98, t=phdthesis, a=Hamid, y=1998, s=ISH98] \author[]{Idris Samawi}[I.]{}{Hamid} \title{The Metaphysics and Cosmology of \TeX} \pubname{\TeX\ State University} \pubyear{1998} \stoppublication The tag gets mapped to 'PhD thesis' in the output. But current English style is to use 'thesis' for Masters degrees and 'dissertation' for doctoral degrees [See the Merriam-Webster Style Manual or even google 'phd thesis or dissertation' for lots of confirmation of this]. As development of a new mkiv module continues, I would suggest changing this to the standard usage. In the meantime: How can I change the label in the current bibliography system? I tried the following (also attached): \starttext \setuppublications[alternative=apa] \setupbtxlabeltext [en] [apa:phdthesis={Doctoral dissertation}] \startsetups btx:apa:phdthesis \setvariables[btx:temp][label=Doctoral Dissertation] \btxsetup{btx:apa:common:thesis} \stopsetups \startpublication[k=hamid98, t=phdthesis, a=Hamid, y=1998, s=ISH98] \author[]{Idris Samawi}[I.]{}{Hamid} \title{The Metaphysics and Cosmology of \TeX} \pubname{\TeX\ State University} \pubyear{1998} \stoppublication \placepublications [criterium=all] % inherits from \setuppublications % \completepublications[criterium=cite] % only works with criterium=all \stoptext But the output is still 'PhD thesis'. How do I get the changes in the btx labeltext passed on to ConTeXt so I can get the correct output? Answer is in context/bib/bibl-apa.tex: \setuppublicationlayout[phdthesis]{% \insertauthors{}{ }{}% \insertpubyear{(}{). }{}% \inserttitle{\bgroup\it }{\egroup \insertseries{ (}{)}{}. }{}% \insertbibtype{}{, }{Doctoral dissertation,}% \insertpublisher{ }{.}{.}% \insertpages{ }{ p. }{}% \insertnote{ }{.}{}% As Hans explained privately, this is hardwired so the btx labels don't kick in as expected. May be decoupled at a later date, but till then this is the key for anyone wanting to fix things. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] Citing a PhD dissertation
Dear gang, ConTeXt currently follows archaic BibTeX conventions in labeling doctoral dissertations for bibliography. So we have the tag 'phdthesis' as in \startpublication[k=hamid98, t=phdthesis, a=Hamid, y=1998, s=ISH98] \author[]{Idris Samawi}[I.]{}{Hamid} \title{The Metaphysics and Cosmology of \TeX} \pubname{\TeX\ State University} \pubyear{1998} \stoppublication The tag gets mapped to 'PhD thesis' in the output. But current English style is to use 'thesis' for Masters degrees and 'dissertation' for doctoral degrees [See the Merriam-Webster Style Manual or even google 'phd thesis or dissertation' for lots of confirmation of this]. As development of a new mkiv module continues, I would suggest changing this to the standard usage. In the meantime: How can I change the label in the current bibliography system? I tried the following (also attached): \starttext \setuppublications[alternative=apa] \setupbtxlabeltext [en] [apa:phdthesis={Doctoral dissertation}] \startsetups btx:apa:phdthesis \setvariables[btx:temp][label=Doctoral Dissertation] \btxsetup{btx:apa:common:thesis} \stopsetups \startpublication[k=hamid98, t=phdthesis, a=Hamid, y=1998, s=ISH98] \author[]{Idris Samawi}[I.]{}{Hamid} \title{The Metaphysics and Cosmology of \TeX} \pubname{\TeX\ State University} \pubyear{1998} \stoppublication \placepublications [criterium=all] % inherits from \setuppublications % \completepublications[criterium=cite] % only works with criterium=all \stoptext But the output is still 'PhD thesis'. How do I get the changes in the btx labeltext passed on to ConTeXt so I can get the correct output? Thanks and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 test-phdthesis.pdf Description: Adobe PDF document test-phdthesis.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] State of documentation of ConTeXt?
On 7/15/2014 5:33 PM, Yuri Teixeira wrote: As I wrote in another thread, the state of the docs worries me too. I take it that the suggestion to study the source was not serious, and perhaps it is indeed a matter of priorities. As a new user I have a strong opinion that the documentation should be a higher priority than it seems to be. All the arguments about how many person-hours it would take and the huge task it is, in my eyes, only furthers the point that it is not considered as important as doing "real development". I Well, without development (like luatex and mp and fonts and so) it would be a dead end anyway. Also, without some of the new things I could not use context myself in projects (and thereby put time in it). consider the docs a core part of the project, and the code another part, hence the disagreement in regards to the priorities. Pro-bono or not is not an issue, since time is spent on the project in some form. Writing features that few people know about and are able to use is only half of the dev work. Most mechanism that are new or renewed also come with pretty recent manuals (like xtables and new bibliography support); older code is mostly compatible with what old manuals describe (ok we could just bump the date to 2014 but why). For me that's the most I can so ... write in sync with development. (I simply run out of time otherwise.) But I get it that documenting is a pain, and seemingly frivolous work. The separate manuals may have been good, but they look fragmented and there is no unified docs to go to when in doubt. And having one place to go is even easier to maintain than many. The wiki is a nice idea, but it needs much more rigour to function as real docs. hm, I spend quite some time on writing code but also on documentations; did you read the xtable, xml, cld, fonts, metafun, etc manuals as well as mk, hybrid, allkind? It's up to others to translate that into something better. There are articles published (ok, in that case it helps to be a member if a user group, which helps keeping tex alive anyway). There are also examples in the test suite that can probably be turned into docu. Some suggestions. I'm assuming some form of wiki-like website that can be the contextgarden or (preferably) another official docs/wiki/wiki-like site. everyone can write documentation (and it also happens) ... we have the wiki etc to publish them .. and everyone can conrtibute to make the wiki better (and provide pointers to documentation) All the content of the manuals should be unified in this site. If a crowdsourcing/users-can-do-it approach is taken, a clear structure needs to be previously laid out, so that we know what blanks to fill. And even with collaboration/feedback, core people should do it. It is important that reviewing and check marking the new edits be done by some authoritative group, so that the community knows what to trust, what should work as documented so that we can report real issues. It is important to label the information as reviwed and up to date, and to which version it applies, mkii/mkiv If this structure is put on top of the context garden, some labeling is needed to distinguish the extra pages from the structural docs pages. the problem there is that it needs some users who dedicate time and so that for many years in order to keep consistency (btw, there are some real good sections on the wiki already) There are many good examples out there of good docs structure and presentation. I'm willing to collaborate what I can with my limited knowledge and time, even if little while writing my master's thesis. In that case, coordinate with Sietse. One of the things we want to (be) do(ne) is a split between mkii and mkiv on the wiki. Sorry to annoy with this again, No problem, as you also offer to help, YT 2014-07-15 11:55 GMT-03:00 luigi scarso mailto:luigi.sca...@gmail.com>>: On Tue, Jul 15, 2014 at 11:59 AM, Gerben Wierda mailto:gerben.wie...@rna.nl>> wrote: On 14 Jul 2014, at 19:29, Hans Hagen mailto:pra...@wxs.nl>> wrote: quite some sub-systems are described in their own manuals (fonts, tables, xml, ...) and these manuals are quite up to date (and easier to maintain than one big fat manual also, additional documentation is something that users need to participate in (just pick a topic) even if it has high priority, that doesn't mean that those involved have much free time left to do that next to their regular work (as usual most development is done in spare time) so, patience is needed, I like ConTeXt (still do, I liked its approach when I first encountered it). But the project is more the ongoing private tinkering of a small in-crowd (that communicates with some followers). ConTeXt is managed a bit like a small gr
Re: [NTG-context] State of documentation of ConTeXt?
As I wrote in another thread, the state of the docs worries me too. I take it that the suggestion to study the source was not serious, and perhaps it is indeed a matter of priorities. As a new user I have a strong opinion that the documentation should be a higher priority than it seems to be. All the arguments about how many person-hours it would take and the huge task it is, in my eyes, only furthers the point that it is not considered as important as doing "real development". I consider the docs a core part of the project, and the code another part, hence the disagreement in regards to the priorities. Pro-bono or not is not an issue, since time is spent on the project in some form. Writing features that few people know about and are able to use is only half of the dev work. But I get it that documenting is a pain, and seemingly frivolous work. The separate manuals may have been good, but they look fragmented and there is no unified docs to go to when in doubt. And having one place to go is even easier to maintain than many. The wiki is a nice idea, but it needs much more rigour to function as real docs. Some suggestions. I'm assuming some form of wiki-like website that can be the contextgarden or (preferably) another official docs/wiki/wiki-like site. All the content of the manuals should be unified in this site. If a crowdsourcing/users-can-do-it approach is taken, a clear structure needs to be previously laid out, so that we know what blanks to fill. And even with collaboration/feedback, core people should do it. It is important that reviewing and check marking the new edits be done by some authoritative group, so that the community knows what to trust, what should work as documented so that we can report real issues. It is important to label the information as reviwed and up to date, and to which version it applies, mkii/mkiv If this structure is put on top of the context garden, some labeling is needed to distinguish the extra pages from the structural docs pages. There are many good examples out there of good docs structure and presentation. I'm willing to collaborate what I can with my limited knowledge and time, even if little while writing my master's thesis. Sorry to annoy with this again, YT 2014-07-15 11:55 GMT-03:00 luigi scarso : > > > > On Tue, Jul 15, 2014 at 11:59 AM, Gerben Wierda > wrote: > >> On 14 Jul 2014, at 19:29, Hans Hagen wrote: >> >> quite some sub-systems are described in their own manuals (fonts, tables, >> xml, ...) and these manuals are quite up to date (and easier to maintain >> than one big fat manual >> >> also, additional documentation is something that users need to >> participate in (just pick a topic) >> >> even if it has high priority, that doesn't mean that those involved have >> much free time left to do that next to their regular work (as usual most >> development is done in spare time) >> >> so, patience is needed, >> >> >> I like ConTeXt (still do, I liked its approach when I first encountered >> it). But the project is more the ongoing private tinkering of a small >> in-crowd (that communicates with some followers). >> >> ConTeXt is managed a bit like a small group of researchers sharing a >> couple of complex and undocumented models/programs and tinkering with them >> as they go along. It’s an activity without formal design, but with a lot of >> trial-and-error/testing. >> >> Given that status (and the fact that it has had that status for over a >> *decennium*), I don’t expect it to ever become a serious product that is >> (semi-)professionally managed. I prefer content over management every day, >> but something like this needs some minimal management. That requires both >> time (=money) and capabilities. Besides, the tinkering researchers may not >> be inclined to do that, they want to tinker. >> >> BTW, you can’t be serious asking the *users* to provide the >> documentation, can you? >> >> > These are still good > > Fonts in ConTeXt > Layouts in ConTeXt > MetaFun manual > MKII - MKIV, the history of LuaTeX > > http://www.h2o-books.com/catalog/5 > > -- > luigi > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___ > ___
Re: [NTG-context] passing arguments to \processMPbuffer
Am 21.04.2014 um 15:46 schrieb Jeong Dal : > Dear all, > > For \startuseMPgraphic, there is a way to do that (found in metafun book) as > following: > > \startuseMPgraphic{Labels}{s, t} > numeric u; u:= 1cm; > > for i=0 upto 7: > label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{s}[origin,3u*dir(30*i)]) > ; > label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{t}[origin,3u*dir(30*i)]) > ; > endfor; > \stopuseMPgraphic > > \starttext > \placefigure[][]{} > {\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}} > \stoptext > > Is there a way to the same job for \processMPbuffer instead of .5 and .7 in > buffer? > > \startbuffer[Labels]%{s, t} > numeric u; u:= 1cm; > for i=0 upto 7: > label (textext("$v_{" & decimal (i) & "}$" ), .5[origin,3u*dir(30*i)]) ; > label (textext("$v_{" & decimal (i) & "}$" ), .7[origin,3u*dir(30*i)]) ; > endfor; > \stopbuffer > > \starttext > \processMPbuffer[Labels]%% ?{s, t}? > \stoptext You can’t pass variables with the buffer command but a direct setup and access of them is possible: \startbuffer[Labels] numeric u; u:= 1cm; for i=0 upto 7: label (textext("$v_{" & decimal (i) & "}$" ), \MPrawvar{Labels}{s}[origin,3u*dir(30*i)]) ; label (textext("$v_{" & decimal (i) & "}$" ), \MPrawvar{Labels}{t}[origin,3u*dir(30*i)]) ; endfor; \stopbuffer \starttext \setupMPvariables[Labels][s=0.8, t=1.3] \processMPbuffer [Labels] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] passing arguments to \processMPbuffer
Dear all, For \startuseMPgraphic, there is a way to do that (found in metafun book) as following: \startuseMPgraphic{Labels}{s, t} numeric u; u:= 1cm; for i=0 upto 7: label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{s}[origin,3u*dir(30*i)]) ; label (textext("$v_{" & decimal (i) & "}$" ), \MPvar{t}[origin,3u*dir(30*i)]) ; endfor; \stopuseMPgraphic \starttext \placefigure[][]{} {\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}} \stoptext Is there a way to the same job for \processMPbuffer instead of .5 and .7 in buffer? \startbuffer[Labels]%{s, t} numeric u; u:= 1cm; for i=0 upto 7: label (textext("$v_{" & decimal (i) & "}$" ), .5[origin,3u*dir(30*i)]) ; label (textext("$v_{" & decimal (i) & "}$" ), .7[origin,3u*dir(30*i)]) ; endfor; \stopbuffer \starttext \processMPbuffer[Labels]%% ?{s, t}? \stoptext Thank you. Best regards, Dalyoung ___ 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] NTG-context] How to hack the lua files
Hans, Thankyou for your suggestion of using the \usereferences tag to reference formulas in another document. This is a good solution. However the example below doesn't give usable results because the references to the external formula output by test2.tex does not include the chapter number: test1.tex: - \starttext \chapter{Chapter 1} \placeformula[one] \startformula x = y \stopformula \placeformula[two] \startformula y = z \stopformula \chapter{Chapter 2} \placeformula[three] \startformula z = x \stopformula \stoptext test2.tex: -- \usereferences[test1.tex] \starttext \in{formula}[test1.tex::one] \in{formula}[test1.tex::two] \in{formula}[test1.tex::three] \stoptext In the output of test1.tex, the formulas are labeled (1.1), (1.2), and (2.1). In the output of test2.tex the references are labeled 'formula 1', 'formula 2', and 'formula 1' (i.e. the section number is not included). Using the \usereferences tag works if I label formulas 'bytext' rather than by 'bysection' and turn off chapter prefixes in test1.tex using the following at the start of the document: \setupformulae[way=bytext,prefixsegments=None] I would really prefer to maintain numbering by section, but to do this, I need test2.tex to show external references in the same way as test1.tex (by including the section number in front of the equation number). Is there a way to do this at present? If not, labeling formulas 'bytext' will work for now even if it isn't ideal. -Lance Larsen On 6/7/2013 4:01 PM, Lance Larsen wrote: > luigi, > > When I started exploring how to map equation references (eq:name) to > equation numbers (4.2), I noticed that the 'tuc' file included the equation > reference (eq:name), but I was not able to identify anywhere where it > indicates the actual equation label specified in the document. Below is an > example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the > document: > > { >["metadata"]=142, >["numberdata"]=237, >["prefixdata"]=11, >["references"]={ > ["block"]="bodypart", > ["internal"]=122, > ["realpage"]=47, > ["reference"]="eq:DVOL_RVI_17", > ["section"]=79, >}, > } > > There is nowhere in the tuc file that contains 4 and 28 near each other. I > checked this for other equations as well and concluded that the tuc file > does not contain the actual equation numbers that are used. because there are indirect references to for instance 'numberdata' where this info sits > If I am missing something or you have any other suggestions that might help > me to extract this info, I would sure appreciate the help. see previous mail btw, if you just want to use references in another tex doc, this will do the trick: \usereferences[somedoc] \starttext \in{formula}[somedoc::a] \in{formula}[somedoc::b] \stoptext - 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 ___
Re: [NTG-context] float combinations
On 2013–04–13 Alan BRASLAU wrote: > A cow is shown in \in{figure} [fig:scenery]a. A cow is shown in \in{figure}{a}[fig:scenery] > The above example raises the following (low priority) feature > suggestion: How about some way of automatically numbering/labeling > combinations just like item lists? Sort-of a hybrid between > combination and itemize. I think this could be a useful feature. > Say, > \startcombination [r*c] [item=a] It's not that simple. You need other itemgroup settings as well, otherwise you don't know the lefttext, righttext, stopper, etc. options which are required for consistency, the sole purpose of this feature. Marco signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] float combinations
This is probably not exactly what you want, however, one can use list= in \startplacefigure\stopplacefigure to differentiate between the figure caption and its listing in the list of figures. \startplacefigure [title={Dutch scenery. \startitemize [n] \startitem A cow. \stopitem \startitem A mill. \stopitem \stopitemize}, list=Figure title, reference=fig:scenery] \startcombination [2] {\externalfigure [cow] [width=.5\textwidth]} {a} {\externalfigure [mill] [width=.45\textwidth} {b} \stopcombination \stopplacefigure A cow is shown in \in{figure} [fig:scenery]a. The above example raises the following (low priority) feature suggestion: How about some way of automatically numbering/labeling combinations just like item lists? Sort-of a hybrid between combination and itemize. Say, \startcombination [r*c] [item=a] \startitem \externalfigure [cow] \stopitem \startitem \externalfigure [mill] \stopitem \stopcombination Hmm. A challenge for Hans (as if he is not busy enough). (However, I am sure that Wolfgang can suggest an obvious solution that is already available, that I overlook... :) Alan ___ 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] Enumeration Label
On Thu, Jan 19, 2012 at 9:09 PM, Troy Henderson wrote: > The labeling for first level enumerations using > > \startitemize[n] > \item Foo > \item Bar > \stopitemize > > yields > > 1. Foo > 2. Bar > > What is the preferred method for changing enumeration symbols from 1. > and 2. to 1) and 2), respectively? I also want to be able to do > something similar for second, third, and fourth level enumerations. > > Thanks, > > Troy Henderson > ___ > 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 > ___ Dear Troy, maybe \startitemize[n][stopper={},right={)}] \item Foo \item Bar \stopitemize does what you want? Best regards, Mikael ___ 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] Enumeration Label
The labeling for first level enumerations using \startitemize[n] \item Foo \item Bar \stopitemize yields 1. Foo 2. Bar What is the preferred method for changing enumeration symbols from 1. and 2. to 1) and 2), respectively? I also want to be able to do something similar for second, third, and fourth level enumerations. Thanks, Troy Henderson ___ 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] Natural Tables---Including a bit of cell
Hans, This didn't quite achieve what I was looking for. I was hoping for the formatting of circuit 4 in the output file test.pdf, rather than what was produced for circuit 8. I modified the definition of \spare so that by default a 15A breaker is assumed unless otherwise specified. However, a more pressing problem is this: If I remove the comments from the row previous, i.e., I have two rows for which I want nr=2, I get the strange artifact in test+.pdf where the second row gets wrapped up a row. Even with the comments in place, the last row is single height. What I really want are two double height rows similar to circuits 2 and 4 but for the entire row. advTHANKSance Message: 1 Date: Wed, 23 Nov 2011 09:38:51 +0100 From: Hans Hagen To: pavneet_ar...@waroc.com,mailing list for ConTeXt users Subject: Re: [NTG-context] Natural Tables---Including a bit of cell style in a \define Message-ID:<4eccb11b.2010...@wxs.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 22-11-2011 13:08, Pavneet Arora wrote: I am creating documentation labeling the circuits of electrical and network panels for a project of mine. Enclosed is a minimal example. What I would like is to define two macros: \unused and \spare (\unused referring to a circuit with no breaker installed, while \spare referring to a circuit with a breaker, but no load). I wish these definitions to not only include the represented text and font directives, i.e., {\tt [Unused]}, but also shade the cell in a background color. However, I cannot seem to figure out how to do that. Including the `[background=color,backgroundcolor=gray]' in the \define seems to be expanded back simply as text. Any suggestions? \define\unused {\inframed [foregroundstyle=type, background=color, backgroundcolor=gray, frame=off] {[Unused]}} - 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 - -- - - Pavneet Arora \setuppapersize[legal] \setuplayout[header=0in,footer=0in,topspace=0.75in,backspace=1.25in] \setuppagenumbering[location=] \setupbodyfont[11pt] \starttext %\showlayout[pt,in] %\showbodyfont \define\unused{ {\inframed [foregroundstyle=type, background=color, backgroundcolor=gray, frame=off] {\tt [Unused]}} } \def\spare{\dosingleempty\doSpare} \def\doSpare[#1]{% \iffirstargument {\tt [#1]} \else {\tt [15A]} \fi {\tt [Spare]} } \startalignment[center] {\tfb Electrical Room Electrical Panel} \blank {\tfa\sc Electrical Panel} \blank {\tfa Panel Model: Siemens} \blank {\tfb \tt [DRAFT---To Be Verified]} \blank[2*big] \stopalignment \setupTABLE[frame=off] \setupTABLE[r][each][height=0.35in] \setupTABLE[c][1,3][align={center,lohi},width=0.75in] \setupTABLE[c][2,4][align={flushleft,lohi},width=2.25in,loffset=0.1in] \setupTABLE[r][4,6][topframe=on] \setupTABLE[r][1][topframe=on,bottomframe=on] \setupTABLE[r][last][bottomframe=on] \midaligned{ \bTABLE \bTABLEbody \bTR \bTD Circuit \eTD \bTD Description \eTD \bTD Circuit \eTD \bTD Description \eTD \eTR \bTR \bTD 1A \eTD \bTD Roof Heating Control Panel \eTD \bTD [nr=2] 2 \eTD \bTD [nr=2] F1 Master Ensuite Steam Unit \eTD \eTR \bTR \bTD 1B \eTD \bTD Recreation Room Plugs \eTD \eTR \bTR \bTD 3A \eTD \bTD Attic Roof Drain Heating Cables \eTD \bTD [nr=2] 4 \eTD \bTD [background=color,backgroundcolor=gray,nr=2] \spare \eTD \eTR \bTR \bTD 3B \eTD \bTD \spare \eTD \eTR % \bTR % \bTD [nr=2] 5 \eTD \bTD [nr=2] Bedrooms 2+3 Arc Fault Plugs \eTD % \bTD [nr=2] 6 \eTD \bTD [nr=2] Roof Heating Cable \eTD % \eTR \bTR \bTD [nr=2] 7 \eTD \bTD [nr=2] Bedroom 4 Arc Fault Plug \eTD \bTD [nr=2] 8 \eTD \bTD [nr=2] \unused \eTD \eTR \eTABLEbody \eTABLE } \stoptext test.pdf Description: Adobe PDF document test+.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Natural Tables---Including a bit of cell style in a \define
On 22-11-2011 13:08, Pavneet Arora wrote: I am creating documentation labeling the circuits of electrical and network panels for a project of mine. Enclosed is a minimal example. What I would like is to define two macros: \unused and \spare (\unused referring to a circuit with no breaker installed, while \spare referring to a circuit with a breaker, but no load). I wish these definitions to not only include the represented text and font directives, i.e., {\tt [Unused]}, but also shade the cell in a background color. However, I cannot seem to figure out how to do that. Including the `[background=color,backgroundcolor=gray]' in the \define seems to be expanded back simply as text. Any suggestions? \define\unused {\inframed [foregroundstyle=type, background=color, backgroundcolor=gray, frame=off] {[Unused]}} - 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] Natural Tables---Including a bit of cell style in a \define
I am creating documentation labeling the circuits of electrical and network panels for a project of mine. Enclosed is a minimal example. What I would like is to define two macros: \unused and \spare (\unused referring to a circuit with no breaker installed, while \spare referring to a circuit with a breaker, but no load). I wish these definitions to not only include the represented text and font directives, i.e., {\tt [Unused]}, but also shade the cell in a background color. However, I cannot seem to figure out how to do that. Including the `[background=color,backgroundcolor=gray]' in the \define seems to be expanded back simply as text. Any suggestions? advTHANKSance. -- - - Pavneet Arora test.pdf Description: Adobe PDF document \setuppapersize[letter] \setuplayout[header=0in,footer=0in,topspace=0.75in,backspace=1.25in] \setuppagenumbering[location=] \starttext % \showlayout % \showbodyfont \define\unused{{\tt [Unused]}} \define\spare{{\tt [Spare]}} \startalignment[center] {\tfb\sc Storage Room Electrical Panel} \blank {\tfa Panel Model: Cutler-Hammer} \blank {\tfb \tt [DRAFT---To Be Verfied]} \blank[2*big] \setupTABLE[frame=off] \setupTABLE[r][each][height=0.35in] \setupTABLE[c][1,3][align={center,lohi},width=0.75in] \setupTABLE[c][2,4][align={flushleft,lohi},width=2.25in,offset=2mm] \setupTABLE[r][1][topframe=on,bottomframe=on] \setupTABLE[r][last][bottomframe=on] \setupTABLE[c][3][leftframe=on] \setupTABLE[r][4][topframe=on] \setupTABLE[r][6][topframe=on] \setupTABLE[1,2][6][bottomframe=on] \bTABLE \bTABLEbody \bTR \bTD Circuit \eTD \bTD Description \eTD \bTD Circuit \eTD \bTD Description \eTD \eTR \bTR \bTD [nr=2] 1 \eTD \bTD [nr=4] Electrical Baseboard Heater \eTD \bTD 2A \eTD \bTD[background=color,backgroundcolor=gray] \unused \eTD \eTR \bTR \bTD 2B \eTD \bTD \unused \eTD \eTR \bTR \bTD [nr=2] 3 \eTD \bTD 4A \eTD \bTD Island Plugs \eTD \eTR \bTR \bTD 4B \eTD \bTD Dishwasher \eTD \eTR \bTR \bTD [nr=2] 5 \eTD \bTD [nr=2] \spare \eTD \bTD 6A \eTD \bTD Freezer \eTD \eTR \bTR \bTD 6B \eTD \bTD Counter Plugs \eTD \eTR \eTABLEbody \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 ___
[NTG-context] MetaFun manual: Incorrect label of ordinate axis on page 382, section 9.3 drawing functions (was: Confusion with `function()` and `xyscaled`)
Dear MetaFun folks, Am Freitag, den 21.10.2011, 01:14 +0200 schrieb Paul Menzel: > looking at the example for grid and functions in the MetaFun manual [1] > section 9.3 > > drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; > draw hlingrid(0, 20, .2, 20cm, 10cm) ; > draw vloggrid(0, 10, .5, 10cm, 20cm) ; > drawoptions(withpen pencircle scaled .50pt) ; > draw hlingrid(0, 20, 1, 20cm, 10cm) ; > draw vloggrid(0, 10, 1, 10cm, 20cm) ; > > fmt_pictures := false ; % use TeX as formatting engine > textextoffset := ExHeight ; % a variable set by ConTeXt > draw hlintext.lft(0, 20, 5, 20cm, "@3e") ; > draw vlogtext.bot(0, 10, 9, 10cm, "@3e") ; > > draw > function(1,"log(x)","x",1,10,1) xyscaled (10cm,2cm) > withpen pencircle scaled 5mm withcolor transparent(1,.5,yellow) ; the labeling of the vertical axis (y-coordinate) is not incorrect. The maximum value is 10 and therefore it should probably be corrected as follows. - draw hlingrid(0, 20, 1, 20cm, 10cm) ; + draw hlingrid(0, 20, 2, 20cm, 10cm) ; - draw hlintext.lft(0, 20, 5, 20cm, "@3e") ; + draw hlintext.lft(0, 10, 5, 20cm, "@3e") ; Furthermore on the bottom labels seem to be incorrect in the figure, it goes from 1 to 0, but this seems to be a bug in the used ConTeXt version, since I do not have that problem when compiling(?) that example locally. Please find the corrected example attached. […] Thanks and I hope I did not mess up, Paul > [1] http://www.pragma-ade.com/general/manuals/metafun-s.pdf function.pdf Description: Adobe PDF document \starttext \startMPcode drawoptions(withpen pencircle scaled .25pt withcolor .5white) ; draw hlingrid(0, 20, .2, 20cm, 10cm) ; draw vloggrid(0, 10, .5, 10cm, 20cm) ; drawoptions(withpen pencircle scaled .50pt) ; draw hlingrid(0, 20, 2, 20cm, 10cm) ; draw vloggrid(0, 10, 1, 10cm, 20cm) ; fmt_pictures := false ; % use TeX as formatting engine textextoffset := ExHeight ; % a variable set by ConTeXt draw hlintext.lft(0, 10, 5, 20cm, "@3e") ; draw vlogtext.bot(0, 10, 9, 10cm, "@3e") ; draw function(1,"log(x)","x",1,10,1) xyscaled (10cm,2cm) withpen pencircle scaled 5mm withcolor transparent(1,.5,yellow) ; \stopMPcode \stoptext 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] attachment attaches twice - the fix was minimal
Dear Hans, when you fixed the bug with attachment being listed twice in the attachment list, you also enhanced attachment support On Mon, 28 Feb 2011, Hans Hagen wrote: as far as i can see there were a couple of issues: attachments without associated annotation, and labeling and both are covered, but using the same command and extra keys/values ... as far as I understand, "attachments without associated annotation" are called "hidden" in ConTeXt, as in \attachment[test][file=att.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] But that does not work and, as far as I can see from the current beta code, is not supposed to. For example, in lpdf-wid.lua we have local function flushembeddedfiles() if next(filestreams) then local e = pdfarray() for tag, reference in next, filestreams do if not reference then report_attachment("unreferenced file: tag '%s'",tag) elseif referenced[name] == "hidden" then e[#e+1] = pdfstring(tag) e[#e+1] = reference -- already a reference else -- messy spec ... when annot not in named else twice in menu list acrobat end end lpdf.addtonames("EmbeddedFiles",pdfreference(pdfflushobject(pdfdictionary{ Names = e }))) end end Note the "referenced[name]" part, while there is no "name" variable. It seems the working code did not find its way into released version and some draft got shipped. Sincerely, Michail ___ 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] attachment attaches twice - the fix was minimal (?)
Dear Hans, On Mon, 28 Feb 2011, Hans Hagen wrote: to be precise, the attachment is attached once but is listed twice by Adobe Reader. i'll patch lpdf-wid on one hand your patch fixes the bug that is in the Subj. of the thread, this is a bit of a weird comment given that i haven't uploaded anything that you can comment on; as far as i can see there were a couple of issues: attachments without associated annotation, and labeling and both are covered, but using the same command and extra keys/values ... sorry for being so dumb, but on one hand you "haven't uploaded anything", on the other "there were a couple of issues" that "are covered" by now, and on the third one first-setup.sh brought me this morning lpdf-wid.lua that now has --- local ignorereferenced = true -- fuzzy pdf spec .. twice in attachment list, can become an option --- etc. - that change caused my comment. On the positive side - ConTeXt internals are your internal affairs, you are more sovereign than some kings and revolution leaders ;) Just tell us what that user-level "extra keys/values" are and we'll sing, dance and rejoice, being innocent of knowing what only the ConTeXt creator is to know. Sincerely, Michail ___ 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] attachment attaches twice - the fix was minimal
On 28-2-2011 8:52, Michail Vidiassov wrote: Dear Hans, On Mon, 21 Feb 2011, Hans Hagen wrote: to be precise, the attachment is attached once but is listed twice by Adobe Reader. i'll patch lpdf-wid on one hand your patch fixes the bug that is in the Subj. of the thread, but it does just that and nothing more. It is a pity to see the opportunity to enhance attachments support wasted. It'd likely be a long time before you revisit the issue :( this is a bit of a weird comment given that i haven't uploaded anything that you can comment on; as far as i can see there were a couple of issues: attachments without associated annotation, and labeling and both are covered, but using the same command and extra keys/values ... 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 ___
Re: [NTG-context] Lua programming conventions..
On Wed, Sep 29, 2010 at 8:30 PM, Jaroslav Hajtmar wrote: > Hello, all.. > Where can I read something about Lua programming conventions? > > I mean programming conventions labeling local and global variables, table > fields, Lua variables in modules, variables in namespaces etc. etc... > When names are written in capital letters, sign reserved for system > variables, etc.? http://www.lua.org/pil/ and context *lua files -- 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 ___
[NTG-context] Lua programming conventions..
Hello, all.. Where can I read something about Lua programming conventions? I mean programming conventions labeling local and global variables, table fields, Lua variables in modules, variables in namespaces etc. etc... When names are written in capital letters, sign reserved for system variables, etc.? Thanx Jarda ___ 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] local footnote (Tables) problem
Wolfgang— Using tabulate does seem, to help: I still get odd labeling and a no page break. \showframe \starttext \dorecurse{3}{\input knuth\par} \start \setuptabulate [bodyfont=9pt, width=\textwidth, rulethickness=0.03em, distance=big, split=yes, header=repeat] \placetable [split, top,nonumber] [tab:Table03] {Table 3} {\startlocalfootnotes[conversion=character,bodyfont=9pt] \placelegend {\startframedtext[frame=off,offset=none,width=fit] \starttabulatehead \HL \NC {Column A} \NC {Column B} \NC\SR \HL \stoptabulatehead \starttabulate[|p(11.5pc)|p(11.5pc)|] \NC {1[4].341||345 [= F21.82||86]} \NC{6.29.3||4} \NC\SR \NC Text A\note[a]\NC Text B\note[b]\NC\SR \NC \input knuth\NC\NC\AR \NC \NC \input knuth\NC\AR \NC \input knuth\NC \NC\AR \stoptabulate \stopframedtext} {\footnotetext[a]{A local footnote.} \footnotetext[b]{Another local footnote.} \hskip2pc\mbox{\placelocalfootnotes} } \stoplocalfootnotes} \stop \stoptext On Nov 23, 2009, at 02;51,46 , Wolfgang Schuster wrote: > > Am 23.11.2009 um 08:49 schrieb Taco Hoekwater: > >> it seems that TaBlE does not support splitting p() columns and >> (iirc) TABLE does. > > TABLE doesn't (each cell is a \framed) but tabulate does > > 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 ___ ___ 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] local footnote (Tables) problem
Wolfgang— Using tabulate does seem, to help: I still get odd labeling and a no page break. \showframe \starttext \dorecurse{3}{\input knuth\par} \start \setuptabulate [bodyfont=9pt, width=\textwidth, rulethickness=0.03em, distance=big, split=yes, header=repeat] \placetable [split, top,nonumber] [tab:Table03] {Table 3} {\startlocalfootnotes[conversion=character,bodyfont=9pt] \placelegend {\startframedtext[frame=off,offset=none,width=fit] \starttabulatehead \HL \NC {Column A} \NC {Column B} \NC\SR \HL \stoptabulatehead \starttabulate[|p(11.5pc)|p(11.5pc)|] \NC {1[4].341||345 [= F21.82||86]} \NC{6.29.3||4} \NC\SR \NC Text A\note[a]\NC Text B\note[b]\NC\SR \NC \input knuth\NC \NC\AR \NC \NC \input knuth \NC\AR \NC \input knuth\NC\NC\AR \stoptabulate \stopframedtext} {\footnotetext[a]{A local footnote.} \footnotetext[b]{Another local footnote.} \hskip2pc\mbox{\placelocalfootnotes} } \stoplocalfootnotes} \stop \stoptext On Nov 23, 2009, at 02;51,46 , Wolfgang Schuster wrote: > > Am 23.11.2009 um 08:49 schrieb Taco Hoekwater: > >> it seems that TaBlE does not support splitting p() columns and >> (iirc) TABLE does. > > TABLE doesn't (each cell is a \framed) but tabulate does > > 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] Producing PDF x/1-a:2001 output.
On Friday 30 October 2009 12:03:33 luigi scarso wrote: > On Fri, Oct 30, 2009 at 4:48 PM, John Culleton wrote: > > At least two commercial printers that I use prefer or insist on the > > format PDF X/1-a:2001 output. The only way I have found to > > produce such in TeX without a pass through Adobe Acrobat > > Distiller or the shareware program Pstill is via the package > > pdfx.sty > > authored by CV Radhakrishnan and Han The Thanh. This in turn > > uses some other files such as xmpincl.sty. > > > > I wonder if this setup could be incorporated into some flavor of > > Context? Or even pdftex? I prefer not to live within the strictures > > of pdflatex. > > is not Ghostscript OK ? > (I have seen > http://www.ghostscript.com/pipermail/gs-devel/2009- September/008566.html) Yes, I started that thread also. It seems that the spec can be met via Ghostscript. What is also needed is the internal labeling of the file as pdf X/1-a:2001, and some xml add-ins. The prepress staff will look at the file and if it is not labeled correctly run it through Distiller, which can degrade text and barcodes by converting them to bitmaps. LSI handles hundreds of pdf cover files each week, many of which are out of spec. If it does not look like X/1-a:2001 they will bitmap it, and in the process mess it up to a degree, or so I am told. So getting the file within spec is necessary but it also has to look like it is in spec. Their Customer Service Rep specifically mentioned Ghostscript as producing non-acceptable pdf files. This is not the only hoop to be leapt through in dealing with LSI. they have a limit on total ink coverage that is more restrictive than the usual formulation for CMYK rich black. They want only %240 total coverage so I cobbled up CMYK 60,40,40,100 which adds up to 240%. In brief, they are a royal pain. But they have a near-monopoly on POD printing for bookstores in the US and their pricing for Amazon beats anyone including Amazon's own subsidy Createspace. Hans: The needed files and the documentation for pdfx.sty are located here: http://www.ctan.org/tex-archive/macros/latex/contrib/pdfx/ The files in the package include: README glyphtounicode-cmr.tex manifest.txt pdfa-1b.xmp pdfx-1a.xmp pdfx.pdf pdfx.sty small2e.pdf small2e.tex small2e.xmpdata -- John Culleton "Create Book Covers with Scribus" http://www.booklocker.com/books/4055.html ___ 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] PDF x1a:2001 and Context
On Thu, Aug 27, 2009 at 3:22 PM, John Culleton wrote: > On Wednesday 26 August 2009 17:29:20 Hans Hagen wrote: >> John Culleton wrote: >> > PDF X/1a:2001 is an old pdf standard still required by some >> > important American printers. Han The Thanh et al. has created a >> > package for pdfLatex. I wonder if there is a route to this >> > output using Context? >> >> it depends ... what do validators report? >> >> Hans > > To satisfy some US printers (e.g., LSI) the file must actually meet > the pdf/X1a:2001 standard and the file must be labeled as such > internally. It is not difficult to modify the file to pdf 1.3 format > which is essentially the same thing as pdf/X1a. But the internal > labeling is the problem. The standard solution is to run the file > through Acrobat Distiller. But that is not an Open Source product. http://www.ghostscript.com/ http://www.pstill.com/ > > If the file, typically a cover layout, does not meet the above > requirements then it is pre-rasterized by the printer prior to > prepress in some product or other which degrades the quality of both > type and especially bar codes. It shouldn't. You should use vector type and vector barcode, not bitmap (ie gnu barcode makes eps output) . Eventually you can convert a pdf to a TIFF by yourself with ghostscript -- 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF x1a:2001 and Context
On Wednesday 26 August 2009 17:29:20 Hans Hagen wrote: > John Culleton wrote: > > PDF X/1a:2001 is an old pdf standard still required by some > > important American printers. Han The Thanh et al. has created a > > package for pdfLatex. I wonder if there is a route to this > > output using Context? > > it depends ... what do validators report? > > Hans To satisfy some US printers (e.g., LSI) the file must actually meet the pdf/X1a:2001 standard and the file must be labeled as such internally. It is not difficult to modify the file to pdf 1.3 format which is essentially the same thing as pdf/X1a. But the internal labeling is the problem. The standard solution is to run the file through Acrobat Distiller. But that is not an Open Source product. If the file, typically a cover layout, does not meet the above requirements then it is pre-rasterized by the printer prior to prepress in some product or other which degrades the quality of both type and especially bar codes. It is perhaps not a problem that you choose to address in Context. But I am trying all avenues looking for an Open Source solution that can meet these draconian requirements. -- John Culleton Able Indexers and Typesetters ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost labeling question. Please help
Beautiful! Thanks, Wolfgang. On Fri, Apr 3, 2009 at 9:35 AM, Wolfgang Schuster < schuster.wolfg...@googlemail.com> wrote: > > Am 03.04.2009 um 14:47 schrieb Curiouslearn: > > Mojca and Peter, thanks very much for your responses. I used Peter's >> solution and it worked beautifully. >> >> Does anyone know how I can change the size of these labels? If I try >> >> textext(\tfa decimal(tx)) >> > > textext("\tfa" & decimal(tx)) > > 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost labeling question. Please help
Am 03.04.2009 um 14:47 schrieb Curiouslearn: Mojca and Peter, thanks very much for your responses. I used Peter's solution and it worked beautifully. Does anyone know how I can change the size of these labels? If I try textext(\tfa decimal(tx)) textext("\tfa" & decimal(tx)) 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost labeling question. Please help
Mojca and Peter, thanks very much for your responses. I used Peter's solution and it worked beautifully. Does anyone know how I can change the size of these labels? If I try textext(\tfa decimal(tx)) that does not work. On Fri, Apr 3, 2009 at 6:52 AM, Peter Rolf wrote: > Curiouslearn schrieb: > >> Hi, >> >> I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) or >> (0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine. >> >> I tried the following code for this. >> >> \starttext >> >> \startuseMPgraphic{labeltest} >> numeric rmin,rmax; >> rmin := 0.5; rmax := 1; >> ux := 25cm; uy :=10cm; >> % draw axes >> draw (rmin,0)*ux -- (rmax+0.1,0)*ux; >> draw (rmin,0)*ux -- (rmin*ux,(1.1)*uy); >> for x = 0.5 step 0.05 until 1.1: >> label.bot(textext(decimal(x)),(x*ux,x*uy)); >> > you accumulate the rounding error with every step of the loop. try to avoid > such 'low value' steps if possible. > > for x = 10 step 1 until 22: % 0.05*20 to get an integer loop index > tx := x/20; % correct value > label.bot(textext(decimal(tx)),(tx*ux,tx*uy)); > > > Best wishes, Peter > > endfor; >> \stopuseMPgraphic >> >> \useMPgraphic{labeltest} >> >> \stoptext >> >> I get (0.5,0.55, 0.6,0.65001,0.70001,0.75002,...,1.3) instead. I don't >> understand why I get more than 2 digits after 0.6. Is there a way to >> restrict the number of digits after the decimal point. >> Thanks very much. >> >> >> >> >> ___ >> 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 : https://foundry.supelec.fr/projects/contextrev/ >> wiki : http://contextgarden.net >> >> ___ >> >> > > > -- > "Es ist doch ein Trost, > das Geldgier manchmal blöd macht." > >- Kottan in "Kottan ermittelt", Folge 9: "Die Einteilung" - > > > > > > ___ > 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost labeling question. Please help
Curiouslearn schrieb: Hi, I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) or (0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine. I tried the following code for this. \starttext \startuseMPgraphic{labeltest} numeric rmin,rmax; rmin := 0.5; rmax := 1; ux := 25cm; uy :=10cm; % draw axes draw (rmin,0)*ux -- (rmax+0.1,0)*ux; draw (rmin,0)*ux -- (rmin*ux,(1.1)*uy); for x = 0.5 step 0.05 until 1.1: label.bot(textext(decimal(x)),(x*ux,x*uy)); you accumulate the rounding error with every step of the loop. try to avoid such 'low value' steps if possible. for x = 10 step 1 until 22: % 0.05*20 to get an integer loop index tx := x/20; % correct value label.bot(textext(decimal(tx)),(tx*ux,tx*uy)); Best wishes, Peter endfor; \stopuseMPgraphic \useMPgraphic{labeltest} \stoptext I get (0.5,0.55, 0.6,0.65001,0.70001,0.75002,...,1.3) instead. I don't understand why I get more than 2 digits after 0.6. Is there a way to restrict the number of digits after the decimal point. Thanks very much. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- "Es ist doch ein Trost, das Geldgier manchmal blöd macht." - Kottan in "Kottan ermittelt", Folge 9: "Die Einteilung" - ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Metapost labeling question. Please help
On Fri, Apr 3, 2009 at 03:02, Curiouslearn wrote: > Hi, > I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) > or (0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine. > I tried the following code for this. > \starttext > \startuseMPgraphic{labeltest} > numeric rmin,rmax; > rmin := 0.5; rmax := 1; > ux := 25cm; uy :=10cm; > % draw axes > draw (rmin,0)*ux -- (rmax+0.1,0)*ux; > draw (rmin,0)*ux -- (rmin*ux,(1.1)*uy); > for x = 0.5 step 0.05 until 1.1: > label.bot(textext(decimal(x)),(x*ux,x*uy)); > endfor; > \stopuseMPgraphic > \useMPgraphic{labeltest} > \stoptext > I get (0.5,0.55, 0.6,0.65001,0.70001,0.75002,...,1.3) instead. I don't > understand why I get more than 2 digits after 0.6. It's because you get exact numbers in the terms what metapost considers exact (multiples of 2^{-something}). You have exactly the same problem if you work with floating points with any other programming language. > Is there a way to > restrict the number of digits after the decimal point. > Thanks very much. See page 18 of metapost manual (speaking of metapost manual present in TeX Live): - 6.2 Operators The length operator returns the number of characters in a string. For substring construction, the ⟨of operator⟩ substring is used like this: substring ⟨pair expression⟩ of ⟨string primary⟩ substring (2,4) of "abcde" is "cd". - You can use substring (0,4) to truncate the number. 0.5 might need special treatment, so you either need to concatenate it with 0 at the end or you need to check the lenght of string before using substring. Mojca ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Metapost labeling question. Please help
Hi, I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) or (0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine. I tried the following code for this. \starttext \startuseMPgraphic{labeltest} numeric rmin,rmax; rmin := 0.5; rmax := 1; ux := 25cm; uy :=10cm; % draw axes draw (rmin,0)*ux -- (rmax+0.1,0)*ux; draw (rmin,0)*ux -- (rmin*ux,(1.1)*uy); for x = 0.5 step 0.05 until 1.1: label.bot(textext(decimal(x)),(x*ux,x*uy)); endfor; \stopuseMPgraphic \useMPgraphic{labeltest} \stoptext I get (0.5,0.55, 0.6,0.65001,0.70001,0.75002,...,1.3) instead. I don't understand why I get more than 2 digits after 0.6. Is there a way to restrict the number of digits after the decimal point. Thanks very much. ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] mkiv ppchtex greek character bug
On Wed, Feb 25, 2009 at 09:23, Hans Hagen wrote: > Alan BRASLAU wrote: >> >> I confirm that this now works using the current --context=alpha >> >>>> \enableregime[utf] >>> >>> mkiv is utf by default -) >> >> (But is still necessary to remain compatible with mkii) >> >> >>>> the \alpha shows up, the α not (not sure why) >>> >>> you need the mathematical alpha >>> >>> \startTEXpage >>> \startchemical[width=fit,height=fit] >>> >>> \chemical[ONE,Z0,MOV1,SB5,Z0][C_{\alpha},C_{\utfchar{"1D6FC}}] >>> \stopchemical >>> \stopTEXpage >> >> OK, I see that TeX input is to be retained... >> >> However, note that $K_α$ works, so there must be some confusion in >> interpreting unicode characters in the macros. > > ppchtex uses an upright and there is no alpha in the base lm font > > if you use > > \usetypescript[cambria]\setupbodyfont[cambria] > > you will get the right alpha Hans, maybe italic (mathematical) alpha should be a fallback for normal alpha in LM. Personally, I have always been satisfied with italic alpha for labeling C atoms or alpha chains of proteins. So it should also be OK (not to say preferrable) to use "mathematical greek" inside chemistry formulae. Mojca ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translaing ConTeXt interface to Arabic
Khaled Hosny wrote: > On Thu, Jun 19, 2008 at 06:15:29PM -0600, Idris Samawi Hamid wrote: >> Salaam Khaled, >> >> On Thu, 19 Jun 2008 17:05:50 -0600, Khaled Hosny <[EMAIL PROTECTED]> >> wrote: >> >>> How do I translate things like "Contents, Index, List of tables, etc.." >>> to Arabic. If this is documented somewhere, please tell me since I failed >>> to find such documentation. >> There is no official Arabic interface to ConTeXt yet. For now you >> just create your own registers and format them in imitation of "Contents, >> Index, List of tables, etc..". It's not hard, see Ch.~9 of the main >> context manual. For labeling, use the sectioning mechanism from Ch.~8. > > Thanks, I'm reading this. > In the mean time I can offer doing the translation. just english from lang-ger.tex and copy it to lang-xxx.tex and add the labels in utf code, as starting point for further integration (maybe also take variants into account) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translaing ConTeXt interface to Arabic
On Thu, Jun 19, 2008 at 06:15:29PM -0600, Idris Samawi Hamid wrote: > Salaam Khaled, > > On Thu, 19 Jun 2008 17:05:50 -0600, Khaled Hosny <[EMAIL PROTECTED]> > wrote: > > > > > How do I translate things like "Contents, Index, List of tables, etc.." > > to Arabic. If this is documented somewhere, please tell me since I failed > > to find such documentation. > > There is no official Arabic interface to ConTeXt yet. For now you > just create your own registers and format them in imitation of "Contents, > Index, List of tables, etc..". It's not hard, see Ch.~9 of the main > context manual. For labeling, use the sectioning mechanism from Ch.~8. Thanks, I'm reading this. In the mean time I can offer doing the translation. Regards, Khaled -- Khaled Hosny Arabic localizer and member of Arabeyes.org team signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translaing ConTeXt interface to Arabic
On Fri, Jun 20, 2008 at 2:15 AM, Idris Samawi Hamid <[EMAIL PROTECTED]> wrote: > Salaam Khaled, > > On Thu, 19 Jun 2008 17:05:50 -0600, Khaled Hosny <[EMAIL PROTECTED]> > wrote: > >> >> How do I translate things like "Contents, Index, List of tables, etc.." >> to Arabic. If this is documented somewhere, please tell me since I failed >> to find such documentation. > > There is no official Arabic interface to ConTeXt yet. For now you > just create your own registers and format them in imitation of "Contents, > Index, List of tables, etc..". It's not hard, see Ch.~9 of the main > context manual. For labeling, use the sectioning mechanism from Ch.~8. You forgot chapter 7 because labels are language dependent and this requires a defined language. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Translaing ConTeXt interface to Arabic
Salaam Khaled, On Thu, 19 Jun 2008 17:05:50 -0600, Khaled Hosny <[EMAIL PROTECTED]> wrote: > > How do I translate things like "Contents, Index, List of tables, etc.." > to Arabic. If this is documented somewhere, please tell me since I failed > to find such documentation. There is no official Arabic interface to ConTeXt yet. For now you just create your own registers and format them in imitation of "Contents, Index, List of tables, etc..". It's not hard, see Ch.~9 of the main context manual. For labeling, use the sectioning mechanism from Ch.~8. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt-ifying Kile
text] \definesynonyms[singular][plural][command][command] \definetabletemplate[name][text][text][text] \definetabulate[name][name][text] \definetext[name][position][text][text][text] # \definetextbackground \definetextposition[name][settings] # \definetextvariable[settings][???][???] \definetype[name][settings] # \definetypeface \definetyping[file|typing|name][settings] \defineversion[name][numbers] # \defineXMLargument # \defineXMLcommand # \defineXMLenvironment # \defineXMLenvironmentsave # \defineXMLgrouped # \defineXMLgsave # \defineXMLgstore # \defineXMLignore # \defineXMLnested # \defineXMLpickup # \defineXMLprocess # \defineXMLsave # \defineXMLsavecontent # \defineXMLsingular # \defineXMLstore # \defXMLstring \description{text}text \determineheadnumber[section] \determinelistcharacteristics[names][settings] # \digits \disableinteractionmenu[position|name][references] # \disablemode # \doglobal # \dogotopar # \doif # \doifcommon # \doifcommonelse # \doifdefined # \doifdefinedelse # \doifelse # \doifelsenothing # \doifelsevalue # \doiffieldelse # \doifflagged # \doifinset # \doifinsetelse # \doifmode # \doifmodeelse # \doifnextcharelse # \doifnot # \doifnotcommon # \doifnotflagged # \doifnothing # \doifnotinsetelse # \doifnotmode # \doifnotvalue # \doifsomething # \doiftext # \doiftextelse # \doifundefined # \doifundefinedelse # \doifvalue # \doifXMLdata # \doifXMLdataelse # \doifXMLop # \doifXMLparelse # \doloop # \donothing # \dontleavehmode \donttest # \dorecurse # \dostepwiserecurse # \dowithnextbox # \dowithnextboxcontent # \empty \emptylines[number] # \emptytoks # \enablemode # \endstrut \enumeration # \environment # \EQ # \eTABLE # \eTABLEbody # \eTABLEfoot # \eTABLEhead # \eTABLEnext # \eTD # \eTH # \eTR # \exitloop # \expanded \externalfigure[file][settings] \field[name] \fieldstack[name][names][settings] \fillinfield[text]{text} \fillinline[settings] \fillinrules[settings]{text}{text} \fillintext[settings]{text}{text} \fitfield[name] \fixedspaces # \FLOWchart # \flushcollector # \flushlayer # \flushXMLelement \followprofile{text}[text] \followprofileversion{text}[text][text] \followversion{text}[text] \footnote[reference]{text} \footnotetext[reference]{text} \forceblocks[names][names] # \forgetall # \FR \fraction{text}{text} \framed[settings]{text} \framedtext[settings] \from[reference] \getbuffer[name] # \getfiguredimensionsonly # \getmarking[name][options] # \getvalue # \getvariable # \globalletvalue \godown[dimension] \goto{text}{text}[references] \gotobox{text}[references] \graycolor[text] \grid[options] # \gsaveXMLasdata \hairline \head[references] \headnumber[section] \headtext{text} # \hfilll \hideblocks[names][names] \high{text} # \HL \hl[number] # \hpos # \hspace # \ifconditional # \ifdefined # \iftrialtypesetting # \ifundefined \in{text}{text}[reference] # \includeFLOWchart # \includemenu # \increment \indentation \indenting[options] \inframed[settings]{text} \ininner[+|-|low][reference]{text} \inleft[+|-|low][reference]{text} \inline[reference] \inmargin[+|-|low][reference]{text} \inothermargin[+|-|low][reference]{text} \inouter[+|-|low][reference]{text} \inright[+|-|low][reference]{text} \installlanguage[name][options] \interactionbar[settings] \interactionbuttons[settings][names] \item[references] \items[settings]{text} \its[references] \keepblocks[names][all|names] \labeling[reference] \labels[name] \labeltext{text} \language[language code] \leftaligned{text} # \letgvalue # \letvalue \listsymbol[name]{text} # \loadmapfile \loadsorts \loadsynonyms # \localhsize \logfields \lohi[low]{text}{text} \low{text} # \LR \mainlanguage[language code] \mar[references]{text} \marginrule[number]{text} \margintext[+|-|low][reference]{text} \marking[name]{text} \markversion \mathematics{text} \mediaeval{text} \midaligned{text} \mirror{text} \MONTH{text} \month{text} \moveongrid[options] # \MR \name{text} # \NC # \newcounter # \nextbox \nextsection \nocap{text} \noheaderandfooterlines \noindenting \nolist{text} \nomarking{text} \nomoreblocks \nomorefiles \nop \nospace \note[reference] \notopandbottomlines \nowhitespace # \NR \numbers{text} \overbar{text} \overbars{text text} # \overlaybutton # \overlayfigure \overstrike{text} \overstrikes{text text} \packed \page[options] \pagereference[reference] \pagetype[name] \paragraph \part[references]{text} \periods[number] \placebookmarks[names][names|all] \placecombinedlist[name][settings] \placecombinedlist[name][settings] # \placefigure \placefloat[options][references]{text}{text} \placefootnotes[settings] \placeformula[references]{text}$$ $$ # \placelayer \placelegend{text}{text} \placelist[names][settings] \placelistoffloats \placelistofsorts \placelistofsynonyms \placelocalfootnotes[settings] \placelogos[names] \placeongrid[settings{text} \placeontopofeachother{text}{text} \placereferencelist[names] \placeregister[name][settings] \placeregister[settings] \placerule[name] \placesidebyside{text}{text} \placesubformula[references]{text}$$ $$ \placetextv
Re: [NTG-context] Which manual for basic drawing?
On Wed, 02 May 2007 00:18:46 -0600, James Buchanan <[EMAIL PROTECTED]> wrote: > Thanks everyone for your input. I think I have enough to go on now. It > does seem MetaPost is easiest, but quickly gets complicated. Then you should definitely try TikZ > I have not > seen any simple geometry examples labeling angles, for example. I > suppose though I can figure out those things for myself when I get some > more practice in. Again, TikZ ;-) > Is there a book on ConTeXt that starts from the beginning like layout of > the page, setup of colors, and things like that, then typing in text, > and finally drawing, fonts, inclusion of graphics and things like that? There are two general manuals on ConTeXt in the official documentation, and also one (The MetaFun manual) on Metapost. Look all three up on the wiki: http://wiki.contextgarden.net/Official_ConTeXt_Documentation#General_Manuals A real-life book on ConTeXt is still needed however. The manuals are a bit rough around the edges... Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 Using Opera's revolutionary e-mail client: 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Which manual for basic drawing?
Aditya Mahajan wrote: > Here is an example: > > \setupcolors[state=start] > > \def\solutionbox >{\dosingleempty\dosolutionbox} > > \def\dosolutionbox[#1]% >{\mframed[width=2em,background=color,backgroundcolor=lightgreen,#1] > {\strut}} > > > \starttext [cut] > \stoptext > > Aditya Thanks everyone for your input. I think I have enough to go on now. It does seem MetaPost is easiest, but quickly gets complicated. I have not seen any simple geometry examples labeling angles, for example. I suppose though I can figure out those things for myself when I get some more practice in. Is there a book on ConTeXt that starts from the beginning like layout of the page, setup of colors, and things like that, then typing in text, and finally drawing, fonts, inclusion of graphics and things like that? Thanks again for everyone's generous help, Aditya and Thomas. James Buchanan ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Re: test suite in the garden
Patrick Gundlach wrote: > > >> It is perhaps a lot of work included, but extending the > >> contextgarden.net in such a way that users could provide test cases > >> which would be typeset with different ConTeXt versions and PNGs > >> compared afterwards ... could make it easier to discover any broken > >> functionality. > > It comes down to: > > * different context versions needed Once you are done with the fonts ... Different ConTeXt versions also seem to be useful for all kinds of stuff: - browsing (& comparing) old source files - running live.contextgarden.net on older versions (in case the behaviour in the new version is changed) - (maybe donloading old ConTeXt versions for whatever reason?) - modules.pdf - test suite > * different test documents needed This can be done gradually. Of course, it is impossible to have a very good test suite, but at least some features can be tested; broken functionality would be noted much later otherwise (if ever). If you let the users add stuff, the suit will gradually grow. It would be much easier then to say "take a look: my document is OK with the version this-and-that, but since the version this-and-that something strange happens" when reporting a bug. (Perhaps testing documents should also have at least some very basic set of labels: very important to test, interesting test case, just temporary or one-time testing. Or at least some switch to leave the document there, but to remove it from the list of "test suite" when next ConTeXt version is out. 100 versions and 1000 documents ... can slow down your computer a bit.) > 1) user can select any combination of the above > 2) result (one page/png, more pages pdf) can be viewed or downloaded Converting multiple-page pdf to png-s should also be possible. Take http://archive.contextgarden.net/thread/20050701.172657.13cd3fb5.html for example (the difference seen on the third page). But the number of pages or at least the number of document with a big number of pages has to be limited somehow. > 3) feedback Perhaps some labeling in case the results differ? - Label A: to inspect what's going wrong - Label B: it's ok, it's only a new feature, not supported before - Label C: ok, the bug was removed (some page inbetween differ) - Label D: ... Only the label A and perhaps some others would be interesting then ... > So we need test documents and after that context can mix in the pages > from the known good document and the selecte version. > > So you think that users actually download these comparisons? The most important would be some graphical representation (different colors if a document doesn't compile or if it changes), but allowing the user to download a selected document compiled with a selected version should be possible. > Don't call me magic. I am currently trying to understand the tftopl, > pltotf, vftovp and vptovf programs in detail. And I am so miserable at > that; all kinds of optimizations that makes the code unreadable. :) > > Let me extend the suggestion, for we miss a ConTeXt test suite for a > > long time now: > > > > - users send test cases > > - test cases get typeset with the actual ConTeXt and converted to PNG > > (like inline samples) > > - user "votes" if it looks right, if not adds comment > > - test case gets saved, including PNG, ConTeXt version and vote/comments > > - at next update, all test cases get typeset again, and users can > > "vote" if it looks still ok or at least the same (perhaps it would > > be possible to check automatically if the bitmaps are exactly > > identical) > > Again, I doubt that users will actually do these kind of things. I > could provide some interface for documents connected to version > numbers, so you could download a set of .tex files (or one big tex > file) and the related pdf file, but we need to collect good examples. > And I think that testing is very hard: there are so many different > things in ConTeXt that can be tested, so the pdf would result in a few > hundred pages. No, this wouldn't make any sense. I was thinking about PDF to PNG conversion and bitwise comparison of the files, which could be made automatically. Each time a new version would be uploaded, the documents would be compiled, any compilation errors caught and any image differences reported. Only if any of those two cases would be reported, the results would be inspected manually. Sorry Patrick :), Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Some gardening
Hello, Here's some more work for you Patrick, in case you get bored. (I guess I'll soon be removed from the list as a spammer/abuser if I continue writing mails such as this one :) What do the others think about it? # Source browser Can you "escape" control characters when searching through the source in ConTeXtgarden? For example, \def\somecommand now has to be written as\\def\\somecommand. And the search field is slightly small (only 20 characters). Well, I admit, these limitations can all be overcome by asking Mr. Google for "\def\someveryveryverylongcommand site:contextgarden.net" or by "grep"-ing on my hard disk. Also, after the search the right window is empty and sometimes 20 hits are found on the left. What about adding some context around the search term? For example one line before and one line after each hit (like Google does)? Once you have that, the same could be done for single files (if a specific word appears in one file more than once than you can select a file and see only the hits found + some lines before and after). If you also add to the web pages with sources, than you can click on a hit and go directly to the line number where the search term occurs. # texshow-web I've just noticed that there's no possibility to describe single options for the commands. Take \setuplayout for example. Describing such huge collection of parameters in plain text is not clear, synoptic any more. It would be great if there would be a possibility to add descriptions for: - the command as such (already there) - every pair of braces (only one for \setuplayout), has to be visible if it is optional or not - every parameter inside a single brace - every single option for that parameter (for example: width=middle means that ...), default has to be marked Some classification/hierarchy/labeling of the commands could also be added, but this has to be thought of well before starting to implement it. For example "page layout", "floats", "mathematics", "colors", "metapost", "language", "core functions", ... The top-level classification could probably be taken from prefixes of the source files. Enabling the Wiki functionality (bold, italic, tables ... and ) and linking it to the source browser (to the place where \def\thisspecificcommand is) would also add another dimensionality. It would probably not be 100% compatible with the pretty-much-textbased texshow program, but ... I could imagine that one day something similar as modules.pdf (texshow.pdf) could be made from that page with pretty good documentation of (all ?) ConTeXt commands. The ability to add commands is already there I think (I have never tried it out yet). What about adding commands for (official and third-party) modules? It should be separated from the main page, but still offering the same functionality. I was also thinking about making some interface for translations of commands (for example: when a new third-party module is there, someone could translate it without much effort, some more exotic languages could be translated step-by-step, and new commands in ConTeXt could be found quickly and translated - the dutch interface is probably up-to-date, but I doubt that other translators are constantly checking if anything new appeared). But these things are much more conservative (commands may not change once they are translated) and probably not worth the effort yet. Finally a "five-minute-work" request after all that philosophizing: can you add link to the .po files under "special" in texshow-web and a "submit new .po version" button next to it? Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] XYpic
luigi.scarso wrote: Vit Zyka wrote: before I started to use context I had prepared some diagrams in xypic. Me too, for some notes on a course on commutative algebra when I was student at university. It was the only way I knew for creating vector graphics for both tex and pdftex with text and graphics interaction possibility. I try xfig with poor results. With 'interaction possibilitity' I meant e.g. text labeling with the same fonts and possibilities as in the main text (math...), length parametrization. It is not possile in xfig. 3) Metapost is naturaly incorporated to context, strongly supported, higher possibilities and (my opinion) much more intuitive. Yes, I love metafun. But a mp graphic must be preprocessed by mpost for inclusion, and I can do it only if I can execute sysytems commands; this open a security and performance issues. It is true only for very advanced features like text along line, AFAIK. For framed text it is possible to run mpost manually with several passes of tex. So: "Can I typeset a framedbox with a rulestyle WITHOUT using MetaPost ?" (Rulestyle?) Frames with only plain \hrule and \vrule is of course possible even with plain TeX. But it is probably not what you mean. vit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: Labeling of axes
Hans Hagen wrote: beginfig(1) ; numeric u ; u = 1.0cm ; for i=-10 upto 10 : if not (i=0) : draw textext.lft("$" & decimal i & "$") shifted (i*u,0) ; fi ; endfor; endfig ; end given that you have configured texexec well: texexec --mptex thisfile.mp mptopdf thisfile.1 With ConTeXt 2003.8.15, I get (\000) in thisfile.1, which mptopdf does not handle: ! Undefined control sequence. l.14 (\0 00) cmsy10 11.95514 fshow These seem to be the minus signs. Regards, Christopher Creutzig ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context