ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: special character in filename
@ 2011-03-05 20:57 Reviczky, Adam
  2011-03-05 21:14 ` Aditya Mahajan
  2011-03-05 21:23 ` Peter Münster
  0 siblings, 2 replies; 9+ messages in thread
From: Reviczky, Adam @ 2011-03-05 20:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> only Hans can decide if this can/should be changed
I won't argue for any changes, just thought to ask about it.
A simple "yes, can be done" or "no, its a really bad idea" is perfectly enough for me.

I'll think about a workaround outside context.

Cheers,
Adam
___________________________________________________________________________________
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] 9+ messages in thread

* Re: special character in filename
  2011-03-05 20:57 special character in filename Reviczky, Adam
@ 2011-03-05 21:14 ` Aditya Mahajan
  2011-03-05 21:23 ` Peter Münster
  1 sibling, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2011-03-05 21:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 5 Mar 2011, Reviczky, Adam wrote:

>>> only Hans can decide if this can/should be changed
> I won't argue for any changes, just thought to ask about it.
>
> I'll think about a workaround outside context.

The "error" is with the backend.

luatex (and pdftex and even tex) do not like filenames with a ~ in it.

luatex test\~1.tex

tries to compile a file called test.tex! If you want to compile 
test~1.tex, you need

luatex "test\string~1.tex"

In ConteXt, a wrapper script mtx-context calls luatex with appropriate 
settings of format, etc. So, with

context test\~1.tex

mtx-context will call

luatex --fmt=... --lua=.. "test~1.tex"

which, as mentioned above, tries to compile test.tex. But you can use the 
same workaround

context "test\\string~1.tex"

and the file test~1.tex is correctly compiled.

> A simple "yes, can be done" or "no, its a really bad idea" is perfectly enough for me.

I don't understand why tex (the engine) ignores ~. I will call it a bug.

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
___________________________________________________________________________________


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

* Re: special character in filename
  2011-03-05 20:57 special character in filename Reviczky, Adam
  2011-03-05 21:14 ` Aditya Mahajan
@ 2011-03-05 21:23 ` Peter Münster
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Münster @ 2011-03-05 21:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Reviczky, Adam" <adam.reviczky@kcl.ac.uk> writes:

>>> only Hans can decide if this can/should be changed
> I won't argue for any changes, just thought to ask about it.
> A simple "yes, can be done" or "no, its a really bad idea" is perfectly enough
> for me.

See also section 1.7 on page 11 of the ConTeXt manual¹.

Feel free, to send enhancements/patches for the manual here or to the
mailing list for the manual².

¹ http://pmrb.free.fr/contextref.pdf
² contextman-reference@lists.foundry.supelec.fr. 

-- 
           Peter
___________________________________________________________________________________
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] 9+ messages in thread

* Re: special character in filename
  2011-03-06  8:36   ` Vnpenguin
@ 2011-03-06 11:00     ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2011-03-06 11:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6-3-2011 9:36, Vnpenguin wrote:

> "/dev/null" as folder name ? Wow, what a crazy idea !

well, \input /dev/null/thesis-chapter-1.tex

does miracles (in germany)

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
___________________________________________________________________________________


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

* Re: special character in filename
  2011-03-05 20:26 ` Thomas Schmitz
@ 2011-03-06  8:36   ` Vnpenguin
  2011-03-06 11:00     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Vnpenguin @ 2011-03-06  8:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Mar 5, 2011 at 21:26, Thomas Schmitz <tschmit1@uni-bonn.de> wrote:
> On Sat, 5 Mar 2011 20:09:12 +0000
>  "Reviczky, Adam" <adam.reviczky@kcl.ac.uk> wrote:
>
>>
>> It works with the "+" character though.
>> The same problem goes for the directory names; directories with "~" in the
>> name drops and error, even if the filename has no special characters in it.
>>
>> Can this be fixed?
>>
> Yeah, please fix this ASAP. I keep all my context files in a directory which
> I call /dev/null, and for some reason, this doesn't really work. But I am
> not going to change the name of my directory, no, you have to rewrite your
> software!
>

"/dev/null" as folder name ? Wow, what a crazy idea !
___________________________________________________________________________________
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] 9+ messages in thread

* Re: special character in filename
  2011-03-05 20:38 Reviczky, Adam
@ 2011-03-05 20:46 ` Thomas Schmitz
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Schmitz @ 2011-03-05 20:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 5 Mar 2011 20:38:13 +0000
  "Reviczky, Adam" <adam.reviczky@kcl.ac.uk> wrote:

> Dear Thomas
> 
> I understand, that it's not a good idea, and I've seen 
>similar issues on the list 
>(http://www.ntg.nl/pipermail/ntg-context/2010/052339.html).
> I ran into this by making a deb package of a software 
>(that includes context files) with a version that have a 
>"~" in it, and therefore it makes a folder name having 
>this character and context fails.
> 
> So i guess the answer is then, no.
Hi Adam,

I didn't want to sound rude - in the end, only Hans can 
decide if this can/should be changed. It's just when you 
think about the complexity of a system like context which 
runs on many different platforms, which involves a number 
of programming languages, which passes names to and fro in 
temporary files and commands - I just would advise to 
stick to characters which you can be sure will be parsed 
correctly by all parts involved. If you want to know a bit 
more about it, have a look at all the efforts Hans makes 
to sanitize font names so they will be found in the mkiv 
font database; taking out all the spaces and periods and 
whatnot. And yet, next week, some smart font designer will 
certainly come up with an even more bizarre name which 
breaks everything. That's all I wanted to say with my 
sarcasm.

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

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


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

* Re: special character in filename
@ 2011-03-05 20:38 Reviczky, Adam
  2011-03-05 20:46 ` Thomas Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Reviczky, Adam @ 2011-03-05 20:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

>> Yeah, please fix this ASAP. I keep all my context files in
>> a directory which I call /dev/null, and for some reason,
>> this doesn't really work. But I am not going to change the
>> name of my directory, no, you have to rewrite your
>> software!
>> 
>> Thomas
Dear Thomas

I understand, that it's not a good idea, and I've seen similar issues on the list (http://www.ntg.nl/pipermail/ntg-context/2010/052339.html).
I ran into this by making a deb package of a software (that includes context files) with a version that have a "~" in it, and therefore it makes a folder name having this character and context fails.

So i guess the answer is then, no.

Adam
___________________________________________________________________________________
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] 9+ messages in thread

* Re: special character in filename
  2011-03-05 20:09 Reviczky, Adam
@ 2011-03-05 20:26 ` Thomas Schmitz
  2011-03-06  8:36   ` Vnpenguin
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Schmitz @ 2011-03-05 20:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 5 Mar 2011 20:09:12 +0000
  "Reviczky, Adam" <adam.reviczky@kcl.ac.uk> wrote:

> 
> It works with the "+" character though.
> The same problem goes for the directory names; 
>directories with "~" in the name drops and error, even if 
>the filename has no special characters in it.
> 
> Can this be fixed?
> 
Yeah, please fix this ASAP. I keep all my context files in 
a directory which I call /dev/null, and for some reason, 
this doesn't really work. But I am not going to change the 
name of my directory, no, you have to rewrite your 
software!

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

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


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

* special character in filename
@ 2011-03-05 20:09 Reviczky, Adam
  2011-03-05 20:26 ` Thomas Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Reviczky, Adam @ 2011-03-05 20:09 UTC (permalink / raw)
  To: ntg-context

Hi

Context fails to run with an input (filename or directoryname) that includes special characters.

example files:
%%%
reviczky@arlequin ~/minimal % la
total 0
drwxrwxr-x 1 reviczky reviczky   60 2011-03-05 19:58 ./
drwxr-xr-x 1 reviczky reviczky 2148 2011-03-05 20:00 ../
drwxrwxr-x 1 reviczky reviczky   40 2011-03-05 19:59 dir~1/
drwxrwxr-x 1 reviczky reviczky   40 2011-03-05 19:59 dir+2/
-rw-rw-r-- 1 reviczky reviczky   34 2011-03-05 19:58 test~1.tex
-rw-rw-r-- 1 reviczky reviczky   34 2011-03-05 19:58 test+2.tex
%%%

fails to run for "test~1.tex", output:
%%%
context test\~1.tex

mtx-context     | run 1: luatex --fmt="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en" --lua="/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui" --backend="pdf" "./test~1.tex"
This is LuaTeX, Version beta-0.66.0-2011030112 (rev 4090) 
 \write18 enabled.
! I can't find file `./test'.
<to be read again> 
                   \penalty 
\CCC:9:126 ->\penalty 
                      \plustenthousand \normalspaceprimitive 
<*> ./test~
           1.tex
Please type another input file name: 
%%%

but giving the filename again it runs:
%%%
...
Please type another input file name: test~1.tex
(test~1.tex

ConTeXt  ver: 2011.02.25 22:03 MKIV  fmt: 2011.3.1  int: english/english

system          > cont-new.mkiv loaded
(/usr/share/texmf/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > test~1.top loaded
(test~1.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > fallback modern rm 12pt is loaded
system          > begin file test~1.tex at line 1
backend         > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
system          > end file test~1.tex at line 3
 )</usr/share/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>
mkiv lua stats  > used config file          - /usr/share/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - /home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d
mkiv lua stats  > input load time           - 0.130 seconds
mkiv lua stats  > stored bytecode data      - 275 modules, 56 tables, 331 chunks
mkiv lua stats  > cleaned up reserved nodes - 33 nodes, 9 lists of 411
mkiv lua stats  > node memory usage         - 19 glue_spec
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 2304 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > language load time        - 0.057 seconds , nofpatterns: 1
mkiv lua stats  > callbacks                 - 2440 direct, 2929 indirect, 5369 total
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 11 lpath calls, 0 cached calls
mkiv lua stats  > result saved in file      - test~1.pdf
mkiv lua stats  > loaded fonts              - 33 files: stmary10.afm eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats  > fonts load time           - 0.506 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.66.0-2011030112 (rev 4090)
mkiv lua stats  > control sequences         - 29651 of 165536
mkiv lua stats  > current memory usage      - 32 MB (ctx: 33 MB)
mkiv lua stats  > runtime                   - 54.133 seconds, 1 processed pages, 1 shipped pages, 0.018 pages/second
%%%

It works with the "+" character though.
The same problem goes for the directory names; directories with "~" in the name drops and error, even if the filename has no special characters in it.

Can this be fixed?

Adam
___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2011-03-06 11:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05 20:57 special character in filename Reviczky, Adam
2011-03-05 21:14 ` Aditya Mahajan
2011-03-05 21:23 ` Peter Münster
  -- strict thread matches above, loose matches on Subject: below --
2011-03-05 20:38 Reviczky, Adam
2011-03-05 20:46 ` Thomas Schmitz
2011-03-05 20:09 Reviczky, Adam
2011-03-05 20:26 ` Thomas Schmitz
2011-03-06  8:36   ` Vnpenguin
2011-03-06 11:00     ` Hans Hagen

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).