Re: [NTG-context] actualtext and encoding
Am 07.12.2009 um 08:52 schrieb Taco Hoekwater: Is /ActualText supposed to be in PDFDoc Encoding? No, you could also use Unicode Encoding. 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] actualtext and encoding
Taco Hoekwater wrote: Wolfgang Schuster wrote: Hi Hans, you showed a while ago how the actualtext function of pdf works and i have a module where i would use it but letters outside of ascii appear wrong when i copy the text \starttext text \pdfliteral{/Span /ActualText (Müller) BDC}Meier\pdfliteral{EMC} text \stoptext Is /ActualText supposed to be in PDFDoc Encoding? nopdfcompression \def\pdfactualtext#1#2% {\pdfliteral direct{/Span /ActualText \ctxlua{tex.write(lpdf.tosixteen(#2))} BDC}#1\pdfliteral direct{EMC}} \starttext text \pdfactualtext{Meier}{Müller} text \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Selectively not using a font feature
Matthijs Kooijman wrote: Hi all, I'm currently using old-style numerals in my document using the onum otf font feature: \definefontfeature[default][default][onum=yes] This gives very nice results, except for the cases where a 0 appears by itself in the text. In these cases, it appears just like an o instead of a 0. I'd like to explicitly turn off old style numerals for those cases, but I'm unsure how. Any suggestions? it assumes that you know what is provided by the font ... you cam play with addff and subff and addfs and subfs (individual features cq. current set) \definefontfeature[smallcaps][smallcaps][script=latn] \definefontfeature[oldstyle] [oldstyle] [script=latn] \definedfont[name:cambria at 15pt] Hello there {\setff{smallcaps}capped 123 \setff{oldstyle}123!}\blank Hello there {\addff{smallcaps}capped 123 \addff{oldstyle}123!}\blank Hello there {\addff{smallcaps}capped \subff{smallcaps}normal} \blank - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] actualtext and encoding
Am 07.12.2009 um 09:46 schrieb Hans Hagen: \def\pdfactualtext#1#2% {\pdfliteral direct{/Span /ActualText \ctxlua{tex.write(lpdf.tosixteen(#2))} BDC}#1\pdfliteral direct{EMC}} \starttext text \pdfactualtext{Meier}{Müller} text \stoptext Perfect, will this end in the core? Regards, 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] actualtext and encoding
Wolfgang Schuster wrote: Am 07.12.2009 um 09:46 schrieb Hans Hagen: \def\pdfactualtext#1#2% {\pdfliteral direct{/Span /ActualText \ctxlua{tex.write(lpdf.tosixteen(#2))} BDC}#1\pdfliteral direct{EMC}} \starttext text \pdfactualtext{Meier}{Müller} text \stoptext Perfect, will this end in the core? hm, doesn't that kind of functionality demands a bit more 'thinking'? what exactly is needed? how does it relate to linebreaks? other content? etc .. actually, such a mechanism should be implemented a bit differently (maybe attributes and delayed processing) or maybe dictionary driven .. i have no problem with adding this two line hack as it has a \pdf prefix anyway so it sits in the category wolfgangs-only -) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Selectively not using a font feature
Hi Hans, it assumes that you know what is provided by the font ... you cam play with addff and subff and addfs and subfs (individual features cq. current set) I couldn't get the addff/subff stuff working to remove the font feature, but the following did the trick: \definefontfeature[default][default][onum=yes] \definefontfeature[normalnum][default][onum=no] And in the text use: {\definedfont[Serif*normalnum]0 to 7} Thanks, Matthijs signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] actualtext and encoding
Am 07.12.2009 um 10:11 schrieb Hans Hagen: hm, doesn't that kind of functionality demands a bit more 'thinking'? what exactly is needed? how does it relate to linebreaks? other content? etc .. actually, such a mechanism should be implemented a bit differently (maybe attributes and delayed processing) or maybe dictionary driven .. there is no linebreak in the text because it's a boxed content, a simple version of my macro is \def\pdfactualtext#1#2% {\pdfliteral direct{/Span /ActualText \ctxlua{tex.write(lpdf.tosixteen(#2))} BDC}#1\pdfliteral direct{EMC}} \def\ruby#1#2% {\dontleavehmode\bgroup \setbox\scratchboxone\hbox{#1}% \setbox\scratchboxtwo\hbox{#2}% \scratchdimen\wd\scratchboxone \setbox\scratchbox\vbox {\hbox to \scratchdimen{\hss\box\scratchboxtwo\hss} \hbox to \scratchdimen{\hss\box\scratchboxone\hss}}% \pdfactualtext{\box\scratchbox}{#1 (#2)}% \egroup} \starttext text \ruby{base text}{ruby text} text \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] Minimals Setup witout rsync?
Timestamp: 2009-05-11 13:30 Ouch. Can that be synchronized with the rsync-able repository? Thanks, Joh Wolfgang Schuster wrote: Am 04.12.2009 um 14:27 schrieb Johannes Graumann: Hi, How would one install the minimals when sitting behind a restrictive firewall not allowing rsyncing with the outside world? http://pragma-ade.com/download-4.htm 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 ___ ___ 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] sectionsegments for reference
Wolfgang Schuster wrote: This is a reminder for Hans. Regards, Wolfgang Am 22.11.2009 um 23:49 schrieb Wolfgang Schuster: Hi Hans, there is a nice example in strc-ref.mkiv for the use of sectionsegments in references but the feature is still missing, can it be added. % \starttext % \definestructureconversionset[default][Character,number,Romannumerals,Character][number] % \definestructureseparatorset [default][.,.,--][.] % \setupstructurehead[subsection][sectionstopper=),sectionsegments=4:4] % \setupreferencing[sectionsegments=3:4] % \section {One} \subsection[sec:test]{Two} See \in[sec:test] % \stoptext % \definestructureconversionset[default][Character,number,Romannumerals,Character][number] % \definestructureseparatorset [default][.,.,--][.] % \setupstructurehead[subsection][sectionstopper=),sectionsegments=4:4] % \setupreferencestructureprefix[default][prefixsegments=2:4] % \setupreferencestructureprefix[figure][default][prefixsegments=3:4] % \chapter {One} % \section {One} % \subsection[sec:test]{Two} % See \in[sec:test] and \in[fig:xx] and \in[fig:yy] % \placefigure[here][fig:xx]{}{} % \placefigure[here][fig:yy]{}{} this works here now (i cannot update as we are in the middle something luatex) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] actualtext and encoding
Wolfgang Schuster wrote: Am 07.12.2009 um 10:11 schrieb Hans Hagen: hm, doesn't that kind of functionality demands a bit more 'thinking'? what exactly is needed? how does it relate to linebreaks? other content? etc .. actually, such a mechanism should be implemented a bit differently (maybe attributes and delayed processing) or maybe dictionary driven .. there is no linebreak in the text because it's a boxed content, a simple version of my macro is \def\pdfactualtext#1#2% {\pdfliteral direct{/Span /ActualText \ctxlua{tex.write(lpdf.tosixteen(#2))} BDC}#1\pdfliteral direct{EMC}} \def\ruby#1#2% {\dontleavehmode\bgroup \setbox\scratchboxone\hbox{#1}% \setbox\scratchboxtwo\hbox{#2}% \scratchdimen\wd\scratchboxone \setbox\scratchbox\vbox {\hbox to \scratchdimen{\hss\box\scratchboxtwo\hss} \hbox to \scratchdimen{\hss\box\scratchboxone\hss}}% \pdfactualtext{\box\scratchbox}{#1 (#2)}% \egroup} \starttext text \ruby{base text}{ruby text} text \stoptext detail ... \def\ruby#1#2% {\dontleavehmode\bgroup \setbox\scratchboxone\hbox{#1}% \setbox\scratchboxtwo\hbox{#2}% \scratchdimen\wd\ifdim\wd\scratchboxone\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi \setbox\scratchbox\vbox {\hbox to \scratchdimen{\hss\box\scratchboxtwo\hss} \hbox to \scratchdimen{\hss\box\scratchboxone\hss}}% \pdfactualtext{\box\scratchbox}{#1 (#2)}% \egroup} \starttext text \ruby{lua text}{ruby or perl text which is more blabla} text \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Selectively not using a font feature
Matthijs Kooijman wrote: Hi Hans, it assumes that you know what is provided by the font ... you cam play with addff and subff and addfs and subfs (individual features cq. current set) I couldn't get the addff/subff stuff working to remove the font feature, but the following did the trick: \definefontfeature[default][default][onum=yes] \definefontfeature[normalnum][default][onum=no] i made that mechanism for idris so he can help you with better examples - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] actualtext and encoding
Am 07.12.2009 um 11:21 schrieb Hans Hagen: detail ... \def\ruby#1#2% {\dontleavehmode\bgroup \setbox\scratchboxone\hbox{#1}% \setbox\scratchboxtwo\hbox{#2}% \scratchdimen\wd\ifdim\wd\scratchboxone\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi \setbox\scratchbox\vbox {\hbox to \scratchdimen{\hss\box\scratchboxtwo\hss} \hbox to \scratchdimen{\hss\box\scratchboxone\hss}}% \pdfactualtext{\box\scratchbox}{#1 (#2)}% \egroup} \starttext text \ruby{lua text}{ruby or perl text which is more blabla} text \stoptext this was just a simplified example, the real implementation is more complex by default ruby text overlaps the surrounding text (like in my example) and what you suggested can be activated but it's not so nice because you get unwanted whitespace in the text 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] Minimals Setup witout rsync?
Johannes Graumann wrote: Timestamp: 2009-05-11 13:30 Ouch. Can that be synchronized with the rsync-able repository? my upload is not that fast ... they will be synced with luatex 0.50 Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Minimals Setup witout rsync?
On Monday 07 December 2009 10:49:45 Johannes Graumann wrote: Timestamp: 2009-05-11 13:30 Ouch. Can that be synchronized with the rsync-able repository? Thanks, Joh Wolfgang Schuster wrote: Am 04.12.2009 um 14:27 schrieb Johannes Graumann: Hi, How would one install the minimals when sitting behind a restrictive firewall not allowing rsyncing with the outside world? http://pragma-ade.com/download-4.htm Wolfgang See also attached mail. If you can connect to a machine on the outside world that has nc and itself allows rsync. Alan ---BeginMessage--- On Thursday 23 July 2009 21:40:54 Mojca Miklavec wrote: On Wed, Jul 22, 2009 at 23:03, Alan BRASLAU wrote: I am currently behind a firewall that does not allow rsync:// connections, so ./first-setup.sh fails. However, ssh connections are allowed. I do not (currently) know enough about rsync (and the conTeXt scripts) to see how to get around this. I re-read the rsync documentation and found a solution: export RSYNC_CONNECT_PROG='ssh proxyhost nc %H 873' ./first-setup.sh where proxyhost is replaced by the name of my laboratory gateway machine that is configured to allow rsync (port 873) connections. The other solutions (-e ssh) require having a login on contextgarden.net. So, now I can rsync with the minimals on the garden. Alan, thanks a lot for figuring that out. This should be documented on Wiki or in first-setup.sh. Just a question: what kind of server exactly does that proxyhost need to be? The proxyhost can be any machine outside of the ssh firewall that 1) has nc (netcat) 2) allows a connection to port 873 (rsync) Alan ---End Message--- ___ 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] Minimals Setup witout rsync?
Geee, that was easy! $context --version MTXrun | main context file: /opt/ConTeXt/tex/texmf- context/tex/context/base/context.tex MTXrun | current version: 2009.12.03 00:41 Thanks a lot! Joh Alan BRASLAU wrote: On Monday 07 December 2009 10:49:45 Johannes Graumann wrote: Timestamp: 2009-05-11 13:30 Ouch. Can that be synchronized with the rsync-able repository? Thanks, Joh Wolfgang Schuster wrote: Am 04.12.2009 um 14:27 schrieb Johannes Graumann: Hi, How would one install the minimals when sitting behind a restrictive firewall not allowing rsyncing with the outside world? http://pragma-ade.com/download-4.htm Wolfgang See also attached mail. If you can connect to a machine on the outside world that has nc and itself allows rsync. Alan ___ 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] Minimals Setup witout rsync?
On Mon, Dec 7, 2009 at 10:49, Johannes Graumann wrote: Timestamp: 2009-05-11 13:30 Ouch. Can that be synchronized with the rsync-able repository? You got some extra instructions (maybe I need to mention them in some installation notes), but another mirror should be http://minimals.contextgarden.net/pragma/ (but I don't update it too often either unless the need arises). Mojca ___ 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] zip usage
Hello, This doesn't seem to work anymore: \xmlprocess{main}{zip:///\inputfilename.odt?name=content.xml}{} What's a newer syntax? Thanks, Joh ___ 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] Selectively not using a font feature
Hi, On Mon, 07 Dec 2009 02:16:49 -0700, Matthijs Kooijman matth...@stdin.nl wrote: \definefontfeature[default][default][onum=yes] \definefontfeature[normalnum][default][onum=no] And in the text use: {\definedfont[Serif*normalnum]0 to 7} \definefontfeature[default][script=latn,fea1=yes,fea2=yes,...fean=yes,...onum=yes] \definefontfeature[onum][onum=yes] \definedfont[Serif*default] \subff{onum} should subtract onum from the current stack. These are not accumulative, they only act on the original featureset -- default here -- so no \subff{featureset1} \addff{featureset2} effects For accumulative effects you need \addfs/\subfs, but those are broken at the moment. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] page[no] not working?
Hi all, I've come to understand taht using the \page[no] command should prevent a pagebreak at that particular spot whenever possible. However, this seems to be not working for me. My actual problem is with a \startframed directly after a description header, but the problem is easily reproduced with the below example (for MkII, replace the 25cm with 20cm). The \dontleavehmod was needed to make the \blank work... \starttext \dontleavehmode \blank[25cm] A \page[no] \startframedtext H \stopframedtext \stoptext This example generates the A at the bottom of the first page, with the boxed H on the next page, putting a page break exactly where the page[no] is. Is it broken, or am I missing an important detail about how page[no] works? I've also tried \defineblankmethod [nobreak] {\nobreak} \blank[nobreak,line] and some variations as suggested by Wolfgang (IIRC) in some thread from 2008, but that failed with missing number, treated as zero for me. Gr. Matthijs signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] page[no] not working?
Am 07.12.2009 um 22:55 schrieb Matthijs Kooijman: Hi all, I've come to understand taht using the \page[no] command should prevent a pagebreak at that particular spot whenever possible. However, this seems to be not working for me. My actual problem is with a \startframed directly after a description header, but the problem is easily reproduced with the below example (for MkII, replace the 25cm with 20cm). The \dontleavehmod was needed to make the \blank work... As you don't provide a example with a description where you have the problem I can't make a test but this could work in MkIV \setupdescriptions[...][inbetween={\blank[samepage,line]}] 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 ___