Linked Questions

3
votes
1answer
296 views

Does LaTeX support including a specific part of an \input, like a specific environment and ignoring everything else? [duplicate]

Can LaTeX natively include only specific expressions from an input file (ignoring the rest)? I am not sure how to best word my question. Below is an example of what I'd like to do. Situation For ...
30
votes
3answers
15k views

Full path of current file

This question led to a new package: currfile-abspath (subpackage to currfile) How can I display the full path of the tex file that I compile? It is a simple file, no include or input present. Edit:...
13
votes
5answers
2k views

Including parts of a LaTeX document in another document WITHOUT splitting up original document

I'm working on a paper with some collaborators. At the same time, I'm writing my dissertation for my defense next month. I need to include the paper in the dissertation, but it doesn't just become a ...
8
votes
3answers
3k views

Creating multiple language versions from single latex source by fetching translation from file

I could not really find anything matching, maysome someone got an idea or a starting point: I want to maintain a collection of documents written in Kile, Using LaTeX converted by xetex into pdf ...
7
votes
3answers
1k views

copy and reuse the content of an environment

is there a way to embed an text in several environments (or structures, \chapter, \section etc.) in one file and "copy"/insert the content of single environment items in other files? i've noticed the ...
11
votes
1answer
2k views

catchfilebetweentags package swallows end of line

I would like to include only a part of a .tex file into a different .tex file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package. I tried the ...
5
votes
3answers
326 views

Can I use a function inside LaTeX to alter portions of \input{}?

I have a table in a LaTeX file, named tabular.tex which contains a tabular environment: \begin{tabular}{rr} Number & Name \\ 1 & John \\ 2 & Mary \\ \end{tabular} and I input ...
1
vote
2answers
4k views

Long wide table vertically overflows

I am trying to typeset a long and wide table using this code. Whatever I do the table is not page-breaked. Instead it vertically overflows the space allocated for it. As you can see the last rows of ...
7
votes
1answer
5k views

Combining different projects into one (papers into PhD Thesis)

My question is similar to this one, but I have a problem with relative paths when including files. Assume I have three projects which all start with \documentclass[12pt,a4paper]{article} \usepackage[...
4
votes
3answers
564 views

Input a parameter from another file

Thank to the people asking and answering this question for how to import a part of a file into Latex. I want to extend this question a bit more. What if you have such a file resulted from a C++ ...
4
votes
1answer
1k views

How can I input part of a file in verbatim?

I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or ...
5
votes
1answer
1k views

pgfplots: Using a column header as the plot title [duplicate]

Possible Duplicate: Use first row of a table as legend entry in pgfplot graph ? I am creating a number of very similar plots using pgfplots. The raw data for these is provided in a single .csv ...
4
votes
1answer
855 views

Insert a TeX file created with knitr into a main TeX file [duplicate]

I want to insert a knitr output file (created in RStudio as .rnw file, then I compiled, it creates the .tex file) into my main .tex file. But I got an error, how we can do this? Knitter Tex file: \...
3
votes
1answer
826 views

“\input only part of a file” and keep numbering

I would like to create an excerpt from a script that I have TeX'ed as a compendium of the most important statements (theorems & definitions). The question \input only part of a file has an ...
4
votes
1answer
565 views

Declaring array of integers

Is it possible to declare in TeX array of integer numbers ? What I am trying to do is to declare new tabular environment for very long tables spanning accross multiple columns and (or) pages. My ...
1
vote
1answer
753 views

How to input text from a file

I need to do the following: I have a file A which consists out of short fragments of text: Text 1 Text 2 Text 3 Text 4 I have another file file B in which I need to input fragments ...
6
votes
1answer
208 views

Conflict between catchfilebetweentags and a kind of arrow from xypic: argument of \next@ has an extra }

I'm using the solution from https://tex.stackexchange.com/a/4952/1403 to input a part of file.tex into another file. But I'm getting this error: at the line \ExecuteMetaData[file.tex]{tag}. Here's ...
1
vote
1answer
296 views

\input only part of file, without losing SyncTeX support?

I want to include parts of a child document, specified by a range of line numbers, as LaTeX input, while producing useful SyncTeX information. It should also be possible to re-include lines already in ...
1
vote
1answer
237 views

Inserting paragraphs in a single document from an another file

I have a document which I have to translate in other languages. I was thinking of writing the translations in different text files with tagged paragraphs so that I could include in the right place of ...
1
vote
0answers
156 views

Command for getting number of lines in another file

My goal is to combine several documents into one, so maybe someone can recommend a different solution. More specifically, I need to input about 20 files in a master file, all from line 4 to the second-...
2
votes
1answer
108 views

What is a good source code management technique to quickly position floats with SyncTeX?

Positioning a float in a document usually involves not only changing modifiers such as [t] etc, but also moving around the code -- especially figure* environments in twocolumn documents, which have to ...
1
vote
0answers
131 views

Is there a way to input part of a file that includes sagetex?

I am trying to build a sort of jumbling program for Tex Files. Specifically I want to randomly order problems on quizzes/exams that are generated. I have gotten most of the work done, but I am left ...
1
vote
2answers
72 views

Using external inputs to be included based on \if switches

I am working on a specifications file which should be used for multiple projects. Ideally what I would like to have is a generic latex file where I can enable project specific additions, but these ...
0
votes
0answers
56 views

Creating a more modular system

Though my question may be a basic one, I hope one can help me by being clear about what to do. I am using an apj emulate document on ShareLatex for my writing. My writing is long and has many sections ...
2
votes
1answer
43 views

Function / macro / commands as tags

I want to implement function as tags. For now, this code is working: In equations_folder/equations.tex \EQUATION{miqp-obj} \begin{equation} \label{eq:miqp-obj} \min_{\mathbf{x}}C = \frac{1}{2} \...
0
votes
0answers
30 views

copy a section from another .tex file

I'll try my best to explain.. I need to make a LaTex document every week for a lab. In it, I have the safety sheet of chemicals. Often, I've already done a chemical in an earlier document. Now, I just ...
1
vote
0answers
25 views

Centralized Master Equation in Single File like `\cite{}` [duplicate]

Is it possible in latex to have single file like equations.tex and able to call part of it to our main.tex just like a combination of \include{} or \input{} and \cite{}? For example I have a ...