Re: [NTG-context] \type gives different results in footnotes
On 05/26/2014 10:12 PM, Hans Hagen wrote: > On 5/26/2014 9:28 PM, Pablo Rodriguez wrote: >> [...] >> \starttext >> \type{{\em\de Textsatzsystem}} >> \footnote{\type{{\em\de Textsatzsystem}}.} >> \stoptext >> >> Only in the footnote \em has an extra unrequired space. >> >> I don’t have no idea about how TeX works here. As I wrote in a previous >> message, this is far beyond my understanding. > > It has to do with catcodes and tex adding a space after a stringified > \cs so passing as argument is fragile. There is already some magic in > place for \foo{bar} cases so I've added a (less tested) aggressive > option 'absolute'. > [...] > In uploaded beta. Many thanks for your fast fix, Hans. 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 ___
Re: [NTG-context] Command for printing back of book index.
On Mon, 26 May 2014 22:41:41 +0200 Hans Hagen wrote: > On 5/26/2014 10:31 PM, john Culleton wrote: > > On Mon, 26 May 2014 19:15:48 +0200 > > Hans Hagen wrote: > > > >> On 5/26/2014 6:07 PM, john Culleton wrote: > >>> > >>> In the current General Manual section 12.7 > >>> "Registers" the command for actually > >>> printing the back of book index is omitted. > >>> What is it? Is it the same for both MKII > >>> and MKIV? > >>> > >>> Does one run the command texutil separate > >>> from the context command (analogous to > >>> running the makeindex command in other > >>> versions of TeX)? > >>> > >>> I can create an index separate from context > >>> using a front end to makeindex that I wrote > >>> years ago but I prefer an embedded index. > >> > >> producing an (sorted) index has always been > >> integrated > >> > >> - in mkii texexec handles it (using texutil > >> for all multi-pass pre- processing); the use > >> never had to run texutil him/herself; in > >> fact, i once made a replacement in Lua so > >> that we could avoid ruby but never finished > >> it read: had time to finish it > >> > >> - in mkiv sorting the index is done > >> internally > >> > >> there has never been a reason for using > >> something makeindex > >> > >> Hans > >> > >> ps. texutil itself went from modula-2 to perl > >> to ruby ... so it's a real ancient part of > >> context > >> > > > > Thanks. Now, what is the command to be placed > > at the back of the file to print the index? > > Section 12.7 just has a blank line after > > > > "A register is generated and placed in your > > document with" > > did you consult the wiki? > > http://wiki.contextgarden.net/Registers > > I finally traced it down in the wiki. I was first looking under "index" and not finding the answer. My American mind didn't think to look under "Register." That's not what we call a back of book index. So thanks for the pointer. But it would be useful also to correct the manual. Neither section 12.7 nor the list of commands in the back mention \completeregister nor \placeregister as the means to create a back of the book index. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at 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] LuaTeX/ConTeXt connect to SQL Server
On 5/26/2014 9:48 PM, Matt Baker wrote: I apologize, I'm not completely understanding you. So the reason I have: local presets = { server = "XXX\XXX", Database = "Customer", Integrated Security = "True", } Is it would need to look something like this - or an equivalent. There Server would need to be the location of the DB Server, then the DB name, and then some way to tell it to utilize windows authentication (this model is based lightly on the C# connection model). no, it should look like this: local presets = { database = "test", username = "root", password = "none", host = "localhost", port = 3306, } You should use lowercase keys. Spaces in keys are impossible anyway unless you use ["foo bar"] = "xxx". It's Lua, so some basic understanding of Lua helps. I'm unaware of windows auth, but username/pwd should work okay. Is there not a prebuilt library to access SQL built into the LuaTeX/ConTeXT libraries? It seems that there should be a method in which I could include a set of database queries in an external document that can link to the tex \usemodule[sql] document. The closest I am to being familiar with any of this is Nlatexdb (based off of latexdb and rlatexdb) http://www.ctan.org/pkg/nlatexdb . I am rather new to ConTeXT and Lua so I am struggling with wrapping my head around all of this as it is. The interface in context is an abstraction layer that can use several methods. - the command line mysql program (client) - the luasql library (not the best piece of code) - the swiglib lua binding and starting with the client method is easiest as one can also mimmick that on the command line. Perhaps if you could show me an example document that links to a DB might be beneficial... I was hoping you would have shown this at the end of your PDF. attached some left-overs from the 2012 context conference - 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 - demo-sql.pdf Description: Adobe PDF document demo-sql.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] Command for printing back of book index.
On 5/26/2014 10:31 PM, john Culleton wrote: On Mon, 26 May 2014 19:15:48 +0200 Hans Hagen wrote: On 5/26/2014 6:07 PM, john Culleton wrote: In the current General Manual section 12.7 "Registers" the command for actually printing the back of book index is omitted. What is it? Is it the same for both MKII and MKIV? Does one run the command texutil separate from the context command (analogous to running the makeindex command in other versions of TeX)? I can create an index separate from context using a front end to makeindex that I wrote years ago but I prefer an embedded index. producing an (sorted) index has always been integrated - in mkii texexec handles it (using texutil for all multi-pass pre- processing); the use never had to run texutil him/herself; in fact, i once made a replacement in Lua so that we could avoid ruby but never finished it read: had time to finish it - in mkiv sorting the index is done internally there has never been a reason for using something makeindex Hans ps. texutil itself went from modula-2 to perl to ruby ... so it's a real ancient part of context Thanks. Now, what is the command to be placed at the back of the file to print the index? Section 12.7 just has a blank line after "A register is generated and placed in your document with" did you consult the wiki? http://wiki.contextgarden.net/Registers -- - 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] Command for printing back of book index.
On Mon, 26 May 2014 19:15:48 +0200 Hans Hagen wrote: > On 5/26/2014 6:07 PM, john Culleton wrote: > > > > In the current General Manual section 12.7 > > "Registers" the command for actually printing > > the back of book index is omitted. What is > > it? Is it the same for both MKII and MKIV? > > > > Does one run the command texutil separate from > > the context command (analogous to running the > > makeindex command in other versions of TeX)? > > > > I can create an index separate from context > > using a front end to makeindex that I wrote > > years ago but I prefer an embedded index. > > producing an (sorted) index has always been > integrated > > - in mkii texexec handles it (using texutil for > all multi-pass pre- processing); the use never > had to run texutil him/herself; in fact, i once > made a replacement in Lua so that we could > avoid ruby but never finished it read: had time > to finish it > > - in mkiv sorting the index is done internally > > there has never been a reason for using > something makeindex > > Hans > > ps. texutil itself went from modula-2 to perl > to ruby ... so it's a real ancient part of > context > Thanks. Now, what is the command to be placed at the back of the file to print the index? Section 12.7 just has a blank line after "A register is generated and placed in your document with" -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at 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] \type gives different results in footnotes
On 5/26/2014 9:28 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \starttext \type{{\em\de Textsatzsystem}} \footnote{\type{{\em\de Textsatzsystem}}.} \stoptext Only in the footnote \em has an extra unrequired space. I don’t have no idea about how TeX works here. As I wrote in a previous message, this is far beyond my understanding. It has to do with catcodes and tex adding a space after a stringified \cs so passing as argument is fragile. There is already some magic in place for \foo{bar} cases so I've added a (less tested) aggressive option 'absolute'. \definetype[TeXcodeA][option=TEX] \definetype[TeXcodeB][option=TEX,compact=all] \definetype[TeXcodeC][option=TEX,compact=absolute] \def\argA#1{\TeXcodeA{{#1}}} \def\argB#1{\TeXcodeB{{#1}}} \def\argC#1{\TeXcodeC{{#1}}} \starttext \startlines \argA {\em\de Textsatzsystem} \argB {\em\de Textsatzsystem} \argC {\em\de Textsatzsystem} \TeXcodeA{{\em\de Textsatzsystem}} \TeXcodeB{{\em\de Textsatzsystem}} \TeXcodeC{{\em\de Textsatzsystem}} \blank \argA {\em \de Textsatzsystem} \argB {\em \de Textsatzsystem} \argC {\em \de Textsatzsystem} \TeXcodeA{{\em \de Textsatzsystem}} \TeXcodeB{{\em \de Textsatzsystem}} \TeXcodeC{{\em \de Textsatzsystem}} \stoplines \stoptext In uploaded beta. Is there no way to have the same results in footnote? Many thanks for your help, Pablo -- - 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] LuaTeX/ConTeXt connect to SQL Server
I apologize, I'm not completely understanding you. So the reason I have: local presets = { server = "XXX\XXX", Database = "Customer", Integrated Security = "True", } Is it would need to look something like this - or an equivalent. There Server would need to be the location of the DB Server, then the DB name, and then some way to tell it to utilize windows authentication (this model is based lightly on the C# connection model). Is there not a prebuilt library to access SQL built into the LuaTeX/ConTeXT libraries? It seems that there should be a method in which I could include a set of database queries in an external document that can link to the tex document. The closest I am to being familiar with any of this is Nlatexdb (based off of latexdb and rlatexdb) http://www.ctan.org/pkg/nlatexdb . I am rather new to ConTeXT and Lua so I am struggling with wrapping my head around all of this as it is. Perhaps if you could show me an example document that links to a DB might be beneficial... I was hoping you would have shown this at the end of your PDF. Thanks! On Mon, May 26, 2014 at 1:05 PM, Hans Hagen wrote: > On 5/26/2014 6:38 PM, Matt Baker wrote: > >> FROM MY POSTING AT: >> http://tex.stackexchange.com/questions/180018/luatex- >> context-connect-to-sql-server?noredirect=1#comment415824_180018 >> >> I am looking to connect ConTeXt to a SQL Server database. I have looked >> through the manuals, and even read pragma-ade's SQL PDF (which, for me, >> seems a bit abstract). I am not extremely familiar with Lua but have read >> up on the language (I am more familiar with JS). For LaTex I used nlatexdb >> which did the trick, but LaTex isn't able to do what ConTeXt can. >> >> - >> >> The connection needs to use Windows Authentication. >> - >> >> The document is set up as a letter with an environment that it pulls >> from. >> - >> >> It would be preferable to have the connection and queries be seperate >> from the letter itself, and be able to place variables into the >> letter that >> can be populated through the queries (much like nlatexdb) if possible. >> - example: Dear ??first ??last, Thank you for your interest in >> >>??product... etc. >> >> I am rather new to ConText and just starting to get the hang of it, long >> time latex user, the transition starts off rather confusing, but once it >> makes sense it opens up a whole toolbox of available tools which is great. >> Just need this one last tool. >> >> Any help would be much appreciated. >> >> EDIT:: Honestly I haven't gotten to any point that I felt I could attempt >> trying the connection. Looking at the SQL PDF from pragma-ade it should >> look something like: >> >> local presets = { >> server = "XXX\XXX", >> Database = "Customer", >> Integrated Security = "True", >> } >> > > I have no clue where get that setup from as the manual says: > > local presets = { > database = "test", > username = "root", > password = "none", > host = "localhost", > port = 3306, > } > > or something like that. The same kind of connection info that the mysql > client needs. > > presets.id = "XXX" >> > > ? > > > local template = [[ >> SELECT >> 'Control_Content' >> FROM >> 'Customer.dbo.Report_Client_Data' >> WHERE >> 'Control_Name' LIKE 'Long_Name' AND 'Client_Id' = 154; >> ]] >> >> local data, keys = utilities.sql.execute { >> presets = presets, >> template = template, >> variables = {}, >> } >> > > should work given a proper preset table > > > I can't seem to find where or how the connection is being made, except >> perhaps where utilities.sql.execute is called, but I can't find any >> information anywhere about such a call in lua or context... >> > > you can best start with using the command line client approach: > > sql.setmethod("client") > > because the other methods assume a library that matches your luatex (this > should works ok with regular mysql or swiglib bindings but it adds a level > of complication) > > Hans > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net >
[NTG-context] \type gives different results in footnotes
Dear list, I have the following sample: \starttext \type{{\em\de Textsatzsystem}} \footnote{\type{{\em\de Textsatzsystem}}.} \stoptext Only in the footnote \em has an extra unrequired space. I don’t have no idea about how TeX works here. As I wrote in a previous message, this is far beyond my understanding. Is there no way to have the same results in footnote? 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 ___
Re: [NTG-context] LuaTeX/ConTeXt connect to SQL Server
On 5/26/2014 6:38 PM, Matt Baker wrote: FROM MY POSTING AT: http://tex.stackexchange.com/questions/180018/luatex-context-connect-to-sql-server?noredirect=1#comment415824_180018 I am looking to connect ConTeXt to a SQL Server database. I have looked through the manuals, and even read pragma-ade's SQL PDF (which, for me, seems a bit abstract). I am not extremely familiar with Lua but have read up on the language (I am more familiar with JS). For LaTex I used nlatexdb which did the trick, but LaTex isn't able to do what ConTeXt can. - The connection needs to use Windows Authentication. - The document is set up as a letter with an environment that it pulls from. - It would be preferable to have the connection and queries be seperate from the letter itself, and be able to place variables into the letter that can be populated through the queries (much like nlatexdb) if possible. - example: Dear ??first ??last, Thank you for your interest in ??product... etc. I am rather new to ConText and just starting to get the hang of it, long time latex user, the transition starts off rather confusing, but once it makes sense it opens up a whole toolbox of available tools which is great. Just need this one last tool. Any help would be much appreciated. EDIT:: Honestly I haven't gotten to any point that I felt I could attempt trying the connection. Looking at the SQL PDF from pragma-ade it should look something like: local presets = { server = "XXX\XXX", Database = "Customer", Integrated Security = "True", } I have no clue where get that setup from as the manual says: local presets = { database = "test", username = "root", password = "none", host = "localhost", port = 3306, } or something like that. The same kind of connection info that the mysql client needs. presets.id = "XXX" ? local template = [[ SELECT 'Control_Content' FROM 'Customer.dbo.Report_Client_Data' WHERE 'Control_Name' LIKE 'Long_Name' AND 'Client_Id' = 154; ]] local data, keys = utilities.sql.execute { presets = presets, template = template, variables = {}, } should work given a proper preset table I can't seem to find where or how the connection is being made, except perhaps where utilities.sql.execute is called, but I can't find any information anywhere about such a call in lua or context... you can best start with using the command line client approach: sql.setmethod("client") because the other methods assume a library that matches your luatex (this should works ok with regular mysql or swiglib bindings but it adds a level of complication) 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] unwanted extra space in type definition
On 05/26/2014 06:55 PM, luigi scarso wrote: > On Mon, May 26, 2014 at 6:00 PM, Pablo Rodriguez wrote: > > Dear list, > > I have the following sample: > > \definetype[TeXcode][option=TEX] > \def\arg#1{\TeXcode{{#1}}} > \starttext > \arg{\em\de Textsatzsystem} > > \TeXcode{{\em\de Textsatzsystem}} > \stoptext > > I don’t know what is wrong defined in \arg that inserts an extra space > after \em? > > You can see how TeX works with \tracingmacros > \definetype[TeXcode][option=TEX] > \def\arg#1{\edef\temp{#1}\TeXcode{{#1}}} > \starttext > \tracingmacros1 > \arg{\em\de Textsatzsystem} > \tracingnone > \tracingmacros1 > \TeXcode{{\em\de Textsatzsystem}} > \tracingnone > \stoptext Many thanks for your reply, Luigi. Sorry, but I have just downloaded and read your message. Well, this seems to be something beyond my understanding (this is all Greek to me). The only conclusion I can draw is that I have to use the second option. 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 ___
Re: [NTG-context] Command for printing back of book index.
On 5/26/2014 6:07 PM, john Culleton wrote: In the current General Manual section 12.7 "Registers" the command for actually printing the back of book index is omitted. What is it? Is it the same for both MKII and MKIV? Does one run the command texutil separate from the context command (analogous to running the makeindex command in other versions of TeX)? I can create an index separate from context using a front end to makeindex that I wrote years ago but I prefer an embedded index. producing an (sorted) index has always been integrated - in mkii texexec handles it (using texutil for all multi-pass pre- processing); the use never had to run texutil him/herself; in fact, i once made a replacement in Lua so that we could avoid ruby but never finished it read: had time to finish it - in mkiv sorting the index is done internally there has never been a reason for using something makeindex Hans ps. texutil itself went from modula-2 to perl to ruby ... so it's a real ancient part of context - 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] unwanted extra space in type definition
On 05/26/2014 06:08 PM, Wolfgang Schuster wrote: > Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez: >>\def\arg#1{\TeXcode{{#1}}} >> [...] >> I don’t know what is wrong defined in \arg that inserts an extra space >> after \em? > > You can’t do this form a definition for a verbatim command because TeX has > its own rules > for such a situation (search for a description about catcodes), when you want > a copy of > \TeXcode add > > \definetype[arg][TeXcode] > > to your document. > > BTW: \arg is a predefined command and you should avoid to redefine it Many thanks for your reply, Wolfgang. Is there no way that I have the already predefined \arg with colored contents (braces included)? Even with defining another command, the problem is that left and right aren’t covered by option=TEX. 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 ___
Re: [NTG-context] unwanted extra space in type definition
On Mon, May 26, 2014 at 6:00 PM, Pablo Rodriguez wrote: > Dear list, > > I have the following sample: > > \definetype[TeXcode][option=TEX] > \def\arg#1{\TeXcode{{#1}}} > \starttext > \arg{\em\de Textsatzsystem} > > \TeXcode{{\em\de Textsatzsystem}} > \stoptext > > I don’t know what is wrong defined in \arg that inserts an extra space > after \em? > > You can see how TeX works with \tracingmacros \definetype[TeXcode][option=TEX] \def\arg#1{\edef\temp{#1}\TeXcode{{#1}}} \starttext \tracingmacros1 \arg{\em\de Textsatzsystem} \tracingnone \tracingmacros1 \TeXcode{{\em\de Textsatzsystem}} \tracingnone \stoptext -- 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] LuaTeX/ConTeXt connect to SQL Server
FROM MY POSTING AT: http://tex.stackexchange.com/questions/180018/luatex-context-connect-to-sql-server?noredirect=1#comment415824_180018 I am looking to connect ConTeXt to a SQL Server database. I have looked through the manuals, and even read pragma-ade's SQL PDF (which, for me, seems a bit abstract). I am not extremely familiar with Lua but have read up on the language (I am more familiar with JS). For LaTex I used nlatexdb which did the trick, but LaTex isn't able to do what ConTeXt can. - The connection needs to use Windows Authentication. - The document is set up as a letter with an environment that it pulls from. - It would be preferable to have the connection and queries be seperate from the letter itself, and be able to place variables into the letter that can be populated through the queries (much like nlatexdb) if possible. - example: Dear ??first ??last, Thank you for your interest in ??product... etc. I am rather new to ConText and just starting to get the hang of it, long time latex user, the transition starts off rather confusing, but once it makes sense it opens up a whole toolbox of available tools which is great. Just need this one last tool. Any help would be much appreciated. EDIT:: Honestly I haven't gotten to any point that I felt I could attempt trying the connection. Looking at the SQL PDF from pragma-ade it should look something like: local presets = { server = "XXX\XXX", Database = "Customer", Integrated Security = "True", } presets.id = "XXX" local template = [[ SELECT 'Control_Content' FROM 'Customer.dbo.Report_Client_Data' WHERE 'Control_Name' LIKE 'Long_Name' AND 'Client_Id' = 154; ]] local data, keys = utilities.sql.execute { presets = presets, template = template, variables = {}, } I can't seem to find where or how the connection is being made, except perhaps where utilities.sql.execute is called, but I can't find any information anywhere about such a call in lua or context... ___ 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] unwanted extra space in type definition
Am 26.05.2014 um 18:00 schrieb Pablo Rodriguez : > Dear list, > > I have the following sample: > >\definetype[TeXcode][option=TEX] >\def\arg#1{\TeXcode{{#1}}} >\starttext >\arg{\em\de Textsatzsystem} > >\TeXcode{{\em\de Textsatzsystem}} >\stoptext > > I don’t know what is wrong defined in \arg that inserts an extra space > after \em? You can’t do this form a definition for a verbatim command because TeX has its own rules for such a situation (search for a description about catcodes), when you want a copy of \TeXcode add \definetype[arg][TeXcode] to your document. BTW: \arg is a predefined command and you should avoid to redefine it 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] Command for printing back of book index.
In the current General Manual section 12.7 "Registers" the command for actually printing the back of book index is omitted. What is it? Is it the same for both MKII and MKIV? Does one run the command texutil separate from the context command (analogous to running the makeindex command in other versions of TeX)? I can create an index separate from context using a front end to makeindex that I wrote years ago but I prefer an embedded index. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at 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 ___
[NTG-context] unwanted extra space in type definition
Dear list, I have the following sample: \definetype[TeXcode][option=TEX] \def\arg#1{\TeXcode{{#1}}} \starttext \arg{\em\de Textsatzsystem} \TeXcode{{\em\de Textsatzsystem}} \stoptext I don’t know what is wrong defined in \arg that inserts an extra space after \em? 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 ___
Re: [NTG-context] bug in latest beta?
On 05/26/2014 10:24 AM, Hans Hagen wrote: > On 5/26/2014 7:47 AM, Pablo Rodriguez wrote: >> [...] >> Page break is wrong if \section is enabled (or I am missing something >> extremely basic). >> >> I guess it might be worth fixing it also for ConTeXt in TeX Live 2014. >> >> Many thanks for your help, > > It has to do with trying to improve the 'keep together' successive > head/text 'without deadlock' issue; I'll try to improve that bit but for > a while it will be somewhat experimental (it's one of the things I'm > trying to improve). Many thanks for the fix, Hans. I have another wrong page break, but I’m afraid I need some time to elaborate the sample. Many thanks again 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] placement of graphics across coluums.
In Scribus, (which has many shortcomings compared to Context for book length documents,) there is one trick that is pretty easy. In a double column document one can place a graphic in another layer that is part in one column and part in another, but not spanning either column completely. Then the texts in each column can be made to flow around the graphic. I have looked in "It's in the details" and the "Columns" document but I cannot find this specific example. I thought I saw one years ago. Is such a trick possible in Context without heroic special coding? -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at 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] upright lowercase Greek letters in math formulas
Am 26.05.2014 um 14:57 schrieb Mikael P. Sundqvist : > On Mon, May 26, 2014 at 2:12 PM, Mojca Miklavec > wrote: >> How could I get upright lowercase Greek letters in math formulas >> (provided that such a symbol exists, of course)? > > $\mathgreekupright 15{\rm\frac{μm}{μs}}$ 15 μs > > I guess you are aware of \setupmathematics[lcgreek=normal] that makes > all lower case greek letters upright. Use “lcgreek=none” and enable the upright, bold etc. symbols with the \tf, \bf etc. commands. \setupbodyfont[times] \setupmathematics[lcgreek=none] \starttext $ 15\frac{μm}{μs} \quad 15\frac{\tf μm}{\tf μs} $ \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 ___
Re: [NTG-context] upright lowercase Greek letters in math formulas
On Mon, May 26, 2014 at 2:57 PM, Mikael P. Sundqvist wrote: > On Mon, May 26, 2014 at 2:12 PM, Mojca Miklavec wrote: >> How could I get upright lowercase Greek letters in math formulas >> (provided that such a symbol exists, of course)? > > $\mathgreekupright 15{\rm\frac{μm}{μs}}$ 15 μs Thank you, that worked. > I guess you are aware of \setupmathematics[lcgreek=normal] that makes > all lower case greek letters upright. I don't want that. I would still like to be able to have italic letters by default, for example for quantities like magnetic permeability. All I need is a switch to make *all* the letters upright, including the Greek ones. So the only question is: is it an oversight or is it on purpose that \rm doesn't also switch the Greek letters to their upright form? 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] upright lowercase Greek letters in math formulas
Hi Mojca, it seems font switches do not work here. You must define your own commands for upright Greek letters, e.g. \def\muup {\Umathchar "0"0"B5 } At least this works, maybe there is a better way to do it. Johannes Am 26.05.14 14:12, schrieb Mojca Miklavec: Hi, How could I get upright lowercase Greek letters in math formulas (provided that such a symbol exists, of course)? Here's a minimal example: \setupbodyfont[times] \starttext $15{\rm\frac{μm}{μs}}$ 15 μs \stoptext Thank you, 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 : 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] upright lowercase Greek letters in math formulas
On Mon, May 26, 2014 at 2:12 PM, Mojca Miklavec wrote: > How could I get upright lowercase Greek letters in math formulas > (provided that such a symbol exists, of course)? $\mathgreekupright 15{\rm\frac{μm}{μs}}$ 15 μs I guess you are aware of \setupmathematics[lcgreek=normal] that makes all lower case greek letters upright. /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] Split in specific row in natural tables?
Hi, Is there a possibility of split a natural table in specific row? I want to split in row third or something like that. Thanks, Xan. ___ 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] upright lowercase Greek letters in math formulas
Hi, How could I get upright lowercase Greek letters in math formulas (provided that such a symbol exists, of course)? Here's a minimal example: \setupbodyfont[times] \starttext $15{\rm\frac{μm}{μs}}$ 15 μs \stoptext Thank you, 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in latest beta?
On 5/26/2014 7:47 AM, Pablo Rodriguez wrote: Dear list, I’m afraid there is a bug (I think it was) introduced in beta from 2014.05.21 22:04: \showframe \setuppapersize[A6] \starttext \dorecurse{23}{This is only a random sentence. } \section{Section} \input zapf \stoptext Page break is wrong if \section is enabled (or I am missing something extremely basic). I guess it might be worth fixing it also for ConTeXt in TeX Live 2014. Many thanks for your help, It has to do with trying to improve the 'keep together' successive head/text 'without deadlock' issue; I'll try to improve that bit but for a while it will be somewhat experimental (it's one of the things I'm trying to improve). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] LuaTeX/ConTeXt connect to SQL Server
FROM MY POSTING AT: http://tex.stackexchange.com/questions/180018/luatex-context-connect-to-sql-server?noredirect=1#comment415824_180018 I am looking to connect ConTeXt to a SQL Server database. I have looked through the manuals, and even read pragma-ade's SQL PDF (which, for me, seems a bit abstract). I am not extremely familiar with Lua but have read up on the language (I am more familiar with JS). For LaTex I used nlatexdb which did the trick, but LaTex isn't able to do what ConTeXt can. - The connection needs to use Windows Authentication. - The document is set up as a letter with an environment that it pulls from. - It would be preferable to have the connection and queries be seperate from the letter itself, and be able to place variables into the letter that can be populated through the queries (much like nlatexdb) if possible. - example: Dear ??first ??last, Thank you for your interest in ??product... etc. I am rather new to ConText and just starting to get the hang of it, long time latex user, the transition starts off rather confusing, but once it makes sense it opens up a whole toolbox of available tools which is great. Just need this one last tool. Any help would be much appreciated. EDIT:: Honestly I haven't gotten to any point that I felt I could attempt trying the connection. Looking at the SQL PDF from pragma-ade it should look something like: local presets = { server = "XXX\XXX", Database = "Customer", Integrated Security = "True", } presets.id = "XXX" local template = [[ SELECT 'Control_Content' FROM 'Customer.dbo.Report_Client_Data' WHERE 'Control_Name' LIKE 'Long_Name' AND 'Client_Id' = 154; ]] local data, keys = utilities.sql.execute { presets = presets, template = template, variables = {}, } I can't seem to find where or how the connection is being made, except perhaps where utilities.sql.execute is called, but I can't find any information anywhere about such a call in lua or context... ___ 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 ___