Re: [NTG-context] Simple question

2022-05-10 Thread Denis Maier via ntg-context
Don't know how if there's an automatic way, perhaps look into ctx processing 
instructions.
Anyway you can use
--result=name
As you have to set quite a few options on the command line (modes, language) 
you'll perhaps want to use a makefile anyway.




Von: ntg-context  im Auftrag von Gerben Wierda via 
ntg-context 
Gesendet: Dienstag, 10. Mai 2022 18:47:32
An: mailing list for ConTeXt users
Cc: Gerben Wierda
Betreff: Re: [NTG-context] Simple question

Thank you.

Is it possible to change the name of the resulting PDF file based on the 
language and a mode?

So that with a command

context language=fr mode=simple file.tex

the result is in

file-simple-fr.pdf

and with

context language=ru mode=none file.tex (or no mode given)

the result is

file-ru.pdf

G

On 10 May 2022, at 17:21, Wolfgang Schuster 
mailto:wolfgang.schuster.li...@gmail.com>> 
wrote:

Gerben Wierda via ntg-context schrieb am 10.05.2022 um 00:15:
What is the easiest way to have a ‘database’ of translations for strings and 
maybe links?

I now have 4 languages and 2 versions so 8 documents, but I’d like to have all 
translatable strings together so I can maintain these in a single file. Ideally 
I can do a file where the key of the translation is one language (say English) 
and the translations are part of that.

Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an \externalfigure 
command and \translatephrase can be used as as text.

In the end I’d like to compile with

context language=fr mode=simple mainfile.tex

Doable?

To set language dependent texts you can use the labeltext mechanism which is 
used by ConTeXt to change the captions for floats etc.

Besides the default \labeltext and \setuplabeltext commands you can create your 
own instance of the mechanism for your texts.

 begin example
\definelabelclass [gerben]

\setupgerbentext [en] [phrase=English phrase]
\setupgerbentext [nl] [phrase=Nederlandse frase]
\setupgerbentext [fr] [phrase=Phrase français]

%\mainlanguage[nl]
%\mainlanguage[fr]

\starttext
\gerbentext{phrase}
\stoptext
 end example

To change images you use multiple sub folders where each folder has images 
which the same name. In ConTeXt you can use a mode to choose which directory is 
used to load the image. Another method is to map the file names of the images 
to symbolic names and use only the symbolic names in your document.

 begin example
\setupexternalfigures [location={local,global,default}]

\useexternalfigure [simple] [cow.pdf]
%\useexternalfigure [simple] [hacker.png]

\starttext
\externalfigure[simple]
\stoptext
 end 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Simple question

2022-05-10 Thread Gerben Wierda via ntg-context
Thank you.

Is it possible to change the name of the resulting PDF file based on the 
language and a mode?

So that with a command

context language=fr mode=simple file.tex

the result is in

file-simple-fr.pdf

and with 

context language=ru mode=none file.tex (or no mode given)

the result is

file-ru.pdf

G

> On 10 May 2022, at 17:21, Wolfgang Schuster 
>  wrote:
> 
> Gerben Wierda via ntg-context schrieb am 10.05.2022 um 00:15:
>> What is the easiest way to have a ‘database’ of translations for strings and 
>> maybe links?
>> 
>> I now have 4 languages and 2 versions so 8 documents, but I’d like to have 
>> all translatable strings together so I can maintain these in a single file. 
>> Ideally I can do a file where the key of the translation is one language 
>> (say English) and the translations are part of that. 
>> 
>> Something I can call like this
>> 
>> \translatephrase[English phrase][nl]
>> \translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]
>> 
>> and where I can maintain all the translations a bit like this:
>> 
>> \translationentry[English phrase]{
>>  \definetranslatephrase[nl]Nederlandse frase]
>>  \definetranslatephrase[fr][Phrase français]
>>  }
>> }
>> 
>> \translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
>> \translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
>> 
>> 
>> Where the \translatelocation command can be used inside an \externalfigure 
>> command and \translatephrase can be used as as text.
>> 
>> In the end I’d like to compile with 
>> 
>> context language=fr mode=simple mainfile.tex
>> 
>> Doable?
> 
> To set language dependent texts you can use the labeltext mechanism which is 
> used by ConTeXt to change the captions for floats etc.
> 
> Besides the default \labeltext and \setuplabeltext commands you can create 
> your own instance of the mechanism for your texts.
> 
>  begin example
> \definelabelclass [gerben]
> 
> \setupgerbentext [en] [phrase=English phrase]
> \setupgerbentext [nl] [phrase=Nederlandse frase]
> \setupgerbentext [fr] [phrase=Phrase français]
> 
> %\mainlanguage[nl]
> %\mainlanguage[fr]
> 
> \starttext
> \gerbentext{phrase}
> \stoptext
>  end example
> 
> To change images you use multiple sub folders where each folder has images 
> which the same name. In ConTeXt you can use a mode to choose which directory 
> is used to load the image. Another method is to map the file names of the 
> images to symbolic names and use only the symbolic names in your document.
> 
>  begin example
> \setupexternalfigures [location={local,global,default}]
> 
> \useexternalfigure [simple] [cow.pdf]
> %\useexternalfigure [simple] [hacker.png]
> 
> \starttext
> \externalfigure[simple]
> \stoptext
>  end 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Simple question

