Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Sorry, I took your message for irony.
Should have read your blog posts to know better.

Hraban

> Am 28.04.2020 um 18:07 schrieb Henning Hraban Ramm :
> 
> Don’t forget, what’s already included in ConTeXt:
> 
> \usemodule[visual]
> \useMPlibrary[dum]
> 
> \starttext
> \simplethesis
> \stoptext
> 
> 
> 
>> Am 28.04.2020 um 17:33 schrieb Thangalin :
>> 
>> Jan-Erik, after you have installed all the required software (and
>> fonts!) and unzipped the book.zip and themes.zip archives, you can
>> build a book using:
>> 
>> cd $HOME/dev/writing/book
>> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
>> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
>> 
>> This is noted at the bottom of the preamble section.
>> 
>> Enjoy!
>> 
>> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>>  wrote:
>>> 
>>> Is there a running example ? I’m not sure how to fill in the commandline
>>> 
>>> 
>>> 
>>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>>> 
>>> Yes, the naming is completely up to you.
>>> 
>>> I use:
>>> 
>>> project_something.tex
>>> env_something.tex
>>> prd_oneissue.tex
>>> c_onechapter.tex
>>> 
>>> That’s also what my script supports as default:
>>> https://github.com/fiee/tools/blob/master/contextproject.py
>>> 
> 
> ___
> 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
> ___

___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Hi Jan,

> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Download "themes.zip" from the blog post. It shows some naming
conventions and relationships between projects, products,
environments, and components.

> books. What I am looking for is a script to extract all XML tags/tokens
> from their files to have a complete list of things that should be
> handled in a ConTeXt style file. Five years ago I tried to create such a
> style file by hand, but I gave up.

XSL was designed specifically to parse XML. ConTeXt has facilities for
mapping XML tokens, as you've used. Depending on the complexity of
what you're trying to accomplish, take a look at "book.zip" from the
blog post. Inside you'll find "se2md.xsl"; a similar approach could
work for TEI: put the complexity of parsing TEI into XSL, then use
ConTeXt to typeset the resulting 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm
Don’t forget, what’s already included in ConTeXt:

\usemodule[visual]
\useMPlibrary[dum]

\starttext
\simplethesis
\stoptext



> Am 28.04.2020 um 17:33 schrieb Thangalin :
> 
> Jan-Erik, after you have installed all the required software (and
> fonts!) and unzipped the book.zip and themes.zip archives, you can
> build a book using:
> 
> cd $HOME/dev/writing/book
> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
> 
> This is noted at the bottom of the preamble section.
> 
> Enjoy!
> 
> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>  wrote:
>> 
>> Is there a running example ? I’m not sure how to fill in the commandline
>> 
>> 
>> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py
>> 

___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan-Erik Hägglöf
Perfect, I will get in to it.

Many thanks and Best wishes, Janne

> 28 apr. 2020 kl. 17:33 skrev Thangalin :
> 
> Jan-Erik, after you have installed all the required software (and
> fonts!) and unzipped the book.zip and themes.zip archives, you can
> build a book using:
> 
> cd $HOME/dev/writing/book
> ./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
> -b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde
> 
> This is noted at the bottom of the preamble section.
> 
> Enjoy!
> 
> On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
>  wrote:
>> 
>> Is there a running example ? I’m not sure how to fill in the commandline
>> 
>> 
>> 
>> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>> 
>> Yes, the naming is completely up to you.
>> 
>> I use:
>> 
>> project_something.tex
>> env_something.tex
>> prd_oneissue.tex
>> c_onechapter.tex
>> 
>> That’s also what my script supports as default:
>> https://github.com/fiee/tools/blob/master/contextproject.py
>> 
>> 
>> ___
>> 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
>> ___
> ___
> 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
> ___

___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Thangalin
Jan-Erik, after you have installed all the required software (and
fonts!) and unzipped the book.zip and themes.zip archives, you can
build a book using:

cd $HOME/dev/writing/book
./build -V -c -y -i jekyll-hyde -d standard-ebooks/jekyll-hyde \
-b robert-louis-stevenson_the-strange-case-of-dr-jekyll-and-mr-hyde

This is noted at the bottom of the preamble section.

Enjoy!

On Tue, Apr 28, 2020 at 7:12 AM Jan-Erik Hägglöf
 wrote:
>
> Is there a running example ? I’m not sure how to fill in the commandline
>
>
>
> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
>
> Yes, the naming is completely up to you.
>
> I use:
>
> project_something.tex
> env_something.tex
> prd_oneissue.tex
> c_onechapter.tex
>
> That’s also what my script supports as default:
> https://github.com/fiee/tools/blob/master/contextproject.py
>
>
> ___
> 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
> ___
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan-Erik Hägglöf
Is there a running example ? I’m not sure how to fill in the commandline



> 28 apr. 2020 kl. 09:33 skrev Henning Hraban Ramm :
> 
> Yes, the naming is completely up to you.
> 
> I use:
> 
> project_something.tex
> env_something.tex
> prd_oneissue.tex
> c_onechapter.tex
> 
> That’s also what my script supports as default:
> https://github.com/fiee/tools/blob/master/contextproject.py 
> 
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan U. Hasecke
Am 28.04.20 um 10:35 schrieb Saša Janiška:
> On Tue, 28 Apr 2020 08:32:57 +0200
> "Jan U. Hasecke"  wrote:
> 
>> 3. Being a writer I think that Markdown --> ConTeXt is the best way to
>> achieve what I want: easy writing and professional looking books. 
> 
> I've the same opinion!
> 
>> Up to now I used Pablos way via pandoc and XHTML described here:
>> http://www.from-pandoc-to-context.tk/
> 
> What do you use now?

Oh I still use it. But Daves posts might offer an alternative for me.

>> The problem with pandoc is that it does not generate a perfect ConTeXt
>> source to build the file as some things are missing.
> 
> You mean Pablos pandoc --> from-pandoc-to-context or

Yes.

juh


___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Saša Janiška
On Tue, 28 Apr 2020 08:32:57 +0200
"Jan U. Hasecke"  wrote:

> 3. Being a writer I think that Markdown --> ConTeXt is the best way to
> achieve what I want: easy writing and professional looking books. 

I've the same opinion!

> Up to now I used Pablos way via pandoc and XHTML described here:
> http://www.from-pandoc-to-context.tk/

What do you use now?

> The problem with pandoc is that it does not generate a perfect ConTeXt
> source to build the file as some things are missing.

You mean Pablos pandoc --> from-pandoc-to-context or

direct pandoc --> ConTeXt export ?


Sincerely,
Gour

-- 
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.


___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Henning Hraban Ramm


> Am 28.04.2020 um 08:32 schrieb Jan U. Hasecke :
> 
> 1. Nameing and organizing the project, product and environments files. I
> am currently reorganising the files for my cooperative. I think that
> besides some nameing conventions it is more or less up to me how I
> organise our print work. Any recommendations welcome.

Yes, the naming is completely up to you.

I use:

project_something.tex
env_something.tex
prd_oneissue.tex
c_onechapter.tex

That’s also what my script supports as default:
https://github.com/fiee/tools/blob/master/contextproject.py

Probably I should switch to .mkiv extensions, since I also have LaTeX projects 
now.


> 2. The "Deutsches Text Archiv" has prepared a text corpus of German
> texts up to 1900 in TEI PS XML, so we could use them directly to typeset
> books.
...
> The tokens/tags differ from text to text and I think the structure too
> so that it was beyond my knowledge to generate a general style file for
> all texts.

And it’s probably impossible. Like with HTML and ePub export, the mapping of 
structures is very individual.


Best, Hraban
___
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] Typesetting Markdown - Part 8

2020-04-28 Thread Jan U. Hasecke
Hi Dave,

