Re: [NTG-context] Conditional float references

2013-09-25 Thread Marco Patzer
On 2013–09–25 Otared Kavian wrote:

 I have not yet tried it with references to maths formulas,
 theorems, lemmas and such,

Me neither.

  \ifsinglesided
\strc_references_do_relative_else\plusone
  {\def\strc_references_smart_string{\labeltext\v!nextpage}}
  {\strc_references_do_relative_else\minusone

 The issues I noticed are the following:
 1. Typesetting the file gives an error message when there is no 
   \setuppagenumbering[alternative=doublesided]

A typo:

  \ifsinglesided
\strc_references_do_relative_else\plusone
  {\def\strc_references_smart_string{\labeltext\v!nextpage}}
-  {\strc_references_do_relative\minusone
+  {\strc_references_do_relative_else\minusone


 2. In the above minimal example, when stating 
   \setuppagenumbering[alternative=doublesided]
 then Test 2 and Test 3 do not result in the smart references
 expected (they both result in « See figure 1 and figure 3. » while
 Test 2 should give « See figure 1 and figure 3 on next page. »,
 and Test 3 should result in « See figure 1 on previous page and
 figure 3. »).

That's on purpose. If the graphic appears on the same double page,
it is visible and no further reference is printed. In traditional
typesetting a single page is rather insignificant. The reader is
always faced with double pages, never single pages.

 Thanks again for sharing your module.

Well, it wasn't meant to be a module. I rather intended to start a
discussion and threw some code in to start with. If there's interest
I can make it a module.

Thanks for the feedback.

Marco


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
___

[NTG-context] Wrong spacing using stretch effect

2013-09-25 Thread Marco Patzer
Hi,

the stretch effect does not take the final width of the string into
account. Is this a bug or a limitation? Example:

\starttext
  (\effect[stretch]{fftabc})\par  %% “c” collides with “)”
  (\kerncharacters[.05]fftabc)%% no collision
\stoptext

Marco


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] Conditional float references

2013-09-25 Thread Otared Kavian
Hi Marco,

Thanks for your answer: indeed I was wrong about the issue I reported about 
doublesided page numbering. The reason is that I use TeXShop (on a Mac) and the 
PDF produced is shown in a single page layout (it is however possible to have 
doublesided layout as well: that's what I tested after your answer.

Also after applying your patch everything works as expected. I tested your file 
with some maths formulas and changed even the language to French with:
\unprotect
\setuplabeltext
  [\s!fr]
  [\v!atpage=page\nobreakspace, %% “at page” sounds weird
   \v!previouspage=à la page précédente,
   \v!nextpage=à la page suivante]
\protect
\mainlanguage[fr]

without any problem. So your macro is just wonderful!

However maybe it would be better to have some setup options like:
\setuplabeltext[smartref][atpage={page},
previouspage={à la page précédente}, %or {page 
précédente}
nextpage={à la page suivante}] %or {page suivante}

In case Hans is willing to add such capabilities to the cross referencing, it 
would be great if one could setup the cross references in the same way by 
saying for instance
\setupreferencing[alternative=smartref]
and then have \smartref be defined automatically.

A final remark concerns the possibility to visualize the reference points when 
one is in the process of proof reading: at least in maths, it is usual to have 
dozens of reference points to formulas, lemmas, theorems, etc, and it is quite 
useful to be able to visualize such things. For instance I use a quick and 
dirty macro to print in the margin « eq:Fermat » to the right of the following 
formula

\placeformula[eq:Fermat]
\startformula
a,b,c \in {\Bbb N}^*, \quad n \geq 3, \quad a^n + b^n = c^n \imply abc = 0.
\stopformula

when I am preparing a paper. I do the same with references to lemmas and 
theorems, but I print them in the margin to the left of the reference point. 
For now, mkiv does not support such things and it's a pity.

Best regards: OK

On 25 sept. 2013, at 09:29, Marco Patzer li...@homerow.info wrote:

 On 2013–09–25 Otared Kavian wrote:
 
 I have not yet tried it with references to maths formulas,
 theorems, lemmas and such,
 
 Me neither.
 
  \ifsinglesided
\strc_references_do_relative_else\plusone
  {\def\strc_references_smart_string{\labeltext\v!nextpage}}
  {\strc_references_do_relative_else\minusone
 
 The issues I noticed are the following:
 1. Typesetting the file gives an error message when there is no 
  \setuppagenumbering[alternative=doublesided]
 
 A typo:
 
  \ifsinglesided
\strc_references_do_relative_else\plusone
  {\def\strc_references_smart_string{\labeltext\v!nextpage}}
 -  {\strc_references_do_relative\minusone
 +  {\strc_references_do_relative_else\minusone
 
 
 2. In the above minimal example, when stating 
  \setuppagenumbering[alternative=doublesided]
 then Test 2 and Test 3 do not result in the smart references
 expected (they both result in « See figure 1 and figure 3. » while
 Test 2 should give « See figure 1 and figure 3 on next page. »,
 and Test 3 should result in « See figure 1 on previous page and
 figure 3. »).
 
 That's on purpose. If the graphic appears on the same double page,
 it is visible and no further reference is printed. In traditional
 typesetting a single page is rather insignificant. The reader is
 always faced with double pages, never single pages.
 
 Thanks again for sharing your module.
 
 Well, it wasn't meant to be a module. I rather intended to start a
 discussion and threw some code in to start with. If there's interest
 I can make it a module.
 
 Thanks for the feedback.
 
 Marco
 ___
 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] error when installing ConTeXt Standalone

2013-09-25 Thread Pablo Rodríguez
On 09/25/2013 12:01 AM, Mica Semrick wrote:
 Have you added the bin directory to your PATH?

No, I invoke source tex/setuptex, which does the same job.


Pablo


 On Tue, Sep 24, 2013 at 1:55 PM, Pablo Rodríguez wrote:
 
 Dear list,
 
 I have installed a system-wide ConTeXt Standalone in Fedora 19,
 following the instructions from the wiki.
 
 But when I try to rebuild the font cache, I get the following error
 (with option verbose):
 
 resolvers   | resolving | remembering file 'font-otp.lua'cannot open
 : No such file or directory
 
 I don’t know what I’m doing wrong, but I get the error as root also.
 
 Could anyone tell me what it’s wrong here?
 
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] bug with font

2013-09-25 Thread Prashanth
Hello,

I update my ConTeXt setup about every couple of weeks. I use Ubuntu font
in some of my documents. My setup from 2013-09-11 was selecting the
specified fonts correctly. However my setup from 2013-09-25 (today)
selects Ubuntu Light when I specify just Ubuntu. When I specifically
ask it to use Ubuntu Regular, it forces this weight everywhere
(including places where I specify \em).

I have attached a minimal example and sample PDF and log files from both
versions.

Best regards,
Prashanth


demo-20130911.tgz
Description: GNU Zip compressed data


demo-20130925.tgz
Description: GNU Zip compressed data
___
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] question about linespace adjustment

2013-09-25 Thread Lars Huttar
On 9/24/2013 5:25 PM, Aditya Mahajan wrote:
 On Tue, 24 Sep 2013, Lars Huttar wrote:

 environment), and the second category only affects the font (and I'm
 still not clear on how the body font differs from the current font).

 (Sorry for the terse replies...)

 {\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}

 {\tfc Text $math$ \sans{Sans} \endgraf}

 Aditya

I don't know how this answers the above question. Can anybody explain?

Clearly you're drawing a comparison between \switchtobodyfont[14pt] and
\tfc.
I've run the sample, and I see that, as in other samples earlier in this
thread, \switchtobodyfont causes the interlinespace to be adjusted
accordingly, and \tfc doesn't.

Is that intended to be an answer to 'how the body font differs from
the current font'? And is the answer that the bodyfont is a conglomerate
of more properties than just the font, including interlinespace?

Thanks,
Lars

___
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] error when installing ConTeXt Standalone