2022-05-10 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 10.05.2022 um 00:15:
What is the easiest way to have a ‘database’ of translations for 
strings and maybe links?


I now have 4 languages and 2 versions so 8 documents, but I’d like to 
have all translatable strings together so I can maintain these in a 
single file. Ideally I can do a file where the key of the translation 
is one language (say English) and the translations are part of that.


Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an 
\externalfigure command and \translatephrase can be used as as text.


In the end I’d like to compile with

context language=fr mode=simple mainfile.tex

Doable?


To set language dependent texts you can use the labeltext mechanism 
which is used by ConTeXt to change the captions for floats etc.


Besides the default \labeltext and \setuplabeltext commands you can 
create your own instance of the mechanism for your texts.


 begin example
\definelabelclass [gerben]

\setupgerbentext [en] [phrase=English phrase]
\setupgerbentext [nl] [phrase=Nederlandse frase]
\setupgerbentext [fr] [phrase=Phrase français]

%\mainlanguage[nl]
%\mainlanguage[fr]

\starttext
\gerbentext{phrase}
\stoptext
 end example

To change images you use multiple sub folders where each folder has 
images which the same name. In ConTeXt you can use a mode to choose 
which directory is used to load the image. Another method is to map the 
file names of the images to symbolic names and use only the symbolic 
names in your document.


 begin example
\setupexternalfigures [location={local,global,default}]

\useexternalfigure [simple] [cow.pdf]
%\useexternalfigure [simple] [hacker.png]

\starttext
\externalfigure[simple]
\stoptext
 end 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Simple question

2022-05-10 Thread Henning Hraban Ramm via ntg-context

Am 10.05.22 um 00:15 schrieb Gerben Wierda via ntg-context:
What is the easiest way to have a ‘database’ of translations for strings 
and maybe links?


I now have 4 languages and 2 versions so 8 documents, but I’d like to 
have all translatable strings together so I can maintain these in a 
single file. Ideally I can do a file where the key of the translation is 
one language (say English) and the translations are part of that.


Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an 
\externalfigure command and \translatephrase can be used as as text.


In the end I’d like to compile with

context language=fr mode=simple mainfile.tex

Doable?

Gerben Wierda (LinkedIn )
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 


Book: Mastering ArchiMate 



Hi Gerben,

a lot is doable, it depends on by whom ;)
But this looks like a quite easy case.

Of course the answer is always “Lua tables”, but I guess the 
translations would be most easy to maintain in a CSV file (you can edit 
it in LibreOffice or Excel, while the latter often botches the encoding).


It could look like:

key;en;de;nl
yes;yes;ja;ja
LANG;English;Deutsch;Nederlands

i.e. the first column is the keyword and the other columns contain the 
translated term (so you can also change the “original” version).


(We’re using the same in a LaTeX3 project made by Marei.)

Without researching I assume there are already Lua functions to read a 
CSV file into a Lua table, and the lookup is easy – since I’m not fluent 
in Lua, I won’t provide the function(s) for you.


BTW there is already \translate 
(https://wiki.contextgarden.net/Command/translate) that changes text 
depending on the current language.


And there is the translate module that changes terms within the whole 
text: 
https://source.contextgarden.net/tex/context/modules/mkiv/m-translate.mkiv


Other options like .po files might be more versatile but also much more 
involved.


This covers \translatephrase; for your figures I’d just just a language 
variable in the path, like \externalfigure[images/\LANG/cow.pdf]

If this is always the current language, use \currentlanguage.
You can also setup the language dependent directory in 
\setupexternalfigures.


Regarding modes, the current language is set as a system mode (*en, 
*nl), and of course you can query modes with one of the many \doif 
macros. (https://wiki.contextgarden.net/Modes)
Since it doesn’t make sense to try 
\externalfigure[path/\currentmode/cow] (you never know how many modes 
are active), you can set a macro or variable depending on a mode:


\doifmode{simple}{\setvariable{gerben}{level}{simple}}
and then
\externalfigure[images/\getvariable{gerben}{level}/\currentlanguage/cow]

Hraban
___
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] Simple question

2022-05-09 Thread Gerben Wierda via ntg-context
What is the easiest way to have a ‘database’ of translations for strings and 
maybe links?

I now have 4 languages and 2 versions so 8 documents, but I’d like to have all 
translatable strings together so I can maintain these in a single file. Ideally 
I can do a file where the key of the translation is one language (say English) 
and the translations are part of that. 

Something I can call like this

\translatephrase[English phrase][nl]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][nl][simple]

and where I can maintain all the translations a bit like this:

\translationentry[English phrase]{
\definetranslatephrase[nl]Nederlandse frase]
\definetranslatephrase[fr][Phrase français]
}
}

\translatelocation[../LMTX-Output/without-ids/en/file.pdf][simple][nl][../LMTX-Output/without-ids/nl/file-simple.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]


Where the \translatelocation command can be used inside an \externalfigure 
command and \translatephrase can be used as as text.

In the end I’d like to compile with 

context language=fr mode=simple mainfile.tex

Doable?

Gerben Wierda (LinkedIn )
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
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] Simple question: how do I get the filename in the footer

2013-01-22 Thread Gerben Wierda
On 20 Jan 2013, at 22:32, Aditya Mahajan wrote:

 On Sun, 20 Jan 2013, Gerben Wierda wrote:
 
 You can add the \nonknuthmode to your document which makes _ and ^ normal 
 characters for text mode.
 
 Is that limited to a {}-scope? And more importantly, that catches ^ and _, 
 but what about whitespace etc. Isn;t there a true verbatim that I can use on 
 a macro like \currentcomponent? Something along the lines of 
 \verbatimexpand{\currentcomponent}?
 
 Untested: \filename{\currentcomponent}

Works. When outside a component (e.g. index) it defaults to the string 'text'.

Thanks,

G

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


[NTG-context] Simple question: how do I get the filename in the footer

2013-01-20 Thread Gerben Wierda
Simple question, guys (and gals),

how do I get the filename (full path not needed) in the footer of my document? 
I want it there while writing the book and remove it in the final stages. I am 
using MKII (TeXLive 2011 still)

texexec --pdf --mode=editor --once ../products/prd_book.tex
TeXExec | processing document '../products/prd_book.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
TeXExec | writing option file prd_book.top
TeXExec | using randomseed 712
TeXExec | tex engine: pdftex
TeXExec | tex format: cont-en.mkii
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)
 restricted \write18 enabled.
 (/usr/local/texlive/2011/texmf/web2c/natural.tcx)
