% -*- mode: tex -*-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                STANDARD                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definefontfeature[default][default]
                  [protrusion=quality,
                    expansion=quality,
                    script=latn]
\setupalign[hz,hanging]
\setuptolerance[tolerant]
\setbreakpoints[compound]
\setupindenting[yes,1em]
\setupfootnotes[way=bychapter,align={hz,hanging}]
\setupbodyfont[modern] % this is a stinky workaround to load lmodern
\setupbodyfont[libertine,11pt]

\setuppagenumbering[alternative=singlesided,location={footer,middle}]
\setupcaptions[width=fit,align={hz,hanging},number=no]

\startmode[a4imposed,a4imposedbc,letterimposed,letterimposedbc,a5imposed,%
  a5imposedbc,halfletterimposed,halfletterimposedbc]
  \setuppagenumbering[alternative=doublesided]
\stopmode

\setupbodyfontenvironment[default][em=italic]


\setupheads[%
  sectionnumber=no,number=no,
  align=flushleft,
  align={flushleft,nothyphenated,verytolerant,stretch},
  indentnext=yes,
  tolerance=verytolerant]

\definehead[awikipart][chapter]

\setuphead[awikipart]
          [%
            number=no,
            footer=empty,
            style=\bfd,
            before={\blank[force,2*big]},
            align={middle,nothyphenated,verytolerant,stretch},
            after={\page[yes]}
          ]

% h3
\setuphead[chapter]
          [style=\bfc]

\setuphead[title]
          [style=\bfc]


% h4
\setuphead[section]
          [style=\bfb]

% h5
\setuphead[subsection]
          [style=\bfa]

% h6
\setuphead[subsubsection]
          [style=bold]


\setuplist[awikipart]
          [alternative=b,
            interaction=all,
            width=0mm,
            distance=0mm,
            before={\blank[medium]},
            after={\blank[small]},
            style=\bfa,
            criterium=all]
\setuplist[chapter]
          [alternative=c,
            interaction=all,
            width=1mm,
            before={\blank[small]},
            style=bold,
            criterium=all]
\setuplist[section]
          [alternative=c,
            interaction=all,
            width=1mm,
            style=\tf,
            criterium=all]
\setuplist[subsection]
          [alternative=c,
            interaction=all,
            width=8mm,
            distance=0mm,
            style=\tf,
            criterium=all]
\setuplist[subsubsection]
          [alternative=c,
            interaction=all,
            width=15mm,
            style=\tf,
            criterium=all]


% center

\definestartstop
  [awikicenter]
  [before={\blank[line]\startalignment[middle]},
   after={\stopalignment\blank[line]}]

% right

\definestartstop
  [awikiright]
  [before={\blank[line]\startalignment[flushright]},
   after={\stopalignment\blank[line]}]


% blockquote

\definestartstop
  [blockquote]
  [before={\blank[big]
    \setupnarrower[middle=1em]
    \startnarrower
    \setupindenting[no]
    \setupwhitespace[medium]},
  after={\stopnarrower
    \blank[big]}]

% verse

\definestartstop
  [awikiverse]
  [before={\blank[big]
      \setupnarrower[middle=2em]
      \startnarrower
      \startlines},
    after={\stoplines
      \stopnarrower
      \blank[big]}]

\definestartstop
  [awikibiblio]
  [before={%
      \blank[big]
      \setupnarrower[left=1em]
      \startnarrower[left]
        \setupindenting[yes,-1em,first]},
    after={\stopnarrower
      \blank[big]}]
                
% same as above, but with no spacing around
\definestartstop
  [awikiplay]
  [before={%
      \setupnarrower[left=1em]
      \startnarrower[left]
        \setupindenting[yes,-1em,first]},
    after={\stopnarrower}]



% interaction
% we start the interaction only if it's not an imposed format.
\startnotmode[a4imposed,a4imposedbc,letterimposed,letterimposedbc,a5imposed,%
  a5imposedbc,halfletterimposed,halfletterimposedbc]
  \setupinteraction[state=start,color=black,contrastcolor=black,style=bold]
  \placebookmarks[awikipart,chapter,section,subsection,subsubsection][force=yes]
  \setupinteractionscreen[option=bookmark]
\stopnotmode



\setupexternalfigures[%
  maxwidth=\textwidth,
  maxheight=\textheight,
  factor=fit]

\setupitemgroup[itemize][each][packed][indenting=no]

\definemakeup[titlepage][pagestate=start,doublesided=no]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                IMPOSER                                       %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\startusercode

function optimize_signature(pages,min,max)
   local minsignature = min or 40
   local maxsignature = max or 80
   local originalpages = pages

   -- here we want to be sure that the max and min are actual *4
   if (minsignature%4) ~= 0 then
      global.texio.write_nl('term and log', "The minsig you provided is not a multiple of 4, rounding up")
      minsignature = minsignature + (4 - (minsignature % 4))
   end
   if (maxsignature%4) ~= 0 then
      global.texio.write_nl('term and log', "The maxsig you provided is not a multiple of 4, rounding up")
      maxsignature = maxsignature + (4 - (maxsignature % 4))
   end
   global.assert((minsignature % 4) == 0, "I suppose something is wrong, not a n*4")
   global.assert((maxsignature % 4) == 0, "I suppose something is wrong, not a n*4")

   --set needed pages to and and signature to 0
   local neededpages, signature = 0,0

   -- this means that we have to work with n*4, if not, add them to
   -- needed pages 
   local modulo = pages % 4
   if modulo==0 then
      signature=pages
   else
      neededpages = 4 - modulo
   end

   -- add the needed pages to pages
   pages = pages + neededpages
   
   if ((minsignature == 0) or (maxsignature == 0)) then 
      signature = pages -- the whole text
   else
      -- give a try with the signature
      signature = find_signature(pages, maxsignature)
      
      -- if the pages, are more than the max signature, find the right one
      if pages>maxsignature then
	 while signature<minsignature do
	    pages = pages + 4
	    neededpages = 4 + neededpages
	    signature = find_signature(pages, maxsignature)
	    --         global.texio.write_nl('term and log', "Trying signature of " .. signature)
	 end
      end
      global.texio.write_nl('term and log', "Parameters:: maxsignature=" .. maxsignature ..
		   " minsignature=" .. minsignature)

   end
   global.texio.write_nl('term and log', "ImposerMessage:: Original pages: " .. originalpages .. "; " .. 
	 "Signature is " .. signature .. ", " ..
	 neededpages .. " pages are needed, " .. 
	 pages ..  " of output")
   -- let's do it
   tex.print("\\dorecurse{" .. neededpages .. "}{\\page[empty]}")

end

function find_signature(number, maxsignature)
   global.assert(number>3, "I can't find the signature for" .. number .. "pages")
   global.assert((number % 4) == 0, "I suppose something is wrong, not a n*4")
   local i = maxsignature
   while i>0 do
      -- global.texio.write_nl('term and log', "Trying " .. i  .. "for max of " .. maxsignature)
      if (number % i) == 0 then
	 return i
      end
      i = i - 4
   end
end

\stopusercode

