*-----------------------------------------------------------------------
      PROGRAM SGPK07

      PARAMETER (N=9)
      DIMENSION Y(N)
      CHARACTER GREEK1*10, GREEK2*10, SYMBOL*10, CSGI*1


      WRITE(*,*) ' WORKSTATION ID (I)  ? ;'
      CALL SGPWSN
      READ(*,*) IWS

      CALL SGOPN(IWS)
      CALL SGFRM

      X1 = 0.1
      X2 = 0.9
      XC = 0.5

      CALL SGSLNI(1)
      DO 10 I=1, N
        Y(I) = 0.1 * (10-I)
        CALL SGLNV(X1, Y(I), X2, Y(I))
  10  CONTINUE
      CALL SGLNV(XC, 0.05, XC, 0.95)

*----------------------- SUPER/SUB SCRIPT ------------------------------

      CALL SGTXV(XC, Y(1), 'SGTXV|SUP"RST_SUB"')

      CALL SGSTXI(2)
      CALL SGLSET('LCNTL', .TRUE.)               ! <-- 添字コントロールON
      CALL SGTXV(XC, Y(2), 'SGTXV|SUP"RST_SUB"')

      CALL SGRSET('SHIFT', 0.5)                  ! <-- シフト量設定
      CALL SGRSET('SMALL', 0.5)                  ! <-- 添字の大きさ設定
      CALL SGTXV(XC, Y(3), 'SGTXV|SUP"RST_SUB"')

*------------------------ FONT SELECTION -------------------------------

      CALL SGSTXI(1)
      CALL SGSTXS(0.05)
      CALL SGTXV(XC, Y(4), 'ABCDEFG abcdefg')

      CALL SGISET('IFONT', 2)                    ! <-- きれいなフォント
      CALL SGTXV(XC, Y(5), 'ABCDEFG abcdefg')

      CALL SGSTXI(3)
      CALL SGTXV(XC, Y(6), 'ABCDEFG abcdefg')

*------------------------- GREEK LETTERS -------------------------------

      GREEK1 = CSGI(152)//CSGI(153)//CSGI(154)//CSGI(155)//CSGI(156)//
     #         CSGI(157)//CSGI(158)//CSGI(159)//CSGI(160)//CSGI(161)
      GREEK2 = CSGI(130)//CSGI(131)//CSGI(135)//CSGI(138)//CSGI(141)//
     #         CSGI(143)//CSGI(145)//CSGI(148)//CSGI(150)//CSGI(151)

      CALL SGTXV(XC, Y(7), GREEK1)
      CALL SGTXV(XC, Y(8), GREEK2)

*----------------------------- SYMBOLS ---------------------------------

      SYMBOL = CSGI(189)//CSGI(190)//CSGI(191)//CSGI(192)//CSGI(193)//
     #         CSGI(210)//CSGI(211)//CSGI(212)//CSGI(217)//CSGI(218)
      CALL SGTXV(XC, Y(9), SYMBOL)

      CALL SGCLS

      END
