ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* (announcement) from pandoc to ConTeXt
@ 2015-07-09 16:32 Pablo Rodriguez
  2015-07-09 17:05 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2015-07-09 16:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

this is a bit weird, because the vast majority of the list members are
way forward in the path of ConTeXt knowledge than myself.

But just in case you were interested, I created an environment to
typeset XHTML generated by pandoc with ConTeXt MkIV.

Here you have the websites:

  http://www.from-pandoc-to-context.tk
  https://github.com/ousia/from-pandoc-to-context

Just in case it might help to anyone.

Many thanks to Hans for his help explaining the XML interface to ConTeXt
MkIV.


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (announcement) from pandoc to ConTeXt
  2015-07-09 16:32 (announcement) from pandoc to ConTeXt Pablo Rodriguez
@ 2015-07-09 17:05 ` Wolfgang Schuster
  2015-07-10 17:10   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2015-07-09 17:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1341 bytes --]


> Pablo Rodriguez <mailto:oinos@gmx.es>
> 9. Juli 2015 18:32
> Dear list,
>
> this is a bit weird, because the vast majority of the list members are
> way forward in the path of ConTeXt knowledge than myself.
>
> But just in case you were interested, I created an environment to
> typeset XHTML generated by pandoc with ConTeXt MkIV.
>
> Here you have the websites:
>
> http://www.from-pandoc-to-context.tk
> https://github.com/ousia/from-pandoc-to-context

Just a few comments on your code.

1. When you use \vfill at the begin of a makeup environment you don’t 
need \mbox and a ConTeXt user would use \dontleavehmode instead of \mbox.

2. To create a language dependant header for the TOC etc. you can use 
the \headtext command, e.g.

     \title{\headtext{content}}
     \placelist[part,chapter]

3. Be careful when you use _ in command names, e.g. \TOC_Title because 
it your case you created the command \TOC followed by the string “_Title”.

4. Better use \crlf to force a line break for the <br/> tag because \\ 
can produce different results depending in the environment.

5. Use \define[2]\... or \unexpanded\def\... to create your \href command.

6. ConTeXt already has a \url command.

7. Your \url command has two font changes (\tt and \hw) and one should 
be removed.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2579 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (announcement) from pandoc to ConTeXt
  2015-07-09 17:05 ` Wolfgang Schuster
@ 2015-07-10 17:10   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2015-07-10 17:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 07/09/2015 07:05 PM, Wolfgang Schuster wrote:
> 
>> Pablo Rodriguez
>> 9. Juli 2015 18:32
>> [...]
>> Here you have the websites:
>>
>> http://www.from-pandoc-to-context.tk
>> https://github.com/ousia/from-pandoc-to-context
> 
> Just a few comments on your code.

Many thanks for your comments, Wolfgang. I really appreciate your help.

Many thanks for all the improvements. The original code only shows my
ignorance related to ConTeXt matters :-).

> 5. Use \define[2]\... or \unexpanded\def\... to create your \href command.

Sorry, but I don’t get it. Why do I need expansion when having more than
one arguments?

BTW, it isn’t clear to me what expansion may be.

> 6. ConTeXt already has a \url command.

To avoid name clashes, I replaced the command with \mypersonalurl.

> 7. Your \url command has two font changes (\tt and \hw) and one should
> be removed.

Yes, but this is the workaround that came to my mind to solve the
following scenario: I may want to a special mono typeface only for urls.
This mono typeface would be different from the general mono font.

The problem when using \setupbodyfont or \switchtobodyfont is that it
doesn’t work with other sizes than the default one.

This sample shows the issue:

    \definefontfamily
        [anothermono]
        [ss]
        [DejaVu Sans Mono]

    \starttext
    \tfxx smaller text with \anothermono\ss second mono.
    \stoptext

Either I define the handwriting or calligraphy font for the same font
family, or I get wrong sizes when using other than the default.

Is this a bug or is my approach wrong?

BTW, if you allow me a question, I’d be very interested in setting up a
\hiddentitle that adds no extra vertical space (I need the \hiddentitle
to be displayed in the PDF bookmarks).

    \setupinteraction[state=start]
    \placebookmarks[chapter,hiddentitle]
    \definehead[hiddentitle][chapter]
    \setuphead
        [hiddentitle]
        [placehead=empty,
         incrementnumber=list,
         number=no,
         before=,
         after=]
    \starttext
         \completecontent
         \startmakeup[copyright][top=]
         \hiddentitle{[Copyright]}
         This document is released to the public...
         \stopmakeup
         \chapter{Foreword}
         aa
         \chapter{Introduction}
    \stoptext

I need to have no space inserted by \hiddentitle. Otherwise, vertical
spacing in makeups won’t work.

Many thanks for your help again,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-10 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-09 16:32 (announcement) from pandoc to ConTeXt Pablo Rodriguez
2015-07-09 17:05 ` Wolfgang Schuster
2015-07-10 17:10   ` Pablo Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).