2013-09-25 Thread John Kitzmiller
Maybe you need to specify the installation directory or issue tex/setuptex from 
inside the install folder?

font-opt.lua should be in install folder/tex/texmf-context/tex/context/base

John


 On 09/25/2013 12:01 AM, Mica Semrick wrote:
 Have you added the bin directory to your PATH?
 
 No, I invoke source tex/setuptex, which does the same job.
 
 
 Pablo
 
 
 On Tue, Sep 24, 2013 at 1:55 PM, Pablo Rodr?guez wrote:
 
Dear list,
 
I have installed a system-wide ConTeXt Standalone in Fedora 19,
following the instructions from the wiki.
 
But when I try to rebuild the font cache, I get the following error
(with option verbose):
 
resolvers   | resolving | remembering file 'font-otp.lua'cannot open
: No such file or directory
 
I don?t know what I?m doing wrong, but I get the error as root also.
 
Could anyone tell me what it?s wrong here?
 
Many thanks for your help,
 
 
Pablo

___
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] error when installing ConTeXt Standalone

2013-09-25 Thread Pablo Rodríguez
On 09/25/2013 10:21 PM, John Kitzmiller wrote:
 Maybe you need to specify the installation directory or issue
 tex/setuptex from inside the install folder?
 
 font-opt.lua should be in install
 folder/tex/texmf-context/tex/context/base

