Discussion:
java code in tex files
Arek Kuźniewski
2007-03-09 10:16:58 UTC
Permalink
Hello

I have a problem with colouring the java code in my latex document.
I expect environment for example, where I write somethink like this:
--------------------------------------------------------------------
\begin{java}
public interface CellSpan {
public final int ROW = 0;
public final int COLUMN = 1;

public int[] getSpan(int row, int column);
public void setSpan(int[] span, int row, int column);

public boolean isVisible(int row, int column);

public void combine(int[] rows, int[] columns);
public void split(int row, int column);

}
\end{java}
--------------------------------------------------------------------

and it should give me the same efect like this (for example):
--------------------------------------------------------------------
{\bfseries public interface} CellSpan \{ \\
public final int ROW = 0; \\
\{\bfseries public final int\} COLUMN = 1; \\
\\
public int[] getSpan(int row, int column); \\
public void setSpan(int[] span, int row, int column); \\
\\
public boolean isVisible(int row, int column); \\
\\
public void combine(int[] rows, int[] columns); \\
public void split(int row, int column); \\
\\
\}
--------------------------------------------------------------------

Is there any package which let me reach this effect?

Greetings, Arek



------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
Alain Delmotte
2007-03-10 07:59:27 UTC
Permalink
Hi!

Have a look to the "listings" package, it should probably have what you
are looking for.

Regards,

Alain Delmotte
Post by Arek Kuźniewski
Hello
I have a problem with colouring the java code in my latex document.
--------------------------------------------------------------------
\begin{java}
public interface CellSpan {
public final int ROW = 0;
public final int COLUMN = 1;
public int[] getSpan(int row, int column);
public void setSpan(int[] span, int row, int column);
public boolean isVisible(int row, int column);
public void combine(int[] rows, int[] columns);
public void split(int row, int column);
}
\end{java}
--------------------------------------------------------------------
--------------------------------------------------------------------
{\bfseries public interface} CellSpan \{ \\
public final int ROW = 0; \\
\{\bfseries public final int\} COLUMN = 1; \\
\\
public int[] getSpan(int row, int column); \\
public void setSpan(int[] span, int row, int column); \\
\\
public boolean isVisible(int row, int column); \\
\\
public void combine(int[] rows, int[] columns); \\
public void split(int row, int column); \\
\\
\}
--------------------------------------------------------------------
Is there any package which let me reach this effect?
Greetings, Arek
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Great things are happening at Yahoo! Groups. See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
Arek Kuźniewski
2007-03-10 08:49:56 UTC
Permalink
Thaks Alain.

Greetings, Arek
Post by Alain Delmotte
Hi!
Have a look to the "listings" package, it should probably have what you
are looking for.
Regards,
Alain Delmotte
Post by Arek Kuźniewski
Hello
I have a problem with colouring the java code in my latex document.
----------------------------------------------------------
\begin{java}
public interface CellSpan {
public final int ROW = 0;
public final int COLUMN = 1;
public int[] getSpan(int row, int column);
public void setSpan(int[] span, int row, int column);
public boolean isVisible(int row, int column);
public void combine(int[] rows, int[] columns);
public void split(int row, int column);
}
\end{java}
----------------------------------------------------------
----------------------------------------------------------
{\bfseries public interface} CellSpan \{ \\
public final int ROW = 0; \\
\{\bfseries public final int\} COLUMN = 1; \\
\\
public int[] getSpan(int row, int column); \\
public void setSpan(int[] span, int row, int column); \\
\\
public boolean isVisible(int row, int column); \\
\\
public void combine(int[] rows, int[] columns); \\
public void split(int row, int column); \\
\\
\}
----------------------------------------------------------
Is there any package which let me reach this effect?
Greetings, Arek
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Great things are happening at Yahoo! Groups. See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~->
Loading...