Re: [NTG-context] issue attaching remote files

2019-11-04 Thread Pablo Rodriguez
On 11/4/19 7:02 PM, Hans Hagen wrote:
> On 11/4/2019 6:26 PM, Pablo Rodriguez wrote:
>> [...]
>> Would it be possible that ConTeXt could handle the second address with
>> parentheses to attach the file to a PDF document?
>
> hm i see both files in the cache (under trees)
>
> i also see both embedded

I tested this on a Windows 64bit machine and both files are embedded
(with MkIV and LMTX).

I have tested it again in Linux 64bit with brand new MkIV and LMTX
installations and only a file is embedded.

I don’t know what may be the difference here between Linux and Windows.

> btw these are weird files (1) pdf 1.4 which afaik doesn't permit tags,
> (2) imo invalid object references are used, (3) the files are pretty
> inefficient, and let's not talk about how bad they look (ok, that is of
> course subjective, but still ... a kind of braindead job for tex to
> generate such files)

I’m afraid that outside the TeX world having a PDF file that reflects
what is displayed on screen is enough for most of the users.

Many thanks for your help,

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

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


Re: [NTG-context] Formatting in the toc

2019-11-04 Thread Henning Hraban Ramm
I’d suggest to use something like (untested)

\startsubject[title={The Lord’s my Shepherd}][biblepart={Hymn 387}]

and

\setuphead[subject][command=\MyBibleSection]

