ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* CD cover tool -- handling unusual symbols in folder names
       [not found] <mailman.1235.1171641318.17432.ntg-context@ntg.nl>
@ 2007-02-16 23:49 ` Vyatcheslav Yatskovsky
  2007-02-18  5:48 ` Not able to use Bibtex module Zulkifli Hidayat
  1 sibling, 0 replies; 2+ messages in thread
From: Vyatcheslav Yatskovsky @ 2007-02-16 23:49 UTC (permalink / raw)
  To: ntg-context-request@ntg.nl

Hello,

I try to implement a script that will typeset covers for CD/DVD's that contain music compilations.

Now I have script that follows. It scans the root directory of a CD for folders and outputs them a list. The major problem is that I have " & " and " ' " symbols in folder names on which script fails complaining


(D:\context\xmldir-1.xml
subject         : - Music
! Argument of & has an extra }.
<inserted text> 
                \par 
<to be read again> 
                   }
\next1 #1,->\dosetups {#1}
                          \doprocesscommaitem 
\doprocesscommalist ...item \gobbleoneargument #1,
                                                  ]\relax \global \advance \...

\XML:ele:/file ->\setups [xmldir:file]
                                       \endgraf \egroup 
l.8     </file>
               
? 
! Emergency stop.



How can I cope with this?

Best,
Vyatcheslav


%%%%%%%%%%%%%%%%%%%%%%%%%%

\startmode[*first]
\executesystemcommand
{xmltools --dir --pattern=* --root=H:\ --output=xmldir-1.xml}
\stopmode


\setuppapersize
  [S6][S6]

\setuplayout
  [width=middle,
   height=middle,
   backspace=12pt,
   topspace=12pt,
   bottomspace=32pt,
   header=0pt,
   footer=0pt,
   bottomdistance=9pt,
   bottom=18pt]

\setupbackgrounds
  [text]
  [background=color,
   backgroundcolor=TextColor]

\definecolor [TextColor] [r=.7,g=.8,b=.9]
\definecolor [DoneColor] [s=.5]

\setupcolors
  [state=start]

\setuphead
  [subject]
  [style=\tfc]

\setupbodyfont
  [ss]
  

\defineXMLenvironment [files] [url=]
  {\doifelsenothing{\XMLop{url}}
     {\xdef\XMLDIRurl{}}
     {\xdef\XMLDIRurl{\XMLop{url}/}}
   \startXMLignore}
  {\stopXMLignore}

\newcounter\NOfEntries

\startsetups[xmldir:file]

  \doglobal\increment\NOfEntries
  {\hbox to \hsize \bgroup

    \XMLflush{base}
    \hss
    \hbox to  2em{\XMLflush{type}\hss}
    \quad
    \quad
    \hbox to  5em{\hss\XMLflush{size}}
    \quad
    \quad
   \XMLflush{date}

  \egroup} 

\stopsetups

\defineXMLenvironment [directory] [name=]
  {\subject{Music}}
  {}

\defineXMLenvironment [file] [name=]
  {\bgroup}
  {\setups[xmldir:file]
   \endgraf
   \egroup}

\defineXMLsave[base]
\defineXMLsave[type]
\defineXMLsave[size]
\defineXMLsave[date]

\starttext

  \processXMLfilegrouped{xmldir-1.xml}

\stoptext

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

* Re: Not able to use Bibtex module
       [not found] <mailman.1235.1171641318.17432.ntg-context@ntg.nl>
  2007-02-16 23:49 ` CD cover tool -- handling unusual symbols in folder names Vyatcheslav Yatskovsky
@ 2007-02-18  5:48 ` Zulkifli Hidayat
  1 sibling, 0 replies; 2+ messages in thread
From: Zulkifli Hidayat @ 2007-02-18  5:48 UTC (permalink / raw)
  To: ntg-context


> On Fri, 16 Feb 2007, Zulkifli Hidayat wrote:
>
>> Hi,
>>
>> I'm trying to use bib module. So far, I still can't make it work. I
>> can't
>> have the pdf shows the list of reference.
>>
>> I have made a small test file to try the bib module (it is shown below
>> this mail). For the test, I use only the default options. I also attach
>> the output of the Context process. My Context version is 12.01.2007 on
>> MS
>> Windows XP SP2.
>>
>> So what I did are:
>> 1. Make the .bbl file -> tes.bbl
>> 2. Make the main file -> tes.tex
>> 3. Include the tes.bbl in tes.tex as it is written below
>>
>> Any comment is appreciated.
>
> I did not actually try your file, but the reason it is not working may
> be spaces in your key value assignments.
>
>> \setuppublicationlist[%
>>  criterium=all,
>>  totalnumber = 2]
>               ^^^^^^
>
>> \startpublication[
>>  k = katfti,  % key
>     ^^^^^^^^^^^
>
> etc. That is instead of
>
> key(space)=(space)value,
>
> use
>
> key=value,
>
> There can be spaces before the key, as is
>
> (space)key=value,
>
> but there should be no other spaces.
>
> Aditya
>

You're right, it works. So I have to be more careful with space. Thank you
for clue.

Zulkifli

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

end of thread, other threads:[~2007-02-18  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1235.1171641318.17432.ntg-context@ntg.nl>
2007-02-16 23:49 ` CD cover tool -- handling unusual symbols in folder names Vyatcheslav Yatskovsky
2007-02-18  5:48 ` Not able to use Bibtex module Zulkifli Hidayat

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