I use Aquamacs and TeX Live 2009 to edit my LaTeX files. As my publications tend to get quite big, I want to structure the source folder containing all my LaTeX files. Like e.g.
[bib]
[images]
[chapters]
chapter1.tex
chapter2.tex
main.tex
One can define the %%% TeX-master: "main" local variable at the end of each "sub" file to define a master file that contains all headers etc. That works fine if the subfiles are in the same directory as the main file. If I try to define the main file here (e.g. main.tex in chapter1.tex), LaTeX cannot find the specified file.
What can I do in this case?
In Aquamacs' menu bar go to Latex / Multifile/Parsing / Reset Buffer or Shortcut ^C ^N.
When specifying %%% TeX-master: "../main" in one of the chapters in the subfolders, the main tex file is correctly compiled!
Just an idea (not tested):
%%% TeX-master: "../main"
.. is the usual Unix shortcut for one directory level above. I don't know if this works for the TeX-master variable of AUCTeX, but it is worth a try.
The main latex file which contains all the headers and gets compile can include all the chapter files via:
[...]
\input{chapters/chapter1.tex}
\input{chapters/chapter2.tex}
\input{chapters/chapterTitleOfChapter.tex}
[...]
You do not need to have each chapter include the main file. Or am I missing something you are doing?
Related
Sometimes when I create .cpp or .sh files, for example, a.cpp, I see another file created and named #a.cpp#, I'm using ubuntu, what is that file?
According to http://www.gnu.org/software/emacs/manual/html_node/elisp/Auto_002dSaving.html, this is the notation how emacs handles its autosave files.
After closing and saving the file, it should dissapear.
In latex we can split a big document(paper.tex) into several tex files(abstract.tex,intro.tex ...) which can be inserted inline using \input{paper.tex}.
Is there a similar facility in org-mode?
Just use the include command i.e.
#+INCLUDE abstract.org
#+INCLUDE intro.org
This will inline abstract.org and intro.org in the current org file. See also the org-mode documentation on include files.
Without test, but I think you can just simply add the latex command \input{paper.tex} in any place of .org file you want. It will render the .tex file to final file.
PS: other option: Include-files which are mentioned in the comment.
I am trying to run doxygen on some source files for a project that I downloaded source files for. The files are located in the following directories:
doc/ - Documentation files, such as .dox files.
src/ - Source files
My settings in my doxygen.config file are:
INPUT = ../ .
FILE_PATTERNS = *.h *.dox *.dxx
When I run doxygen (doxygen doxygen.config), it generates all of the documentation from the .h files correctly, but it does not generate the mainpage correctly. I have a file titled intro.dox in the doc folder, with a command \mainpage Documentation Index, and a bunch of text, but doxygen is not using this to generate the main page.
What am I doing wrong?
There are (at least) two possible reasons for this:
You are not including the /doc directory in you INPUT list. Try modifying this to
INPUT = ../ . ../doc
Did you mean to write ../doc instead of ../? I am guessing that your doxygen.config file is in your src directory. If this is not the case can you make this clear in the question.
Doxygen requires that your documentation files (your .dox files) are plain text with your text wrapped with Doxygen C++ comments (i.e. /** ... */).
Without knowing where doxygen.config is located, and since you are using relative paths in INPUT, it is difficult to determine what might cause this, however since the files you are looking for are in parallel directories, it is possible that doxygen is not search recursively for your files. You may want to confirm that RECURSIVE is set to YES in doxygen.config.
I want to place some customization codes in a separate file, and include it from other files later. For example, file config.org has a single line #+MATHJAX: align:"left" mathml:t. How do I include it in another .org file abc.org so that the net-effect is exactly same as I write that #+MATHJAX line directly in abc.org?
Use #+setupfile: /path/to/config.org documented here.
The #+INCLUDE directive can include another file with export options (but it cannot affect the configuration of the enclosing file, since it is only for export purposes). Use it like:
#+INCLUDE: "/path/to/config.org"
Is there a simple way to add something like the {Back to Worg's index} to every .org page in a directory which I plan to publish with org-publish-project-alist? Is this accomplished with a #+ tag, or some definition in the .css file?
I looked at how they did it on Worg, and it doesn't look like CSS.
There are a few ways you might be able to do so.
Create a generic file that only includes the details you want in each file. For example:
[[./index.org][Back to index]]
Then use #+include: <filename> at the location in your file where you want the line. (See Include Files)
Alternately you could define a macro in a setupfile (See In-Buffer Settings) that is the definition of the link (or multiple link choices)
#+macro: toIndex [[./index.org][Back to index]]
In both cases it is worth noting that the relative paths are based on the exported file. So a [[../index.org]] will always point to the index.org file in the parent directory, no matter where the setupfile is.