Am 28.04.20 um 04:00 schrieb Thangalin:
> Hi folks!
> 
> Second last part in the series. The project, product, component, and
> environment relations were a bit finicky. Those willing to point out
> improvements that can be made---Hans, Taco, Wolfgang, Aditya, and
> others---would be very much appreciated.
> 
> Specifically, it seems that some project environment settings can be
> overruled inside products, but other project settings cannot. It's not
> really clear to me whether this is due to dependency order or that
> definitions cannot be redefined across environments. Thoughts?
> 
> https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/

thank you very much. I really appreciate your series. There is so much
in it that suits to my needs that I have to read it carefully later. But
I have some short remarks anyway.

Some topics are especially of interest to me:

1. Nameing and organizing the project, product and environments files. I
am currently reorganising the files for my cooperative. I think that
besides some nameing conventions it is more or less up to me how I
organise our print work. Any recommendations welcome.

2. The "Deutsches Text Archiv" has prepared a text corpus of German
texts up to 1900 in TEI PS XML, so we could use them directly to typeset
books. What I am looking for is a script to extract all XML tags/tokens
from their files to have a complete list of things that should be
handled in a ConTeXt style file. Five years ago I tried to create such a
style file by hand, but I gave up.

https://github.com/juh2/tei-style-dta-context

The tokens/tags differ from text to text and I think the structure too
so that it was beyond my knowledge to generate a general style file for
all texts.

3. Being a writer I think that Markdown --> ConTeXt is the best way to
achieve what I want: easy writing and professional looking books. Up to
now I used Pablos way via pandoc and XHTML described here:
http://www.from-pandoc-to-context.tk/

The problem with pandoc is that it does not generate a perfect ConTeXt
source to build the file as some things are missing.

Annotations and eg. your classify.lua might be a second approach to
achieve what I want.

So thanks a lot for your work.

@all: Feel free to comment on my three topics any hints are welcome.

Ciao!
juh
___
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] Typesetting Markdown – Part 5: Interpolation

2019-07-09 Thread Andres Conrado
Thank you. I still don't really understand why can't you have a
"presentational" yaml file and a "content" yaml file (I do it like that...
I have a "variables.yaml" file for content and a "settings.yaml" file for
presentational stuff, and use a "template.context" file with all my mapped
variables within the ConTeXt code, and compile everything using pandoc).
But I guess you want to do it this way. Or maybe I'm not really
understanding your process. It's quite interesting in any case, and I'm
learning a lot. Thanks for sharing.

Andrés Conrado Montoya
http://chiquitico.org
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown – Part 5: Interpolation

2019-07-09 Thread Thangalin
That's another intriguing approach, Andrés, thank you.

The approach faces some hurdles. First, the template file (main.tex) is
written in ConTeXt, so it never sees the YAML variables, nor can it be used
to interpret pandoc's conditional expressions. Second, moving the
\completecontent macro out of main.tex and into Markdown (e.g., 01.md,
being the first chapter) so that the conditional expression can be
evaluated using pandoc mixes content with presentation logic.

Modes are a good approach in this case because the "context" command can
take a "mode" command-line argument. This provides presentation controls
that neither the YAML nor the Markdown need consider. Adding presentation
logic to the ConTeXt template (i.e., introducing \startmode and
\startnotmode into main.tex) is acceptable because ConTeXt is wholly
responsible for the appearance of the final document. See:
https://wiki.contextgarden.net/Modes

This then allows development of command-line arguments from shell scripts
to control how the document is presented when built, which is a little bit
more flexible than maintaining YAML variables. Also, ideally, the YAML
variables would be used for controlling only content, not presentation
logic.

Thanks again, Andrés.

On Mon, Jul 8, 2019 at 11:27 AM Andres Conrado 
wrote:

> You can do it on the template... you can use a yaml variable to determine
> if the toc should be printed or not. Like so:
>
> yaml file:
> ---
> toc: true
> ...
>
> template file:
> %%%
> $if(toc)$
> \completecontent
> $endif$
> %%%
>
>
> Andrés Conrado Montoya
> http://chiquitico.org
>
>
> El lun., 8 jul. 2019 a las 2:52,  escribió:
>
>> Send ntg-context mailing list submissions to
>> ntg-context@ntg.nl
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>> ntg-context-requ...@ntg.nl
>>
>> You can reach the person managing the list at
>> ntg-context-ow...@ntg.nl
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>>
>>
>> Today's Topics:
>>
>>1. Re:  Typesetting Markdown – Part 5: Interpolation
>>   (Aditya Mahajan)
>>2. Re:  Typesetting Markdown – Part 5: Interpolation (Thangalin)
>>3. Re:  Typesetting Markdown – Part 5: Interpolation
>>   (Aditya Mahajan)
>>4. request for \definefontfamily and \definefallbackfamily
>>   (Pablo Rodriguez)
>>5. Re: crappy names in the fontloader (Hans Hagen)
>>6. problems with images, layers and crop marks (Henning Hraban Ramm)
>>7. Re: problems with images, layers and crop marks (Hans Hagen)
>>
>>
>> --
>>
>> Message: 1
>> Date: Sun, 7 Jul 2019 10:17:31 -0400 (EDT)
>> From: Aditya Mahajan 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
>> Interpolation
>> Message-ID: 
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> On Sat, 6 Jul 2019, Thangalin wrote:
>>
>> > Hello again!
>> >
>> > This part of the series describes how to reference *interpolated*
>> strings
>> > inside Markdown documents.
>> > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
>> >
>> > There's a section at the end about eliminating the table of contents
>> from a
>> > reusable document template. I would have preferred using setups, rather
>> > than redefining the \completecontent macro, but didn't see an obvious
>> way
>> > to do so.
>>
>> Why not simply omit \compltecontent from the pandoc template?
>>
>> Aditya
>>
>>
>>
>> --
>>
>> Message: 2
>> Date: Sun, 7 Jul 2019 11:58:12 -0700
>> From: Thangalin 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
>> Interpolation
>> Message-ID:
>> > g...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Thank you Aditya.
>>
>> The main.tex file is meant to be reusable for different document styles.
>> By
>> removing \completecontent altogether from the main template, it would
>> preclude a different document from reusing the main.tex template with a
>> table of contents. I'd like the template to be "re

Re: [NTG-context] Typesetting Markdown – Part 5: Interpolation

2019-07-08 Thread Andres Conrado
You can do it on the template... you can use a yaml variable to determine
if the toc should be printed or not. Like so:

yaml file:
---
toc: true
...

template file:
%%%
$if(toc)$
\completecontent
$endif$
%%%


Andrés Conrado Montoya
http://chiquitico.org


El lun., 8 jul. 2019 a las 2:52,  escribió:

> Send ntg-context mailing list submissions to
> ntg-context@ntg.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> ntg-context-requ...@ntg.nl
>
> You can reach the person managing the list at
> ntg-context-ow...@ntg.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
>
>
> Today's Topics:
>
>1. Re:  Typesetting Markdown – Part 5: Interpolation
>   (Aditya Mahajan)
>2. Re:  Typesetting Markdown – Part 5: Interpolation (Thangalin)
>3. Re:  Typesetting Markdown – Part 5: Interpolation
>   (Aditya Mahajan)
>4. request for \definefontfamily and \definefallbackfamily
>   (Pablo Rodriguez)
>5. Re: crappy names in the fontloader (Hans Hagen)
>6. problems with images, layers and crop marks (Henning Hraban Ramm)
>7. Re: problems with images, layers and crop marks (Hans Hagen)
>
>
> --
>
> Message: 1
> Date: Sun, 7 Jul 2019 10:17:31 -0400 (EDT)
> From: Aditya Mahajan 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
> Interpolation
> Message-ID: 
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Sat, 6 Jul 2019, Thangalin wrote:
>
> > Hello again!
> >
> > This part of the series describes how to reference *interpolated* strings
> > inside Markdown documents.
> > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
> >
> > There's a section at the end about eliminating the table of contents
> from a
> > reusable document template. I would have preferred using setups, rather
> > than redefining the \completecontent macro, but didn't see an obvious way
> > to do so.
>
> Why not simply omit \compltecontent from the pandoc template?
>
> Aditya
>
>
>
> --
>
> Message: 2
> Date: Sun, 7 Jul 2019 11:58:12 -0700
> From: Thangalin 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
> Interpolation
> Message-ID:
>  g...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Thank you Aditya.
>
> The main.tex file is meant to be reusable for different document styles. By
> removing \completecontent altogether from the main template, it would
> preclude a different document from reusing the main.tex template with a
> table of contents. I'd like the template to be "reusable"; making
> modifications to "main.tex" --- or creating a copy --- would subvert that
> goal.
>
> On Sun, Jul 7, 2019 at 7:17 AM Aditya Mahajan  wrote:
>
> > On Sat, 6 Jul 2019, Thangalin wrote:
> >
> > > Hello again!
> > >
> > > This part of the series describes how to reference *interpolated*
> strings
> > > inside Markdown documents.
> > > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
> > >
> > > There's a section at the end about eliminating the table of contents
> > from a
> > > reusable document template. I would have preferred using setups, rather
> > > than redefining the \completecontent macro, but didn't see an obvious
> way
> > > to do so.
> >
> > Why not simply omit \compltecontent from the pandoc template?
> >
> >
> >
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190707/25ca6215/attachment-0001.html
> >
>
> --
>
> Message: 3
> Date: Sun, 7 Jul 2019 15:17:50 -0400 (EDT)
> From: Aditya Mahajan 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context]  Typesetting Markdown – Part 5:
> Interpolation
> Message-ID: 
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
>
> On Sun, 7 Jul 2019, Thangalin wrote:
>
> > Thank you Aditya.
> >
> > The main.tex file is meant to be reusable for different document styles.
> By
> > removing \completecontent altogether from the main template, it would

Re: [NTG-context] Typesetting Markdown – Part 5: Interpolation

2019-07-08 Thread Thangalin
Thanks again for the great ideas. The downside is that it comes with a lot
of extra ConTeXt setup code. My understanding is that the toc parameter to
pandoc only works when creating a standalone document. I think
\def\completecontent\empty is a bit more expressive of intent than
\def\completecontent{}. Modes are probably the way to go, though.

Thank you.

On Sun, Jul 7, 2019 at 12:18 PM Aditya Mahajan  wrote:

>
> On Sun, 7 Jul 2019, Thangalin wrote:
>
> > Thank you Aditya.
> >
> > The main.tex file is meant to be reusable for different document styles.
> By
> > removing \completecontent altogether from the main template, it would
> > preclude a different document from reusing the main.tex template with a
> > table of contents. I'd like the template to be "reusable"; making
> > modifications to "main.tex" --- or creating a copy --- would subvert that
> > goal.
>
> Pandoc allows that. For example, see line 140 of the default context
> template:
>
> https://github.com/jgm/pandoc-templates/blob/master/default.context
>
> I don't remember the exact command line parameters for pandoc that set
> the toc flag to true.
>
> An equivalent method will be to control this using a ConTeXt mode.
> Redefining \completecontent to \empty seems too drastic.
>
> 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
>
> ___
>
___
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] Typesetting Markdown – Part 5: Interpolation

2019-07-07 Thread Aditya Mahajan


On Sun, 7 Jul 2019, Thangalin wrote:


Thank you Aditya.

The main.tex file is meant to be reusable for different document styles. By
removing \completecontent altogether from the main template, it would
preclude a different document from reusing the main.tex template with a
table of contents. I'd like the template to be "reusable"; making
modifications to "main.tex" --- or creating a copy --- would subvert that
goal.


Pandoc allows that. For example, see line 140 of the default context 
template:


https://github.com/jgm/pandoc-templates/blob/master/default.context

I don't remember the exact command line parameters for pandoc that set 
the toc flag to true.


An equivalent method will be to control this using a ConTeXt mode. 
Redefining \completecontent to \empty seems too drastic.


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] Typesetting Markdown – Part 5: Interpolation

2019-07-07 Thread Thangalin
Thank you Aditya.

The main.tex file is meant to be reusable for different document styles. By
removing \completecontent altogether from the main template, it would
preclude a different document from reusing the main.tex template with a
table of contents. I'd like the template to be "reusable"; making
modifications to "main.tex" --- or creating a copy --- would subvert that
goal.

On Sun, Jul 7, 2019 at 7:17 AM Aditya Mahajan  wrote:

> On Sat, 6 Jul 2019, Thangalin wrote:
>
> > Hello again!
> >
> > This part of the series describes how to reference *interpolated* strings
> > inside Markdown documents.
> > https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/
> >
> > There's a section at the end about eliminating the table of contents
> from a
> > reusable document template. I would have preferred using setups, rather
> > than redefining the \completecontent macro, but didn't see an obvious way
> > to do so.
>
> Why not simply omit \compltecontent from the pandoc template?
>
>
>
___
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] Typesetting Markdown – Part 5: Interpolation

2019-07-07 Thread Aditya Mahajan

On Sat, 6 Jul 2019, Thangalin wrote:


Hello again!

This part of the series describes how to reference *interpolated* strings
inside Markdown documents.
https://dave.autonoma.ca/blog/2019/07/06/typesetting-markdown-part-5/

There's a section at the end about eliminating the table of contents from a
reusable document template. I would have preferred using setups, rather
than redefining the \completecontent macro, but didn't see an obvious way
to do so.


Why not simply omit \compltecontent from the pandoc template?

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] Typesetting Markdown -- Part 3

2019-06-17 Thread Floris van Manen


On 17-06-19 19:31, Thangalin wrote:
> 
> Definitely. Part 4 will be about themes.

great !

.F


pEpkey.asc
Description: application/pgp-keys
___
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] Typesetting Markdown -- Part 3

2019-06-17 Thread Thangalin
> Maybe some instructions as how to adjust/redefine the pandoc output?

Please elaborate.

> e.g. how to include different style templates for ConTeXt.

Definitely. Part 4 will be about themes.

Thank you!
___
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] Typesetting Markdown -- Part 3

2019-06-17 Thread Floris van Manen


On 17-06-19 07:54, Thangalin wrote:
> Hi all!
> 
> The third part of the series describes a way to perform continuous
> integration when writing Markdown that is typeset using ConTeXt.
> 
> https://dave.autonoma.ca/blog/2019/06/16/typesetting-markdown-part-3/
> 
> Suggestions for improvement are welcome.
> 
> Thank you.

Very nice indeed.
Maybe some instructions as how to adjust/redefine the pandoc output?
e.g. how to include different style templates for ConTeXt.

.F


pEpkey.asc
Description: application/pgp-keys
___
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] Typesetting Markdown -- Part 2

2019-05-31 Thread Saša Janiška
David Nebauer  writes:

> https://github.com/Witiko/markdown is forked from
> https://github.com/jgm/lunamark. Github user "jgm" is John MacFarlane,
> the creator of pandoc, and pandoc itself is hosted on github under
> "jgm" as well: https://github.com/jgm/pandoc.
>
> So, it seems a good bet that https://github.com/Witiko/markdown
> supports pandoc markdown.

Well John MacFarlane is [here](https://commonmark.org/) as well. ;)


Sincerely,
Gour

-- 
While contemplating the objects of the senses, a person
develops attachment for them, and from such attachment lust
develops, and from lust anger arises.

___
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] Typesetting Markdown -- Part 2

2019-05-30 Thread Thangalin
>
> sense to check all these mappings onto context, for instance I think
> that pandoc uses \section and such while in fact it should use
> \startsectionlevel[title={}] ... \stopsectionlevel so that one can embed
> documents in other documents.
>

https://github.com/jgm/pandoc/issues/5539

Feel free to add comments to the issue.
___
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] Typesetting Markdown -- Part 2

2019-05-30 Thread David Nebauer

https://github.com/Witiko/markdown is forked from https://github.com/jgm/lunamark. Github user 
"jgm" is John MacFarlane, the creator of pandoc, and pandoc itself is hosted on github 
under "jgm" as well: https://github.com/jgm/pandoc.

So, it seems a good bet that https://github.com/Witiko/markdown supports pandoc 
markdown.

Regards,
David.

Excerpts from Saša Janiška's message of May 30, 2019 7:48 pm:

Hans Hagen  writes:


just test it and tell me what needs to be fixed / added


I'm looking at https://github.com/Witiko/markdown and wondering which
flavour of Markdown this package does support?

By reading https://github.com/Witiko/markdown/issues/25 it could mean it
could be Pandoc's one, but not sure?

___
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] Typesetting Markdown -- Part 2

2019-05-30 Thread Hans Hagen

On 5/30/2019 12:18 PM, Saša Janiška wrote:

Hans Hagen  writes:


just test it and tell me what needs to be fixed / added


I'm looking at https://github.com/Witiko/markdown and wondering which
flavour of Markdown this package does support?

By reading https://github.com/Witiko/markdown/issues/25 it could mean it
could be Pandoc's one, but not sure?
I don't know as I never use these coding methods. But it might make 
sense to check all these mappings onto context, for instance I think 
that pandoc uses \section and such while in fact it should use 
\startsectionlevel[title={}] ... \stopsectionlevel so that one can embed 
documents in other documents.


(An option is to look into mappings onto xml.)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown -- Part 2

2019-05-30 Thread Saša Janiška
Hans Hagen  writes:

> just test it and tell me what needs to be fixed / added

I'm looking at https://github.com/Witiko/markdown and wondering which
flavour of Markdown this package does support?

By reading https://github.com/Witiko/markdown/issues/25 it could mean it
could be Pandoc's one, but not sure?


Sincerely,
Gour

-- 
As the embodied soul continuously passes, in this body,
from boyhood to youth to old age, the soul similarly passes
into another body at death. A sober person is not bewildered
by such a change.

___
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] Typesetting Markdown -- Part 2

2019-05-30 Thread Hans Hagen

On 5/29/2019 11:54 PM, Thangalin wrote:

Hi all,

The second part describes how to create a PDF file from a Markdown file 
using pandoc and ConTeXt:


https://dave.autonoma.ca/blog/2019/05/29/typesetting-markdown-part-2/

If anyone has suggestions to improve the ConTeXt-related portions, 
please pass them along.


I've considered using ConTeXt's Markdown module, but I'm not sure how 
much of Pandoc's enhanced Markdown it supports.

just test it and tell me what needs to be fixed / added

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown

2019-05-26 Thread Pablo Rodriguez
On 5/25/19 9:54 PM, Thangalin wrote:
>[...]
> For the document language, Pandoc provides language variables:
>
> https://pandoc.org/MANUAL.html#language-variables
> [...]
> Intermixing languages is also possible, as per the above link.

As far as I can remember, neither of them were available when I wrote
that (for ConTeXt, I mean).

I think that TeX output is the main problem in the development of
pandoc, because XML is so different from TeX.

But this is another issue and it doesn’t belong here.

Looking forward to seeing your sources and your output documents!

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown

2019-05-25 Thread Thangalin
> For Markdown --> ConTeXt usage, math is not my primary concern, but
> wonder what do you think about the Pandoc's "cons" as stated on
> pandoc-xhtml site, iow:
>
> * Main document language information.
> * Markup for language in text portions.
> * Any  or  elements markup.
>

For the document language, Pandoc provides language variables:

https://pandoc.org/MANUAL.html#language-variables

I haven't tried it, so I don't know if it'll handle variations on quotes or
hyphenation, but that strikes me as more a presentation layer aspect than a
content aspect. That is, ConTeXt (or LaTeX), given a language, is
responsible for showing the correct representation; whereas, Markdown is
responsible for the prose.

Intermixing languages is also possible, as per the above link.

Lastly, the above link also shows how to mark up div elements. I'll cover
how to create inline images later in the series---it requires a little bit
of Lua, depending on the complexity of the problem. See:

https://pandoc.org/MANUAL.html#divs-and-spans

Cheers!
___
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] Typesetting Markdown

2019-05-25 Thread Pablo Rodriguez
On 5/24/19 5:37 AM, Thangalin wrote:
> Hi Gour,
>
> I added an abstract, an overview section with the plan, and an RSS feed:
>
> https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/
>
> One of the reasons I chose Pandoc's Markdown is for its support of
> classes and annotations. I looked into the pandoc-xhtml link and it
> looked both incomplete and lacking support for typesetting mathematics.

Hi Dave,

pandoc-xhtml is only a poor example about handling XML as input source.
I only use Markdown and pandoc, because they provide a limited way of
XML code easily.

The real thing is that you can feed ConTeXt with XML sources to typeset
what you want.

My use of XML typesetting is basic when compared to that of Hans, Taco,
Thomas Schmitz and Hans van der Meer.

Of course, other approaches are perfectly fine. My comment was only
about not focusing on pandoc-xhtml (which I should rewrite from scratch
when I find time for that), but on what makes it thick.

Just in case it helps,

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Typesetting Markdown

2019-05-24 Thread Saša Janiška
Thangalin  writes:

> I added an abstract, an overview section with the plan, and an RSS
> feed:

Thanks a lot - now it's much better seeing what is ahead of us. ;)

> One of the reasons I chose Pandoc's Markdown is for its support of
> classes and annotations.

I was not using Pandoc's markdown, so will have to check the docs in
regard.

> I looked into the pandoc-xhtml link and it looked both incomplete and
> lacking support for typesetting mathematics.

For Markdown --> ConTeXt usage, math is not my primary concern, but
wonder what do you think about the Pandoc's "cons" as stated on
pandoc-xhtml site, iow:

* Main document language information.

* Markup for language in text portions.

*  Any  or  elements markup.

> Have a read and let me know what you think!

See above. ;)


Sincerely,
Gour

-- 
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.

___
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] Typesetting Markdown

2019-05-23 Thread Thangalin
Hi Gour,

I added an abstract, an overview section with the plan, and an RSS feed:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/

One of the reasons I chose Pandoc's Markdown is for its support of classes
and annotations. I looked into the pandoc-xhtml link and it looked both
incomplete and lacking support for typesetting mathematics.

Have a read and let me know what you think!

Thank you for the feedback.
___
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] Typesetting Markdown

2019-05-23 Thread Saša Janiška
Thangalin  writes:

> I'm thinking about writing a series of blog posts about how to typeset
> Markdown using ConTeXt. I've written the first part and am wondering
> if anyone would be interested in reading more:

I'm interested for the topic, but it would be nice, imho, if the Part-1
would contain some kind of Abstract along with the TOC for the whole
series according to your plan?

Otoh, I still wonder which method to use for typesetting Markdown with
ConTeXt, iow. whether to use Mardkown module and/or filter or to go with
pandoc-xhtml (http://www.from-pandoc-to-context.tk/) method...

However, one thing is certain: (Pandoc's) Markdown seems easy and
good-enough for most of documents I plan to write, while ConTeXt is
without comparison when it comes to the quality of final output.


Sincerely,
Gour

-- 
From wherever the mind wanders due to its flickering and unsteady
nature, one must certainly withdraw it and bring it back under
the control of the self.

___
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] Typesetting Markdown

2019-05-22 Thread Jan U. Hasecke
Am 23.05.19 um 07:18 schrieb Thangalin:
> Hi folks!
> 
> I'm thinking about writing a series of blog posts about how to typeset
> Markdown using ConTeXt. I've written the first part and am wondering if
> anyone would be interested in reading more:
> 
> https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/
> 

That is interesting. Do you provide a RSS feed for your blog?

juh
___
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
___