entering extended mode
(../products/prd_book.tex

ConTeXt  ver: 2011.05.18 18:04 MKII  fmt: 2011.11.14  int: english/english

Thanks,

G
___
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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Philipp Gesang
Hi Gerben,

···date: 2013-01-20, Sunday···from: Gerben Wierda···

 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
if the name of the main file suffices, then the TeX command
\jobname is what you are looking for.

···

\setuppagenumbering[location=]
\setupfootertexts[pagenumber][{\jobname.tex}]
\starttext
\dorecurse{5}{\input knuth\page}
\stoptext

···

Regards
Philipp




pgpX2KnOO35O1.pgp
Description: PGP 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Gerben Wierda
On 20 Jan 2013, at 12:57, Philipp Gesang wrote:

 Hi Gerben,
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
 if the name of the main file suffices, then the TeX command
 \jobname is what you are looking for.

Thanks but that is not the one. Because I use the standard project setup, and 
the job is always to typeset the file prd_book.tex, but I want the chapter file 
names (e.g. chapter1.tex) in the footer.

So, prd_book contains:

\startbodymatter
 \component chapter1
 \component chapter2
 \component chapter3
\stopbodymatter

And I want chapter1.tex (maybe full path) in the footer.

G


 
 ···
 
 \setuppagenumbering[location=]
 \setupfootertexts[pagenumber][{\jobname.tex}]
 \starttext
 \dorecurse{5}{\input knuth\page}
 \stoptext
 
 ···
 
 Regards
 Philipp
 
 
 ___
 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Philipp Gesang
···date: 2013-01-20, Sunday···from: Gerben Wierda···

 On 20 Jan 2013, at 12:57, Philipp Gesang wrote:
 
  Hi Gerben,
  
  ···date: 2013-01-20, Sunday···from: Gerben Wierda···
  
  how do I get the filename (full path not needed) in the footer
  of my document? I want it there while writing the book and remove
  it in the final stages. I am using MKII (TeXLive 2011 still)
  
  if the name of the main file suffices, then the TeX command
  \jobname is what you are looking for.
 
 Thanks but that is not the one. Because I use the standard project setup, and 
 the job is always to typeset the file prd_book.tex, but I want the chapter 
 file names (e.g. chapter1.tex) in the footer.
 
 So, prd_book contains:
 
 \startbodymatter
  \component chapter1
  \component chapter2
  \component chapter3
 \stopbodymatter
 
 And I want chapter1.tex (maybe full path) in the footer.

If the component identifier matches the file name (e.g. if you
use the asterisk instead of a name), you can use
\currentcomponent. So the main file foo.tex would look like:

\setuppagenumbering[location=]
%% footer:main file-component file
\setupfootertexts[pagenumber][{\jobname-\currentcomponent}]
\startproduct *
  \input ward \page
  \component bar
\stopproduct

And bar.tex:

\startcomponent *
  \input knuth \page
\stopcomponent

Hth
Philipp



-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpDiZWb_os7E.pgp
Description: PGP 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Gerben Wierda
On 20 Jan 2013, at 16:09, Philipp Gesang wrote:

 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 On 20 Jan 2013, at 12:57, Philipp Gesang wrote:
 
 Hi Gerben,
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
 if the name of the main file suffices, then the TeX command
 \jobname is what you are looking for.
 
 Thanks but that is not the one. Because I use the standard project setup, 
 and the job is always to typeset the file prd_book.tex, but I want the 
 chapter file names (e.g. chapter1.tex) in the footer.
 
 So, prd_book contains:
 
 \startbodymatter
 \component chapter1
 \component chapter2
 \component chapter3
 \stopbodymatter
 
 And I want chapter1.tex (maybe full path) in the footer.
 
 If the component identifier matches the file name (e.g. if you
 use the asterisk instead of a name), you can use
 \currentcomponent. So the main file foo.tex would look like:
 
\setuppagenumbering[location=]
%% footer:main file-component file
\setupfootertexts[pagenumber][{\jobname-\currentcomponent}]
\startproduct *
  \input ward \page
  \component bar
\stopproduct
 
 And bar.tex:
 
\startcomponent *
  \input knuth \page
\stopcomponent

Hi Philipp,

that runs into the problem that the file name might contain characters that TeX 
does not like, e.g. underscore. Is there a command to catch that?

(./c_loosely.tex
! Missing $ inserted.
inserted text 
$
to be read again 
   _
\currentcomponent -c_
  loosely


Thanks,

G

 
 Hth
 Philipp
 
 
 
 -- 
 ()  ascii ribbon campaign - against html e-mail
 /\  www.asciiribbon.org   - against proprietary attachments
 ___
 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Wolfgang Schuster

Am 20.01.2013 um 18:06 schrieb Gerben Wierda gerben.wie...@rna.nl:

 On 20 Jan 2013, at 16:09, Philipp Gesang wrote:
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 On 20 Jan 2013, at 12:57, Philipp Gesang wrote:
 
 Hi Gerben,
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
 if the name of the main file suffices, then the TeX command
 \jobname is what you are looking for.
 
 Thanks but that is not the one. Because I use the standard project setup, 
 and the job is always to typeset the file prd_book.tex, but I want the 
 chapter file names (e.g. chapter1.tex) in the footer.
 
 So, prd_book contains:
 
 \startbodymatter
 \component chapter1
 \component chapter2
 \component chapter3
 \stopbodymatter
 
 And I want chapter1.tex (maybe full path) in the footer.
 
 If the component identifier matches the file name (e.g. if you
 use the asterisk instead of a name), you can use
 \currentcomponent. So the main file foo.tex would look like:
 
   \setuppagenumbering[location=]
   %% footer:main file-component file
   \setupfootertexts[pagenumber][{\jobname-\currentcomponent}]
   \startproduct *
 \input ward \page
 \component bar
   \stopproduct
 
 And bar.tex:
 
   \startcomponent *
 \input knuth \page
   \stopcomponent
 
 Hi Philipp,
 
 that runs into the problem that the file name might contain characters that 
 TeX does not like, e.g. underscore. Is there a command to catch that?

You can add the \nonknuthmode to your document which makes _ and ^ normal 
characters for text mode.

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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Gerben Wierda
On 20 Jan 2013, at 18:34, Wolfgang Schuster wrote:

 
 Am 20.01.2013 um 18:06 schrieb Gerben Wierda gerben.wie...@rna.nl:
 
 On 20 Jan 2013, at 16:09, Philipp Gesang wrote:
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 On 20 Jan 2013, at 12:57, Philipp Gesang wrote:
 
 Hi Gerben,
 
 ···date: 2013-01-20, Sunday···from: Gerben Wierda···
 
 how do I get the filename (full path not needed) in the footer
 of my document? I want it there while writing the book and remove
 it in the final stages. I am using MKII (TeXLive 2011 still)
 
 if the name of the main file suffices, then the TeX command
 \jobname is what you are looking for.
 
 Thanks but that is not the one. Because I use the standard project setup, 
 and the job is always to typeset the file prd_book.tex, but I want the 
 chapter file names (e.g. chapter1.tex) in the footer.
 
 So, prd_book contains:
 
 \startbodymatter
 \component chapter1
 \component chapter2
 \component chapter3
 \stopbodymatter
 
 And I want chapter1.tex (maybe full path) in the footer.
 
 If the component identifier matches the file name (e.g. if you
 use the asterisk instead of a name), you can use
 \currentcomponent. So the main file foo.tex would look like:
 
  \setuppagenumbering[location=]
  %% footer:main file-component file
  \setupfootertexts[pagenumber][{\jobname-\currentcomponent}]
  \startproduct *
\input ward \page
\component bar
  \stopproduct
 
 And bar.tex:
 
  \startcomponent *
\input knuth \page
  \stopcomponent
 
 Hi Philipp,
 
 that runs into the problem that the file name might contain characters that 
 TeX does not like, e.g. underscore. Is there a command to catch that?
 
 You can add the \nonknuthmode to your document which makes _ and ^ normal 
 characters for text mode.

Is that limited to a {}-scope? And more importantly, that catches ^ and _, but 
what about whitespace etc. Isn;t there a true verbatim that I can use on a 
macro like \currentcomponent? Something along the lines of 
\verbatimexpand{\currentcomponent}?

G

 
 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] Simple question: how do I get the filename in the footer

2013-01-20 Thread Aditya Mahajan

On Sun, 20 Jan 2013, Gerben Wierda wrote:


You can add the \nonknuthmode to your document which makes _ and ^ normal 
characters for text mode.


Is that limited to a {}-scope? And more importantly, that catches ^ and 
_, but what about whitespace etc. Isn;t there a true verbatim that I can 
use on a macro like \currentcomponent? Something along the lines of 
\verbatimexpand{\currentcomponent}?


Untested: \filename{\currentcomponent}

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


Re: [NTG-context] simple question on kerning activation

2012-11-28 Thread Hans Hagen

On 11/27/2012 6:11 PM, luigi scarso wrote:


I see this and I believe that there are kerning -- or not ?


yes, lots of them

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-28 Thread Wolfgang Schuster

Am 28.11.2012 um 10:01 schrieb Hans Hagen pra...@wxs.nl:

 On 11/27/2012 6:11 PM, luigi scarso wrote:
 
 I see this and I believe that there are kerning -- or not ?
 
 yes, lots of them

I tried your example with a few other fonts and none of them kerned so much and 
all of them had a good spacing for 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] simple question on kerning activation

