Hullo,

can someone tell me what's the difference between \skip and \unskip and when 
to use them?

I've already checked the wiki and the references, but cannot find a definition 
of either.

Here's a use case that's giving me headaches for quite some time:

In my bibliography I often have items that are missing one or two fields (e.g. 
legal texts with or without amendments etc.) and I have to tell ConTeXt to 
skip those. From trial and error I learnt that:

        * \skip leaves me with the punctuation and styling around the skipped 
field (e.g. a trailing ", ." or "( )")

        * \unskip seems to do what I want, but generates the following error 
every 
time 'context' reaches an '\unskip' entry:
--8<------------------
l.1 ...al , št. \localissue /\localvolume \skip ,
                                                   \localspremembe .
\currentnotedescriptiontext ...ptionnumberentry )}
                                                  
\handlenoteitself ... \currentnotedescriptiontext 
                                                  \endstrut 
\dostopstoreddes...
\handlenoteinsert ...s }\handlenoteitself {#1}{#2}
                                                  \egroup \the 
\everyafterno...
\@@notemakedescription ...note \currentnotenumber 
                                                  \fi \fi \endgroup \fi \fi 
...
...
l.82 ...e Konvencija MOD št. 173\zakon[][MOD_173]
                                                   (ter Priporočilo št. 18...
? help
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
------------------>8--

The example code:

--8<------------------
\def\zakon[#1][#2]%                                                             
                                                                                
                        
    {\doifdefinedelse{zakonkratko:#2}                                           
                                                                                
                        
        {\zakonkratko[#1][#2]}                                                  
                                                                                
                        
        {\bgroup                                                                
                                                                                
                        
        \nocite[#2]%                                                            
                                                                                
                        
        \getcitedata[title][#2] to \localtitle                                  
                                                                                
                        
        \getcitedata[kratko][#2] to \localkratko                                
                                                                                
                        
        \getcitedata[journal][#2] to \localjournal                              
                                                                                
                        
        \getcitedata[issue][#2] to \localissue                                  
                                                                                
                        
        \getcitedata[volume][#2] to \localvolume                                
                                                                                
                        
        \getcitedata[spremembe][#2] to \localspremembe                          
                                                                                
                        
        \footnote{\localtitle\ (\localkratko), \localjournal, št. 
\localissue/\localvolume\skip, \localspremembe.}%                               
                                      
        \egroup}                                                                
                                                                                
                        
    \setvalue{zakonkratko:#2}{done}                                             
                                                                                
                        
    }                                                                           
                                                                                
                        
                                                                                
                                                                                
                        
\def\zakonkratko[#1][#2]%                                                       
                                                                                
                        
    {\bgroup                                                                    
                                                                                
                        
    \nocite[#2]%                                                                
                                                                                
                        
    \getcitedata[kratko][#2] to \localkratko                                    
                                                                                
                        
    \footnote{\skip#1 \localkratko.}%                                           
                                                                                
                        
    \egroup}                                                                    
                                                                                
                        

\startpublication[k=MESL,
    t=zakon,
    y=1996
]
    \title{Evropska socialna listina (spremenjena)}
    \kratko{MESL}
    \engtitle{European Social Charter (revised)}
    \organization{Svet Evrope}
    \journal{Ur. l. RS-MP}
    \volume{1999}
    \issue{7}
    \pubyear{1999}\month{04}\day{10}
    \yearfiled{1999}\monthfiled{04}\dayfiled{11}
    \biburl{http://www.uradni-list.si/1/objava.jsp?urlmpid=199920}
\stoppublication
------------------>8--

-- 
gsm:    +386 41 849 552
www:    http://matija.suklje.name
xmpp:   matija.suk...@gabbler.org

Attachment: signature.asc
Description: This is a digitally signed message part.

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

Reply via email to