I have a Latex project that is including multiple PDFs. These PDFs are added in the final document through the includepdf tag when the project is compiled over Overleaf. My question is can Latex automatically generate a ToC from included PDFs, i.e., can it automatically read the \section \subsection tags from the included files and automatically generate it? Or maybe this is only possible if I included the separate project or sources into the final solution and compile that.
Your help is so welcome!
Including a rendered pdf file in your project would make you limited in accessing details of those documents. You will then only be able to select specific pages or add some content on specific places of those files (e.g. your own page numbers).
Since you have access to those projects, best is to nest those raw tex files under your current project using one (or a combination) of the following methods:
Input command: \input{foo.tex}: in this case the input file mustn't be a separate project (no \begindocument and \enddocument in it)
Include command: \include{foo.tex}: very similar to input command but a bit limited about nested includes.
import package: very similar to input and include commands but allows nested imports and also accepts a different logic for path resolution on its input (i.e. it accepts relative path to the file from where it is called).
subfiles package: In this case the subfile can have its own document body and is able to be rendered separately. The subfiles would use the preambles of your main project.
standalone package: Similar to subfiles but the main project would use the preambles of your subfiles in this case.
Overleaf nicely allows you to add files from another project which is the best choice when the other file is still being developed in a separate project. In this case, the file remains under control of the other project.
For further info, here is a very nice guide on how to write modular documents in latex and here is a brief tutorial on subfiles and standalone.
Related
I was reading a blog to better understanding the purpose of making a project for sublime (or any editor):
When you save your code as a project you end up with two files. The
first is the project file which contains references to folders for
your project, project based settings and build commands for your
project. The second file is the workspace. This is simply a file that
tracks what layout you're currently using and what files you have open
in each pane. Using the workspace file means that you can switch to
another project, do some work and then switchback to your original
project knowing that the layout and files you had open will be
restored back to the state you left them in. Handy.
So seems like there's 2 reasons? 1. is to save settings and 2. is to save the current layout of the files and folders you have already opened? I see reason 2 to be nice, but not really super important. What are some of the settings in reason 1 that's important to keep in between projects? What is a build command?
You might simply have to follow different coding standards for different customers, e.g. indentation rules, so its handy that you can set these rules on a per project basis.
A build system let's you run or compile code directly from Sublime Text.
I am making use of Doxygen tool for code documentation for an iOS (Objective-c based) project.
When the Doxygen tool is run for the project it is generating the selected html files.
The generated files contains some of the unwanted classes. So how do I customize the documents with Doxygen.
It has already been given here, but the doubt is how to make use of this with the tool?
Please let us know about it.
Thanks in advance..
I don't know if there is a possibility to delete classes from the output. I do this by simply excluding the source files containing the unwanted classes.
Go to the Expert tab, choose Input and exclude all the files containing your unwanted classes.
I'm currently working on a project which contains a number of components (polymer elements). All said and done, I'll probably be looking at around 10+ components for the application. At the moment, following Pub's Package Layout Conventions each .html and associated .dart file is in the web/ directory.
It would be nice to have them in lib/src/ of my application and only have the main files in web/ however at the moment <link ref="import" href="package:my_app/src/my_component.html"> will not work (See Issue 12867).
Are there currently any conventions in use to handle multiple (private) components for an app? Should I create a web/src/ directory to load imports/source files relative to the web/ directory? Would it even make sense to keep Polymer Element .html files in lib/src/ (assuming it was supported) as they're not pure dart files as traditionally recommended/expected in a pub package layout?
As far as I understand, package: works only for external components (dependencies declared in pubspec.yaml), and the default path is the packages folder (created by pub install). See the getting started section here: Dart Pub
I keep components in their own folders under the web directory so web/component1, web/component2 and so on and I use relative links to import across components. Not sure if this is the best practice but it works.
I'm working on a Delphi project and I want to add a parser to it. The parser comes with components that should be added to the project
So it works great if I add the files to the same folder that my project is in, but I would like it to be in a separate components folder (to keep it cleaner, since I'm not going to be modifying those files anyway).
However, when I add create a components folder and add the files there, when I add it to the project through delphi, it has trouble finding the files. So it adds the .psu files to the right folder, but it says it can't find the unit 'Calculator', for example, until I copy the Calculator.dcu file from the component directory to the source directory.
How do I tell Delphi to look for those files where I put them?
Thanks
You have some options:
Add the units folder to the Projects' Search Path (Menu: Project\Options...) - only affects the project you're working now.
Add the units folder to the Environment's Library Path (Menu: Tools\Options...\Environment Options\Delphi Options\Library - Win32) if you want all projects in this ide install to find that units (not only the project you are working).
Just to complement: if, in the near future, you add components to your pallete and the compilation fail not finding the units; you'll have to update your system path as well. For details give a search on SO on this, as this is a common source of questions on the delphi tag... ;-)
Take a look at the Search Path for the project in the project options. Make sure your .pas and/or .dcu files are in that search path, i.e. add the folder in which the units are to your project's search path.
When compiling latex documents the compiler emits a lot of "object" files. This clutters the directories I'm working on and it difficults the use of VCS like SVN. When I work with C++ code I have separate directories for the code and the objects, I can run make on the source directory but the .o files go to the build directory.
Is there a proper way to perform this separate compilation with Latex documents? Can it be done by using Makefiles or by passing options to the latex compiler?
Thanks
You can use:
pdflatex --output-directory=tmp file.tex
and all the files will be stored in the folder tmp (pdf included).
Because this is not an optimal solution, I made my own tool, pydflatex, that compiles the LaTeX source by stashing away the auxilliary files (using the trick above), and brings the pdf back to the current directory, so after compiling you only have file.tex and file.pdf in your directory. This plays very well with version control.
I can't help much with LaTeX (having last user it seriously 20 years ago;-), but for Subversion, you should read up on the svn:ignore property -- it makes it easy to ignore files with extensions you do not want to version (object files, bytecode files as Python can often put in the same directory as the sources, backup files some text editors use, &c).
Latex generates the temporary files in the directory where the main document is located. If you want the contents to be placed in a different location, try with a main file like below.
\documentclass{article}
\input{src/maindocument.tex}
Using this method, you could maintain a directory structure like below
/
main.tex
/src
maindocument.tex
Two options, besides the above.
Use Lyx: it looks after the separate files. I think it copies the Latex file over to its own private directory and runs latex on it. In any case, nothing is created in the current directory.
Use a makefile or one of the special Latex make programs, and have your regular targets run make clean.