2012-11-28 Thread Pablo Rodríguez
On 27/11/12 23:10, Hans Hagen wrote:
 
 Normally context will automatically fall back on latn but does so by 
 looking at the feature list. These fonts support so many scripts that 
 it's not possible.
 
 You (pablo) can report to the font designer that for features like 
 kerning a dflt,dflt pair makes sense.

Thank you very much, Hans, Wolfgang and Luigi for your help.

Sorry for the messages, but I used ConTeXt to check whether old
traditional kerning was enabled on FreeSerif fonts (not as OpenType
features). This is actually for an ereader.

As far as I know, I have to enable the Latin script in ConTeXt in all
the fonts I use with include OT features. That's fine for me.

What I couldn't understand before was that I was getting less kerns even
with the OpenType feature enabled. I took me a while to understand that
those kerns that weren't showing off in my file (my guess) were removed
in the latest version of FreeSerif.

BTW, I need to enable the Latin script even for features that belong to
other scripts, such as in Theano Didot (those contextual alternatives
and stylistic set 11 belong to the Greek script):

\usemodule[simplefonts]
\definefontfeature[default][default][script=latn,calt=yes,ss11=yes]
\setmainfont[Theano Didot]
\starttext
\startTEXpage[offset=10pt]
βάρβαροι θαυμασθεὶς
\stopTEXpage
\stoptext

Many thanks again 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
___

Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 26/11/12 23:46, Hans Hagen wrote:
 [...]
 Sure, kern tables are used and are quite valid in open type as well 
 (open type includes truetype).
 
 I see lots of kerns in:
 
 \starttext
  \startTEXpage[offset=10pt]
  \definedfont[file:freeserif.ttf*default] \showfontkerns \input ward
  \stopTEXpage
 \stoptext

Well, I don't see any kern.

Using ConTeXt - 2012.11.26 13:31 + LuaTeX-0.70.1.