\define[2]\MyBibleSection{{\bf #1}\hfill{\it\structureuservariable{biblepart}}}

You’d need to setup your ToC useing \structurelistuservariable,
similar to https://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD


> Am 2019-11-04 um 22:07 schrieb Calum MacLeod :
> 
> In the body of document, I often have a heading such as this:
> 
> \subject{{\bf Hymn 387} \hfill {\it The Lord's my Shepherd}}
> 
> When it arrives in the Table of Contents, the bold and italic have been 
> stripped off.
> 
> My question is: How do I copy to ToC the formatting as well as the content of 
> the text?
> 
> I would be grateful for an answer, or to be pointed to where I could learn 
> more. 
> 
> Thanks in advance,
> Calum MacLeod
> ___
> 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
___


[NTG-context] Formatting in the toc

2019-11-04 Thread Calum MacLeod
In the body of document, I often have a heading such as this:

\subject{{\bf Hymn 387} \hfill {\it The Lord's my Shepherd}}

When it arrives in the Table of Contents, the bold and italic have been
stripped off.

My question is: How do I copy to ToC the formatting as well as the content
of the text?

I would be grateful for an answer, or to be pointed to where I could learn
more.

Thanks in advance,
Calum MacLeod
___
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] Issue with text running into footnotes

2019-11-04 Thread Wolfgang Schuster

Otared Kavian schrieb am 04.11.2019 um 20:30:

Hi all,

I have a lecture note in which a few footnotes are given, but in some 
cases the text runs into the footnote, and it has been impossible for 
me to exhibit a minimal example where the issue appears. In the link

https://www.dropbox.com/s/o9h0j6i21emyw2v/footnote-issue.pdf?dl=0
the issue is shown in the real case. If I remove a few lines of text 
before the last paragraph on th tepage shown in the above link, the 
issue disappears, but of course this is not a solution.


I am aware that overuse of footnotes is not recommended, but in my 
lecture notes I have very few of them.
Is there a way to prevent such conflicts between footnotes and the 
last lines of text on a page?


You can increase the vertical tolerance, e.g.

    \setuptolerance[vertical,verytolerant]

change the penalty settings or use a bigger whitespace between the 
paragraphs.


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
___


[NTG-context] Issue with text running into footnotes

2019-11-04 Thread Otared Kavian
Hi all,

I have a lecture note in which a few footnotes are given, but in some cases the 
text runs into the footnote, and it has been impossible for me to exhibit a 
minimal example where the issue appears. In the link
https://www.dropbox.com/s/o9h0j6i21emyw2v/footnote-issue.pdf?dl=0 

the issue is shown in the real case. If I remove a few lines of text before the 
last paragraph on th tepage shown in the above link, the issue disappears, but 
of course this is not a solution.

I am aware that overuse of footnotes is not recommended, but in my lecture 
notes I have very few of them.
Is there a way to prevent such conflicts between footnotes and the last lines 
of text on a page?

Many thanks in advance: OK___
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] issue attaching remote files

2019-11-04 Thread Hans Hagen

On 11/4/2019 6:26 PM, Pablo Rodriguez wrote:

Hi Hans,

I have the following sample:

 \setupinteraction[state=start]
 \starttext
 \startTEXpage[offset=1em]
 \attachment
 [file={https://eur-lex.europa.eu/legal-content/%
 ES/TXT/PDF/?uri=CELEX:02010L0040-20180109},
  name=one.pdf,
  color=orange]
 \attachment
 [file={https://eur-lex.europa.eu/legal-content/%
 ES/TXT/PDF/?uri=CELEX:52011DC0144R(02)},
  name=two.pdf,
  color=magenta]
 \stopTEXpage
 \stoptext

Because of the parentheses in the file address, the second file isn’t
attached, due to the use of parentheses (sorry, but I cannot avoid this
in their address).

curl is also unable to download the second file unless an output name is
specified (with --output or -o).

Would it be possible that ConTeXt could handle the second address with
parentheses to attach the file to a PDF document?

hm i see both files in the cache (under trees)

i also see both embedded

btw these are weird files (1) pdf 1.4 which afaik doesn't permit tags, 
(2) imo invalid object references are used, (3) the files are pretty 
inefficient, and let's not talk about how bad they look (ok, that is of 
course subjective, but still ... a kind of braindead job for tex to 
generate such files)


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] Strange error with combination of itemization, footnote and \crlf

2019-11-04 Thread Pablo Rodriguez
On 10/31/19 11:43 AM, cont...@vivaldi.net wrote:
> Hello Hans,
>
> when do you plan to release next beta for ConTeXt with the fixed issue
> spoken bellow?

Hi Lukas,

I compile your minimal sample using any of these:

  LuaTeX 1.11 7215 + ConTeXt MkIV 2019.10.29 15:00
  LuaTeX 2.00 20190729 + ConTeXt MkIV 2019.10.28 18:57

Does none of them work for you?

Just in case it helps,

Pablo


> On 2019-10-22 23:54, Hans Hagen wrote:
>> On 10/22/2019 2:16 PM, cont...@vivaldi.net wrote:
>>> Hello,
>>>
>>> here is a minimal sample which doesn't compile:
>>>
>>> 
>>> \starttext
>>>    \startitemize
>>>      \item
>>>    A\footnote{%
>>>      B
>>>      \startitemize
>>>    \item C
>>>      \stopitemize
>>>    }\crlf
>>>    D
>>>
>>>      \item E %  This sample compiles when this line is commented
>>> (?!)
>>>    \stopitemize
>>> \stoptext
>>> 
>>>
>>> The error message is:
>>>
>>> "
>>> ...
>>> ...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465:
>>> attempt to index a nil value (local 'd')
>>>
>>>   2   \startitemize
>>>   3 \item
>>>   4   A\footnote{%
>>>   5 B
>>>   6 \startitemize
>>>   7   \item C
>>>   8 \stopitemize
>>>   9   }\crlf
>>> 10   D
>>> 11
>>> 12 >>  \item E %  This sample compiles when this line is
>>> commented
>>> 13   \stopitemize
>>> 14 \stoptext
>>> 15
>>> "
>>>
>>> When the "\item E" is commented, the sample compiles successfully.
>>>
>>> ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt:
>>> 2019.10.16  int: english/english".
>>>
>>> Any idea what's going wrong?
>> side effect of recent attempt to deal with nesting ... fixed in next
>> beta
>>
>> -
>>   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
> ___
>


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


[NTG-context] issue attaching remote files

2019-11-04 Thread Pablo Rodriguez
Hi Hans,

I have the following sample:

\setupinteraction[state=start]
\starttext
\startTEXpage[offset=1em]
\attachment
[file={https://eur-lex.europa.eu/legal-content/%
ES/TXT/PDF/?uri=CELEX:02010L0040-20180109},
 name=one.pdf,
 color=orange]
\attachment
[file={https://eur-lex.europa.eu/legal-content/%
ES/TXT/PDF/?uri=CELEX:52011DC0144R(02)},
 name=two.pdf,
 color=magenta]
\stopTEXpage
\stoptext

Because of the parentheses in the file address, the second file isn’t
attached, due to the use of parentheses (sorry, but I cannot avoid this
in their address).

curl is also unable to download the second file unless an output name is
specified (with --output or -o).

Would it be possible that ConTeXt could handle the second address with
parentheses to attach the file to a PDF document?

Many thanks for your help,

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

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


Re: [NTG-context] ASCII mode within \footnote

2019-11-04 Thread Wolfgang Schuster

Aditya Mahajan schrieb am 04.11.2019 um 15:05:

On Mon, 4 Nov 2019, Aditya Mahajan wrote:

That should have been:


As Hans' mentioned, use:

\startasciimode
\footnote{\type{%APPDATA%\file.txt}}
\stopasciimode


In a longer document setting \asciimode at the begin can be the better 
solution.


The reason why setting \asciimode in the \footnote doesn't work is that 
TeX uses
uses the meaning of a special character it had when it read the 
argument, i.e.
when TeX reads the text "%APPDATA%\file.txt" the percent sign acts as 
begin of
a comment and everything after it is ignored. As a result the asciimode 
command

can't work because the text has already disappeared.

Other characters like $ are less problematic because there are ways to 
change
their meaning afterwards (# can be tricky) but not comments because 
nothing remains.


\setupbuffer
  [before=\blank,
   after=\blank]

\starttext

Normal comment:

\startbuffer
    % comment
\stopbuffer

\typebuffer \getbuffer

Comment in \type{asciimode} environment:

\startbuffer
    \startasciimode
    % comment
    \stopasciimode
\stopbuffer

\typebuffer \getbuffer

Comment in the argument of a command:

\startbuffer
    \firstofoneargument
    {
    % comment
    }
\stopbuffer

\typebuffer \getbuffer

Comment in the argument of a command + \type{asciimode} in the argument:

\startbuffer
    \firstofoneargument
    {
    \startasciimode
    % comment
    \stopasciimode
    }
\stopbuffer

\typebuffer \getbuffer

Comment in a argument after \type{asciimode} was enabled:

\startbuffer
    \startasciimode
    \firstofoneargument
    {
    % comment
    }
    \stopasciimode
\stopbuffer

\typebuffer \getbuffer

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


Re: [NTG-context] ASCII mode within \footnote

2019-11-04 Thread Aditya Mahajan

On Mon, 4 Nov 2019, Aditya Mahajan wrote:

That should have been:


As Hans' mentioned, use:

\startasciimode
\footnote{\type{%APPDATA%\file.txt}}
\stopasciimode


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] ASCII mode within \footnote

2019-11-04 Thread Aditya Mahajan

On Mon, 4 Nov 2019, cont...@vivaldi.net wrote:


Hello Aditia,

thanks for reaction.

I simply want to write "%APPDATA%\file.txt" and the same into the 
footnote, with ability to use the text "%APPDATA%\file.txt" without any 
substitution (like "%" -> "\letterpercent") - if possible.


My attepmts with \text or \asciimode fail:


\starttext
  \type{%APPDATA%\file.txt}
  \footnote{%
%\type{%APPDATA%\file.txt}
%\asciimode{%APPDATA%\file.txt}
  }
\stoptext


Even plays with

  %\catcode\commentasciicode=\othercatcode
  %\catcode\backslashasciicode=\othercatcode

don't give the desired result.

So - is there a simple way how to get strings with "%" and "\" (which 
represent a path on Windows) into footnote?


As Hans' mentioned, use:

\startasciicode
\footnote{\type{%APPDATA%\file.txt}}
\stopasciicode

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] ASCII mode within \footnote

