def selectlower expr t =
  currenttitle:= t;
  subtitle := substring(0,27) of currenttitle;
  if subtitle = "Lowercase sigma followed by" : let next_ = lose_it_
% Four composites need corrected heights. See abary4.mf and wbary4.mf
  elseif t = 
    "Lowercase alpha with grave and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with rough breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with smooth breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with rough breathing, acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with smooth breathing and acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with circumflex and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with rough breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with smooth breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase alpha with iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase epsilon with grave":
    let next_ = lose_it_
  elseif t = 
    "Lowercase epsilon with acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with rough breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with smooth breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with grave and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with rough breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with smooth breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with rough breathing, acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with smooth breathing and acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with circumflex and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with rough breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with smooth breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase eta with iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase upsilon with smooth breathing":
    let next_ = lose_it_
  elseif t = 
    "Lowercase upsilon with rough breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase upsilon with smooth breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with rough breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with smooth breathing and acute":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with grave and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with rough breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with smooth breathing and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with rough breathing, acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with smooth breathing and acute and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with circumflex and iota subscript":
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with rough breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with smooth breathing, circumflex and iota subscript" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase omega with iota subscript":
    let next_ = lose_it_
% diaeresis occurs only on short iota and upsilon, so never with circumflex
  elseif t = 
    "Lowercase iota with diaeresis and circumflex" :
    let next_ = lose_it_
  elseif t = 
    "Lowercase upsilon with diaeresis and circumflex" :
    let next_ = lose_it_
% Remapping to BetaCode
  elseif t = "Lowercase theta" : 
    code_offset := ASCII"q" - ASCII"j"; let next_ = use_it_
  elseif t = "Lowercase chi" : 
    code_offset := ASCII"x" - ASCII"q"; let next_ = use_it_
  elseif t = "Lowercase xi" : 
    code_offset := ASCII"c" - ASCII"x"; let next_ = use_it_
  elseif t = "Final lowercase sigma" : 
	code_offset := ASCII"j" - ASCII"s"; let next_ = use_it_
  elseif t = "Initial and medial lowercase sigma" : 
	code_offset := ASCII"s" - ASCII"c"; let next_ = use_it_
  else: code_offset := 0; let next_ = use_it_ fi; next_ enddef;

let cmchar = selectlower;

readfrom("a")
input abary4
readfrom("e")
input ebary4
readfrom("h")
input hbary4
readfrom("i")
input ibary4
readfrom("o")
input obary4
doing_u:=1;
readfrom("u")
input ubary4
doing_u:=0;
readfrom("w")
input wbary4
readfrom("b")
readfrom("g")
readfrom("d")
readfrom("z")
readfrom("j")
readfrom("k")
readfrom("l")
readfrom("m")
readfrom("n")
readfrom("x")
readfrom("p")
readfrom("r")
readfrom("s")
readfrom("t")
readfrom("f")
readfrom("q")
readfrom("y")

code_offset:=0; % let's be really sure of this

def selectkoppa expr t =
  currenttitle:= t;
  if t = 
    "Lowercase koppa" :    let next_ = use_it_
  else: let next_ = lose_it_ fi; next_ enddef;
let cmchar = selectkoppa;

input koppa4

let cmchar = relax;
input cigma4
input digamma4
input sampi4