What is wrong here?


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] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 27/11/12 00:11, Wolfgang Schuster wrote:
 [...]
 Is there a difference between the two lines?
 
 \usemodule[simplefonts]
 \setmainfont[FreeSerif]
 \starttext
 \showfontkerns
 dadedidodufafefifofufrflftlalelilolutatetitotu\par
 {\definedfont[file:serif*default]dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 \stoptext

No. None has any kerning.

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 27/11/12 18:04, Hans Hagen wrote:
 I see lots of kerns in:

 \starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
   \stopTEXpage
 \stoptext

 Well, I don't see any kern.
 
 attached

Mine attached to (excluding source)

 Using ConTeXt - 2012.11.26 13:31 + LuaTeX-0.70.1.

 What is wrong here?
 
 maybe the logs reveal something

BTW, on my computer fontconfig isn't able to find many system fonts. But
I guess this isn't the cause, since ConTeXt deals directly with the fonts.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk


kern.tuc
Description: application/tamp-update-confirm


kern.pdf
Description: application/binary
(/opt/ctxbeta/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2012.11.26 13:31 MKIV  fmt: 2012.11.27  int: english/english

system   cont-new.mkiv loaded
(/opt/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   files  jobname: kern, input: kern, result: kern
fontslatin modern fonts are not preloaded
languageslanguage en is active
(kern.tex{/opt/ctxbeta/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
fontstypescripts  unknown: library 'loc'
{/opt/ctxbeta/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/ctxbeta/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsfallback modern rm 12pt is loaded

% begin of command line arguments
%
% script   = true
% fulljobname  = ./kern.tex
% input= ./kern.tex
% no-parse-first-line  = true
% kindofrun= 2
% currentrun   = 3
%
% end of command line arguments

% begin of command line files
%
% 1  ./kern.tex
%
% end of command line files

visualizeenabled
(/opt/ctxbeta/tex/texmf-context/tex/context/sample/ward.tex)
backend  xmp  using file '/opt/ctxbeta/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
 ) )/usr/share/fonts/ousia-fonts/FreeSerif.ttf

system   files  start used files

used files  1: filename=cont-yes.mkiv | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/base/cont-yes.mkiv | usedmethod=database
used files  2: filename=cont-new.mkiv | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=database
used files  3: filename=lang-us.lua | filetype=lua | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=database
used files  4: filename=kern.tex | foundname=kern.tex | usedmethod=direct
used files  5: filename=mkiv-base.map | filetype=map | format=map | foundname=/opt/ctxbeta/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map | usedmethod=database
used files  6: filename=lm.lfg | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/fonts/lm.lfg | usedmethod=database
used files  7: filename=lm-math.lfg | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/fonts/lm-math.lfg | usedmethod=database
used files  8: filename=lm-math.map | filetype=map | format=map | foundname=/opt/ctxbeta/tex/texmf/fonts/map/dvips/lm/lm-math.map | usedmethod=database
used files  9: filename=lm-rm.map | filetype=map | format=map | foundname=/opt/ctxbeta/tex/texmf/fonts/map/dvips/lm/lm-rm.map | usedmethod=database
used files 10: filename=lmroman12-regular | filetype=otf | format=otf | foundname=/opt/ctxbeta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf | usedmethod=database
used files 11: filename=lmmath-regular.otf | filetype=opentypefonts | foundname=/opt/ctxbeta/tex/texmf/fonts/opentype/public/lm/lmmath-regular.otf | usedmethod=database
used files 12: filename=lmmath-regular.otf | filetype=otf | format=otf | foundname=/opt/ctxbeta/tex/texmf/fonts/opentype/public/lm/lmmath-regular.otf | usedmethod=database
used files 13: filename=/usr/share/fonts/ousia-fonts/FreeSerif.ttf | format=ttf | foundname=/usr/share/fonts/ousia-fonts/FreeSerif.ttf | usedmethod=direct
used files 14: filename=lmmonoltcond10-regular.otf | filetype=otf | format=otf | foundname=/opt/ctxbeta/tex/texmf/fonts/opentype/public/lm/lmmonoltcond10-regular.otf | usedmethod=database
used files 15: filename=ward | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/sample/ward.tex | usedmethod=database
used files 16: filename=lpdf-pdx.xml | filetype=tex | foundname=/opt/ctxbeta/tex/texmf-context/tex/context/base/lpdf-pdx.xml | usedmethod=database

system   files  stop used files


system   structure  start used structure

used structure   text: kern

system   structure  stop used structure


mkiv lua stats   used config file  - selfautoparent:/texmf/web2c/texmfcnf.lua

Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread luigi scarso
On Tue, Nov 27, 2012 at 6:36 PM, Pablo Rodríguez oi...@web.de wrote:
 \starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
   \stopTEXpage
 \stoptext

this is mine


--
luigi


test-3.pdf
Description: Adobe PDF document
___
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] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 27/11/12 18:42, luigi scarso wrote:
 On Tue, Nov 27, 2012 at 6:36 PM, Pablo Rodríguez oi...@web.de wrote:
 \starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
   \stopTEXpage
 \stoptext

 this is mine

Something must be wrong with my configuration, since i don't even get
all kerns using the OT kern feature.

Any ideas of what could be wrong?

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread luigi scarso
On Tue, Nov 27, 2012 at 6:46 PM, Pablo Rodríguez oi...@web.de wrote:
 On 27/11/12 18:42, luigi scarso wrote:
 On Tue, Nov 27, 2012 at 6:36 PM, Pablo Rodríguez oi...@web.de wrote:
 \starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
   \stopTEXpage
 \stoptext

 this is mine

 Something must be wrong with my configuration, since i don't even get
 all kerns using the OT kern feature.

 Any ideas of what could be wrong?

hm, no.
In this situation I usually reinstall context on a new folder, or
rerun first-setup

--
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] simple question on kerning activation

2012-11-27 Thread Hans Hagen

On 11/27/2012 6:36 PM, Pablo Rodríguez wrote:

On 27/11/12 18:04, Hans Hagen wrote:

I see lots of kerns in:

\starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input ward
   \stopTEXpage
\stoptext


Well, I don't see any kern.


attached


Mine attached to (excluding source)


Using ConTeXt - 2012.11.26 13:31 + LuaTeX-0.70.1.

What is wrong here?


maybe the logs reveal something


BTW, on my computer fontconfig isn't able to find many system fonts. But
I guess this isn't the cause, since ConTeXt deals directly with the fonts.


the font gets included .. so maybe someone else should also test it


Many thanks for your help,


are you sure that the font is okay? mine is 1.687.516 bytes

btw, the font has kerns (gpos feature using classes)

mtxrun --script font --save freeserif.ttf

shows the internals (in a lua file)

mtxrun --script font --list --info --file freeserif.ttf

shows all features

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 27/11/12 18:56, Hans Hagen wrote:
 On 11/27/2012 6:36 PM, Pablo Rodríguez wrote:
 I see lots of kerns in:

 \starttext
\startTEXpage[offset=10pt]
\definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
\stopTEXpage
 \stoptext

 Well, I don't see any kern.
 [...]
 the font gets included .. so maybe someone else should also test it
 
 are you sure that the font is okay? mine is 1.687.516 bytes

Probably my font is newer (from
http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).

I think there is no file clash, since ConTeXt standalone doesn't provide
the font

 btw, the font has kerns (gpos feature using classes)
 
 mtxrun --script font --save freeserif.ttf
 
 shows the internals (in a lua file)
 
 mtxrun --script font --list --info --file freeserif.ttf
 
 shows all features

Well, I know that the font has kern as OpenType feature, but I need it
to have the TrueType kern table (not the OpenType feature).

At least on my ConTeXt installation, OpenType features aren't enabled by
default.

I used ConTeXt to check the font wrong kerns that my ereader (Sony
PRS-T1) showed with this font.

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread Wolfgang Schuster

Am 27.11.2012 um 20:34 schrieb Pablo Rodríguez oi...@web.de:

 On 27/11/12 18:56, Hans Hagen wrote:
 On 11/27/2012 6:36 PM, Pablo Rodríguez wrote:
 I see lots of kerns in:
 
 \starttext
   \startTEXpage[offset=10pt]
   \definedfont[file:freeserif.ttf*default] \showfontkerns \input 
 ward
   \stopTEXpage
 \stoptext
 
 Well, I don't see any kern.
 [...]
 the font gets included .. so maybe someone else should also test it
 
 are you sure that the font is okay? mine is 1.687.516 bytes
 
 Probably my font is newer (from
 http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).
 
 I think there is no file clash, since ConTeXt standalone doesn't provide the 
 font

The font files from the gnu page have no kerning but the files from
http://de.fonts2u.com/free-serif.schriftart have kerning information.

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] simple question on kerning activation

2012-11-27 Thread Hans Hagen

On 11/27/2012 8:34 PM, Pablo Rodríguez wrote:

 Probably my font is newer (from

http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).


i got it from:

http://www.fonts2u.com/


At least on my ConTeXt installation, OpenType features aren't enabled by
default.


hard to believe

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-27 Thread Pablo Rodríguez
On 27/11/12 22:34, Wolfgang Schuster wrote:
 Am 27.11.2012 um 20:34 schrieb Pablo Rodríguez oi...@web.de:
 [...]
 Probably my font is newer (from
 http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).

 I think there is no file clash, since ConTeXt standalone doesn't provide the 
 font
 
 The font files from the gnu page have no kerning but the files from
 http://de.fonts2u.com/free-serif.schriftart have kerning information.

Many thanks for your reply, Wolfgang.

I'd like to report this to the font developer (he has assured me that
the fonts have kerning).

