Re: [NTG-context] TOC: page headers
Jeff Smith wrote: So, what to do here? I do need the frontmatter/bodymatter structure anyway. So there must be something else... adding \page before ending the sectionblock may help - 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 ___
[NTG-context] switching to Context
Hello, I'm thinking of making the switch from latex to context, indeed I'm working on my first non-trivial document as a trial. I have some questions. (1) Is it possible to do conditional compilation? I wish to use context to write lecture notes with embedded pictures. I'd like to compile the document into one form to hand out to the class (or make available on the web) and another to be used as a presentation, much like latex-beamer, with just the pictures. (2) Is it possible to convert context into plain text (i.e. strip out the formatting instructions)? This may seem eccentric but it might, with some programming, offer a means to put document content into a relational database, perhaps in paragraph chunks. Thanks, Roger ___ 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] switching to Context
On Nov 29, 2007 1:17 PM, Roger Mason [EMAIL PROTECTED] wrote: Hello, I'm thinking of making the switch from latex to context **WELCOME** (1) Is it possible to do conditional compilation? yes, search in wiki for \startmode \stopmode or start to see http://wiki.contextgarden.net/Modes (2) Is it possible to convert context into plain text hmm, with a bit of discipline, yes. But you can also explore pdftotext (make pdf = convert to text) or use \write macros of TeX or try luatex. -- luigi ... it's new . it's powerful . it's luatex . http://www.luatex.org ___ 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] switching to Context
On Nov 29, 2007, at 1:17 PM, Roger Mason wrote: Hello, I'm thinking of making the switch from latex to context, indeed I'm working on my first non-trivial document as a trial. I have some questions. (1) Is it possible to do conditional compilation? I wish to use context to write lecture notes with embedded pictures. I'd like to compile the document into one form to hand out to the class (or make available on the web) and another to be used as a presentation, much like latex-beamer, with just the pictures. This is in fact quite easy with ConTeXt, you can use different modes. If you excuse the shameless plug, I wrote something in the PracTeX journal that may get you started: http://www.tug.org/pracjourn/2006-2/schmitz/ (2) Is it possible to convert context into plain text (i.e. strip out the formatting instructions)? This may seem eccentric but it might, with some programming, offer a means to put document content into a relational database, perhaps in paragraph chunks. I'm not aware of anything like that, but you can always use a tool such as pdftotext (part of xpdf, whch is available on any reasonable platform) on the pdf files that ConTeXt creates. HTH Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] inline-graphics and unwanted line-break
Hi, I have a small metapost graphic I like to use inline. But the arragement behaves a little bit unpractically. As soon there is no character in front of the graphic context will break the line after the graphic - but as soon there is a character in front of the graphic, context does not adding a linebreak after the graphic. Does anyone know how to prevent the line-break after the graphic if the graphic is the first inline? Thanks, P. example-file: \startuseMPgraphic{zo} color schwarz ; schwarz := (.0,.0,.0) ; draw (0pt,0pt)--(0pt,8pt)--(5pt,12pt)--(10pt,8pt)--(10pt,0pt)--(0pt,0pt)--cycle withcolor schwarz ; \stopuseMPgraphic \starttext \hbox{\useMPgraphic{zo}} test text - why a line-break? How to prevent this? a \hbox{\useMPgraphic{zo}} test text - this is fine: no line-break! \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] switching to Context
Luigi and Thomas, Thank you both very much for your suggestions. It appears that much is possible beyond the simple inclusion/exclusion I had considered. Just yesterday(!) I extracted from a pdf file the text to pass on to a colleague. Now why did I not think of that when I had the same need! Many thanks, Roger ___ 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] TeXnicCenter
Hello, Is there any TeXnicCenter user on the list? Wiki page http://wiki.contextgarden.net/Configure_TeXnicCenter_for_ConTeXt only has anonymous edits, and I have no windows here at the moment o test. I have no idea how that program works. Mojca -- Forwarded message -- Sir, I have Protext installed on my machine with WinXp as OS. I have problems in getting the output. I have tried to configure TexnicCenter for Context. But whenever I try to compile my context document, I get the error message cannot execute the command [DocOpen(%bm.pdf)][FileOpen(%bm.pdf)]. Where have I gone wrong? ___ 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] selectively turn off captions
Hello, I'm making progress in using modes - thanks again for the help so far that was given in the switching to Context thread. I have followed Thomas Schmitz' practex article and have set up modes for presentation and manuscript. I am using external figures on most of the slides. In presentation mode there is no need for figure captions (the slide heading and my waffling will suffice). In manuscript mode I'd like to have captions to the figures. I know I can disable captions with {none} for each individual figure, but can I do this _just_ for the presentation? I have looked up \setupcaptions but there does not seem to be a none option that could be used for this purpose. Thanks, Roger ___ 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] Datenumber
On Thursday November 29 2007, Mojca Miklavec wrote: On Nov 27, 2007 5:49 PM, Bart Wise wrote: LaTeX has a package called datenumber. It basically allows you to several things: 1) convert a date into a number, What number? What's the input and what's the output? First you set the date: \setdatenumber{year}{month}{day} Example: \setdatenumber{2007}{1}{5} Internally, this sets a counter called datenumber. You print the date with \datedate. Then, to increment by a week, you would add 7 to the datenumber and set the date as follows: \addtocounter{datenumber}{7} \setdatebynumber{\thedatenumber} I made a function that increments the date: \def\IncDate{% \addtocounter{datenumber}{7}% \setdatebynumber{\thedatenumber}% }% Then, I created a table with the first column entries as follows: \datedate\IncDate \datedate\IncDate \datedate\IncDate \datedate\IncDate \datedate\IncDate ... The output would be: Friday, 5 January, 2007 Friday, 12 January, 2007 Friday, 19 January, 2007 Friday, 26 January, 2007 Friday, 2 February, 2007 This way I do not have to put in anything except the first date and dates for the whole year are calculated and printed for me. 2) add and subtract from that number, in essence adding and subtracting days, and 3) converting a date number into a date string. The manual mentions this example \date[d=17,m=11,y=2007][weekday,month,day,{, },year] or simply \date[y=2007,m=11,d=27] or \currentdate As best as I can tell, this only sets the date. I can see of no way to add a given number of days to calculate a new date. I use this package to create a yearly lesson schedule and various other similiar things. However, I have spent a considerable amount of time trying to find the same functionality in ConTeXt with no avail. Is there a solution for this? There are quite some macros in tex/context/base/core-con.tex ( core-con.mkii) devoted to that. I didn't play with substraction yet, but I bet there is some simple way to do it. I looked through the source code of core-con.mkii, core-con.mkiv and core-con.tex. I don't see the functionality I need already constructed. I was hoping that an existing solution existed without the need for creating new code. Mojca Thanks for you help. If I overlooked something, let me know. Bart ___ 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] selectively turn off captions
2007/11/29, Roger Mason [EMAIL PROTECTED]: Hello, I'm making progress in using modes - thanks again for the help so far that was given in the switching to Context thread. I have followed Thomas Schmitz' practex article and have set up modes for presentation and manuscript. I am using external figures on most of the slides. In presentation mode there is no need for figure captions (the slide heading and my waffling will suffice). In manuscript mode I'd like to have captions to the figures. I know I can disable captions with {none} for each individual figure, but can I do this _just_ for the presentation? I have looked up \setupcaptions but there does not seem to be a none option that could be used for this purpose. Thanks, Roger \setupfloat[figure][default=none] 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] inline-graphics and unwanted line-break
2007/11/29, luigi scarso [EMAIL PROTECTED]: write \dontleavehmode\hbox{...}, this is normal TeX bahaviour and has nothing special to do with ConTeXt. also \hskip1sp\hbox{...} the invisible touch effect :)) \hskip\zeropoint\hbox{} ;-) 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] inline-graphics and unwanted line-break
write \dontleavehmode\hbox{...}, this is normal TeX bahaviour and has nothing special to do with ConTeXt. also \hskip1sp\hbox{...} the invisible touch effect :)) -- luigi ... it's new . it's powerful . it's luatex . http://www.luatex.org ___ 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] inline-graphics and unwanted line-break
\dontleavehmode is \dontleavehmode=\quitvmode. and \quitvmode is a primitive stricly speacking we don't see a space, but a command that switch to a mode to another. And it's also sound good: you have put a command to change status. \hskip\zeropoint\hbox{} ;-) here we see a space of 0pt. Can be a bit embarassing that a horiz. space of 0pt make difference between status, because one can think hey, a space of 0pt is nothing and should do nothing! (Of course, \hskip0t has sense ) \hskip1sp\hbox{...} here we see a space of 1sp, ie (1/2^16) * 1pt which is invisible to human eye. Here my invisible touch effect. It's more human because i can say hey, you have inserted a hor. space very small, so small that you can see it, but it's always a hor,. space not null, so it's reasonable a change of state. btw, the context way is \dontleavehmode -- luigi ... it's new . it's powerful . it's luatex . http://www.luatex.org ___ 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] \externalfigure advanced parameters
Vyatcheslav Yatskovsky wrote: Hello, Could someone please explain me advanced parameters of \externalfigure, listed in http://wiki.contextgarden.net/Using_Graphics ? What is max, and broad in Factor? factor scales relatiev to the font size And what is Preset, Preview, Repeat, and Object? preset/preview/repeat concerns movies and such and object deals with reuse of graphics - 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] selectively turn off captions
Hi Wolfgang, Wolfgang Schuster [EMAIL PROTECTED] writes: \setupfloat[figure][default=none] Thanks, but that did not work. The only thing that seems to work is to put {none} for the caption. However, that means I'm not going to have captions in the manuscript version either. Cheers, Roger ___ 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] selectively turn off captions
Roger Mason wrote: Hi Wolfgang, Wolfgang Schuster [EMAIL PROTECTED] writes: \setupfloat[figure][default=none] Thanks, but that did not work. The only thing that seems to work is to put {none} for the caption. However, that means I'm not going to have captions in the manuscript version either. well, we can misuse the number= key . % patch, goes in cont-new.tex \unprotect \def\presetfloatvariables#1#2#3#4% {\doifcommonelse {#2} {\v!left,\v!right,\v!inner,\v!outer,% \v!inleft,\v!inright,\v!inmargin,% \v!backspace,\v!cutspace,% \v!innermargin,\v!outermargin,\v!inneredge,\v!outeredge,% \v!leftmargin,\v!leftedge,\v!rightmargin,\v!rightedge} {\global\parfloattrue} {\global\parfloatfalse}% \ifinsidecolumns \global\parfloatfalse \fi \global\sidefloatshift\zeropoint \global\sidefloatmaximum\zeropoint \global\chardef\sidefloatmethod\floatparameter\c!sidemethod \global\chardef\textfloatmethod\floatparameter\c!textmethod \global\chardef\sidefloatalign\zerocount \globallet\floatrotation\!!zerocount \calculatefloatskips \ifparfloat \processaction [\floatparameter\c!sidealign] [\v!height=\global\chardef\sidefloatalign\plusone,% \v!line=\global\chardef\sidefloatalign\plustwo,% (***) \v!depth=\global\chardef\sidefloatalign\plusthree,% \v!grid=\global\chardef\sidefloatalign4,% \v!halfline=\global\chardef\sidefloatalign5]% % todo (test first): \doifinset\v!lokaal{#2}{\chardef\sidefloatalign\zerocount}% \ifcase\sidefloatalign\relax % todo: optie v!lokaal = \else \doifinset\v!height {#2}{\global\chardef\sidefloatalign\plusone}% \doifinset\v!line{#2}{\global\chardef\sidefloatalign\plustwo}% \doifinset\v!depth {#2}{\global\chardef\sidefloatalign\plusthree}% \doifinset\v!grid{#2}{\global\chardef\sidefloatalign4}% \doifinset\v!halfline{#2}{\global\chardef\sidefloatalign5}% meant for 'none' \fi \doifinset\v!high{#2}{\global\sidefloattopskip \zeropoint}% \doifinset\v!low {#2}{\global\sidefloatbottomskip\zeropoint}% \doifinset\v!fit {#2} {\global\sidefloattopskip \zeropoint \global\sidefloatbottomskip\zeropoint \global\floatsideskip \zeropoint}% \else \processallactionsinset [#2] [ 90=\globallet\floatrotation\commalistelement,% 180=\globallet\floatrotation\commalistelement,% 270=\globallet\floatrotation\commalistelement]% \fi \doifinsetelse\v!nonumber{#2} {\global\nofloatnumbertrue} {\doifelse{\floatcaptionparameter\c!number}\v!yes {\global\nofloatnumberfalse} {\global\nofloatnumbertrue}}% \ConvertToConstant\doifelse{#4}{} {\global\emptyfloatcaptiontrue} {\global\emptyfloatcaptionfalse}% \doifinsetelse\v!none{#2} {\global\nofloatcaptiontrue} {\ConvertToConstant\doifelse{#4}\v!none {\global\nofloatcaptiontrue} {\global\nofloatcaptionfalse}}% \doif{\floatcaptionparameter\c!number}\v!none {\global\nofloatcaptiontrue}% \ifemptyfloatcaption \ifnofloatnumber \global\nofloatcaptiontrue \fi \fi} \protect \starttext \placefigure{}{} \setupcaptions[number=none] \placefigure{}{} \stoptext (I'll add that to the core, but only if you wikify it) - 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 ___
[NTG-context] Whitespace significance without verbatim
Is there an environment that preserves whitespace (like typing), but still processes \bf \it and other text formatting commands (unlike typing). Any thoughts? Cheers, Mike ___ 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] Whitespace significance without verbatim
On Thu, 29 Nov 2007, Mike Santy wrote: Is there an environment that preserves whitespace (like typing), but still processes \bf \it and other text formatting commands (unlike typing). \setuplines[space=yes] \startlines write what you want {\bf Either bold} or not \stoplines 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] selectively turn off captions
On Nov 29, 2007 11:17 PM, Hans Hagen wrote: (I'll add that to the core, but only if you wikify it) Nice new strategy :) 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] TOC: page headers
On Nov 29, 2007 5:41 AM, Wolfgang Schuster [EMAIL PROTECTED] wrote: But this give also a rule in the header at the last page, the following code give at least a empty last page. \setupsectionblock [bodypart] [page=no, before=\setups{header:bodymatter}, after={\page\setupbackgrounds[header][text][bottomframe=off]}] An empty page? Good enough for me! :-) As always, many thanks! Jeff ___ 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] Whitespace significance without verbatim
Thanks. Works like a champ. Cheers, Mike ___ 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 ___