Well, that’s exactly what the following command does (at least, it works
for me in a local installation, but not system-wide):

$ source tex/setuptex
Setting /opt/ctxbeta/tex as ConTeXt root.

It worked with Fedora 16, but after installing Fedora 19 it doesn’t work.


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
___


Re: [NTG-context] error when installing ConTeXt Standalone

2013-09-25 Thread Mica Semrick
$ source tex/setuptex

Do you do that as root? You probably need to add it to something like
/etc/bashrc or the like... it sounds like you don't have permission/your
shell isn't getting the right path...


On Wed, Sep 25, 2013 at 1:50 PM, Pablo Rodríguez oi...@web.de wrote:

 On 09/25/2013 10:21 PM, John Kitzmiller wrote:
  Maybe you need to specify the installation directory or issue
  tex/setuptex from inside the install folder?
 
  font-opt.lua should be in install
  folder/tex/texmf-context/tex/context/base

 Well, that’s exactly what the following command does (at least, it works
 for me in a local installation, but not system-wide):

 $ source tex/setuptex
 Setting /opt/ctxbeta/tex as ConTeXt root.

 It worked with Fedora 16, but after installing Fedora 19 it doesn’t work.


 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

 ___

___
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] question about linespace adjustment

2013-09-25 Thread luigi scarso
On Wed, Sep 25, 2013 at 9:54 PM, Lars Huttar lars_hut...@sil.org wrote:

 And is the answer that the bodyfont is a conglomerate
 of more properties than just the font, including interlinespace?



You can read  font-ini.mkvi :

%D \macros
%D   {setupbodyfont,switchtobodyfont}
%D
%D The next two macros are user ones. With \type{\setupbodyfont}
%D one can set the document bodyfont size, font family, style
%D and/or options defined in files, for example:
%D
%D \starttyping
%D \setupbodyfont[modern,12pt,roman]
%D \stoptyping
%D
%D This command affects the document as a whole: text, headers
%D and footers. The second macro however affects only the text:
%D
%D \starttyping
%D \switchtobodyfont[10pt]
%D \stoptyping
%D
%D So we've got:
%D
%D \showsetup{setupbodyfont}
%D \showsetup{switchtobodyfont}
%D
%D Both macros look alike. The second one also has to take
%D all kind of keywords into account.
If you follow switchtobodyfont you can see

