Roman Numeral converter

Hey, I've received an error message in my roman numeral program and am not what I'm doing wrong.
Here's the error:
C:\Documents and Settings\Mitch Thul\Desktop\Java2\lab5\Roman2.java:22: cannot find symbol
symbol : variable length
location: class java.lang.String
               for(int i = 0; i <= roman.length - 2; i++)
^
C:\Documents and Settings\Mitch Thul\Desktop\Java2\lab5\Roman2.java:25: cannot find symbol
symbol : method charAt(int)
location: class Roman2
                    if((charAt(i)) >= (charAt(i+1)))
^
C:\Documents and Settings\Mitch Thul\Desktop\Java2\lab5\Roman2.java:25: cannot find symbol
symbol : method charAt(int)
location: class Roman2
                    if((charAt(i)) >= (charAt(i+1)))
^
3 errors
Tool completed with exit code 1
And here's my code:
//Mitch Thul 3059899
import java.util.Scanner;
import java.lang.String;
public class Roman2
     public static void main(String[] arg)
          Scanner keyboard = new Scanner(System.in);
          String date;
          System.out.println("Please enter a roman numeral date:");
          date = keyboard.next();
          System.out.println("Roman numeral = " + date);
          public static int romanToInt(String roman)
               //takes a string of roman numerals (date) and produces corresponding int
               int n; //value of next numeral
               roman = roman + "0"; //adds 0 to the end of the numeral string (for simplification)
               int total = 0; //start at position 0
               for(int i = 0; i <= roman.length - 2; i++)
                    n = numeralToInt(roman.charAt(i));
                    if((charAt(i)) >= (charAt(i+1)))
                         total += n; // add n to the total
                    else
                         total -= n; //subtract n from the total
                    return total;
          private static int numeralToInt(char ch)
               switch(ch)
                    case 'M': return 1000;
                    case 'D': return 500;
                    case 'C': return 100;
                    case 'L': return 50;
                    case 'X': return 10;
                    case 'V': return 5;
                    case 'I': return 1;
                    case '0': return 0;
               return 0;
}Thanks in advance for any help.

Not sure how to finalize the output into looking like this:
Roman numeral date + " is the year " + Integer date
Here's the error message I receive:
C:\Documents and Settings\Mitch Thul\Desktop\Java2\lab5\Roman2.java:14: cannot find symbol
symbol : variable n
location: class Roman2
          System.out.println(date + " is the year " + n);
^
1 error
Tool completed with exit code 1
And here's my code again:
//Mitch Thul 3059899
import java.util.Scanner;
import java.lang.String;
public class Roman2
     public static void main(String[] arg)
          Scanner keyboard = new Scanner(System.in);
          String date;
          System.out.println("Please enter a roman numeral date:");
          date = keyboard.next();
          System.out.println(date + " is the year " + n);
     public static int romanToInt(String roman)
          //takes a string of roman numerals (date) and produces corresponding int
          int n; //value of next numeral
          roman = roman + "0"; //adds 0 to the end of the numeral string (for simplification)
          int total = 0; //start at position 0
          for(int i = 0; i <= roman.length() - 2; i++)
               n = numeralToInt(roman.charAt(i));
               if((roman.charAt(i)) >= (roman.charAt(i+1)))
                    total += n; // add n to the total
               else
                    total -= n; //subtract n from the total
               return n;
     private static int numeralToInt(char ch)
          switch(ch)
               case 'M': return 1000;
               case 'D': return 500;
               case 'C': return 100;
               case 'L': return 50;
               case 'X': return 10;
               case 'V': return 5;
               case 'I': return 1;
               case '0': return 0;
          return 0;
}Can't figure out how to finish things up.

