[NTG-context] Title in margin example from the wiki not working?

2014-08-07 Thread Mica Semrick

Hello,

I'm trying to get the subject heading in the margin. I found this code on the 
wiki, but it is not compiling with the latest version of ConTeXt.

\setuppapersize[A5]
\setuphead
  [subject]
  [alternative=text,distance=0pt,command=\MyHead,style=\sc]

\def\MyHead#1#2{\inmargin{#1 #2}}

\starttext

\subject{First Subject}
\input weisman

\subject{Second Subject}
\input ward

\stoptext

from http://wiki.contextgarden.net/Titles#Titles_in_margin

The error being thrown is  ! Argument of \MyHead has an extra }

Please help!

Best,
Mica
___
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] Superscript Citation References

2014-08-07 Thread Thangalin
Hi,

I would like to cite bibliography references using a superscript font.
Here is the setup:

\setupbibtex[database=sources]
\setuppublications[
  refcommand=num,
  numbering=yes
]

\setupcite[num][
  left=\empty,
  right=\empty,
]

\starttext
  Citation.\cite[kattamuri@debate]
\stoptext

Here is an example entry in sources.bib:

@inproceedings{kattamuri@debate,
 author = {Kattamuri, Kishore and Silaghi, Marius and Kaner, Cem and
Stansifer, Ryan and Zanker, Markus},
 title = {Supporting Debates over Citizen Initiatives},
 booktitle = {Proceedings of the 2005 National Conference on Digital
Government Research},
 series = {dg.o '05},
 year = {2005},
 location = {Atlanta, Georgia},
 pages = {279--280},
 numpages = {2},
 url = 
{https://repository.lib.fit.edu/bitstream/handle/11141/150/cs-2005-03.pdf},
 acmid = {1065321},
 publisher = {Digital Government Society of North America},
}

I tried the following:

\setupcite[num][
  left=\empty,
  right=\empty,
  textstyle=\textsuperscript,
]

It did not work...

Any ideas?

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Hans will be offline for a few weeks

2014-08-07 Thread Taco Hoekwater
Hi all,

Just to let you know Hans will not be responding to any email messages for the 
next two weeks as unexpectedly, over the weekend he had immediate laser surgery 
to re-attach one of his retinas. 

   Everything will be fine, so do not panic! 

But, on doctors’ orders, he is not allowed to read for the next two weeks, to 
give the eye the best chance to heal properly. 

So: no email, no programming, and no leisure reading. Needless to say Hans is 
not very thrilled at the prospect but on the plus side, at the end of month the 
Pragma offices will be cleaner and more organised than ever !

Best wishes,
Taco


___
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] Hans will be offline for a few weeks

2014-08-07 Thread Joshua Krämer
My best wishes for a speedy recovery to Hans.
Joshua


___
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] Accessing the URL of \useURL (for putting URLs into footnotes)

2014-08-07 Thread Matthias Weber
Dear All,

for the printable version of a document I’d like to put the actual URLs into 
footnotes.
In other words, I’d like to replace

\setupinteraction [state=start]
\starttext

\useURL
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  [ConTeXtgarden]


\starttext

Look at the \from[garden]!

\stoptext

with

\setupinteraction [state=start]
\starttext

