You are not logged in.

#1 2013-04-20 16:32:21

csopi
Member
Registered: 2013-04-12
Posts: 4

Geany, LaTeX

Hi,

I'm writing a long document in latex, and I use Geany for that. The project consists of several files. My problem is that when hitting F9 (compile), the compiler tries to compile that specific tex file that I edit currently and not the main tex file in the project (and of course, it failes, beacause only the main file contains \begin{document}).

How can I fix it?

Offline

#2 2013-04-20 18:15:39

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: Geany, LaTeX

I do not know geany, but almost every editor should be suitable for that. Try emacs.

Or use a tool like latex-mk from the commandline.

Offline

#3 2013-04-20 18:47:15

gridcol
Guest

Re: Geany, LaTeX

Edit: Answer was wrong, didn't use brain, sorry.

Last edited by gridcol (2013-04-20 18:57:52)

#4 2013-04-20 19:26:04

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: Geany, LaTeX

I would only use the editor ... for editing. Make yourself two shell scripts inside of your document folder and chmod +x them. That's much more useful especially, when you are using BibTex aswell so you don't have to pdflatex -> bibtex -> pdflatex -> pdflatex everytime one after the other for a full compilation. I use a second script to clean up all non-tex files from time to time. Only one click on that file is needed and it compiles my document with working bibliography.

Last edited by blackout23 (2013-04-20 19:28:39)

Offline

#5 2013-04-20 19:42:04

narendiran
Member
From: Chennai, Tamil Nadu, India
Registered: 2011-09-07
Posts: 26
Website

Re: Geany, LaTeX

Using shell script is probably the best approach. You have higher flexibility.

Here's how my script file looks like. (Here report1.tex is the main tex file)

file=report1

pdflatex --shell-escape $file.tex
bibtex $file.aux
pdflatex --shell-escape $file.tex
pdflatex --shell-escape $file.tex

rm $file.aux	-v
rm $file.toc	-v
rm $file.log	-v
rm $file.bbl	-v
rm $file.blg	-v
rm $file.lof	-v
rm plots//*.pdf	-v
rm pics//*.pdf		-v

This way you can generate pdf with bibs and postscript images, do cleanups etc at single command. Just run the script file.

Offline

#6 2013-04-20 19:58:24

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: Geany, LaTeX

These are my skripts.


#! /bin/bash

pdflatex thesis.tex && bibtex thesis && pdflatex thesis.tex && pdflatex thesis.tex
#! /bin/bash

find \( -name "*.aux" -o -name "*.lot" -o -name "*.lof" -o -name "*.bbl" -o -name "*.blg" -o -name "*.pdf" -o -name "*.log" -o -name "*.toc" \) -delete

Offline

#7 2013-04-20 20:11:09

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,727

Re: Geany, LaTeX

narendiran wrote:

Using shell script is probably the best approach. You have higher flexibility..


Or, my preference,  a make file.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#8 2013-04-20 20:14:00

jsoy9pQbYVNu5nfU
Member
Registered: 2013-04-19
Posts: 108

Re: Geany, LaTeX

I use a makfile with LaTeX, and I suppose every editor targeted at development would provide a mechanism for integrating that. In particular, I use latex-mk as follows for pdfTeX with bibLaTeX+biber backend:

NAME=ws12-jpeu-techipr
TEXSRCS=$(NAME).tex
USE_PDFLATEX=1
BIBTEX=biber
BIBTEXSRCS=$(NAME).bib
include /usr/share/latex-mk/latex.gmk

where the rest from latex-mk is included from the appropriate location. Targets may be configured with the full power of make, but latex-mk brings a selection of pre-configured targets that take automatically care of standard LaTeX toolchains. Just run `make` from within the editor.

Offline

#9 2013-04-21 10:51:21

GordonGR
Member
From: Thessaloniki, Greece
Registered: 2011-11-07
Posts: 276

Re: Geany, LaTeX

What I do in such cases is to keep the main document open in a tab and use geany's (or latexila's, I like playing between the two) internal command to build them. Otherwise you can have a terminal open and feed the command there.


Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.

“No one without the knowledge of geometry may enter.“ Plato.

Offline

#10 2013-04-21 10:53:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,553
Website

Re: Geany, LaTeX

I'm really confused by these makefile.  latexmk has it's own configuration file.  Once configured to your liking, just run `latexmk main-input.tex`.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2013-04-21 15:00:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,727

Re: Geany, LaTeX

Trilby wrote:

I'm really confused by these makefile.  latexmk has it's own configuration file.  Once configured to your liking, just run `latexmk main-input.tex`.

In my case, I have some Python scripts that parse non-tex files and generate dynamic tex files on-the-fly.  latexmk does not quite handle them.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB