ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Indent missed after \placefigure[inner]
       [not found] <mailman.448.1258320461.22155.ntg-context@ntg.nl>
@ 2009-11-15 22:15 ` Vyatcheslav Yatskovsky
  2009-11-16 10:13   ` Wolfgang Schuster
  2009-11-15 22:19 ` Indent missed after \placefigure[inner] Vyatcheslav Yatskovsky
  1 sibling, 1 reply; 16+ messages in thread
From: Vyatcheslav Yatskovsky @ 2009-11-15 22:15 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 3301 bytes --]

Hello,

I've asked about this issue already, but maybe my cry for help was missed )

After I include a grapichs with \placefigure[inner], the next paragraph 
is not indented. This looks very strange, because the figure floats at a 
side, and nothing suggests that new paragraph begins. I'm forced to 
issue \hskip0.7cm to imitate the indent.

With \placefigure[middle], everything is OK because I use some magic 
setup kindly suggested by Wolfgang:

\setupfloat[figure][indentnext=yes]

Maybe I should expand this setup with other keywords?

Pleaase, see attached image for illustration. This is an excerpt from my 
code:

%--------------------------------------------------------------------------

Передбачається використання певної системи одиниць виміру, скажемо, 
метричної, так що одиниця довжини точно визначена. Відповідність між 
точками тривимірного евклідового простору і їхніх

координат може бути задано або радіусом-вектором

\startformula r = \overline {OP} = x{e_x} + y{e_y} + z{e_z}, \stopformula

де ${e_x}, {e_y}, {e_z}$ — одиничні вектори осей, або матрицями: 
координатним рядком $[x, y, z]$ або координатним вектором-стовпцем

$ \left| {\matrix{

x \cr

y \cr

z \cr

} } \right|, $

причому координати $х$, $у$ і $z$ точки {\it Р} у цій системі координат 
задаються

як довжини (з відповідним знаком) перпендикулярних проекцій вектора {\it 
OP} на вектори $i$, $j$ і $k$ (рис.2.4).

\placefigure[inner]{ }

{\externalfigure[image219.png][scale=900]}

\hskip0.7cm У машинній графіці широко застосовуються однорідні 
координати, які дозволяють {\it n}--мірний об'єкт представити в 
$(n+1)$--мірному просторі, шляхом додавання ще однієї координати — 
скалярного множника. Однорідні координати є основними в проективній 
геометрії, у машинній графіці вони зручний штучний прийом, що дозволяє

привести до лінійної форми перспективні зображення. Однорідні координати 
дають

можливість записувати невласні (нескінченно вилучені) точки простору, а 
також

виражати афінні перетворення в зручній матричній формі, уникаючи 
переповнення

розрядної сітки ЕОМ за рахунок нормалізації чисел [2].



P.S. Is there a keyword that produces an indent? (like \makeindent)

P.S. If no, how can I specify that I want big horizontal skip instead of 
a number as in \hskip0.7cm ?

Regards,
Vyatcheslav

[-- Attachment #2: 2009-11-16_000820.png --]
[-- Type: image/png, Size: 80036 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Indent missed after \placefigure[inner]
       [not found] <mailman.448.1258320461.22155.ntg-context@ntg.nl>
  2009-11-15 22:15 ` Indent missed after \placefigure[inner] Vyatcheslav Yatskovsky
@ 2009-11-15 22:19 ` Vyatcheslav Yatskovsky
  1 sibling, 0 replies; 16+ messages in thread
From: Vyatcheslav Yatskovsky @ 2009-11-15 22:19 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 3286 bytes --]

Hello,

I've asked about this issue already, but probably my cry for help was 
missed )

After I include a grapichs with \placefigure[inner], the next paragraph 
is not indented. This looks very strange, because the figure floats at a 
side, and nothing suggests that new paragraph begins. I'm forced to 
issue \hskip0.7cm to imitate the indent.

With \placefigure[middle], everything is OK because I use some magic 
setup kindly suggested by Wolfgang:

\setupfloat[figure][indentnext=yes]

Maybe I should expand this setup with other keywords?

Pleaase, see attached image for illustration. This is an excerpt from my 
code:

%--------------------------------------------------------------------------

Передбачається використання певної системи одиниць виміру, скажемо, 
метричної, так що одиниця довжини точно визначена. Відповідність між 
точками тривимірного евклідового простору і їхніх координат може бути 
задано або радіусом-вектором

\startformula r = \overline {OP} = x{e_x} + y{e_y} + z{e_z}, \stopformula

де ${e_x}, {e_y}, {e_z}$ — одиничні вектори осей, або матрицями: 
координатним рядком $[x, y, z]$ або координатним вектором-стовпцем
$ \left| {\matrix{
x \cr
y \cr
z \cr
} } \right|, $

причому координати $х$, $у$ і $z$ точки {\it Р} у цій системі координат 
задаються як довжини (з відповідним знаком) перпендикулярних проекцій 
вектора {\it OP} на вектори $i$, $j$ і $k$ (рис.2.4).

\placefigure[inner]{ }
{\externalfigure[image219.png][scale=900]}

\hskip0.7cm У машинній графіці широко застосовуються однорідні 
координати, які дозволяють {\it n}--мірний об'єкт представити в 
$(n+1)$--мірному просторі, шляхом додавання ще однієї координати — 
скалярного множника. Однорідні координати є основними в проективній 
геометрії, у машинній графіці вони зручний штучний прийом, що дозволяє 
привести до лінійної форми перспективні зображення. Однорідні координати 
дають можливість записувати невласні (нескінченно вилучені) точки 
простору, а також виражати афінні перетворення в зручній матричній 
формі, уникаючи переповнення розрядної сітки ЕОМ за рахунок нормалізації 
чисел [2].



P.S. Is there a keyword that produces an indent? (like \makeindent)

P.S. If no, how can I specify that I want big horizontal skip instead of 
a number as in \hskip0.7cm ?

Regards,
Vyatcheslav



[-- Attachment #2: 2009-11-16_000820.png --]
[-- Type: image/png, Size: 41904 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: Indent missed after \placefigure[inner]
  2009-11-15 22:15 ` Indent missed after \placefigure[inner] Vyatcheslav Yatskovsky
@ 2009-11-16 10:13   ` Wolfgang Schuster
  2009-11-16 10:33     ` osx-64-binaries/minimals Andreas Harder
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2009-11-16 10:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 15.11.2009 um 23:15 schrieb Vyatcheslav Yatskovsky:

> Hello,
> 
> I've asked about this issue already, but maybe my cry for help was missed )

Your chance to get an answer will be bigger when you provide a short and working example.

> P.S. Is there a keyword that produces an indent? (like \makeindent)


Read Adityas TuGboat article about indenting and you will know \indentation is what you want. 

http://www.tug.org/TUGboat/Articles/tb29-2/tb92mahajan.pdf

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* osx-64-binaries/minimals
  2009-11-16 10:13   ` Wolfgang Schuster
@ 2009-11-16 10:33     ` Andreas Harder
  2009-11-17 15:05       ` osx-64-binaries/minimals Mojca Miklavec
  2009-11-18 12:49       ` osx-64-binaries/minimals Mojca Miklavec
  0 siblings, 2 replies; 16+ messages in thread
From: Andreas Harder @ 2009-11-16 10:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all!

If I update the minimals via first-setup.sh I get the 32bit-binaries (luatex) although I'm on Snow Leopard. If I change the binaries myself it works fine and the compilation is notable faster!

Greetings
	Andreas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-16 10:33     ` osx-64-binaries/minimals Andreas Harder
@ 2009-11-17 15:05       ` Mojca Miklavec
  2009-11-17 15:44         ` osx-64-binaries/minimals Hans Hagen
  2009-11-18 12:49       ` osx-64-binaries/minimals Mojca Miklavec
  1 sibling, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2009-11-17 15:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang

On Mon, Nov 16, 2009 at 11:33, Andreas Harder wrote:
> Hi all!
>
> If I update the minimals via first-setup.sh I get the 32bit-binaries (luatex) although I'm on Snow Leopard. If I change the binaries myself it works fine and the compilation is notable faster!

We had a lengthy discussion about Snow Leopard. The last message was
Yue Wang's proposal to check for 64-bit compatibility:

> The hardware test:
> Yue:context yue$  if test `sysctl -n hw.cpu64bit_capable | grep -c 1` = 1 ; then  echo yes; else echo no; fi
> yes
>
> The software test:
> Yue:context yue$  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then echo yes; else echo no; fi
> yes

This test needs to be fixed in:
- first-setup.sh
- setuptex
- mtxrun.lua

The biggest problem is the latest one. I'm not sure if Hans is willing
to implement that in MKIV and I'm still not decided if I want to mess
with that ugly code or not.

The reason for the change:
- a bit faster and a bit more puristic

The reason against the change:
- a bit ugly
- the 32-bit binaries work
- one can always boot in 64-bit mode

There's always a third option to provide fat binaries, but as others
would probably confirm: they are a bit fat indeed. Three times the
original size since we now support 3 platforms.

Any other votes?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-17 15:05       ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-17 15:44         ` Hans Hagen
  2009-11-17 16:16           ` osx-64-binaries/minimals Taco Hoekwater
  0 siblings, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2009-11-17 15:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang

Mojca Miklavec wrote:
> On Mon, Nov 16, 2009 at 11:33, Andreas Harder wrote:
>> Hi all!
>>
>> If I update the minimals via first-setup.sh I get the 32bit-binaries (luatex) although I'm on Snow Leopard. If I change the binaries myself it works fine and the compilation is notable faster!
> 
> We had a lengthy discussion about Snow Leopard. The last message was
> Yue Wang's proposal to check for 64-bit compatibility:
> 
>> The hardware test:
>> Yue:context yue$  if test `sysctl -n hw.cpu64bit_capable | grep -c 1` = 1 ; then  echo yes; else echo no; fi
>> yes
>>
>> The software test:
>> Yue:context yue$  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then echo yes; else echo no; fi
>> yes

hm, we need to use the methods built in luatex

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-17 15:44         ` osx-64-binaries/minimals Hans Hagen
@ 2009-11-17 16:16           ` Taco Hoekwater
  2009-11-17 16:33             ` osx-64-binaries/minimals Mojca Miklavec
  0 siblings, 1 reply; 16+ messages in thread
From: Taco Hoekwater @ 2009-11-17 16:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang



Hans Hagen wrote:
> Mojca Miklavec wrote:
>> On Mon, Nov 16, 2009 at 11:33, Andreas Harder wrote:
>>> Hi all!
>>>
>>> If I update the minimals via first-setup.sh I get the 32bit-binaries
>>> (luatex) although I'm on Snow Leopard. If I change the binaries
>>> myself it works fine and the compilation is notable faster!
>>
>> We had a lengthy discussion about Snow Leopard. The last message was
>> Yue Wang's proposal to check for 64-bit compatibility:
>>
>>> The hardware test:
>>> Yue:context yue$  if test `sysctl -n hw.cpu64bit_capable | grep -c 1`
>>> = 1 ; then  echo yes; else echo no; fi
>>> yes
>>>
>>> The software test:
>>> Yue:context yue$  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then
>>> echo yes; else echo no; fi
>>> yes
> 
> hm, we need to use the methods built in luatex

Someone should check what is returned in the os.uname() return table.

Best wishes,
Taco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-17 16:16           ` osx-64-binaries/minimals Taco Hoekwater
@ 2009-11-17 16:33             ` Mojca Miklavec
  2009-11-18  6:31               ` osx-64-binaries/minimals Taco Hoekwater
  0 siblings, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2009-11-17 16:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang

On Tue, Nov 17, 2009 at 17:16, Taco Hoekwater wrote:
> Hans Hagen wrote:
>> Mojca Miklavec wrote:
>>> On Mon, Nov 16, 2009 at 11:33, Andreas Harder wrote:
>>>> Hi all!
>>>>
>>>> If I update the minimals via first-setup.sh I get the 32bit-binaries
>>>> (luatex) although I'm on Snow Leopard. If I change the binaries
>>>> myself it works fine and the compilation is notable faster!
>>>
>>> We had a lengthy discussion about Snow Leopard. The last message was
>>> Yue Wang's proposal to check for 64-bit compatibility:
>>>
>>>> The hardware test:
>>>> Yue:context yue$  if test `sysctl -n hw.cpu64bit_capable | grep -c 1`
>>>> = 1 ; then  echo yes; else echo no; fi
>>>> yes
>>>>
>>>> The software test:
>>>> Yue:context yue$  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then
>>>> echo yes; else echo no; fi
>>>> yes
>>
>> hm, we need to use the methods built in luatex
>
> Someone should check what is returned in the os.uname() return table.

Mine returns

t={
 ["machine"]="x86_64",
 ["nodename"]="...[my ip]...",
 ["release"]="10.0.0",
 ["sysname"]="Darwin",
 ["version"]="Darwin Kernel Version 10.0.0: Fri Jul 31 22:46:25 PDT
2009; root:xnu-1456.1.25~1/RELEASE_X86_64",
}

but I'm booting in 64-bit mode (I need to reboot first to check for
return value in 32-bit mode).

On one hand uname doesn't return anything usable when booting with
32-bit kernel, but on the other hand one probably already runs the
64-bit luatex at the time when mtxrun needs to determine the
architecture.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-17 16:33             ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-18  6:31               ` Taco Hoekwater
  0 siblings, 0 replies; 16+ messages in thread
From: Taco Hoekwater @ 2009-11-18  6:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang

Mojca Miklavec wrote:
>>>>> The software test:
>>>>> Yue:context yue$  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then
>>>>> echo yes; else echo no; fi
>>>>> yes
>>> hm, we need to use the methods built in luatex
>> Someone should check what is returned in the os.uname() return table.
> 
> Mine returns
> 
> t={
>  ["machine"]="x86_64",
>  ["nodename"]="...[my ip]...",
>  ["release"]="10.0.0",
>  ["sysname"]="Darwin",
>  ["version"]="Darwin Kernel Version 10.0.0: Fri Jul 31 22:46:25 PDT
> 2009; root:xnu-1456.1.25~1/RELEASE_X86_64",
> }
> 
> but I'm booting in 64-bit mode (I need to reboot first to check for
> return value in 32-bit mode).
> 
> On one hand uname doesn't return anything usable when booting with
> 32-bit kernel, but on the other hand one probably already runs the
> 64-bit luatex at the time when mtxrun needs to determine the
> architecture.

Well, I doubt you can discover whether you have a totally 32bit software
environment with a 64bit kernel without lots of trickery (but I could
be wrong about that). In any case, os.uname() will give the same results
as the shell command uname.

64bit osx runs 32bit executables (I assume) so you could make the
initial luatex (the one used during install) be a 32bit one, then make
that one decide on which one to use for normal typesetting?

Best wishes,
Taco


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-16 10:33     ` osx-64-binaries/minimals Andreas Harder
  2009-11-17 15:05       ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-18 12:49       ` Mojca Miklavec
  2009-11-19  1:18         ` osx-64-binaries/minimals Mojca Miklavec
  1 sibling, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2009-11-18 12:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Yue Wang

> If I update the minimals via first-setup.sh I get the 32bit-binaries (luatex) although I'm on Snow Leopard. If I change the binaries myself it works fine and the compilation is notable faster!

Andreas,

Can you please try one thing?

In first-setup.sh you can try to add the following lines (around line
56, after the platforms are being recognized):

if test "$platform" = "osx-intel"; then
  # running Snow Leopard or later
  if test `uname -r|cut -f1 -d"."`  -ge 10 ; then
    # working on 64-bit hardware
    if test `sysctl -n hw.cpu64bit_capable` = 1; then
      platform="osx-64"
    fi
  fi
fi

And then update the minimals. After that try to paste the same lines
to "setuptex" around line 59, try to run setuptex and try if you get
the 64-bit binaries and if they work fine (I can try to do that
myself, but I try to avoid rebooting my machine too often). You need
to fix setuptex after you update the distribution since updating will
change setuptex.

If that works for you, I'll fix it.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-18 12:49       ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-19  1:18         ` Mojca Miklavec
  2009-11-19  6:59           ` osx-64-binaries/minimals Taco Hoekwater
  0 siblings, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2009-11-19  1:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

OK, I did a nasty thing. I have patched "setuptex" to run 64-bit
binaries on Snow Leopard.

There is only one problem: mtxrun doesn't know that one is running on
a 64-bit platform and consequently fetches just 32-bit binaries.

Consequently one needs to call mtx-update with "--platform=osx-64". I
fixed first-setup.sh, but existing Snow Leopard users with 32-bit
kernels will have to add that to first-setup.sh themselves ... or we
need to revert the change.

Hans, Taco - does LuaTeX itself know if it's 64-bit or not?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-19  1:18         ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-19  6:59           ` Taco Hoekwater
  2009-11-19  8:43             ` osx-64-binaries/minimals Mojca Miklavec
  2009-11-19 18:19             ` osx-64-binaries/minimals Martin Schröder
  0 siblings, 2 replies; 16+ messages in thread
From: Taco Hoekwater @ 2009-11-19  6:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Mojca Miklavec wrote:
> 
> Hans, Taco - does LuaTeX itself know if it's 64-bit or not?

Only internally at the moment, but I could add a variable
in the os library (after I figure out which of the sizeof()'s
is the best one to use).

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-19  6:59           ` osx-64-binaries/minimals Taco Hoekwater
@ 2009-11-19  8:43             ` Mojca Miklavec
  2009-11-19  8:53               ` osx-64-binaries/minimals Arthur Reutenauer
  2009-11-19 18:19             ` osx-64-binaries/minimals Martin Schröder
  1 sibling, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2009-11-19  8:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Nov 19, 2009 at 07:59, Taco Hoekwater wrote:
>
> Mojca Miklavec wrote:
>>
>> Hans, Taco - does LuaTeX itself know if it's 64-bit or not?
>
> Only internally at the moment, but I could add a variable
> in the os library (after I figure out which of the sizeof()'s
> is the best one to use).

When outside the binary one can run "file" for example:

> file osx-intel/current/luatex/beta-0.45.0/luatex
osx-intel/current/luatex/beta-0.45.0/luatex: Mach-O executable i386

> file osx-ppc/current/luatex/beta-0.45.0/luatex
osx-ppc/current/luatex/beta-0.45.0/luatex: Mach-O executable ppc

> file osx-64/current/luatex/beta-0.45.0/luatex
osx-64/current/luatex/beta-0.45.0/luatex: Mach-O 64-bit executable x86_64

> file linux/current/luatex/beta-0.44.0/luatex
linux/current/luatex/beta-0.44.0/luatex: ELF 32-bit LSB executable,
Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked
(uses shared libs), stripped

> file linux-64/current/luatex/beta-0.44.0/luatex
linux-64/current/luatex/beta-0.44.0/luatex: ELF 64-bit LSB executable,
x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked
(uses shared libs), stripped

But I have no idea if there is some simple way to hardcode the target
architecture into LuaTeX itself. (Apart from compiling "hello world",
running "file" on it, doing a platform-dependent regular expression
and passing that value to luatex at compile time. But that would be
really really ugly.)

gcc could be as kind as returning the architecture on request.

Yes, I know, I should be dreaming at night, not in the middle of day.
    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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-19  8:43             ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-19  8:53               ` Arthur Reutenauer
  0 siblings, 0 replies; 16+ messages in thread
From: Arthur Reutenauer @ 2009-11-19  8:53 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

> But I have no idea if there is some simple way to hardcode the target
> architecture into LuaTeX itself.

  You could check the first few bytes of the LuaTeX binary itself, it has to
tell you something about the architecture it was compiled for.  That's what
file uses in most cases anyway (the "magic numbers").  By compiling a stupid C
program on both 10.5 and 10.6, I see that the first 16 bytes of the executable
are, respectively:

  10.5: cefa edfe 0700 0000 0300 0000 0200 0000

  10.6: cffa edfe 0700 0001 0300 0080 0200 0000

	Arthur
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-19  6:59           ` osx-64-binaries/minimals Taco Hoekwater
  2009-11-19  8:43             ` osx-64-binaries/minimals Mojca Miklavec
@ 2009-11-19 18:19             ` Martin Schröder
  2009-11-20  7:09               ` osx-64-binaries/minimals Taco Hoekwater
  1 sibling, 1 reply; 16+ messages in thread
From: Martin Schröder @ 2009-11-19 18:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2009/11/19 Taco Hoekwater <taco@elvenkind.com>:
>> Hans, Taco - does LuaTeX itself know if it's 64-bit or not?
>
> Only internally at the moment, but I could add a variable
> in the os library (after I figure out which of the sizeof()'s
> is the best one to use).

How about exposing uname(2)? Or is that too much information?

Best
    Martin
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: osx-64-binaries/minimals
  2009-11-19 18:19             ` osx-64-binaries/minimals Martin Schröder
@ 2009-11-20  7:09               ` Taco Hoekwater
  0 siblings, 0 replies; 16+ messages in thread
From: Taco Hoekwater @ 2009-11-20  7:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Martin Schröder wrote:
> 2009/11/19 Taco Hoekwater <taco@elvenkind.com>:
>>> Hans, Taco - does LuaTeX itself know if it's 64-bit or not?
>> Only internally at the moment, but I could add a variable
>> in the os library (after I figure out which of the sizeof()'s
>> is the best one to use).
> 
> How about exposing uname(2)? Or is that too much information?

It is exposed already, but (if I understand correctly) Snow Leopard
returns the same uname information for both 32bit and 64bit modes.

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-11-20  7:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.448.1258320461.22155.ntg-context@ntg.nl>
2009-11-15 22:15 ` Indent missed after \placefigure[inner] Vyatcheslav Yatskovsky
2009-11-16 10:13   ` Wolfgang Schuster
2009-11-16 10:33     ` osx-64-binaries/minimals Andreas Harder
2009-11-17 15:05       ` osx-64-binaries/minimals Mojca Miklavec
2009-11-17 15:44         ` osx-64-binaries/minimals Hans Hagen
2009-11-17 16:16           ` osx-64-binaries/minimals Taco Hoekwater
2009-11-17 16:33             ` osx-64-binaries/minimals Mojca Miklavec
2009-11-18  6:31               ` osx-64-binaries/minimals Taco Hoekwater
2009-11-18 12:49       ` osx-64-binaries/minimals Mojca Miklavec
2009-11-19  1:18         ` osx-64-binaries/minimals Mojca Miklavec
2009-11-19  6:59           ` osx-64-binaries/minimals Taco Hoekwater
2009-11-19  8:43             ` osx-64-binaries/minimals Mojca Miklavec
2009-11-19  8:53               ` osx-64-binaries/minimals Arthur Reutenauer
2009-11-19 18:19             ` osx-64-binaries/minimals Martin Schröder
2009-11-20  7:09               ` osx-64-binaries/minimals Taco Hoekwater
2009-11-15 22:19 ` Indent missed after \placefigure[inner] Vyatcheslav Yatskovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).