Similar Messages

  • Help Me, roman numeral Unicode to EUC_JP faild ! Why?

    Hi, all
    I want cover the roman numeral from Unicode to EUC_JP , faild !
    there is my program , please check it and tell me where i lost, and what to do it. thanks!
    yours Urey
    ********* my program *************
    void saveEnc(String enc) throws java.lang.Exception{
    System.out.println(" from Unicode to " + enc);
    for(int num =0x2160; num<0x216a; num++){
    char aChar = (char)num;
    if(!Character.isDefined(aChar)){
    continue ;
    String tmpStr = String.valueOf(aChar);
    byte[] tempEncBytes=tmpStr.getBytes(enc);
    String tempEncStr = new String(tempEncBytes, enc);
    String debugString = " " + num
    + " " + string2charcode_string(tmpStr)
    + " [" + tmpStr + "]"
    + " " + byte2charcode_string(tempEncBytes)
    + " [" + tempEncStr +"]" ;
    System.out.println(debugString);
    ********* my result *************
    E:\You Li\Working\nec\F2\sql\test>java Dbtest_E Shift_JIS
    from Unicode to Shift_JIS
    8544 2160 [�T] 87 54 [�T]
    8545 2161 [�U] 87 55 [�U]
    8546 2162 [�V] 87 56 [�V]
    8547 2163 [�W] 87 57 [�W]
    8548 2164 [�X] 87 58 [�X]
    8549 2165 [�Y] 87 59 [�Y]
    8550 2166 [�Z] 87 5A [�Z]
    8551 2167 [�[] 87 5B [�[]
    8552 2168 [�\] 87 5C [�\]
    8553 2169 [�]] 87 5D [�]]
    *************** that's ok ************************
    E:\You Li\Working\nec\F2\sql\test>java Dbtest_E EUC_JP
    from Unicode to EUC_JP
    8544 2160 [�T] 3F [?]
    8545 2161 [�U] 3F [?]
    8546 2162 [�V] 3F [?]
    8547 2163 [�W] 3F [?]
    8548 2164 [�X] 3F [?]
    8549 2165 [�Y] 3F [?]
    8550 2166 [�Z] 3F [?]
    8551 2167 [�[] 3F [?]
    8552 2168 [�\] 3F [?]
    8553 2169 [�]] 3F [?]
    ********** that's falid , Why ? ********************
    ********** my java environment *******************
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
    Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)

    Hi, viravan
    Right, in the doc of the JDK 1.4 and the 1.3 or its othe java Environment , it's say that it supposed that, but i realy can not get the right result of convert Unicode to EUC_JP about the Roman numerals part.
    i run my program in linux , and change the JDK its can not give me the right result also. if that's a bug, that may be so big! i think.
    thanks you viravan.
    yours Urey

  • Unicode to EUC_JP ROMAN NUMERAL is wrong , please help me!

    Hi, all
    I want cover the roman numeral from Unicode to EUC_JP , faild !
    there is my program , please check it and tell me where i lost, and what to do it. thanks!
    yours Urey
    ********* my program *************
         void saveEnc(String enc) throws java.lang.Exception{
    System.out.println(" from Unicode to " + enc);
              for(int num =0x2160; num<0x216a; num++){
              char aChar = (char)num;
              if(!Character.isDefined(aChar)){
                   continue ;
              String tmpStr = String.valueOf(aChar);
              byte[] tempEncBytes=tmpStr.getBytes(enc);
              String tempEncStr = new String(tempEncBytes, enc);
              String debugString = " " + num
              + " " + string2charcode_string(tmpStr)
              + " [" + tmpStr + "]"
              + " " + byte2charcode_string(tempEncBytes)
              + " [" + tempEncStr +"]" ;
              System.out.println(debugString);
    ********* my result *************
    E:\You Li\Working\nec\F2\sql\test>java Dbtest_E Shift_JIS
    from Unicode to Shift_JIS
    8544 2160 [�T] 87 54 [�T]
    8545 2161 [�U] 87 55 [�U]
    8546 2162 [�V] 87 56 [�V]
    8547 2163 [�W] 87 57 [�W]
    8548 2164 [�X] 87 58 [�X]
    8549 2165 [�Y] 87 59 [�Y]
    8550 2166 [�Z] 87 5A [�Z]
    8551 2167 [�[] 87 5B [�[]
    8552 2168 [�\] 87 5C [�\]
    8553 2169 [�]] 87 5D [�]]
    *************** that's ok ************************
    E:\You Li\Working\nec\F2\sql\test>java Dbtest_E EUC_JP
    from Unicode to EUC_JP
    8544 2160 [�T] 3F [?]
    8545 2161 [�U] 3F [?]
    8546 2162 [�V] 3F [?]
    8547 2163 [�W] 3F [?]
    8548 2164 [�X] 3F [?]
    8549 2165 [�Y] 3F [?]
    8550 2166 [�Z] 3F [?]
    8551 2167 [�[] 3F [?]
    8552 2168 [�\] 3F [?]
    8553 2169 [�]] 3F [?]
    ********** that's falid , Why ? ********************
    ********** my java environment *******************
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
    Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)

    Please don't cross-post your questions.

  • How to write roman numeral greater than 10,000?

    Hi Everybody
    I'm writing my first Math book and I can't find under Edit-> Special Characters the symbol for that.
    For exemple 15,000 = XV : they used a horizontal line over each letter to represent  x10,000.
    This workaround of using  _ in the previous line joins the 2 horizontal lines, what wasn't supposed to happen.
    Anybody knows how to do it?
    Have a great Year and thanks in advance.

    Hi Tom
    Where is the over bar? I can´t find it.
    The only symbol with over bar that could be used as roman numeral is under latin:

  • Numeric Converted to In Word

    How to convert a numeric value into the word.
    Example: suppose the value of a product is $9999 it will be automatically converted to Nine Thousand Nine Hundred Ninty Nine.

    Hi
    I hope this will solve ur problem
    select to_char(to_date(9999,'J'), 'JSP') from dual;
    Thanks
    Venkat

  • Display page number in roman numeral

    Is it possible to create a form field that will display the page number in roman numerals and increment by one digit on each of the following pages? If anyone knows of a script that will do this I would greatly appreciate it.

    Yeah, it's possible. Create a unique text field on each page with this code as the custom calculation code:
    event.value = romanize(event.target.page+1);
    Then place this function at the doc-level (I didn't write that one):
    function romanize(num) {
        if (!+num)
            return false;
        var digits = String(+num).split(""),
            key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM",
                   "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC",
                   "","I","II","III","IV","V","VI","VII","VIII","IX"],
            roman = "",
            i = 3;
        while (i--)
            roman = (key[+digits.pop() + (i * 10)] || "") + roman;
        return Array(+digits.join("") + 1).join("M") + roman;

  • How to set month(numeric) convert to month(name) ,datasource from QaaWS

    hi, im newbie of xcelsius
    i got issue for convert to month name
    Data Source is connect thru QaaWS
    let said Source Data look like this
    country | monthnumber | revenue
    US |         001 |                54564  
    US |         002 |                43432
    US |         003 |                97643
    US |         004 |                12324
    US |         005 |                34654
    US |         006 |                83433
    US |         007 |                54564  
    US |         008 |                43432
    US |         009 |                97643
    US |         010 |                12324
    US |         011 |                34654
    US |         012 |                83433
    then i map destination in xcelsius spreadsheet
    country | monthnumber | revenue
    (D2:D13) | (E2:E13) | (F2:F13)
    i want "1" convert to "Jan", "2" convert to "Feb" , "3" convert to "Mar" .... etc...
    as i know usually we can go Universe create new Dimension for set Month name by using if else statement.
    but their requirement cannot use this way, must use another way to convert to month_name ...
    Any solution ?
    thanks,
    regards
    s1

    Hi Leong, if you have the date object, ¿what database are you using? Maybe you can use some database functions in the universe and avoid the IF statement
    Another way, is to have a formula in your excel, like this: =TEXT(DATE(2000;E2;1);"mmm")
    If you put this formula in G2 and then drag up to G13, then you use this column instead of column E
    Hope this helps.
    Regards,
    Liliana
    Hi, Liliana,
    I try ord , its show error. Anyway , thanks for the help.
    Datasource use  SAP BW query point to unverse and then publish to BOE server.
    thanks
    regards
    s1

  • Find and switch any roman numeral to numbers with GREP

    Is it possible to create a GREP function to find any/all roman numerals within a text and switch them to numbers?
    For example: if it finds vi, it has to become 6 and if it finds cxxiv, it has to become 124 etc.

    That would have to be scripted.

  • Troubles in converting roman to arabic..pls HELP!!!

    i have a code here in converting roman to arabic and vice versa. the roman to arabic method is properly giving the correct output, then the arabic to numeral methos is malfunction..what i want is the ROMAN to ARABIC only,,,but im confuse on what to delete/edit in this code...can u help me edit this??...pls??
    here's the code...
    import java.io.*;
    public class Numerals
    public static void main(String[] args) throws IOException
    String input = null;
    System.out.print("Enter either a Roman Numeral or number: ");
    BufferedReader br2 = new BufferedReader(new InputStreamReader (System.in));
    try {
    input = br2.readLine();
    catch (IOException e) {
    e.printStackTrace();
    System.exit( 1 ); // don't catch and just print - exit
    try {
    int number = Integer.parseInt( input );
    System.out.println("number in roman numerals: " );
    intToRoman(number);
    catch(NumberFormatException nfe) {
    System.out.println("roman numberal as a number: " + romanToInt(input));
    //-------Convert Roman numeral to integer data---------
    private static String romanToInt(String RN2)
    RN2 = RN2.toUpperCase();
    int [] RN = new int [RN2.length()];
    for (int convert = 0; convert < RN2.length(); convert++)
    if (RN2.charAt(convert) == 'M' || RN2.charAt(convert) == 'm')
    RN[convert] = 1000;
    else if (RN2.charAt(convert) == 'D' || RN2.charAt(convert) == 'd')
    RN[convert] = 500;
    else if (RN2.charAt(convert) == 'C' || RN2.charAt(convert) == 'c')
    RN[convert] = 100;
    else if (RN2.charAt(convert) == 'L' || RN2.charAt(convert) == 'l')
    RN[convert] = 50;
    else if (RN2.charAt(convert) == 'X' || RN2.charAt(convert) == 'x')
    RN[convert] = 10;
    else if (RN2.charAt(convert) == 'V' || RN2.charAt(convert) == 'v')
    RN[convert] = 5;
    else if (RN2.charAt(convert) == 'I' || RN2.charAt(convert) == 'i')
    RN[convert] = 1;
    else
    RN[convert] = 0;
    //--------Calculate the Roman Numeral---------
    int y = 0;
    int z = 0;
    int Num = 0;
    while (y < RN.length)
    if ((y+1) != RN.length)
    z = RN[y+1];
    if (z > RN[y])
    Num = Num + (z - RN[y]);
    y++;
    else
    Num = Num + RN[y];
    y++;
    }//ends while
    return(Integer.toString(Num));
    }//ends romanToInt
    // CODE TO TRANSLATE ROMAN NUMERAL TO NUMBER
    private static void intToRoman(int Num2)
    int r= 0;
    String number = Integer.toString(Num2);
    for ( r = 0; r < number.length(); r++)
    //return(Integer.toString(number));
    //System.out.println(Num3[r]);
    } //ends intToRoman
    }

    ahhmm, i just want to delete the arabic to roman method...ahm, the program which i wanted is only the ROMAN to ARABIC...i want to dscard/disregard the ARABIC to ROMAN...
    here's hte code:
    import java.io.*;
    public class Numerals
    public static void main(String[] args) throws IOException
    String input = null;
    System.out.print("Enter either a Roman Numeral or number: ");
    BufferedReader br2 = new BufferedReader(new InputStreamReader (System.in));
    try {
    input = br2.readLine();
    catch (IOException e) {
    e.printStackTrace();
    System.exit( 1 ); // don't catch and just print - exit
    try {
    int number = Integer.parseInt( input );
    System.out.println("number in roman numerals: " );
    intToRoman(number);
    catch(NumberFormatException nfe) {
    System.out.println("roman numberal as a number: " + romanToInt(input));
    //-------Convert Roman numeral to integer data---------
    private static String romanToInt(String RN2)
    RN2 = RN2.toUpperCase();
    int [] RN = new int [RN2.length()];
    for (int convert = 0; convert < RN2.length(); convert++)
    if (RN2.charAt(convert) == 'M' || RN2.charAt(convert) == 'm')
    RN[convert] = 1000;
    else if (RN2.charAt(convert) == 'D' || RN2.charAt(convert) == 'd')
    RN[convert] = 500;
    else if (RN2.charAt(convert) == 'C' || RN2.charAt(convert) == 'c')
    RN[convert] = 100;
    else if (RN2.charAt(convert) == 'L' || RN2.charAt(convert) == 'l')
    RN[convert] = 50;
    else if (RN2.charAt(convert) == 'X' || RN2.charAt(convert) == 'x')
    RN[convert] = 10;
    else if (RN2.charAt(convert) == 'V' || RN2.charAt(convert) == 'v')
    RN[convert] = 5;
    else if (RN2.charAt(convert) == 'I' || RN2.charAt(convert) == 'i')
    RN[convert] = 1;
    else
    RN[convert] = 0;
    //--------Calculate the Roman Numeral---------
    int y = 0;
    int z = 0;
    int Num = 0;
    while (y < RN.length)
    if ((y+1) != RN.length)
    z = RN[y+1];
    if (z > RN[y])
    Num = Num + (z - RN[y]);
    y++;
    else
    Num = Num + RN[y];
    y++;
    }//ends while
    return(Integer.toString(Num));
    }//ends romanToInt
    // CODE TO TRANSLATE ROMAN NUMERAL TO NUMBER
    private static void intToRoman(int Num2)
    int r= 0;
    String number = Integer.toString(Num2);
    for ( r = 0; r < number.length(); r++)
    //return(Integer.toString(number));
    //System.out.println(Num3[r]);
    } //ends intToRoman
    }

  • Converting from integers to roman numerals

    i'm new to the whole programming scene, so I've been working with a few practice programs. I've got this one extremely close to working, but the compiler still gives me one error, and it completely baffles me. here's the code:
    package practiceprograms;
    import java.io.*;
    public class RomanNumerals {
         //ButtonCreator c = new ButtonCreator(); //uncomment at start of line to implement GUI and all other full line comments too.
         public static void main(String[] args) {
              //console.run(new ButtonCreator(), 200, 100);
              Numerals.removeNumbers(String number, int i);
    class Numerals {
         static void removeNumbers(String s, int x) {
              GetNumber b = new GetNumber();
              while (x != 0){
                   b.getInput(x);
                   if (x < 0) {
                        x = -x;
                        s += "Negative ";
                   for(; x>=1000; x -= 1000) {
                        s += "M";
                   for(; x>=100; x -= 100) {
                        s += "C";
                   for(; x>=50; x -= 50) {
                        s += "L";
                   for(; x>=10; x -= 10) {
                        s += "X";
                   for(; x>=5; x -= 5) {
                        s += "V";
                   for(; x>=1; x--) {
                        s += "I";
              //if (i = null)
              //     c.actionPerformed();
              System.out.println(s);
                   //txt.setText(s);
    class GetNumber {
         int getInput(int x) throws IOException {
              System.out.println("Please enter a non-zero number between -10000 and 10000. If you enter zero, the program will quit.");
              System.out.println("Return a blank line or zero to quit the program.");
              BufferedReader in = new BufferedReader(
                   new InputStreamReader(System.in));
              x = in.readline();
              GetNumber.getInput(x);
            return x;
         int checkI(int t) {
              if (t > 10000 | t < -10000) {
                   System.out.println("Err: Please enter a non-zero number between -10000 and 10000.");
                   GetNumber n = new GetNumber();
                   n.getInput();
                   n.checkI(i);
                   return i;
              else
                   return t;
    } and the error it gives me:
    C:\Documents and Settings\Aishu\Desktop\java class and source files\RomanNumerals.java:8: ')' expected
    Numerals.removeNumbers(String number, int i);
    ^
    1 error
    its irritating, because its almost saying that the method removeNumbers shouldn't take any arguments... or atleast thats what it seems like to me... any ideas as to what the problem is?

    hmm... well i recompiled, and reran the program (i'm using JCreator LE to write, compile, and run the programs.) and it gave me a new error... a more descriptive one, but i'm not too sure what it means. I can't copy and paste, but i'll type it into here:
    "Exception in thread "main" java.lang.ExceptionInInitializerError
    Caused by: java.lang.NullPointerException
    at comararjun.RomanNumerals.<init>(RomanNumerals.java: 106)
    at comararjun.GetNumber.<clinit>(RomanNumerals.java:9)
    Press any key to continue..."
    here's the code:
    package comararjun;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    class GetNumber {
              static RomanNumerals r = new RomanNumerals();     
    /*line 9*/ static int getInput(int x) throws IOException {
              P.rintln("Please enter a non-zero number between -10000 and 10000.");
              P.rintln("Enter a zero to exit.");
              P.rintln();
              BufferedReader in = new BufferedReader(
                   new InputStreamReader(System.in));
              x = Integer.parseInt(in.readLine());
              //System.out.println(x);
              //checkI(x);
              //System.out.println(x);
    return x;
    //     static int checkI(int t) {
    //          if (t > 10000 || t < -10000) {
    //               RomanNumerals.r.setText("Err: Please enter a non-zero number between -10000 and 10000.");
    //               RomanNumerals.i = Integer.parseInteger(romanNumber.getText());
    //               //P.rintln("Err: Please enter a non-zero number between -10000 and 10000.");
    //               //GetNumber n = new GetNumber();
    //               //try{
    //               //     n.getInput(t);
    //               //} catch(IOException p) {
    //               //     System.out.println("Error: Wrong input type. Please enter another number.");
    //               //     Numerals.removeNumbers(RomanNumerals.number,RomanNumerals.i);
    //          //     System.out.println(t);
    //               checkI(RomanNumerals.i);
    //               return RomanNumerals.i;
    //          else
    //          //     System.out.println(t);
    //               return t;
    class Numerals {
         public static String removeNumbers(String s, int x) {
                   if (x < 0) {
                        x = -x;
                        s += "Negative ";
                   for(; x >= 1000; x -= 1000) {
                        s += "M";
                   for(; x >= 900; x -= 900) {
                        s += "CM";
                   for(; x >= 500; x -= 500) {
                        s += "D";
                   for(; x >= 400; x -= 400) {
                        s += "CD";
                   for(; x >= 100; x -= 100) {
                        s += "C";
                   for (; x >= 90; x -= 90) {
                        s += "XC";
                   for(; x >= 50; x -= 50) {
                        s += "L";
                   for (; x >= 40; x -= 40) {
                        s += "XL";
                   for(; x >= 10; x -= 10) {
                        s += "X";
                   for (; x >= 9; x -= 9) {
                        s += "IX";
                   for(; x >= 5; x -= 5) {
                        s += "V";
                   for(; x >= 4; x -= 4) {
                        s += "IV";
                   for(; x >= 1; x--) {
                        s += "I";
              //if (i == 0)
              //     c.actionPerformed();
                   return s;
                   //txt.setText(s);
    public class RomanNumerals extends JApplet implements ActionListener {
         static String number = "";
         static int i;
         JFrame converterFrame;
         JPanel converterPanel;
         JTextField romanNumber;
         JLabel intLabel, romanLabel;
         JButton convertNumber;
         public RomanNumerals() {
              /*line 106*/converterFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              converterFrame.setSize(new Dimension(120, 40));
              converterPanel = new JPanel(new GridLayout(2, 2));
              addWidgets();
              converterFrame.getContentPane().add(converterPanel, BorderLayout.CENTER);
              converterFrame.pack();
              converterFrame.setVisible(true);
         private void addWidgets() {
              romanNumber = new JTextField(2);
              intLabel = new JLabel("Integer", SwingConstants.LEFT);
              convertNumber = new JButton("Convert");
              romanLabel = new JLabel("Roman Numeral value.");
              convertNumber.addActionListener(this);
              converterPanel.add(romanNumber);
              converterPanel.add(intLabel);
              converterPanel.add(convertNumber);
              converterPanel.add(romanLabel);
              intLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
              romanLabel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
         GetNumber k = new GetNumber();
         Numerals l = new Numerals();
         private static void createGUI() {
              JFrame.setDefaultLookAndFeelDecorated(true);
              RomanNumerals converter = new RomanNumerals();
         public void actionPerformed(ActionEvent event) {
              i = (int)(Double.parseDouble(romanNumber.getText()));
         //     i = GetNumber.checkI(i);
              romanNumber.setText(Numerals.removeNumbers(number, i));
         static void numberIs() {
              do {
                   try {
                        i = GetNumber.getInput(i);
                        //System.out.println(i);
                        Numerals.removeNumbers(number, i);
                   } catch(IOException p) {
                        System.out.println("Error: Wrong input type. Please enter another number.");
                        numberIs();
                   } catch(NumberFormatException t) {
                        System.out.println("Error: Wrong input type. Please enter another number.");
                        numberIs();
              } while(i != 0);
         public static void main(String[] args) {
              javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        createGUI();
    }

  • Re-write numerical page numbers to roman numerals for an introduction?

    Hi there everybody,
    I've been attempting (for some considerable time!) to typeset and format a book. The book needs to have roman numerals running from the first title page (which is in reality left blank through using a secondary master page without page numbers). However, I didn't realise I would need to use roman numerals in the introduction, and instead started the page numbers from the first title page of the introduction. Therefore, my pages that are numbered by roman numerals (copyright page etc) stop at this point and in the introduction become numbers.
    I need to change it so it is roman numerals up until the first page of the actual book, all through the introduction,  but when I try to change it in the Numbers and Sections tab, it tells me that i've already used the numbers i've typed in.
    Basically I would like to know how to take off the first set of roman numeral page numbers and start again??
    I'm very confused!! Help would be MUCH appreciated.
    Lucy

    Is this any help?
    Working with Page Numbers and Sections | Managing Pages and Books with Adobe InDesign CS6 | Que

  • Regarding data type related to roman no

    hi ,
    i have created  a z table named as zstudent.  In that i hve one field name as zstandard which should contain only roman numbers  from I TO X (1ST TO 10 TH ) class .hw can i do this .wen i creating entries on that table it should restrict to only roman numbers.is there any data type related to roman numbers
    thanks in advance
    Nandini.p
    points will be rewarded if useful.

    Why don't you simply maintain a regular integer or even a numeric value in your internal table and then output the appropriate Roman numeral using CASE...ENDCASE when you need to use it?
    Or if you don't have that many, then create a series of constants and use those.
    Regards
    Kurt

  • Roman page numbering

    So, my dissertation's nearly finished and I'm checking the University's formatting specifications. They want the main body from the Introduction to start at page 1. No problem: insert section break and restart numbering.
    But they want all the pages up to page 1 (e.g. abstract, preface, tables of content) to have Roman numeral numbering (i, ii, iii, iv etc.)
    I can't find any way to specify this (I don't think it's possible), but I also can't find a manual workaround e.g. I can't insert a text box near the bottom of a TOC page without it going into the footer field, where it immediately behaves like a footer item.
    Any ideas?
    Given the high uptake of Apple laptops by students, I'm surprised they don't make Pages more academic-friendly. The above function is pretty basic, as would a usable way of a) captioning illustrations and b) automatically listing those captions in their own TOC. For that facility alone I nearly did the whole thing in Word but resisted and resigned myself to creating an table of illustrations by hand.
    Still, it's getting better, the graphs look great and it was a pleasure to work with compared to MSW.

    Thanks Peggy. That's just perfect - talk about a buried feature. But that's just what one hopes for in these forums! How did you know? Is it in the manual somewhere or were you just exploring?
    You don't happen to have a solution to the captioning issue do you?
    I have a work around which goes like this:
    1. Insert photo (illustration/whatever) as floating object - full width of page.
    2. Create floating text box and insert caption - also full width of page.
    3. Group 1 & 2 together, resize and locate as inline object with text wrap (if desired).
    4. Make manual list of illustrations in a table.
    The good news is that I can still edit the text of the caption even when the items are grouped - and it does work - but it's not quick or pretty.

  • Roman numerals within iTunes

    In iTunes, my Star Trek movies are named Star Trek IV, Star Trek V, Star Trek VI... you see what i'm saying. When I get to Star Trek IX, iTunes puts it between IV and V. How do I get iTunes to put the movies in the correct Roman numeral order?
    Thanks,

    Select each movie and open it's "Get Info" dialog (command+ I). Select the "Sorting" tab and use the sort name field to change the roman numeral to regular numbers. They will sort using the sort name but still display the roman numeral.

  • URGENT: Paragraph/Character style help (doing massive amounts manually)

    I'm using CS3 at work but if it's magically easier, i may have access to cs4 (less likely but possible). It's a long post but I wanted to be in  depth with my problem which at its core is simple. I have included a 2-page spread example in pdf.
    What I greatly need help with is your opinion of how I can set this up to speed up the process, unify the document, and make future edits simple instead of crazy difficult. Can I configure a paragraph style to NOT replace font style? Can that style include my preset tabs (for bullets) which list as follows?:
    number, small letter, roman numeral, bullet
    Let me start by saying I SCOUR the net and all available options before posting.  I'm cleaning up/editing a production manual for a portrait company I work for and am new to indesign but have figured many things out. I'm quite proficient with the Adobe Suite and computers. I'm using last year's indesign file and it was done very poorly. The words are right, the lines are right, the tabs are terrible and i've needed to move many pages out of order and add plenty. I also chose to disable 1 text box that flows from page to page (i see now it's helpful but they had made it impossible for me to use the existing one and I didn't have time to redo). The pictures I can add and manipulate freely but an embedded text-wrapped version would be nice as well (less important by far).
    The manual is spiral bound with text on the right page and a notes page on the left for the layout. (flipped open the left side is lines for notes and the right side is operations). It's set up with a Header at the top (in some cases a sub header almost identical right below it), a space or two, then an outline format IE:
    1)     Open job
              a) Go into G:\Location
              b) Select job code
                   i) *Note: Be sure to select the right one (etc)..
    2)      Continue
                                       |                                                    |
                                       |                                                    |
                                       |                    Picture                      |
                                       |                                                    |
                                       |______________________________|
    Page size is 8.5x11 with a .5 safe print border all around (document is 11x17). The Document is about 100 pages of written directions (so double that for indesign pages). It will be printed on a Xerox IGen3.  The whole book give or take is set up like that. Thus, a few paragraph and character styles are in order. I've been editing/cleaning up each page re-tabbing, re-laying out. It's hell and must be done in 2 days.
    I'm using Myriad Pro universally as the font.  The sizes are as follows:
    Header: 16 bold center
    Sub (if applicable): 15 bold center
    Body: 12 point
    I've gotten paragraph styles to work sort of. I tried setting up numbering and bulleting but it's been giving me so much grief that I typed those all by hand or have just adjusted existing ones (I don't have much time currently, BUT need to learn for future updates and to convert it to styles). I know styles are the way to go with a couple master pages involving bulleting and character styles... however I could not become an expert overnight unfortunately; i tried =)
    The real killer for paragraph styles have been:
    - The portions of the directions that pertain to specific menu options or clicks are in bold, occasional important info is red. Normal text including numbers/bullets are normal. There are many words repeated that need bold so perhaps some kind of search/replace script could help however im not positive.
    - When I go to apply a paragraph style it must make all type bold or not bold. It doesn't replace the color of the text which is good.
    -  Having major trouble with bullets/numbers working the way i'd like.

    It is unfortunate you only have two days, but you could play around with these suggestions below and see if they help more than they hender... (NOTE: SAVE A COPY OF THE DOCUMENT BEFORE YOU START MONKEYING AROUND IN CASE YOU HATE THE RESULTS!)
    For starters, you could certainly do the lists via stylesheet. It would require 3 lists based on your sample. Base list 2 and 3 on list 1 or all 3 on a default List paragraph style, so that you can globally control your list formatting without having to change all 3 each time you want to apply a tweak.
    List 1 would be leve 1, 1,2,3 style with indents like 3p, -1.5, 3p. Align right and don't restart numbers. If you want bold numbers, make a bold character style called List# and apply it.
    List 2 would be level 2, a,b,c style with indents like 4p, -1p, 4p. Restart on level change.
    List 3 would be level 3, i,ii,iii style with indents like 6.5p, -1.5p, 6.5p. Restart on level change.
    Tweak as necessary to match your actual text.
    Then just do a global GREP search and replace, replacing out the manual list numbers with real styles.
    List 1 replace ^\t[0-9]+\t with ~- (discretionary hyphen is a nice invisible character that won't break anything) and paragraph style of list1.
    List 2 replace ^\t\t[a-z].\t with ~- and paragraph style list2.
    List 3 replace ^\t\t\t[ivx].\t with ~- and paragraph style list3.
    The last step of list replacement would be to manually restart numbering for each new list.
    As for the keywords, unless you have a complete list of what will be bold and it will always be bold, just manually style them with character styles.
    Make a character style called "Keyword" and apply bold to the formatting.
    Make a character style called "Keyword Important" and apply bold and red formatting.
    If you know certain words are always, always the same and you have CS4, you could create a GREP style that applied Keyword character style to any words that matched.
    For example, if the keywords Left, Right, Top, Bottom always were bolded at the beginning of the paragraph, you could add the GREP style that applied Keyword to ^(Top|Bottom|Left|Right).
    In all likelihood you will be applying a lot of manual keywords too though, so make sure you put a keyboard shortcut on (like cmd-opt-1, 2, etc) on the Keyword and Keyword Important character styles. That way you can just fire through selecting text and whacking cmd-opt-1 where appropriate.

Maybe you are looking for