Re: [NTG-context] Problem with framed text.--addendum
On Sun, 22 Feb 2015 12:56:05 -0500 John Culleton j...@wexfordpress.com wrote: On Sun, 22 Feb 2015 15:57:48 +0100 Pablo Rodriguez oi...@gmx.es wrote: On 02/22/2015 01:55 PM, John Culleton wrote: On Sat, 21 Feb 2015 14:16:31 -0500 Aditya Mahajan wrote: [...] There should be a comma after 0.1. With respect, I don't think so. Commas separate parameters. the last 0.1 is properly followed by a ]. Hi John, this should work: \setupframed[framecorner=round, frameradius=0.1em, background=screen, backgroundscreen=0.70, backgroundcorner=round, backgroundradius=0.1em, corner=round, radius=0.1em] Radius, framedradius and backgroundradius expect dimensions as values, not mere numbers. BTW, having a sample that shows the problem increases the reply speed :-). I hope it helps, Pablo You had the cure. I put commands like the one under discussion in a separate file called macros.tex which is hte first file called in my standard book.tex top level file. For some reason it didn't work. So I copied it to just before my first text frame in the 'chapter01.tex' file. Then it worked for that frame and subsequent instances. Here is my book.tex file as used in my current project: \input variables.tex \input macros.tex \input fonts.tex \starttext %\showlayout \startfrontmatter \input half.tex \input title.tex \input contents.tex \stopfrontmatter \startbodymatter %\input sample3.tex \input body.tex \stopbodymatter \stoptext I will add more calls later for acknowledgements, appendices etc. all in separate subfiles. \body.tex is a subfile that calls the individual chapter subsubfiles. Variables.tex contains the definitions of title, subtitle, author, publisher, ISBN etc. 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 ___
[NTG-context] total pages in external PDF
Dear list, I need to get the number of pages from an external PDF file that I also define with an \env. I think I could get something like this.: \def\Myfilename{\env{filename}} doc = epdf.open(arg[\MyFilename]) total_pages_ = doc:getNumPages() \def\Mypages{total_pages} But mixing both lua and ConTeXt commands the wrong way won’t work. Sorry, but this is all Greek to me. Although I see how it could be done, I cannot write the code for this. Which is the right way to get the code above working? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] Page numbering, new style and running heads.
The new method of handling page numbering (roman and arabic) using e.g., \setupuserpagenumber[numberconversion=Romannumerals] \setcounter[userpage][5] works just fine if you remember one thing: in running heads the word pagenumber has to be replaced with userpagenumber. But in the \chapter setup it is still pagenumber I spent the morning and a few extra minutes figuring those two things out. -- 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 ___
[NTG-context] Get rid of caption on an intermezzo.
I managed after many trips to the Wiki to get a text frame pretty much as I want it, with text wrapping around and so on. But the technique requires using an intermezzo as a wrapper. This feature always puts a title like intermezzo 1 at the bottom. How do I get rid of this title? For the curious here is my code segment to date: \setupframed[framecorner=round, frameradius=1em, background=screen, backgroundscreen=0.70, backgroundcorner=round, backgroundradius=1em, corner=round, radius=1em] \definefloat[intermezzo]{ } \kern 5em\placeintermezzo[right]{} \startframedtext[width=3.2in] \centerline{\ss\tfb Life Before Specialty} \centerline{\ss\tfb Food Marketing} \tfx 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 ---{\bf\it Food Entrepeneur Magazine 2014 pool responses} \stopframedtext -- 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] total pages in external PDF
On 2/25/2015 6:41 PM, Pablo Rodriguez wrote: Dear list, I need to get the number of pages from an external PDF file that I also define with an \env. I think I could get something like this.: \def\Myfilename{\env{filename}} doc = epdf.open(arg[\MyFilename]) total_pages_ = doc:getNumPages() \def\Mypages{total_pages} But mixing both lua and ConTeXt commands the wrong way won’t work. Sorry, but this is all Greek to me. Although I see how it could be done, I cannot write the code for this. Which is the right way to get the code above working? \getfiguredimensions[whatever.pdf] \noffigurepages - 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] total pages in external PDF
On Wed, 25 Feb 2015, Pablo Rodriguez wrote: Dear list, I need to get the number of pages from an external PDF file that I also define with an \env. I think I could get something like this.: \def\Myfilename{\env{filename}} doc = epdf.open(arg[\MyFilename]) total_pages_ = doc:getNumPages() \def\Mypages{total_pages} But mixing both lua and ConTeXt commands the wrong way won’t work. Sorry, but this is all Greek to me. Although I see how it could be done, I cannot write the code for this. Which is the right way to get the code above working? From my old cut-n-paste module (to format two column pdfs into one column so that they are easier to read on an eink reader) \useexternalfigure[cnp:name][\cut!n!paste!parameter\c!name]% Is this really needed? \getfiguredimensions[cnp:name]% \edef\cut!n!paste!NOfpages {\noffigurepages}% Aditya [1]: https://github.com/adityam/cut-n-paste/blob/master/tex/context/third/cut-n-paste/t-cut-n-paste.tex___ 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] CSV scanners built in ConTeXt - feature or bug?
Hi ConTeXist A few days ago Hans pointed me builtin CSV splitter. I tried to test it sure will come in handy for my needs. I found that if the CSV file contain a blank line, then it stops processing the file (see my minimal example). It is clear to me that the incorrectness of file format (eg. different number of columns in rows etc.) may cause interruption of processing, however, I want to ask whether there is an opportunity to process the CSV file with blank lines until the end of CSV file. I noticed that when I exporting data from Excel sometimes happens that in the export file will appear blank line. Is it interrupt processing a feature of a buildin splitter or is it a bug? Can it possibly somehow fix or add new functionality? Thanx Jaroslav Hajtmar Here is minimal example: \starttext \startluacode local mycsvsplitter = utilities.parsers.rfc4180splitter{ separator = ,, quote = '', } local crap = io.loaddata(data.txt) -- with header variant local tablerows, columnname = mycsvsplitter(crap,true) inspect(tablerows) inspect(columnname) -- without header variant -- local tablerows = mycsvsplitter(crap) -- inspect(tablerows) for i=1,#tablerows do local l = tablerows[i] for j=1,#l do context(l[j].., ) end context('\\crlf') end \stopluacode \stoptext % -- here start data.txt file -- first,second,third,fourth 1,2,3,4 a,b,c,d foo,barbaz,boogie,xyzzy ,,, And now,followed by,several,blank lines After several,empty rows,data continues,here 11,22,33,44 aa,bb,cc,dd % -- and here stop data.txt file -- ___ 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 ___