Re: [NTG-context] Missing number, treated as zero
On Fri, 15 Feb 2019 13:59:46 +0100 Wolfgang Schuster wrote: > You need (note the “start”) > > \startsection[title={...}] > > when you use \stopsection. Ahh, I managed to try just those combination which do not work...feeling really embarrassed. :-( Thank you for being kind and exposing my stupidity. ;) Sincerely, Gour -- A person is said to be established in self-realization and is called a yogī [or mystic] when he is fully satisfied by virtue of acquired knowledge and realization. Such a person is situated in transcendence and is self-controlled. He sees everything — whether it be pebbles, stones or gold — as the same. pgpqq1hhraHuS.pgp Description: OpenPGP digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] markdown module vs pandoc
On Fri, 15 Feb 2019, Gour wrote: On Fri, 15 Feb 2019 06:11:32 -0500 (EST) Aditya Mahajan wrote: For obvious reasons, the built in markdown module is faster than calling pandoc but I prefer using pandoc rather than the markdown module for two reasons. First, pandoc provides many extensions to the basic markdown syntax which I use frequently and second pandoc has better documentation. Thank you. Markdown is a loosely specified standard and sometimes it can be tricky to figure out how to get a particular behavior. That's correct - I was using reST in the past, but lack of support for e.g. nested inline markup leads to strange and ugly workarounds. Then I was considering AsciiDoc(tor), but consider that for simpler stuff (Pnadoc) markdown could be enough, but for larger bodies of text ConTeXt is without comparison. So, if you are planning to use markdown for simple documents then go with the markdown module but if you have more complicated document structure, use pandoc. Do I inderstand you correctly: for more complicated documents you use Pandoc' markdown and then do Pandoc --> ConTeXt conversion to typeset with the ConTeXt at the end? For simple documents, I use something like this (untested): \usemodule[filter] \defineexternalfilter [markdown] [filter={pandoc -t context -o \externalfilteroutput}, output=\externalfilterbasefile.tex, cache=yes, directory=output, %make sure a sub-dir output exists readcommand=\ReadFile] \starttext \startmarkdown This is a *test* in **markdown**. \stopmarkdown \stoptext For more complicated documents (where I need both TeX and HTML output), I pre-process the input: https://adityam.github.io/context-blog/post/markdown-with-gpp/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] markdown module vs pandoc
On Fri, 15 Feb 2019 06:11:32 -0500 (EST) Aditya Mahajan wrote: > For obvious reasons, the built in markdown module is faster than > calling pandoc but I prefer using pandoc rather than the markdown > module for two reasons. First, pandoc provides many extensions to the > basic markdown syntax which I use frequently and second pandoc has > better documentation. Thank you. > Markdown is a loosely specified standard and sometimes it can be tricky to > figure out how to get a particular behavior. That's correct - I was using reST in the past, but lack of support for e.g. nested inline markup leads to strange and ugly workarounds. Then I was considering AsciiDoc(tor), but consider that for simpler stuff (Pnadoc) markdown could be enough, but for larger bodies of text ConTeXt is without comparison. > So, if you are planning to use markdown for simple documents then go > with the markdown module but if you have more complicated document > structure, use pandoc. Do I inderstand you correctly: for more complicated documents you use Pandoc' markdown and then do Pandoc --> ConTeXt conversion to typeset with the ConTeXt at the end? Sincerely, Gour -- Those who are on this path are resolute in purpose, and their aim is one. O beloved child of the Kurus, the intelligence of those who are irresolute is many-branched. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Missing number, treated as zero
On Fri, 15 Feb 2019 13:59:20 +0100 Henning Hraban Ramm wrote: > You mixed up the syntax, > it’s either \section{Testing} or \startsection[title=Testing] Ahh, what a shame. :-( Sincerely, Gour -- For him who has conquered the mind, the mind is the best of friends; but for one who has failed to do so, his mind will remain the greatest enemy. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Missing number, treated as zero
Gour schrieb am 15.02.19 um 13:54: Hello, another attempt with ConTeXt and I'm getting this: $ context t.tex mtx-context | run 1: luatex --fmt="/home/gour/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" --jobname="t" --lua="/home/gour/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" This is LuaTeX, Version 1.07.0 (TeX Live 2018/Arch Linux) system commands enabled. open source > level 1, order 1, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2019.2.14 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' close source> level 2, order 2, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 't', input './t', result 't' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/home/gour/tmp/t.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded structure > sectioning > section @ level 3 : 0.0.1 -> Testing ConTeXt tex error > tex error on line 4 in file /home/gour/tmp/t.tex: ! Missing number, treated as zero \23>>currentnamedsection \popmacro ...m_syst_helpers_push_macro \endcsname \global \advance \lastname... l.4 \stopsection 1 \starttext 2 \section[title={Testing ConTeXt}] You need (note the “start”) \startsection[title={...}] when you use \stopsection. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Missing number, treated as zero
Am 2019-02-15 um 13:54 schrieb Gour : > Hello, > > another attempt with ConTeXt and I'm getting this: > > \starttext > \section[title={Testing ConTeXt}] > This is my document using Croatian chars: šŠ đĐ čČ ćĆ žŽ. > \stopsection > \stoptext You mixed up the syntax, it’s either \section{Testing} or \startsection[title=Testing] Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Missing number, treated as zero
Hello, another attempt with ConTeXt and I'm getting this: $ context t.tex mtx-context | run 1: luatex --fmt="/home/gour/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" --jobname="t" --lua="/home/gour/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./t.tex" --c:input="./t.tex" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" This is LuaTeX, Version 1.07.0 (TeX Live 2018/Arch Linux) system commands enabled. open source > level 1, order 1, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv' system > system > ConTeXt ver: 2018.04.04 00:51 MKIV beta fmt: 2019.2.14 int: english/english system > system > 'cont-new.mkiv' loaded open source > level 2, order 2, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' close source> level 2, order 2, name '/usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv' system > files > jobname 't', input './t', result 't' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name '/home/gour/tmp/t.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded structure > sectioning > section @ level 3 : 0.0.1 -> Testing ConTeXt tex error > tex error on line 4 in file /home/gour/tmp/t.tex: ! Missing number, treated as zero \23>>currentnamedsection \popmacro ...m_syst_helpers_push_macro \endcsname \global \advance \lastname... l.4 \stopsection 1 \starttext 2 \section[title={Testing ConTeXt}] 3 This is my document using Croatian chars: šŠ đĐ čČ ćĆ žŽ. 4 >> \stopsection 5 \stoptext 6 7 8 9 ? The file is: $ cat t.tex \starttext \section[title={Testing ConTeXt}] This is my document using Croatian chars: šŠ đĐ čČ ćĆ žŽ. \stopsection \stoptext I'm using Manjaro Linux (stable branch): $ context --version mtx-context | ConTeXt Process Management 1.02 mtx-context | mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2018.04.04 00:51 Any clue what's wrong? Sincerely, Gour -- A self-realized man has no purpose to fulfill in the discharge of his prescribed duties, nor has he any reason not to perform such work. Nor has he any need to depend on any other living being. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] degrade module
On Fri, 15 Feb 2019 11:48:51 +0100 Lutz Haseloff wrote: > Your Module with wrapper finally works for me as expected. Great to hear it's finally working. > Will it find its way into the distribution as an enhanced degrade > module? Probably not, for the following reasons: - It's 99% Peter's code, he's the maintainer of the module and probably he should just fix his code. - My modification contains an ugly hack that just renames all files to pdf, regardless of the actual file type because I have no clue how to do that properly. That code shouldn't make it into the distribution. - I'm not fluent in Lua and am therefore not the right person to maintain a Lua module. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] markdown module vs pandoc
On Thu, 14 Feb 2019, Gour wrote: I'm interested for using markdown markup and typeset such documents via ConTeXt, but wonder whether it is recommended to use Markdown module or do markdown --> ConTeXt via Pandoc? For obvious reasons, the built in markdown module is faster than calling pandoc but I prefer using pandoc rather than the markdown module for two reasons. First, pandoc provides many extensions to the basic markdown syntax which I use frequently and second pandoc has better documentation. Markdown is a loosely specified standard and sometimes it can be tricky to figure out how to get a particular behavior. So, if you are planning to use markdown for simple documents then go with the markdown module but if you have more complicated document structure, use pandoc. If you use the filter module then you can easily switch back and forth between the two markdown "backends" without changing your source. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] degrade module
Thanks Marco, Your Module with wrapper finally works for me as expected. Thank you very much. Will it find its way into the distribution as an enhanced degrade module? Greetings ant thanks again Lutz Am 15. Februar 2019 11:08:45 MEZ schrieb Marco Patzer : >On Fri, 15 Feb 2019 10:22:48 +0100 >Lutz Haseloff wrote: > >> but both scripts trow the same error on windows and linux-armhf: >> >> grph-downsample.lua:32: bad argument #2 to 'format' (number has no >> integer representation) > >It works here on linux-armhf. No Lua error. Maybe the file got >mangled during transmission. > >I've uploaded a modified version to github, maybe try that one: > > https://github.com/mpfusion/context-downsample > >It includes a wrapper so you can call it like any other module >(\usemodule[downsample]). It's still Peter's code, but with small >modifications, so it degrades jpg as well as png images at the same >time. It's a quick hack, but works here, also on armhf. > >Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] degrade module
On Fri, 15 Feb 2019 10:22:48 +0100 Lutz Haseloff wrote: > but both scripts trow the same error on windows and linux-armhf: > > grph-downsample.lua:32: bad argument #2 to 'format' (number has no > integer representation) It works here on linux-armhf. No Lua error. Maybe the file got mangled during transmission. I've uploaded a modified version to github, maybe try that one: https://github.com/mpfusion/context-downsample It includes a wrapper so you can call it like any other module (\usemodule[downsample]). It's still Peter's code, but with small modifications, so it degrades jpg as well as png images at the same time. It's a quick hack, but works here, also on armhf. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] degrade module
Thank you Henning and Marco, but both scripts trow the same error on windows and linux-armhf: grph-downsample.lua:32: bad argument #2 to 'format' (number has no integer representation) Hans' luacode seem not to change the resolution of the pictures at all. It works, the size of the pictures get smaller but the resolution remains the same. Greetings Lutz Am 15. Februar 2019 08:25:35 MEZ schrieb Marco Patzer : >On Fri, 15 Feb 2019 07:56:31 +0100 >Lutz Haseloff wrote: > >> First i tried the grph-downsample.lua script. >> Unfortunately i get an error message >> grph-downsample.lua:31: bad argument #2 to 'format' (number has no >> integer representation) See attached log file. > >I remember that error. The script worked up to a particular context >version. I believe a Lua upgrade broke it. The version attached >should work. > >Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___