unexpanded\def\font_basics_switchtobodyfont#specification%
  {\edef\m_font_step{\bodyfontvariable{#specification}}%
   \ifx\m_font_step\empty
 \font_helpers_set_font\zerocount{#specification}%
   \else
 \font_helpers_switch_bodyfont_step % so we have a fast [small] switch
   \fi
   \the\everybodyfont
   \the\everyswitchtobodyfont}

\unexpanded\def\switchtobodyfont[#specification]% could become an ifx

{\doifsomething{#specification}{\font_basics_switchtobodyfont{#specification}}}


The token register \everybodyfont  and
 \everyswitchtobodyfont take care for spaces:

(still in font-ini.mkvi)

%D   {everybodyfont,Everybodyfont,everyglobalbodyfont}
%D
%D Every change in bodyfont size has conseqences for the baseline
%D distance and skips between paragraphs. These are initialized
%D in other modules. Here we only provide the hooks that
%D garantees their handling.

%D At the system level one can initialize thing like:
%D
%D \starttyping
%D \appendtoks \setupspacing \to \everybodyfont
%D \stoptyping

In core-def.mkiv

\appendtoks
\synchronizelocallinespecs
\to \everyswitchtobodyfont

while  spac-ver.mkiv

\unexpanded\def\synchronizelocallinespecs
  {\bodyfontlineheight \normallineheight
   \bodyfontstrutheight\strutheight
   \bodyfontstrutdepth \strutdepth}



-- 
luigi
___
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] question about linespace adjustment

2013-09-25 Thread Wolfgang Schuster

Am 25.09.2013 um 21:54 schrieb Lars Huttar lars_hut...@sil.org:

 On 9/24/2013 5:25 PM, Aditya Mahajan wrote:
 On Tue, 24 Sep 2013, Lars Huttar wrote:
 
 environment), and the second category only affects the font (and I'm
 still not clear on how the body font differs from the current font).
 
 (Sorry for the terse replies...)
 
 {\switchtobodyfont[14pt] Text $math$ \sans{Sans} \endgraf}
 
 {\tfc Text $math$ \sans{Sans} \endgraf}
 
 Aditya
 
 I don't know how this answers the above question. Can anybody explain?
 
 Clearly you're drawing a comparison between \switchtobodyfont[14pt] and
 \tfc.
 I've run the sample, and I see that, as in other samples earlier in this
 thread, \switchtobodyfont causes the interlinespace to be adjusted
 accordingly, and \tfc doesn't.
 
 Is that intended to be an answer to 'how the body font differs from
 the current font'? And is the answer that the bodyfont is a conglomerate
 of more properties than just the font, including interlinespace?


You can’t expect from \tfa etc. to change the interlinespace because these
commands can be used in your paragraphs to change the size of certain
words only and in this case you don’t want a forced change of the 
interlinespace.

To adapt the interlinespace when you now use \tfa etc. you have to add
\setupinterlinespace to your code (arguments aren’t needed) to tell context
to recalculate it.

example
\setuppapersize[A3]

\starttext

% Standard text size

\begingroup

\input ward

\endgroup

\blank

% Bigger font size with standard linespacing

\begingroup \tfd

\the\bodyfontsize

\input ward

\endgroup

\blank

% Bigger font size with adapted linespacing

\begingroup \tfd \setupinterlinespace

\input ward

\endgroup

\blank

% Larger bodyfont

\begingroup \switchtobodyfont[25pt]

\input ward

\endgroup

\stoptext
/example

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] question about linespace adjustment

2013-09-25 Thread Lars Huttar
Wolfgang, thanks for your response.

On 9/25/2013 5:02 PM, Wolfgang Schuster wrote:
 You can’t expect from \tfa etc. to change the interlinespace because these
 commands can be used in your paragraphs to change the size of certain
 words only and in this case you don’t want a forced change of the 
 interlinespace.

Well... \switchtobodyfont[20pt] can also be used in paragraphs to change
the size of just a few words.
But the above suggests that \switchtobodyfont shouldn't be used for that
purpose, and commands like \tfc should?

 To adapt the interlinespace when you now use \tfa etc. you have to add
 \setupinterlinespace to your code (arguments aren’t needed) to tell context
 to recalculate it.


Thank you. What I'm trying to learn now is *why* that's true. Or more
precisely, where is the boundary between the font-changing commands that
automatically adjust interlinespace, and those commands that don't? and
what is the conceptual model that motivates the boundary, and helps
users remember and predict where the boundary lies?

What I think I'm hearing is that \switchtobodyfont is intended for
changes of longer duration, say, at least a paragraph. Whereas \tfa and
so on are intended for brief changes, to set off a phrase, for example.

As an example of where's the boundary, experimentation shows that
\setsmallbodyfont is in the same category as \switchtobodyfont: it
automatically affects the interlinespace. Nevertheless I can't find
anywhere in the manual or on the wiki that tells me that
\setsmallbodyfont differs from \tx in this way (let alone *why* it
differs). Maybe I should expect that any command that has bodyfont in
its name is intended for long-term changes, and other commands aren't?

Sorry if I'm being slow on the uptake.
Documentation like
http://wiki.contextgarden.net/Command/switchtobodyfont just doesn't seem
to explain this difference in intention.

Thanks again. I do hope to use this experience to contribute
clarifications to the manual. I've already done that some on the wiki
(hoping that if I get it wrong, someone will correct my mistakes!)

Lars

___
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] error when installing ConTeXt Standalone

2013-09-25 Thread Thomas A. Schmitz

On 25.09.2013 22:50, Pablo Rodríguez wrote:

It worked with Fedora 16, but after installing Fedora 19 it doesn’t work.


http://thread.gmane.org/gmane.comp.tex.context/83357

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