\useURL
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  
[ConTeXtgarden\footnote{\hyphenatedurl{http://wiki.contextgarden.net/Main_Page}}]


\starttext

Look at the \from[garden]!

\stoptext

To save me from retyping all the URLs, there must be some way to access the URL 
of garden instead of the display text so that
I could do something like


\def\myfrom[#1]{
\startmode[screen] 
\from[1]
\stopmode   
\startmode[print] 
\from[1]
\footnote{\hyphenatedurl{get the URL text  from \useURL instead 
of the display text}}
\stopmode
}

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] Accessing the URL of \useURL (for putting URLs into footnotes)

2014-08-07 Thread Wolfgang Schuster

Am 07.08.2014 um 12:26 schrieb Matthias Weber matwe...@indiana.edu:

 Dear All,
 
 for the printable version of a document I’d like to put the actual URLs into 
 footnotes.
 In other words, I’d like to replace
 
 \setupinteraction [state=start]
 \starttext
 
 \useURL
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  [ConTeXtgarden]
 
 
 \starttext
 
 Look at the \from[garden]!
 
 \stoptext
 
 with
 
 \setupinteraction [state=start]
 \starttext
 
 \useURL
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  
 [ConTeXtgarden\footnote{\hyphenatedurl{http://wiki.contextgarden.net/Main_Page}}]
 
 
 \starttext
 
 Look at the \from[garden]!
 
 \stoptext
 
 To save me from retyping all the URLs, there must be some way to access the 
 URL of garden instead of the display text so that
 I could do something like
 
 
 \def\myfrom[#1]{
   \startmode[screen] 
   \from[1]
   \stopmode   
   \startmode[print] 
   \from[1]
   \footnote{\hyphenatedurl{get the URL text  from \useURL instead 
 of the display text}}
   \stopmode
 }

\setupinteraction [state=start]

\useurl
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  [ConTeXt garden]

\starttext

Look at the \from[garden] at \url[garden].

\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] Custom breakpoints for \hyphenatedurl

2014-08-07 Thread Wolfgang Schuster

Am 05.08.2014 um 23:36 schrieb Joshua Krämer joshua.krae...@gmail.com:

 On 2014-08-05, 22:54, Wolfgang Schuster wrote:
 
 Can you provide a working minimal example?
 
 Sorry, please find an example at the end.
 
 The first URL has the right linebreaks, but the arrow should be at the
 end of the line.

The position of the \hyphenatedurlseparator symbol depends currently on the 
breakpoint in the url,
when the break is allowed after a character at the end of line but when the 
break is allowed before
a character the symbol appears at the begin of the line.

The question is now if this is intended or can it be changed. Another thing 
where we can discuss
is the way to set the separator, e.g. \sethypehantedurlseparator{…} seems more 
appropriate
than \def\hyphenatedurlseparator{…} because we already have other \setXXX 
commands.

 Interestingly, it shows another problem:  the # is repeated.

Has to be fixed.

 The second URL has a linebreak in front of the colon, which I do not want.

The points where contexts is allowed to break a url at :/# etc. are predefined 
in the Lua code.

When you want to change this you have to use the three commands

  - \sethyphenatedurlbefore{…}
  - \sethyphenatedurlafter{…}
  - \sethyphenatedurlnormal{…}

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] Accessing the URL of \useURL (for putting URLs into footnotes)

2014-08-07 Thread Matthias Weber
Thanks Wolfgang!

Matthias

On Aug 7, 2014, at 6:35 AM, Wolfgang Schuster schuster.wolfg...@gmail.com 
wrote:

 
 Am 07.08.2014 um 12:26 schrieb Matthias Weber matwe...@indiana.edu:
 
 Dear All,
 
 for the printable version of a document I’d like to put the actual URLs into 
 footnotes.
 In other words, I’d like to replace
 
 \setupinteraction [state=start]
 \starttext
 
 \useURL
 [garden]
 [http://wiki.contextgarden.net/Main_Page]
 []
 [ConTeXtgarden]
 
 
 \starttext
 
 Look at the \from[garden]!
 
 \stoptext
 
 with
 
 \setupinteraction [state=start]
 \starttext
 
 \useURL
 [garden]
 [http://wiki.contextgarden.net/Main_Page]
 []
 [ConTeXtgarden\footnote{\hyphenatedurl{http://wiki.contextgarden.net/Main_Page}}]
 
 
 \starttext
 
 Look at the \from[garden]!
 
 \stoptext
 
 To save me from retyping all the URLs, there must be some way to access the 
 URL of garden instead of the display text so that
 I could do something like
 
 
 \def\myfrom[#1]{
  \startmode[screen] 
  \from[1]
  \stopmode   
  \startmode[print] 
  \from[1]
  \footnote{\hyphenatedurl{get the URL text  from \useURL instead 
 of the display text}}
  \stopmode
 }
 
 \setupinteraction [state=start]
 
 \useurl
  [garden]
  [http://wiki.contextgarden.net/Main_Page]
  []
  [ConTeXt garden]
 
 \starttext
 
 Look at the \from[garden] at \url[garden].
 
 \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
 ___



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] Custom breakpoints for \hyphenatedurl

2014-08-07 Thread Joshua Krämer
On 2014-08-07, 12:58, Wolfgang Schuster wrote:

 The position of the \hyphenatedurlseparator symbol depends currently
 on the breakpoint in the url, when the break is allowed after a
 character at the end of line but when the break is allowed before a
 character the symbol appears at the begin of the line.
 The question is now if this is intended or can it be changed.

I can hardly imagine this to be intended.  The reader should be
informed about a break as soon as he reaches the break, so he knows the
word/token is not finished yet.  As we read from top to bottom, the
end of the top line is where this information should be.


 Another thing where we can discuss is the way to set the separator,
 e.g. \sethypehantedurlseparator{…} seems more appropriate than
 \def\hyphenatedurlseparator{…} because we already have other \setXXX
 commands.

Agreed.

  The second URL has a linebreak in front of the colon, which I do
  not want.
 
 The points where contexts is allowed to break a url at :/# etc. are
 predefined in the Lua code.
 
 When you want to change this you have to use the three commands
 
   - \sethyphenatedurlbefore{…}
   - \sethyphenatedurlafter{…}
   - \sethyphenatedurlnormal{…}

Could you please change my minimal example (attached at the
end) accordingly? I want an URL like http://optimist; to be wrapped
after :// only, not in front of the colon.  I couldn't find out how to
achieve this.  I also want no linebreak to occur between two slahes
(if this is possible with the current implementation).  By the way, I
also don't understand the meaning of \sethyphenatedurlnormal {...}.

Kind regards,
Joshua


\setuplayout[width=5cm]
\sethyphenatedurlafter {/}
\sethyphenatedurlbefore {}
\sethyphenatedurlnormal {}
\starttext

Word Word Word \hyphenatedurl {http://optimist.optimist}

Word Word Word W \hyphenatedurl {http://optimist.optimist}

Word Word Word Wo \hyphenatedurl {http://optimist.optimist}

(Only the first of these three linebreaks is desired.)

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

Re: [NTG-context] Superscript Citation References

2014-08-07 Thread Joshua Krämer
On 2014-08-06, 23:54, Thangalin wrote:

 I would like to cite bibliography references using a superscript font.

The attached example is a hack using an \hbox nested inside a math
superscript.  It doesn't work with the text superscript command (\high)
for some reason.

Kind regards,
Joshua


\setupbibtex [database=sources]

\setuppublications[
  refcommand=num,
  numbering=yes
]

\setupcite[num][
  left={$^\bgroup\hbox\bgroup\tfx },
  right={\egroup\egroup$},
]

\starttext
  Word\cite[kattamuri@debate] Word
\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] Citation Sort Order

2014-08-07 Thread Thangalin
The documentation (http://www.ntg.nl/maps/26/12.pdf) suggests that the
order of citations can be changed using sorttype=cite.

The example code below writes a 6 in the document. I thought by
setting the sorttype to cite that the bibliography order would be
determined based on the order that the cite macros occur in the
document.

If I have understood correctly, then the sample document should write
a 1 in the document.

Any idea why 6 is written instead of 1?

Thank you.
--

Example code:

\setupbibtex[database=sources]
\setuppublications[
  sorttype=cite,
]

\starttext
  hello world\cite[kattamuri@debate]

  \startbackmatter
\completepublications[criterium=all]
  \stopbackmatter
\stoptext

--
Sample bibliography:

@inproceedings{delaune@coercion,
  title={Coercion-resistance and receipt-freeness in electronic voting},
  author={Delaune, Stephanie and Kremer, Steve and Ryan, Mark},
  booktitle={Computer Security Foundations Workshop. 19th IEEE},
  pages={12--pp},
  organization={IEEE},
  year={2006},
  url={https://www.cs.bham.ac.uk/~mdr/research/papers/pdf/06-csfw.pdf},
}

@article{zbmath0homomorphic,
  author={Andrea {Huszti}},
  title={{A homomorphic encryption-based secure electronic voting scheme}},
  journal={{Publicationes Mathematicae}},
  ISSN={0033-3883},
  volume={79},
  number={3-4},
  pages={479--496},
  year={2011},
  publisher={Institutum Mathematicum Universitatis Debreceniensis, Debrecen},
  language={English},
  DOI={10.5486/PMD.2011.5142},
  MSC2010={94A60 68P25},
  zbl={1249.94030},
  url={https://www.inf.unideb.hu/~ahuszti/papers/5142-Huszti_megjelent.pdf},
}

@inproceedings{peng04homomorphic,
  author={Kun Peng and Riza Aditya and Colin Boyd and Byoungcheon Lee},
  title={Multiplicative homomorphic e-voting},
  booktitle={In Advances in Cryptology - Indocrypt ’04},
  year={2004},
  pages={61--72},
  url={https://eprints.qut.edu.au/24434/1/},
}

@inproceedings{kremer@verify,
  address={Athens, Greece},
  author={Kremer, Steve and Ryan, Mark D. and Smyth, Ben},
  booktitle={{P}roceedings of the 15th {E}uropean {S}ymposium on
{R}esearch in {C}omputer {S}ecurity ({ESORICS}'10)},
  DOI={10.1007/978-3-642-15497-3_24},
  editor={Gritzalis, Dimitris and Preneel, Bart},
  pages={389-404},
  publisher={Springer},
  series={Lecture Notes in Computer Science},
  title={Election verifiability in electronic voting protocols},
  volume={6345},
  year={2010},
  month={9},
  acronym={{ESORICS}'10},
  url={https://www.lsv.ens-cachan.fr/Publis/PAPERS/PDF/KRS-esorics10.pdf},
}

@article{acquisti0homomorphic,
  author={Alessandro Acquisti},
  
url={https://www.heinz.cmu.edu/~acquisti/papers/acquisti-electronic_voting.pdf},
  journal={IACR Cryptology ePrint Archive},
  pages={105},
  title={Receipt-Free Homomorphic Elections and Write-in Voter
Verified Ballots},
  volume={2004},
  year={2004},
  month={4},
}

@inproceedings{kattamuri@debate,
 author = {Kattamuri, Kishore and Silaghi, Marius and Kaner, Cem and
Stansifer, Ryan and Zanker, Markus},
 title = {Supporting Debates over Citizen Initiatives},
 booktitle = {Proceedings of the 2005 National Conference on Digital
Government Research},
 series = {dg.o '05},
 year = {2005},
 location = {Atlanta, Georgia},
 pages = {279--280},
 numpages = {2},
 url = 
{https://repository.lib.fit.edu/bitstream/handle/11141/150/cs-2005-03.pdf},
 acmid = {1065321},
 publisher = {Digital Government Society of North America},
}
___
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] Title in margin example from the wiki not working?

2014-08-07 Thread Mica Semrick
Thanks Wolfgang. I will test this later tonight and update the wiki when it is 
working.

Best,
Mica
___
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] Citation Sort Order

2014-08-07 Thread Rik

On 2014-08-07 13:20, Thangalin wrote:

The documentation (http://www.ntg.nl/maps/26/12.pdf) suggests that the
order of citations can be changed using sorttype=cite.

The example code below writes a 6 in the document. I thought by
setting the sorttype to cite that the bibliography order would be
determined based on the order that the cite macros occur in the
document.

If I have understood correctly, then the sample document should write
a 1 in the document.

Any idea why 6 is written instead of 1?

Thank you.



Reverse the order of the last two entries in your bib file and rerun the 
example. You will no longer have 6 and will now have a significant clue 
about why the 6 appeared the first time.


Now change the line

   \completepublications[criterium=all]

to

   \placepublications[criterium=text]

rerun, and examine the result.

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