How have you discovered that the Savannah FreeSerif fonts have no
kerning info?

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-27 Thread Hans Hagen

On 11/27/2012 8:34 PM, Pablo Rodríguez wrote:

On 27/11/12 18:56, Hans Hagen wrote:

On 11/27/2012 6:36 PM, Pablo Rodríguez wrote:

I see lots of kerns in:

\starttext
\startTEXpage[offset=10pt]
\definedfont[file:freeserif.ttf*default] \showfontkerns \input ward
\stopTEXpage
\stoptext


Well, I don't see any kern.

[...]
the font gets included .. so maybe someone else should also test it

are you sure that the font is okay? mine is 1.687.516 bytes


Probably my font is newer (from
http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).


that version misses a dflt,dflt - kern definition so you need to add:

\definefontfeature[default][default][script=latn]

at the top of your document


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-27 Thread Wolfgang Schuster

Am 27.11.2012 um 22:43 schrieb Pablo Rodríguez oi...@web.de:

 On 27/11/12 22:34, Wolfgang Schuster wrote:
 Am 27.11.2012 um 20:34 schrieb Pablo Rodríguez oi...@web.de:
 [...]
 Probably my font is newer (from
 http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).
 
 I think there is no file clash, since ConTeXt standalone doesn't provide 
 the font
 
 The font files from the gnu page have no kerning but the files from
 http://de.fonts2u.com/free-serif.schriftart have kerning information.
 
 Many thanks for your reply, Wolfgang.
 
 I'd like to report this to the font developer (he has assured me that
 the fonts have kerning).
 
 How have you discovered that the Savannah FreeSerif fonts have no
 kerning info?

That’s not what I wanted to write. I had the same thought as Hans with the 
missing
for the “default” script (AFAIR this was also a problem with other fonts in the 
past)
but I wanted to test it first but he was faster than me.

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] simple question on kerning activation

2012-11-27 Thread Hans Hagen

On 11/27/2012 10:58 PM, Wolfgang Schuster wrote:


Am 27.11.2012 um 22:43 schrieb Pablo Rodríguez oi...@web.de:


On 27/11/12 22:34, Wolfgang Schuster wrote:

Am 27.11.2012 um 20:34 schrieb Pablo Rodríguez oi...@web.de:
[...]

Probably my font is newer (from
http://ftp.gnu.org/gnu/freefont/freefont-ttf-20120503.zip).

I think there is no file clash, since ConTeXt standalone doesn't provide the 
font


The font files from the gnu page have no kerning but the files from
http://de.fonts2u.com/free-serif.schriftart have kerning information.


Many thanks for your reply, Wolfgang.

I'd like to report this to the font developer (he has assured me that
the fonts have kerning).

How have you discovered that the Savannah FreeSerif fonts have no
kerning info?


That’s not what I wanted to write. I had the same thought as Hans with the 
missing
for the “default” script (AFAIR this was also a problem with other fonts in the 
past)
but I wanted to test it first but he was faster than me.


Normally context will automatically fall back on latn but does so by 
looking at the feature list. These fonts support so many scripts that 
it's not possible.


You (pablo) can report to the font designer that for features like 
kerning a dflt,dflt pair makes sense.


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


[NTG-context] simple question on kerning activation

2012-11-26 Thread Pablo Rodríguez
Hi there,

I have the following file to check a feature in FreeSerif:

\setuppapersize[A4,landscape]
\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext

dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-26 Thread Hans Hagen

On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:

Hi there,

I have the following file to check a feature in FreeSerif:

\setuppapersize[A4,landscape]
\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext

dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?


kerning is *always* driven by the font, given that the font has kerns 
(not all fonts need them)


you can see kern sin action with:

\starttext

\showfontkerns \input ward