2019-11-04 Thread context

Hello Aditia,

thanks for reaction.

I simply want to write "%APPDATA%\file.txt" and the same into the 
footnote, with ability to use the text "%APPDATA%\file.txt" without any 
substitution (like "%" -> "\letterpercent") - if possible.


My attepmts with \text or \asciimode fail:


\starttext
  \type{%APPDATA%\file.txt}
  \footnote{%
%\type{%APPDATA%\file.txt}
%\asciimode{%APPDATA%\file.txt}
  }
\stoptext


Even plays with

  %\catcode\commentasciicode=\othercatcode
  %\catcode\backslashasciicode=\othercatcode

don't give the desired result.

So - is there a simple way how to get strings with "%" and "\" (which 
represent a path on Windows) into footnote?


Best regards,

Lukas


On 2019-11-02 16:35, Aditya Mahajan wrote:


Why not just use asciimode?

To understand why \footnote{\type{...}}} doesn't work, you need to
understand TeX's "digestive system". \type{...} (and asciimode) work
by modifying the catcode tables. However, they are are used inside a
footnote, the argument of \footnote is parsed according to the catcode
table which is active when footnote is passed. Under the default
catcode table, % is a comment, so when you type:

\footnote{\type{*\$%
}}

the argument of \footnote is `\type{*\$}`

So, if you want \footnote to "see" the %, you need to activate a
catcode table where % is a letter. So, the simplest solution is to use
\asciimode.

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
___