Re: [NTG-context] Experience with DITA XML or XSL/FO
On 5/23/2014 1:30 AM, Mica Semrick wrote: Hi Hans, Thanks for your reply. I found my way to foxet, but never got it working. I've written several mapping files for XML with good results, but DITA is a bit of a different beast. that's mkii and will not work in mkiv DITA is geared towards technical writing, and its main features are defined content types, a mechanism for controlled reuse below the file level, a modular structure, and built in extensibility of its XML vocabulary. It comes with its own toolkit that filters out and pulls in content and it uses FOP to produce PDF (hence my mention of FO). Since the toolkit must process the XML to resolve linked content and remove content, it is not recommended to directly typeset the XML like you could do with DocBook. I see a few ways to achieve what I want, which is a PDF produced my ConTeXt: target a merged XML file that the dita toolkit has produced, produce a concatenated HTML file and typeset that, or typeset the fo file before FOP gets to it. Of those approaches, the first seems like the best idea, but I wanted to query the list before proceeding. best just skip to fop stage and directly map the html (or whatever intermediate format) then ... the more info gets lost, the worse the result will look as the typesetting engine works better on abstractions (chapters and so) then on boxes pasted together - 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] Testing TeX Live 2014: last call
On 5/23/2014 7:19 AM, Mojca Miklavec wrote: Dear Pablo, On Fri, May 23, 2014 at 7:00 AM, Pablo Rodriguez wrote: Only a question. When Luigi announced luajittex-0.78.2 (http://www.ntg.nl/pipermail/ntg-context/2014/076633.html), he commented the possibility of having only luajittex in the future. What happened to that merging? You probably misunderstood the message. Luigi kept developing LuaJITTeX separately from LuaTeX until recently, at https://foundry.supelec.fr/projects/luajittex, so the two projects (luatex and luajittex) contained almost the same source code with only minor differences and we had to compile them separately. Both projects now coexist at https://foundry.supelec.fr/projects/luatex in the same subversion repository and both binaries are built from the same sources. Concerning 'only luajittex' .. it will always be two separate binaries - luajit is only available for some architectures - luajittex has some memory constraints due to the different Lua vm In context you use mtxrunjit ... contextjit ... if you want the most efficient call, although (at least for now) mtxrun --jit context --jit will also work (but starts up slower due to a relaunch, using some ugly hacks). On the average luajittex runs faster (some 15-20% normally, but it can be less or more depending on how extreme Lua usage is). 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] \startbackground with footnote
Thanks Aditya. What's the difference between startbackground and starttextbackground? I can't see the options of textbackground. Thanks, ___ 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] \startbackground with footnote
Sorry, I mean Wolfgang not 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 ___
[NTG-context] Italic small capitals with Latin Modern font
How can I use Latin Modern italic small capitals? I have seen on a previous thread that small caps are separated in an other file for Latin Modern font and that one should load it to use them in italic, but there was no example given to achieve that. Minimal example: \starttext \it \sc \input knuth \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] Simple command with variable number of arguments
Dear All, I would like to define a command that expands \vector{2,4} % or vector[2,4] if that’s easier to \startpmatrix \NC 2 \NR \NC 4 \NR \stoppmatrix and more generally \vector{2,4,1,7} to \startpmatrix \NC 2 \NR \NC 4 \NR \NC 1 \NR \NC 7 \NR \stoppmatrix Any hints how to achieve this? Thanks, Matthias signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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] Simple command with variable number of arguments
Hi, Some time ago Wolfgang S. gave a solution to a similar problem: maybe this can help you. begin \def\somemacro#1% {\def\dosomemacro##1{Execute ##1, }% \processcommalist[#1]\dosomemacro} \starttext \somemacro{A,B,C} \somemacro{E,F} \stoptext end Best regards: OK On 23 May 2014, at 11:54, Matthias Weber wrote: > Dear All, > > I would like to define a command that expands > > \vector{2,4} % or vector[2,4] if that’s easier > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \stoppmatrix > > and more generally > > \vector{2,4,1,7} > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \NC 1 \NR > \NC 7 \NR > \stoppmatrix > > Any hints how to achieve this? > > Thanks, > > Matthias > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Ctx goes into infinite loop?
Hello, I have problem running the latest Ctx beta. Suppose having: -- C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings\t2.mkiv \startluacode local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") context.setvalue("HOME", home) \stopluacode \input \HOME/Common/_Defs_.ctx \starttext Test \stoptext -- and an empty -- C:\Lukas\Common\_Defs_.ctx -- When running: C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings>context.exe t2.mkiv Ctx stops telling anything (infinite loop?): " C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings>context.exe t2.mkiv mtx-context | run 1: luatex --fmt="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="t2" --lua="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./t2.mkiv" --c:input="./t2.mkiv" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv" This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5004) \write18 enabled. open source > 1 > 1 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2014.5.22 int: english/english system > 'cont-new.mkiv' loaded open source > 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv close source> 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv system > files > jobname 't2', input './t2.mkiv', result 't2' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > 2 > 3 > C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv tex error > error on line 7 in file C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv: ! I can't find file `C:/Documents'.\HOME ^C C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings> \HOME \-C:/Documents and Settings/LPR l.7 \input \HOME /Common/_Defs_.ctx 1 \startluacode 2 local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") 3 4 context.setvalue("HOME", home) 5 \stopluacode 6 7 >> \input \HOME/Common/_Defs_.ctx 8 9 \starttext 10 Test 11 \stoptext 12 " What's wrong? Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038 _Defs_.ctx Description: Binary data t2.log Description: Binary data t2.mkiv Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Simple command with variable number of arguments
Thanks Otared, that looks very promising. My attempt to wrap the arguments with \NC \NR fails, though. It looks like only the first argument is used, and I am clearly missing something. Also, I’d like to use the example you posted but without the last comma so that in the example below I get (4,5) instead of (4,5,). Matthias \definemathmatrix [pmatrix] [left={\left(\,},right={\,\right)}] \def\docolumnvector#1{\NC#1\NR} \def\columnvector#1 {\startpmatrix \processcommalist[#1]\docolumnvector \stoppmatrix} \def\dorowvector#1{#1,} \def\rowvector#1 {\startpmatrix \processcommalist[#1]\dorowvector \stoppmatrix} \starttext \startformula \columnvector{1,2,3} \stopformula \startformula \rowvector{4,5} \stopformula \stoptext On May 23, 2014, at 6:08 AM, Otared Kavian wrote: > Hi, > > Some time ago Wolfgang S. gave a solution to a similar problem: maybe this > can help you. > > begin > \def\somemacro#1% > {\def\dosomemacro##1{Execute ##1, }% > \processcommalist[#1]\dosomemacro} > > \starttext > \somemacro{A,B,C} > > \somemacro{E,F} > \stoptext > end > > Best regards: OK > > On 23 May 2014, at 11:54, Matthias Weber wrote: > >> Dear All, >> >> I would like to define a command that expands >> >> \vector{2,4} % or vector[2,4] if that’s easier >> >> to >> >> \startpmatrix >> \NC 2 \NR >> \NC 4 \NR >> \stoppmatrix >> >> and more generally >> >> \vector{2,4,1,7} >> >> to >> >> \startpmatrix >> \NC 2 \NR >> \NC 4 \NR >> \NC 1 \NR >> \NC 7 \NR >> \stoppmatrix >> >> Any hints how to achieve this? >> >> Thanks, >> >> Matthias >> ___ >> 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 > ___ signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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] Simple command with variable number of arguments
On Fri, 23 May 2014, Matthias Weber wrote: Dear All, I would like to define a command that expands \vector{2,4} % or vector[2,4] if that’s easier to \startpmatrix \NC 2 \NR \NC 4 \NR \stoppmatrix and more generally \vector{2,4,1,7} to \startpmatrix \NC 2 \NR \NC 4 \NR \NC 1 \NR \NC 7 \NR \stoppmatrix Any hints how to achieve this? Surprisingly, this is not as simple as it may seem at first glance. Some time ago, I had written a module to achieve this. See attached. The usage is: \usemodule[simplematrix] \definesimplematrix[MATRIX][fence=bracket] (any predefined math-fence will work) and then: \MATRIX{1,2,3} for row vectors and \MATRIX{1;2;3} for column vectors, and \MATRIX{1,2,3; 4,5,6} for matrices. You can use \definesimplematrix[...][distance=..., align=...] to influence the distance and align keys of mathmatrix. Aditya%D \module %D [ file=t-simplematrix, %D version=2014.02.18, %Dtitle=\CONTEXT\ User Module, %D subtitle=Simple matrix, %D author=Aditya Mahajan, %D date=\currentdate, %Dcopyright=Aditya Mahajan, %Demail=adityam ieee org, %D license=Simplified BSD License] \writestatus{loading}{Simple matrix (ver: 2014.02.18)} \startmodule[simplematrix] \unprotect \definenamespace [simplematrix] [ \c!type=module, \c!name=simplematrix, \c!command=\v!yes, setup=\v!list, \s!parent=simplematrix, ] \setupsimplematrix [ \c!distance=\emwidth, \c!mathstyle=, fence=bracket, \c!align= ] \appendtoks \setevalue{\currentsimplematrix}{\usesimplematrix[\currentsimplematrix]} \to \everydefinesimplematrix \newtoks\simplematrixtoks \define[1]\simplematrix_row {\processcommalist[#1]\simplematrix_col \appendtoks \NR \to \simplematrixtoks} \define[1]\simplematrix_col {\appendtoks \NC #1 \to \simplematrixtoks} \unexpanded\def\usesimplematrix {\dodoubleargument\usesimplematrix_indeed} \def\simplematrix_left {\edef\p_left{\namedmathfenceparameter{\simplematrixparameter{fence}}\c!left}% \normalleft\ifx\p_left\empty.\else\Udelimiter\plusfour\fam\p_left\relax\fi \,} \def\simplematrix_right {\edef\p_right{\namedmathfenceparameter{\simplematrixparameter{fence}}\c!right}% \, \normalright\ifx\p_right\empty.\else\Udelimiter\plusfive\fam\p_right\relax\fi} \def\usesimplematrix_indeed[#name][#options]#matrix% {\begingroup \edef\currentsimplematrix{#name}% \setupsimplematrix[#name][#options]% \simplematrixtoks\emptytoks \startusemathstyleparameter\simplematrixparameter \appendtoks \bgroup \startmathmatrix [ \c!distance=\simplematrixparameter\c!distance, \c!left=\simplematrix_left, \c!right=\simplematrix_right, \c!align=\simplematrixparameter\c!align, ] \to \simplematrixtoks \processlist[];\simplematrix_row[#matrix]% \appendtoks \stopmathmatrix \egroup \to \simplematrixtoks \the\simplematrixtoks \stopusemathstyleparameter \endgroup} \protect \stopmodule ___ 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] \setuplist ignores width= in combination with headnumber=no
Hi, I would like to remove header numbers for subsections, but keep subsections properly aligned in the table of contents. However, the width= parameter seems to be completely ignored in that case. Here's a nearly-minimal example: \setuplist[section][width=10mm,style=bold] \setuplist[subsection][width=15mm,headnumber=no] \setuplist[subsubsection][width=20mm,style=slanted,pagestyle=normal] \starttext \completecontent \page[yes] \section{First section} \subsection{First subsection} \subsubsection{First subsubsection} \subsubsubsection{First subsubsubsection} \section{Second section} \subsection{Second subsection} \subsubsection{Second subsubsection} \subsubsubsection{Second subsubsubsection} \stoptext The example has been adapted from http://wiki.contextgarden.net/Table_of_Contents. The image on the wiki seems ok, but I get a different result if I try to run the same example with the latest version of ConTeXt (mkiv). Somewhat related: say that I wanted to setup \setuplist[][width=10mm] for all the sections and sub(subsub)sections. The documentation seems to suggest that \placecontent[aligntitle=yes/no,width=10mm] should do that (it's not clear to me whether that's yes or no that should do it), but it doesn't seem to have any effect at all. 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] Simple command with variable number of arguments
Thanks Aditya,but out of the box the following\usemodule[simplematrix]\definesimplematrix[MATRIX][fence=bracket]\starttext\startformula\MATRIX{1,2,3}\MATRIX{1;2;3} \stopformula\stoptextgives me texshop_image.pdf Description: Adobe PDF document MatthiasOn May 23, 2014, at 6:56 AM, Aditya Mahajanwrote:On Fri, 23 May 2014, Matthias Weber wrote:Dear All,I would like to define a command that expands\vector{2,4} % or vector[2,4] if that’s easierto\startpmatrix\NC 2 \NR\NC 4 \NR\stoppmatrixand more generally\vector{2,4,1,7}to\startpmatrix\NC 2 \NR\NC 4 \NR\NC 1 \NR\NC 7 \NR\stoppmatrixAny hints how to achieve this?Surprisingly, this is not as simple as it may seem at first glance. Some time ago, I had written a module to achieve this. See attached. The usage is:\usemodule[simplematrix]\definesimplematrix[MATRIX][fence=bracket](any predefined math-fence will work) and then:\MATRIX{1,2,3} for row vectors and \MATRIX{1;2;3} for column vectors, and \MATRIX{1,2,3; 4,5,6} for matrices.You can use \definesimplematrix[...][distance=..., align=...] to influence the distance and align keys of mathmatrix.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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : http://foundry.supelec.fr/projects/contextrev/wiki : http://contextgarden.net___ signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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] Ctx goes into infinite loop?
On 5/23/2014 12:40 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I have problem running the latest Ctx beta. Suppose having: -- C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings\t2.mkiv \startluacode local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") context.setvalue("HOME", home) \stopluacode \input \HOME/Common/_Defs_.ctx at least put { } around the input name \starttext Test \stoptext -- and an empty -- C:\Lukas\Common\_Defs_.ctx -- When running: C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings>context.exe t2.mkiv Ctx stops telling anything (infinite loop?): " C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings>context.exe t2.mkiv mtx-context | run 1: luatex --fmt="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="t2" --lua="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./t2.mkiv" --c:input="./t2.mkiv" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv" This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5004) \write18 enabled. open source > 1 > 1 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2014.5.22 int: english/english system > 'cont-new.mkiv' loaded open source > 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv close source> 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv system > files > jobname 't2', input './t2.mkiv', result 't2' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > 2 > 3 > C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv tex error > error on line 7 in file C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv: ! I can't find file `C:/Documents'.\HOME ^C C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings> \HOME \-C:/Documents and Settings/LPR l.7 \input \HOME /Common/_Defs_.ctx 1 \startluacode 2 local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") 3 4 context.setvalue("HOME", home) 5 \stopluacode 6 7 >> \input \HOME/Common/_Defs_.ctx 8 9 \starttext 10 Test 11 \stoptext 12 " What's wrong? Lukas ___ 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 ___ -- - 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] Ctx goes into infinite loop?
Hello, \input \HOME/Common/_Defs_.ctx at least put { } around the input name -- \startluacode local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") context.setvalue("HOME", home) \stopluacode \input{\HOME/Common/_Defs_.ctx} \starttext Test \stoptext -- similar failure: " C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings>context.exe t2.mkiv mtx-context | run 1: luatex --fmt="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="t2" --lua="c:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./t2.mkiv" --c:input="./t2.mkiv" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv" This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5004) \write18 enabled. open source > 1 > 1 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2014.5.22 int: english/english system > 'cont-new.mkiv' loaded open source > 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv close source> 2 > 2 > c:/Ctx-Beta/tex/texmf-context/tex/context/base/cont-new.mkiv system > files > jobname 't2', input './t2.mkiv', result 't2' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > 2 > 3 > C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv ^C tex error > error on line 7 in file C:/Lukas/Jobs/D3-Sk/SO_237-20.RDS/Drawings/t2.mkiv: ! I can't find file `C:/Documents and Settings/LPR/Common/_Defs_.ctx'.l.7 \input{\HOME/Common/_Defs_.ctx} (Press Enter to retry, or Control-Z to exit)Please type another input file name: ! Emergency stop l. 7C:\Lukas\Jobs\D3-Sk\SO_237-20.RDS\Drawings> \input{\HOME/Common/_Defs_.ctx} 1 \startluacode 2 local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") 3 4 context.setvalue("HOME", home) 5 \stopluacode 6 7 >> \input{\HOME/Common/_Defs_.ctx} 8 9 \starttext 10 Test 11 \stoptext " (WinXP 32b) Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038 ___ 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] Simple command with variable number of arguments
On May 23, 2014, at 7:14 AM, Matthias Weber wrote: > > Thanks Aditya, > > but out of the box the following > > \usemodule[simplematrix] > > \definesimplematrix[MATRIX][fence=bracket] > > \starttext > > \startformula > \MATRIX{1,2,3} > \MATRIX{1;2;3} > \stopformula > > \stoptext > > gives me > > Matthias > Strange. What version of context are you using? Aditya > >> On May 23, 2014, at 6:56 AM, Aditya Mahajan wrote: >> >>> On Fri, 23 May 2014, Matthias Weber wrote: >>> >>> Dear All, >>> >>> I would like to define a command that expands >>> >>> \vector{2,4} % or vector[2,4] if that’s easier >>> >>> to >>> >>> \startpmatrix >>> \NC 2 \NR >>> \NC 4 \NR >>> \stoppmatrix >>> >>> and more generally >>> >>> \vector{2,4,1,7} >>> >>> to >>> >>> \startpmatrix >>> \NC 2 \NR >>> \NC 4 \NR >>> \NC 1 \NR >>> \NC 7 \NR >>> \stoppmatrix >>> >>> Any hints how to achieve this? >> >> Surprisingly, this is not as simple as it may seem at first glance. Some >> time ago, I had written a module to achieve this. See attached. The usage is: >> >> \usemodule[simplematrix] >> >> \definesimplematrix[MATRIX][fence=bracket] >> >> (any predefined math-fence will work) and then: >> >> \MATRIX{1,2,3} for row vectors and \MATRIX{1;2;3} for column vectors, and >> \MATRIX{1,2,3; 4,5,6} for matrices. >> >> You can use \definesimplematrix[...][distance=..., align=...] to influence >> the distance and align keys of mathmatrix. >> >> 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 >> ___ > > ___ > 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] Simple command with variable number of arguments
On Fri, May 23, 2014 at 11:54 AM, Matthias Weber wrote: > Dear All, > > I would like to define a command that expands > > \vector{2,4} % or vector[2,4] if that’s easier > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \stoppmatrix > > and more generally > > \vector{2,4,1,7} > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \NC 1 \NR > \NC 7 \NR > \stoppmatrix > > Any hints how to achieve this? > > Thanks, > \definemathmatrix [pmatrix] [left={\left(\,},right={\,\right)}] \startluacode document = document or {} document.matthias = document.matthias or {} local function lua_columnvector(a) context.startpmatrix() for i,v in ipairs(a) do context.NC() context(tostring(v)) context.NR() end context.stoppmatrix() end document.matthias.lua_columnvector = document.matthias.lua_columnvector or lua_columnvector \stopluacode \def\columnvector#1{\ctxlua{document.matthias.lua_columnvector(#1)}} \starttext \startformula \columnvector{{1,2,3}} %% watch the double { ! \stopformula \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 ___
Re: [NTG-context] Ctx goes into infinite loop?
On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, \input \HOME/Common/_Defs_.ctx at least put { } around the input name -- \startluacode local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or "?"):gsub("\\", "/") context.setvalue("HOME", home) \stopluacode \input{\HOME/Common/_Defs_.ctx} \starttext Test \stoptext -- similar failure: no loop, just a missing file ... i have no clue - 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] Simple command with variable number of arguments
Indeed - I should have checked, I tried this with the TeXLive version. With the current beta it works. Thank! Matthias On May 23, 2014, at 7:37 AM, Aditya Mahajan wrote: >> > > Strange. What version of context are you using? > > Aditya > > signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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] Simple command with variable number of arguments
Thanks Luigi! Now I have a lot to play with… Matthias On May 23, 2014, at 7:44 AM, luigi scarso wrote: > > > > On Fri, May 23, 2014 at 11:54 AM, Matthias Weber wrote: > Dear All, > > I would like to define a command that expands > > \vector{2,4} % or vector[2,4] if that’s easier > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \stoppmatrix > > and more generally > > \vector{2,4,1,7} > > to > > \startpmatrix > \NC 2 \NR > \NC 4 \NR > \NC 1 \NR > \NC 7 \NR > \stoppmatrix > > Any hints how to achieve this? > > Thanks, > > > > \definemathmatrix > [pmatrix] > [left={\left(\,},right={\,\right)}] > > \startluacode > document = document or {} > document.matthias = document.matthias or {} > local function lua_columnvector(a) > context.startpmatrix() > for i,v in ipairs(a) do > context.NC() context(tostring(v)) context.NR() > end > context.stoppmatrix() > end > document.matthias.lua_columnvector = document.matthias.lua_columnvector or > lua_columnvector > \stopluacode > > \def\columnvector#1{\ctxlua{document.matthias.lua_columnvector(#1)}} > > \starttext > \startformula > \columnvector{{1,2,3}} %% watch the double { ! > \stopformula > > > \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 > ___ signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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] \setuplist ignores width= in combination with headnumber=no
Am 23.05.2014 um 13:08 schrieb Mojca Miklavec : > Hi, > > I would like to remove header numbers for subsections, but keep > subsections properly aligned in the table of contents. However, the > width= parameter seems to be completely ignored in that case. > > Here's a nearly-minimal example: > > \setuplist[section][width=10mm,style=bold] > \setuplist[subsection][width=15mm,headnumber=no] \setuplist[subsection][distance=20mm,headnumber=no] 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] Edit the arrows default Metapost
Hi, Thank you Hans. I saw on the net a macro created by Hans van der Meer (hvdm.mp). Do you have an example of its use? Fabrice ___ 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] Simple command with variable number of arguments
Dear Luigi and listers, Last year, I need to write a text for a linear algebra class. Since there are many \startmatrix … \stopmatrix and matrix calculations, I wrote a lua code which did matrix calculations and writing with a lot of help from this list. Using the code, I can write class materials easily. It is good enough for my purpose. I am not good in Lua coding, so there may be many things to be checked for efficiency and for stability. However, I attached the code because there may be someone who need it. It is also good thing to return what I get from the list back. I hope that you enhance the code for better performance since you are an expert in Lua. I always thank to this list and to developers of ConTeXt. Best regards, Dalyoung MatrixLuacode.tex Description: Binary data > > Message: 1 > Date: Fri, 23 May 2014 13:44:30 +0200 > From: luigi scarso > To: mailing list for ConTeXt users > Subject: Re: [NTG-context] Simple command with variable number of > arguments > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Fri, May 23, 2014 at 11:54 AM, Matthias Weber wrote: > >> Dear All, >> >> I would like to define a command that expands >> >> \vector{2,4} % or vector[2,4] if that?s easier >> >> to >> >> \startpmatrix >> \NC 2 \NR >> \NC 4 \NR >> \stoppmatrix >> >> and more generally >> >> \vector{2,4,1,7} >> >> to >> >> \startpmatrix >> \NC 2 \NR >> \NC 4 \NR >> \NC 1 \NR >> \NC 7 \NR >> \stoppmatrix >> >> Any hints how to achieve this? >> >> Thanks, >> > > > > \definemathmatrix > [pmatrix] > [left={\left(\,},right={\,\right)}] > > \startluacode > document = document or {} > document.matthias = document.matthias or {} > local function lua_columnvector(a) > context.startpmatrix() > for i,v in ipairs(a) do > context.NC() context(tostring(v)) context.NR() > end > context.stoppmatrix() > end > document.matthias.lua_columnvector = document.matthias.lua_columnvector or > lua_columnvector > \stopluacode > > \def\columnvector#1{\ctxlua{document.matthias.lua_columnvector(#1)}} > > \starttext > \startformula > \columnvector{{1,2,3}} %% watch the double { ! > \stopformula > > > \stoptext > > -- > luigi > -- next part -- > An HTML attachment was scrubbed... > URL: > <http://www.ntg.nl/pipermail/ntg-context/attachments/20140523/569165d6/attachment-0001.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] Ctx goes into infinite loop?
Am 23.05.2014 13:50, schrieb Hans Hagen: > On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: >> Hello, >> \input \HOME/Common/_Defs_.ctx >>> >>> at least put { } around the input name >> >> -- >> \startluacode >>local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or >> "?"):gsub("\\", "/") >> >>context.setvalue("HOME", home) >> \stopluacode >> >> \input{\HOME/Common/_Defs_.ctx} >> >> \starttext >>Test >> \stoptext >> >> -- >> >> similar failure: > > no loop, just a missing file ... i have no clue > > The environment variables "HOME" and "HOME.ORG" are not predefined in a windows shell. Just enter "env" and see what is available. You can easily add "HOME" with this tool. A restart is required on older Windows OS (XP)! http://redmondlab.reachby.com/g2gz5/redmond-path-v-1-0 Peter ___ 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] [OT] Twenty Questions for DEK
On 21.05.2014 09:54, Hans Hagen wrote: In fact, awareness of pdf as option is (imo) mostly surfacing because html viewers opened their eyes. We can produce highly interactive documents but I still have to meet the first publishers who really wants them (given that they see it as option). It is not uncommon for publishers to waste many man years (hiring extra people) on getting stuff on the web using the same sources that are used to get the paper: paper becomes a side effect. Just a small anecdote to confirm: about 3 years ago, I did a book with a publisher here in Germany. They wanted to do an ebook as well, so I told them I could easily add interactive features etc. They said no, that wasn't necessary, they had their own experts working on these things. These experts ended offering the exact same pdf I had sent them as a "ebook" download, with cropmarks and context information at the bottom of the page. Bloody amateurs... 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Bold small caps
Hi, I always forget how to use bold or italic small caps (I keep mixing addff/setff and smcp/+smcp/smallcaps etc.). In ideal world it could be nice if simply {\sc Normal and \bf Bold Small Caps} or {\bf\sc Bold Small Caps} would work out-of-the-box. The first hit on the wiki was http://wiki.contextgarden.net/Bold_small_caps which contained just the MKII example. I added a MKIV example {\setff{smallcaps} Normal and \bf bold Small Caps.} but the problem is that this example only works with except for the default Latin Modern setup. Would it make sense to fix this for the default LM setup as well? 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] Ctx goes into infinite loop?
Am 23.05.2014 16:18, schrieb Peter Rolf: > Am 23.05.2014 13:50, schrieb Hans Hagen: >> On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: >>> Hello, >>> > \input \HOME/Common/_Defs_.ctx at least put { } around the input name >>> >>> -- >>> \startluacode >>>local home = (os.getenv("HOME.ORG") or os.getenv("HOME") or >>> "?"):gsub("\\", "/") >>> >>>context.setvalue("HOME", home) >>> \stopluacode >>> >>> \input{\HOME/Common/_Defs_.ctx} >>> >>> \starttext >>>Test >>> \stoptext >>> >>> -- >>> >>> similar failure: >> >> no loop, just a missing file ... i have no clue >> >> > > The environment variables "HOME" and "HOME.ORG" are not predefined in a > windows shell. Just enter "env" and see what is available. > > You can easily add "HOME" with this tool. A restart is required on older > Windows OS (XP)! > > http://redmondlab.reachby.com/g2gz5/redmond-path-v-1-0 > > Sorry, wrong tool. This one is only for "PATH", not for arbitrary variables. > Peter > ___ > 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] Bold small caps
Am 23.05.2014 um 17:55 schrieb Mojca Miklavec : > Hi, > > I always forget how to use bold or italic small caps (I keep mixing > addff/setff and smcp/+smcp/smallcaps etc.). In ideal world it could be > nice if simply >{\sc Normal and \bf Bold Small Caps} or >{\bf\sc Bold Small Caps} > would work out-of-the-box. > > The first hit on the wiki was >http://wiki.contextgarden.net/Bold_small_caps > which contained just the MKII example. I added a MKIV example >{\setff{smallcaps} Normal and \bf bold Small Caps.} > but the problem is that this example only works with name here> except for the default Latin Modern setup. > > Would it make sense to fix this for the default LM setup as well? This need to be done by the font designers because Latin Modern uses a separate font for the small capitals and the \setff (better use \feature) has no effect in this case. 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] \setuplist ignores width= in combination with headnumber=no
On Fri, May 23, 2014 at 2:39 PM, Wolfgang Schuster wrote: > Am 23.05.2014 um 13:08 schrieb Mojca Miklavec wrote: > >> I would like to remove header numbers for subsections, but keep >> subsections properly aligned in the table of contents. However, the >> width= parameter seems to be completely ignored in that case. >> >> Here's a nearly-minimal example: >> >> \setuplist[section][width=10mm,style=bold] >> \setuplist[subsection][width=15mm,headnumber=no] > > \setuplist[subsection][distance=20mm,headnumber=no] Dear Wolfgang, Perfect, thank you, it works. Even though I still don't understand why width wouldn't give the desired result. The keyword "distance=" seems to be the distance between the right edge of section number and the left edge of section title, while "width=" seems to be the distance between the left edge of section number and section title. (If width>0, distance is just added to width.) I don't understand why no head number "nullifies" width. 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] Bold small caps
On Fri, May 23, 2014 at 6:11 PM, Wolfgang Schuster wrote: > Am 23.05.2014 um 17:55 schrieb Mojca Miklavec: > >> Would it make sense to fix this for the default LM setup as well? > > This need to be done by the font designers because Latin Modern > uses a separate font for the small capitals and the \setff (better use > \feature) has no effect in this case. For some reason I thought that they did both (supported all the small cap glyphs as well as released a separate font). But now I remembered that LM doesn't have bold small caps at all. But apart from fixing the font: would creating some kind of a "virtual font" with small cap glyphs taken from the other small cap font(s) (where they exist) be feasible/doable? From what I see there are four small caps fonts: regular and italic for both the roman and typewriter style. No bold and no sans. 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] Bold small caps
On 5/23/2014 5:55 PM, Mojca Miklavec wrote: Hi, I always forget how to use bold or italic small caps (I keep mixing addff/setff and smcp/+smcp/smallcaps etc.). In ideal world it could be nice if simply {\sc Normal and \bf Bold Small Caps} or {\bf\sc Bold Small Caps} would work out-of-the-box. The first hit on the wiki was http://wiki.contextgarden.net/Bold_small_caps which contained just the MKII example. I added a MKIV example {\setff{smallcaps} Normal and \bf bold Small Caps.} but the problem is that this example only works with except for the default Latin Modern setup. Would it make sense to fix this for the default LM setup as well? I don't know .. I'd rather see lm shipped with the smallcaps in the regular font instead of separate. 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] Bold small caps
On 5/23/2014 6:46 PM, Mojca Miklavec wrote: On Fri, May 23, 2014 at 6:11 PM, Wolfgang Schuster wrote: Am 23.05.2014 um 17:55 schrieb Mojca Miklavec: Would it make sense to fix this for the default LM setup as well? This need to be done by the font designers because Latin Modern uses a separate font for the small capitals and the \setff (better use \feature) has no effect in this case. For some reason I thought that they did both (supported all the small cap glyphs as well as released a separate font). But now I remembered that LM doesn't have bold small caps at all. But apart from fixing the font: would creating some kind of a "virtual font" with small cap glyphs taken from the other small cap font(s) (where they exist) be feasible/doable? From what I see there are four small caps fonts: regular and italic for both the roman and typewriter style. No bold and no sans. I wonder what the gyre folks would answer if we ask for proper embedding of smallcaps ... 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] [OT] Twenty Questions for DEK
On 5/23/2014 4:27 PM, Thomas A. Schmitz wrote: On 21.05.2014 09:54, Hans Hagen wrote: In fact, awareness of pdf as option is (imo) mostly surfacing because html viewers opened their eyes. We can produce highly interactive documents but I still have to meet the first publishers who really wants them (given that they see it as option). It is not uncommon for publishers to waste many man years (hiring extra people) on getting stuff on the web using the same sources that are used to get the paper: paper becomes a side effect. Just a small anecdote to confirm: about 3 years ago, I did a book with a publisher here in Germany. They wanted to do an ebook as well, so I told them I could easily add interactive features etc. They said no, that wasn't necessary, they had their own experts working on these things. These experts ended offering the exact same pdf I had sent them as a "ebook" download, with cropmarks and context information at the bottom of the page. Bloody amateurs... well, you're still better of than Don who had to pay himself to get a decent ebook being done by the publisher 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] I'm too studpid for Context...
I believe, it is possible to use in Conext the otf-fonts I have in my computer. I generated the database, the quert shows me, that the font is there, but I can not get it in my file. And when I read the chapter in the Manual or whatever I can find, I read a lot about Typescripts and unterstand absolutely nothing. I find how to make a typescript for palatino, which makes no difference, but I don’t unterstand why I shall make a typescript and how. Is there a text which tells step by step what I have to so and why? Now the situation is: I have a lot of Fonts and can use just four. That was much easier with LaTeX... ___ 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] I'm too studpid for Context...
Am 23.05.2014 um 19:14 schrieb Werner Hintze : > I believe, it is possible to use in Conext the otf-fonts I have in my > computer. I generated the database, the quert shows me, that the font is > there, but I can not get it in my file. And when I read the chapter in the > Manual or whatever I can find, I read a lot about Typescripts and unterstand > absolutely nothing. I find how to make a typescript for palatino, which makes > no difference, but I don’t unterstand why I shall make a typescript and how. > > Is there a text which tells step by step what I have to so and why? Now the > situation is: I have a lot of Fonts and can use just four. That was much > easier with LaTeX… The context suite provides the \definefontfamily command which let you select a font (the name of the font goes into the third argument) without the need to write a typescript. Below is a example where I used fonts from my ms office installation. \definefontfamily [myfontcollection] [serif] [Cambria] \definefontfamily [myfontcollection] [sans] [Calibri] \definefontfamily [myfontcollection] [mono] [Consolas] \definefontfamily [myfontcollection] [math] [Cambria Math] \setupbodyfont[myfontcollection] \starttext {\rm\input ward } {\ss\input ward } {\tt\input ward } \startformula c^2 = a^2 + b^2 \stopformula \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] Experience with DITA XML or XSL/FO
On 2014-05-22 Mica Semrick wrote: > > I've been contemplating making a ConTeXt output or parser for DITA XML > and was wondering if anyone has worked with DITA and ConTeXt before? If > you have and could offer any advice and/code, that would be most > helpful! What is your real use case? A typical XML based workflow involves XSL-FO -> PDF route using FO processor (Antenna House, XEP, FOP etc). Anyway, there are several ways. If you are not locked to DITA yet, I would strongly recommend switching to DocBook instead :-) You get similar single source solution with the semantically rich vocabulary that allows you to produce all typical outputs. Moreover, there is a special project dedicated to DocBook to ConTeXt conversion 'dbcontext' http://dblatex.sourceforge.net/releases/download.html although I had to tweak it for my recent project to ensure compatibility with current ConTeXt version (MkIV). This XSLT way is most natural for XML processing, but I understand that writing XSLT transformation is discouraging for many people. Regards, Jan ___ 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] Simple command with variable number of arguments
urn value of this one: matrixOP.determinant = function(m) if #m ==#m[1]then local det = 1 local t = matrixOP.upperTri(m) for i=1,#t do det = det * t[i][i] end return det else return 0 end end I always thank to this list and to developers of ConTeXt. Based on the attached I can make a more efficient version that we can then add to the distribution (maybe you need more than this?) Hans Best regards, Dalyoung Message: 1 Date: Fri, 23 May 2014 13:44:30 +0200 From: luigi scarso To: mailing list for ConTeXt users Subject: Re: [NTG-context] Simple command with variable number of arguments Message-ID: Content-Type: text/plain; charset="utf-8" On Fri, May 23, 2014 at 11:54 AM, Matthias Weber wrote: Dear All, I would like to define a command that expands \vector{2,4} % or vector[2,4] if that?s easier to \startpmatrix \NC 2 \NR \NC 4 \NR \stoppmatrix and more generally \vector{2,4,1,7} to \startpmatrix \NC 2 \NR \NC 4 \NR \NC 1 \NR \NC 7 \NR \stoppmatrix Any hints how to achieve this? Thanks, \definemathmatrix [pmatrix] [left={\left(\,},right={\,\right)}] \startluacode document = document or {} document.matthias = document.matthias or {} local function lua_columnvector(a) context.startpmatrix() for i,v in ipairs(a) do context.NC() context(tostring(v)) context.NR() end context.stoppmatrix() end document.matthias.lua_columnvector = document.matthias.lua_columnvector or lua_columnvector \stopluacode \def\columnvector#1{\ctxlua{document.matthias.lua_columnvector(#1)}} \starttext \startformula \columnvector{{1,2,3}} %% watch the double { ! \stopformula \stoptext -- luigi -- next part -- An HTML attachment was scrubbed... URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20140523/569165d6/attachment-0001.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 ___ -- - 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 - xtest.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] Experience with DITA XML or XSL/FO
On 5/23/2014 7:39 PM, Jan Tosovsky wrote: On 2014-05-22 Mica Semrick wrote: I've been contemplating making a ConTeXt output or parser for DITA XML and was wondering if anyone has worked with DITA and ConTeXt before? If you have and could offer any advice and/code, that would be most helpful! What is your real use case? A typical XML based workflow involves XSL-FO -> PDF route using FO processor (Antenna House, XEP, FOP etc). Which makes all our workflows here non typical -) I never use an FO processor. The xml handler in mkiv is quite efficient and fast. Anyway, there are several ways. If you are not locked to DITA yet, I would strongly recommend switching to DocBook instead :-) You get similar single source solution with the semantically rich vocabulary that allows you to produce all typical outputs. Moreover, there is a special project dedicated to DocBook to ConTeXt conversion 'dbcontext' http://dblatex.sourceforge.net/releases/download.html although I had to tweak it for my recent project to ensure compatibility with current ConTeXt version (MkIV). This XSLT way is most natural for XML processing, but I understand that writing XSLT transformation is discouraging for many people. it depends ... context mkiv can load an xml tree and you can use path expressions similar to what xslt does but saving the intermediate step 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] Simple command with variable number of arguments
Dear Hans, Thank you for checking and enhancing. I also got an error at “uppertri” as you point out. The version that I have sent is one in my notebook which may be different from that in the desktop at school. When I made a class material, it worked fine. I have to check it and send it to you again. I appreciate you for making it more usable for ConTeXt users. I also found that there is a matrix module for lua programming. It is nice for the calculation of matrix, but I have a difficulty to typeset the result. That’s why I try to write a code even though I am not good in Lua programming. If it is easy to take over the result into TeX, using the lua module is much efficient and correct, I think. Anyway, I hope that it helps to typeset matrices. Best regards, Dalyoung > Hi, > > Can you check the attached? The uppertri is wrong but it was already wrong > (e.g. sign is used but never assigned). I inlined some code so ... I think > there were some more errors (obscured by the fact that that piece of code is > not reached). > > We can turn this into m-matrix or so, maybe we need to add some more. > > 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] Problem with \framed align and orientation on landscape pages
For the /\framed/ command, any value for the key /align /other than a null value pushes the frame beyond the bottom margin on a landscape page for many values of /orientation/. The following MWE demonstrates this: \setuppapersize [A4,landscape] \starttext \framed[orientation=90,align=no]{\externalfigure[dummy]} \stoptext It also seems that the default value of /align/// is not /no/ as the wiki suggests, since there is a very different result when no align key is provided and when it is provided as above with /no/, if by a default value one means that, when a given key is not explicitly provided, processing will occur as if it had been provided with that particular value. -- Rik Kabel ___ 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] Simple command with variable number of arguments
Dear Hans, Here is the file in my desktop. The reason I didn’t define “sgn” in the function “uppertri” is that it is inherited from the call of “determinant’. However, I put “sgn=1” so that the function “uppertri” works independently. I checked the function “uppertri” and found that it worked fine. Here is a sample file. \environment MatrixLuacode \starttext \getbuffer[luaMatrix] \startformula\startalign \startluacode local mat = {{0, 2, 4, -4, 1},{0, 0, 2, 3 , 4}, {2, 2, -6, 2, 4 }, {2,0 , -6, 9, 7},{2, 2, -6, 2, 4 },{2, 2, -6, 2, 4 }} -- local mat = {{1,2,3},{3,4,5},{3,4,5},{3,4,5},{3,4,5}} context.NC("\\text{Given Matrix}\\quad\\Rightarrow\\quad") context.NC() matrixOP.write(mat) context.NR() context.NC() context("\\text{Upper Triangular}\\quad\\Rightarrow\\quad") mat = matrixOP.upperTri(mat) context.NC() matrixOP.write(mat) context.NR() \stopluacode \stopalign\stopformula \stoptext Sometimes, I got “-0” as an entry of matrix after calculation but I couldn’t resolve it(I asked about it to this list before). Thank you. Best regards, Dalyoung MatrixLuacode.tex Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___