\stoptext


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-26 Thread Pablo Rodríguez
On 26/11/12 21:39, Hans Hagen wrote:
 On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:
 Sorry for the stupid question: isn't it font kerning (not kern OT table,
 but traditional non-OT kerning) enabled when compiling this source?
 
 kerning is *always* driven by the font, given that the font has kerns 
 (not all fonts need them)

Thanks for your reply, Hans.

Sorry, my question was inaccurate.

I know that kerning information is in the font, but it is ConTeXt that
uses this information (or not).

As far as I know, there are two kinds of kerningns: an OT kern feature
from the GPOS table and an old TrueType 'kern' table.

In the following sample OpenType features aren't enabled:

\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
by default in ConTeXt? (The glyphs in the example above have no kerning
at all, so I wonder whether at least the TrueType 'kern' table should be
used by ConTeXt.)

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-26 Thread Hans Hagen

On 11/26/2012 11:04 PM, Pablo Rodríguez wrote:

On 26/11/12 21:39, Hans Hagen wrote:

On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?


kerning is *always* driven by the font, given that the font has kerns
(not all fonts need them)


Thanks for your reply, Hans.

Sorry, my question was inaccurate.

I know that kerning information is in the font, but it is ConTeXt that
uses this information (or not).

As far as I know, there are two kinds of kerningns: an OT kern feature
from the GPOS table and an old TrueType 'kern' table.

In the following sample OpenType features aren't enabled:

\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
by default in ConTeXt? (The glyphs in the example above have no kerning
at all, so I wonder whether at least the TrueType 'kern' table should be
used by ConTeXt.)


Sure, kern tables are used and are quite valid in open type as well 
(open type includes truetype).


I see lots of kerns in:

\starttext

\startTEXpage[offset=10pt]

\definedfont[file:freeserif.ttf*default] \showfontkerns \input ward

\stopTEXpage

\stoptext

I assume simplefonts uses the default featureset

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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] simple question on kerning activation

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 23:04 schrieb Pablo Rodríguez oi...@web.de:

 On 26/11/12 21:39, Hans Hagen wrote:
 On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:
 Sorry for the stupid question: isn't it font kerning (not kern OT table,
 but traditional non-OT kerning) enabled when compiling this source?
 
 kerning is *always* driven by the font, given that the font has kerns 
 (not all fonts need them)
 
 Thanks for your reply, Hans.
 
 Sorry, my question was inaccurate.
 
 I know that kerning information is in the font, but it is ConTeXt that
 uses this information (or not).
 
 As far as I know, there are two kinds of kerningns: an OT kern feature
 from the GPOS table and an old TrueType 'kern' table.
 
 In the following sample OpenType features aren't enabled:
 
 \usemodule[simplefonts][size=30pt]
 \setmainfont[FreeSerif]
 \starttext
 dadedidodufafefifofufrflftlalelilolutatetitotu\par
 {\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 {\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 {\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 \stoptext
 
 I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
 by default in ConTeXt? (The glyphs in the example above have no kerning
 at all, so I wonder whether at least the TrueType 'kern' table should be
 used by ConTeXt.)

Is there a difference between the two lines?

\usemodule[simplefonts]
\setmainfont[FreeSerif]
\starttext
\showfontkerns
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\definedfont[file:serif*default]dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\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
___


[NTG-context] simple question: newline in chapter header?

2004-11-05 Thread Miek Gieben
Hello,

I'm trying to switch from latex to context and I'm trying to 
port the book class from latex to a context document.

Right now I'm working on the chapter def and I have:

\definetext[chapter][footer][pagenumber]
\setuphead[chapter][
header=empty, footer=chapter,
textstyle=bold,
numberstyle=bold,
numbercommand=Chapter ,
textcommand={\bfc},
after={\blank[4*big]}]

But this doesn't give a newline after the chapter number. If I change

textcommand={\bfc},
to
textcommand={\\ \bfc},

I do get a newline, but then the chapter title is not aligned to the
left side of the document? Even if I try to left aline this it does 
seem work. :(

What I'm I missing here?

Thanks a lot!

grtz,
  --Miek

--
today's fortune:
Chemist who falls in acid is absorbed in work.
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] simple question: newline in chapter header?

2004-11-05 Thread Hans Hagen
Miek Gieben wrote:
Hello,
I'm trying to switch from latex to context and I'm trying to 
port the book class from latex to a context document.

Right now I'm working on the chapter def and I have:
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][
header=empty, footer=chapter,
textstyle=bold,
numberstyle=bold,
numbercommand=Chapter ,
textcommand={\bfc},
after={\blank[4*big]}]
But this doesn't give a newline after the chapter number. If I change
textcommand={\bfc},
to
textcommand={\\ \bfc},
I do get a newline, but then the chapter title is not aligned to the
left side of the document? Even if I try to left aline this it does 
seem work. :(

What I'm I missing here?
use
\def\MyHeadCommand#1#2%
  {\vbox{#1\par#2}}
with
command=\MyHeadCommand
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
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] simple question: newline in chapter header?

2004-11-05 Thread Miek Gieben
[On 05 Nov, @ 14:53, Hans wrote in Re: [NTG-context] simple quest ...]
 seem work. :(
 
 What I'm I missing here?
 
 use
 
 \def\MyHeadCommand#1#2%
   {\vbox{#1\par#2}}
 
 with
 
 command=\MyHeadCommand

ofcourse \par! :)

thanks!

grtz Miek
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context