\define[1]\fillthesignature{
  \usercode{optimize_signature(#1, 40, 80)}}


\define\alibraryflushpages{
  \page[yes] % reset the page
  \fillthesignature{\the\realpageno}
}


% various papers 
\definepapersize[halfletter][width=5.5in,height=8.5in]
\definepapersize[halfafour][width=148.5mm,height=210mm]
\definepapersize[quarterletter][width=4.25in,height=5.5in]
\definepapersize[halfafive][width=105mm,height=148mm]
\definepapersize[generic][width=210mm,height=279.4mm]

%% this is the default ``paper'' which should work with both letter and a4

\setuppapersize[generic][generic]
\setuplayout[%
  backspace=42mm,
  topspace=31mm,% 176 / 15
  height=195mm,%130mm,
  footer=9mm, %
  header=0pt, % no header
  width=126mm] % 10.5 x 11

\startmode[libertine]
  \usetypescript[libertine]
  \setupbodyfont[libertine,11pt]
\stopmode

\startmode[pagella]
  \setupbodyfont[pagella,11pt]
\stopmode

\startmode[antykwa]
  \setupbodyfont[antykwa-poltawskiego,11pt]
\stopmode

\startmode[iwona]
  \setupbodyfont[iwona-medium,11pt]
\stopmode

\startmode[helvetica]
  \setupbodyfont[heros,11pt]
\stopmode

\startmode[century]
  \setupbodyfont[schola,11pt]
\stopmode

\startmode[modern]
  \setupbodyfont[modern,11pt]
\stopmode

\startmode[charis]
  \setupbodyfont[charis,11pt]
\stopmode        

\startmode[mini]
  \setuppapersize[S33][S33] % 176 × 176 mm
  \setuplayout[%
    backspace=20pt,
    topspace=15pt,% 176 / 15
    height=280pt,%130mm,
    footer=20pt, %
    header=0pt, % no header
    width=260pt] % 10.5 x 11
\stopmode

% for the plain A4 and letter, we use the classic LaTeX dimensions
% from the article class
\startmode[a4]
  \setuppapersize[A4][A4]
  \setuplayout[%
    backspace=42mm,
    topspace=45mm,
    height=218mm,
    footer=10mm,
    header=0pt, % no header
    width=126mm]
\stopmode

\startmode[letter]
  \setuppapersize[letter][letter]
  \setuplayout[%
    backspace=44mm,
    topspace=46mm,
    height=199mm,
    footer=10mm,
    header=0pt, % no header
    width=126mm]
\stopmode


% A4 imposed (A5), with no bc

\startmode[a4imposed]
% DIV=15 148 × 210: these are meant not to have binding correction,
  % but just to play safe, let's say 1mm => 147x210
  \setuppapersize[halfafour][halfafour]
  \setuplayout[%
    backspace=10.8mm, % 146/15 = 9.8 + 1
    topspace=14mm, % 210/15 =  14
    height=182mm, % 14 x 12 + 14 of the footer
    footer=14mm, %
    header=0pt, % no header
    width=117.6mm] % 9.8 x 12
\stopmode

% A4 imposed (A5), with bc
\startmode[a4imposedbc]
  \setuppapersize[halfafour][halfafour]
  \setuplayout[% 14 mm was a bit too near to the spine, using the glue binding
    backspace=17.3mm,  % 140/15 + 8 =
    topspace=14mm, % 210/15 =  14
    height=182mm, % 14 x 12 + 14 of the footer
    footer=14mm, %
    header=0pt, % no header
    width=112mm] % 9.333 x 12
\stopmode


\startmode[letterimposedbc] % 139.7mm x 215.9 mm
  \setuppapersize[halfletter][halfletter]
  % DIV=15 8mm binding corr, => 132 x 216
  \setuplayout[%
    backspace=16.8mm, % 8.8 + 8
    topspace=14.4mm, % 216/15 =  14.4
    height=187.2mm, % 15.4 x 11 + 15 of the footer
    footer=14.4mm, %
    header=0pt, % no header
    width=105.6mm] % 8.8 x 12
\stopmode

\startmode[letterimposed] % 139.7mm x 215.9 mm
  \setuppapersize[halfletter][halfletter]
  % DIV=15, 1mm binding correction. => 138.7x215.9
  \setuplayout[%
    backspace=10.3mm, % 9.24 + 1
    topspace=14.4mm, % 216/15 =  14.4
    height=187.2mm, % 15.4 x 11 + 15 of the footer
    footer=14.4mm, %
    header=0pt, % no header
    width=111mm] % 9.24 x 12
\stopmode

%%% new formats for mini books
%%% \definepapersize[halfafive][width=105mm,height=148mm]

\startmode[a5imposed]
% DIV=12 105x148 : these are meant not to have binding correction,
  % but just to play safe, let's say 1mm => 104x148
  \setuppapersize[halfafive][halfafive]
  \setuplayout[%
    backspace=9.6mm,
    topspace=12.3mm,
    height=123.5mm, % 14 x 12 + 14 of the footer
    footer=12.3mm, %
    header=0pt, % no header
    width=78.8mm] % 9.8 x 12
\stopmode

% A5 imposed (A6), with bc
\startmode[a5imposedbc]
% DIV=12 105x148 : with binding correction,
  % let's say 8mm => 96x148
  \setuppapersize[halfafive][halfafive]
  \setuplayout[%
    backspace=16mm,
    topspace=12.3mm,
    height=123.5mm, % 14 x 12 + 14 of the footer
    footer=12.3mm, %
    header=0pt, % no header
    width=72mm] % 9.8 x 12
\stopmode

%%% \definepapersize[quarterletter][width=4.25in,height=5.5in]

% DIV=12 width=4.25in (108mm),height=5.5in (140mm) 
\startmode[halfletterimposed] % 107x140
  \setuppapersize[quarterletter][quarterletter]
  \setuplayout[%
    backspace=10mm,
    topspace=11.6mm,
    height=116mm,
    footer=11.6mm,
    header=0pt, % no header
    width=80mm] % 9.24 x 12
\stopmode

\startmode[halfletterimposedbc]
  \setuppapersize[quarterletter][quarterletter]
  \setuplayout[%
    backspace=15.4mm,
    topspace=11.6mm,
    height=116mm,
    footer=11.6mm,
    header=0pt, % no header
    width=76mm] % 9.24 x 12
\stopmode

\startmode[quickimpose]
  \setuppapersize[A5][A4,landscape]
  \setuparranging[2UP]
  \setuppagenumbering[alternative=doublesided]
  \setuplayout[% 14 mm was a bit too near to the spine, using the glue binding
    backspace=17.3mm,  % 140/15 + 8 =
    topspace=14mm, % 210/15 =  14
    height=182mm, % 14 x 12 + 14 of the footer
    footer=14mm, %
    header=0pt, % no header
    width=112mm] % 9.333 x 12
\stopmode

\startmode[tenpt]
  \setupbodyfont[10pt]
\stopmode

\startmode[twelvept]
  \setupbodyfont[12pt]
\stopmode

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                            DOCUMENT BEGINS                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\mainlanguage[en]


\starttext

\starttitlepagemakeup
  \startalignment[middle,nothanging,nothyphenated,stretch]


  \switchtobodyfont[18pt] % author
  {\bf \em

Peter Gelderloos  \par}
  \blank[2*big]
  \switchtobodyfont[24pt] % title
  {\bf

Chavistas open fire, injure eight protestors in Caracas

\par}
  \blank[big]
  \switchtobodyfont[20pt] % subtitle
  {\bf 

\par}
  \vfill
  \stopalignment
  \startalignment[middle,bottom,nothyphenated,stretch,nothanging]
  \switchtobodyfont[global]

2007

  \stopalignment
\stoptitlepagemakeup



\page[yes,right]

On 7 October, masked gunmen opened fire on student protestors in Caracas, Venezuela, who were returning from a protest against President Hugo Chavez’s proposed Constitutional reforms.  Thousands of students marched on the Supreme Court protesting the reforms, which Chavez proposes to pass by referendum and critics say consolidate executive powers, giving the President control of the Central Bank, abolishing presidential term limits, expanding state of emergency powers, and creating new provinces to be governed by centrally appointed officials.  These authoritarian changes are paired with populist measures like reducing the voting age and decreasing the hours of the maximum work day.  


After the protest, as students were returning to the Venezuela Central University (UCV), they were attacked by an armed group of Chavistas with gas grenades, knives, clubs, stones, and pistols.  Anti-authoritarian students who had participated in the protest, though they lacked firearms and all but improvised weapons, counterattacked and forced the “pistoleros” to take refuge in a university building.  Shortly, a much larger group of armed Chavistas arrived on motorcycle to rescue the first group.  In total, eight student protestors were injured. 


Two of the those injured are members of Venezuela’s Anarchist Black Cross (ABC), a prisoner support group that opposes Chavez’s dictatorial rule.  They and other libertarian opponents of the Chavez regime have experienced heavy repression.  One week earlier, police dispersed a major protest against the Constitutional reforms with water cannons and tear gas.


Very few leftwing media outlets have reported the attacks on the protestors.  The corporate media continuously portray Chavez in a negative light, mainly on the basis of his socialist reforms, and the US has attempted to organize at least one coup attempt against Chavez, who himself originally tried to come to power in a military coup; thus many opponents of US imperialism raise Chavez to the stature of a popular hero, glossing over his authoritarian credentials,  and repression of opponents.  While the Chavez regime does face strong opposition from the country’s business leaders, it has also been targeted by protests from students, antiauthoritarian groups, and indigenous peoples inhabiting the heavily exploited coal-producing regions.  Similar habits of uncritical support for opponents of the superpower led to reduced and delayed recognition of state repression and abuses with the Sandinistas in Nicaragua and the Castro regime in Cuba.  


\goto{www.cna.contrapoder.org.ve}[url(http://www.cna.contrapoder.org.ve/)]


photos


\goto{argentina.indymedia.org}[url(http://argentina.indymedia.org/news/2007/11/562981.php)]


\goto{news.bbc.co.uk}[url(http://news.bbc.co.uk/2/hi/in\_pictures/7084636.stm)]


compiled from reports of Anarchist Black Cross Venezuela


\goto{news.bbc.co.uk}[url(http://news.bbc.co.uk/2/hi/americas/7084262.stm)]


\goto{argentina.indymedia.org}[url(http://argentina.indymedia.org/news/2007/11/562981.php)]


\goto{www.el-universal.com.mx}[url(http://www.el-universal.com.mx/internacional/55942.html)]









\page[yes]

%%%% backcover

\startmode[a4imposed,a4imposedbc,letterimposed,letterimposedbc,a5imposed,%
  a5imposedbc,halfletterimposed,halfletterimposedbc,quickimpose]
\alibraryflushpages
\stopmode

\page[blank]

\startalignment[middle]
{\tfa The Anarchist Library
\blank[small]
Anti-Copyright}
\blank[small]
\currentdate
\stopalignment

\blank[big]
\framed[frame=off,location=middle,width=\textwidth]
       {\externalfigure[logo][width=0.25\textwidth]}



\vfill
\setupindenting[no]
\setsmallbodyfont

\startalignment[middle,nothyphenated,nothanging,stretch]

\blank[line]
% \framed[frame=off,location=middle,width=\textwidth]
%       {\externalfigure[logo][width=0.25\textwidth]}


Peter Gelderloos



Chavistas open fire, injure eight protestors in Caracas






2007


\stopalignment
\blank[line]

\startalignment[hyphenated,middle]


November




\stopalignment

\stoptext


