Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [java]

{Java} is a general-purpose, concurrent, class-based, object-oriented programming language.

3
votes
1answer
43 views

minted: why are field variables colored and how can I change that for Java code?

As a minimal example I would want to highlight the following code: (new Thread(() -> { System.out.println("Hello"); })).start(); Given the MWE: \documentclass{article} \usepackage{minted} \...
0
votes
0answers
33 views

How to suggest updates to lstlisting Java keywords?

It seems the listings package does not provide syntax highlighting for the following words in Java: strictfp assert enum var Is there any way to add them manually or somewhere to file a bug report ...
2
votes
0answers
52 views

Including a Java code snippet by method name, not line number

I am currently writing documents that contain large amounts of references to source code, in which I would typically include a complete method at a time. /* ... */ public class MyClass { public ...
2
votes
1answer
43 views

bib2gls exception NoSuchMethodError

$ bib2gls file bib2gls version 1.5 (2018-05-09) Reading file.aux Reading greek-symbols.bib Encoding: UTF-8 Exception in thread "main" java.lang.NoSuchMethodError: java.util.Vector.sort(Ljava/util/...
1
vote
1answer
83 views

Bib2gls - Missing aux file

I have following problem using the glossarie-extra usepackage. Everytime I want to compile my document I get the following error message for bib2gls: Missing aux file. Use --help for help. (Use --...
0
votes
1answer
156 views

How to import Java source code from multiple folders to LaTeX

I want to add all my Java source code to an appendix. But I have 20 projects. Is there a possibility to just tell LaTeX where the folder with the different projects are, and LaTeX collects all the ...
4
votes
1answer
320 views

How to indent Java code in Latex?

I have the following code: \documentclass{article} \usepackage[brazilian]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \DeclareUnicodeCharacter{B0}{\textdegree} % ---------------------...
0
votes
1answer
997 views

I want to compile a pdf document using latex as part of a java program [duplicate]

I'm doing a java project and want to produce a word doc or pdf of inputted (formatted) text. I've read that I could use Apache POI xwpf, but I know infinitely more LaTEx commands than apache poi. How ...
2
votes
0answers
178 views

latexindent with arara produces error message [closed]

I try to get my files indented automatically with arara, latexindent and texmaker. I have the TexLive Distribution, so both programs should be installed correctly (or am I wrong?). At least when I ...
1
vote
1answer
503 views

Unexpected error in jabref 4.1 with java

yesterday I updated my jabref 4.0 to the lastest version, 4.1. However, when I open it appears this window: I went to the java webpage and downloaded the Version 8 Update 151 available there, which I ...
5
votes
1answer
882 views

Different fontsize for minted and mintinline

I was wondering if it is possible to distinguish between \mintinline and \begin{minted}, to use different font size for both. Background: I'm placing java code in my document with \begin{minted} and ...
5
votes
1answer
119 views

How can I include the Spanish characters in source code?

Hi i need help for fix this code in the part \begin{lstlisting}[style=Java] i have 2 errors can read the source code from another file and add a main .tex file? PD: i am new in LaTeX - PD 2: my ...
0
votes
0answers
133 views

Highlighting Java annotations in lstlistings [duplicate]

Is it possible to highlight Java annotations in lstlisting? I could not find any similar questions in tex.stackexchange. I'm searching for some yellow-like color. Update: I found another question ...
2
votes
1answer
99 views

texosquery doesn't play well with MiKTeX using XeLaTeX

I'm not quite sure if this is a bug or a configuration problem yet. If I can get confirmation from others that it is a problem I will file a bug report. I installed the recently updated texosquery (...
3
votes
0answers
70 views

Problem with arara in verbose mode

I'm using TeXLive 2016 and java 1.8.0.111 on Windows 7 Home Premium. Suppose I'm using arara with the verbose option, as in: arara -v file.tex If file.tex contains an error, I get a prompt ? where ...
1
vote
0answers
22 views

Render LaTex script and bind with IBM Watson service [duplicate]

How do I bind a rendered LaTex script into my existing java code where I am using Watson Service API. Please help
6
votes
2answers
2k views

How to include Source Code by pointing to a File Path (recursively)

I'm looking for a way to include source code in my thesis' appendix. Any chance to add source code by pointing to a directory and adding the java file recursively going through the packages? I do ...
1
vote
0answers
469 views

Automatic code listing indentation for Java [closed]

I'm a newbie to LaTeX, so sorry if it's a trivial question, but I couldn't find the answer. I'm trying to print code listings inside LaTeX, but when I do so LaTeX doesn't keep code indentation from ...
2
votes
0answers
126 views

Producing LaTeX output in Java [duplicate]

Is there a Java library for producing LaTeX output from Java? I want a methos, where the argument will be the String and the output will be PDF.
4
votes
0answers
626 views

Java library to parse Latex source file [closed]

Is there any java library that can extract title, keywords and abstract from latex source file. Something which works similar to jsoup library that returns html tags. Thanks in advance.
1
vote
0answers
420 views

What is the best TeX renderer for Java applications? [closed]

I want to be able to render mathematical equations in my Java applications. I have been using a library for Java called JEuclid to achieve this. I have done some research on other libraries which ...
2
votes
1answer
63 views

How to position a listing correctly?

I have a situation similar to the following code: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{inconsolata} \usepackage{color} \usepackage{graphicx} \definecolor{pblue}{rgb}{0.13,0....
4
votes
1answer
2k views

How to add caption correctly in listing?

I have two blocks lstlisting and another listing as follows: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{inconsolata} \usepackage{color} \definecolor{pblue}{rgb}{0.13,0.13,1} \...
2
votes
1answer
3k views

How to display the symbol dollar $ correctly?

I have a minted block as follows: \documentclass{article} \usepackage{minted} \usepackage{listings} \begin{document} \begin{listing}[ht] \begin{minted}{xml} <plugin> <...
3
votes
1answer
591 views

How to properly number between lstlisting and listing the same latex file?

I'm having trouble with the legend of the lstlisting and listing the latex file when I reference them both are appearing as listing 1. How do I display the number of correctly caption for listing 1 ...
1
vote
0answers
1k views

Open source Word to LaTeX converter

I'm building a brand new product mobile and web for people collaborating on complex documents and thinking of using latex format for internal document representation. I'd like to use an open source ...
7
votes
3answers
1k views

Why does Java have Eclipse and NetBeans, but TeX cannot?

I faced these questions when I was searching for an intelligent Windows TeX editor: Is there any way to get real-time compilation for LaTeX? Free, "compile and preview as you type" latex ...
0
votes
0answers
415 views

Error installing PDFBox library for pax package

On Ubuntu 14.04, I followed https://tex.stackexchange.com/a/44104/861. First install pax package. $ sudo tlmgr install pax Then run /usr/local/texlive/2014/texmf-dist/scripts/pax/pdfannotextractor....
1
vote
2answers
2k views

Starting LanguageTool from TeXstudio

I am trying to start LanguageTool grammar checker from TexStudio on OS X 10.10.2. This is done defining in Preferences/Grammar the path to Java. I have installed the recent JRE8 but I don't know how ...
1
vote
0answers
108 views

linewrap included Javafile with lstinputlisting

I've spent few days already trying to properly include a Java source file dynamically in a tex file. The text is included. However the lines don't wrap. The following is the "srinked" project \...
0
votes
1answer
1k views

Including both XML code and Java code in a document using lstlisting package

I am writing a document which has both java and xml codes, I managed to highlight my java code but unfortunately I was unable to do the same with xml, so far I have tried more than one way either by ...
3
votes
1answer
72 views

Is it possible to get the location of individual components of a LaTeX image?

I'm writing an android app and I want to render math expressions in LaTeX then react to touches to individual parts of the rendered expression. I'm planning on using a library like jlatexmath. I ...
11
votes
2answers
4k views

How to write “Java” in LaTeX [closed]

How can I write "Java" in LaTeX so that the output looks as it is typeset on https://www.java.com/en/ (image below). For example \textsc{Java} doesn't look good. The image uses white text on red ...
3
votes
1answer
329 views

lstlistings works strangely

I have some Java source code and want to display it in LaTex: \lstset{language=Java} \begin{lstlisting} IntentFileter intentfilter = new IntentFilter(); intentfilter.addAction("com.anguanjia....
6
votes
1answer
6k views

Source code description in LaTeX

I have a problem concerning the creation of the name below a "Source code" (Listing) in LaTeX. When I have a figure I use: \begin{figure}[t] \centering \includegraphics{Figures/...
11
votes
3answers
36k views

Listings Highlight Java Annotations

I am typesetting something that has a lot of Java code listings. Because the Java code has a lot of annotations, and that they are important to the reader, I'd like to have them highlighted, like ...
8
votes
2answers
6k views

Is there a LaTex java .jar?

I'm very interested in using the Java LaTeX Report library, but one of the requirements is an installed or portable LaTeX distribution. My software would be running on various servers and it would not ...
2
votes
1answer
4k views

Include java code to display text in latex

is it possible to do something like the following in texlipse? \documentclass{article} \usepackage{listings} \begin{document} \section{Title} import java \subsection{Subtitle} I want to display ...
5
votes
2answers
1k views

Is there any solution to include Java Applets in presentations/beamers?

I am preparing a presentation on the compiler Texmaker "documentclass" in "beamer". I was fascinated with the package "multimedia" which is a solution to include movies in the presentation. Question: ...
5
votes
1answer
815 views

Problem formatting java code in my latex document (overshooting the page)

My code is being formatted in a way that makes it drift off the page when it's too long rather than just jump to a new line. I have tried lots of different things, pasted all kinds of examples from ...
2
votes
1answer
717 views

Java Code in a paper

I am writing a paper and would like to include some of my "real-world" Java code. What is the best way to accomplish this? I would like to see two templates: My explanation to the right of my Java ...
2
votes
2answers
710 views

How can I highlight Java bytecode?

I usually use minted to display highlighted source code. But it seems as if minted would not support Java bytecode (see list of supported languages). How can I insert highlighted java bytecode? (Is ...
3
votes
0answers
470 views

pdflatex + java applet? [closed]

I am writing lecture notes in Euclidean/Noneuclidean geometry, see here. The lecture 10 is about geometric constructions, where I use some java applets for construction. So far I made a hyperlink ...
5
votes
1answer
1k views

utf8 math characters from source code file with minted in XeLaTeX

I want XeLaTeX/minted to display all my mathematical characters from my .java source file. More detailed: I file my programming homework in PDF documents in my university. I have been using LaTeX and ...
5
votes
1answer
1k views

How to render Android listings with syntax highlighting?

I need to include the source code of a bigger Android project in the documentation written with LaTeX. Do you recommend any particular package that is capable of highlighting Java code and which also ...
1
vote
1answer
2k views

Pointing to Java files not in root latex folder using listings

I am trying to use listings to point to a Java source code file. The file path is different from the Latex document. Below is an example of what I am trying to do, though it doesn't compile it says it ...
2
votes
1answer
1k views

What commands/environments are supported by jLatexMath?

Is there documentation on which commands are available? For example right now I cant even \\ to get linebreaks, however \textcolor{red}{\mathfrak{A}rea}A=\pi r^2 works perfectly...
17
votes
8answers
32k views

TeX rendering in a Java application

I want to render math formulas in my Java GUI application. I am looking for a library made for computer use, not web use, which can render TeX. I have already tried jLatexMath, but it's very slow when ...