17
votes
Merging multiple pdf files without breaking hyperlinks
My method uses the pax package and its pdfannotextractor Perl script (by Heiko Oberdiek).
If you want to combine two PDF files (a.pdf and b.pdf) keeping the PDF annotations (internal and external ...
14
votes
Accepted
what tools are available to apply correct page numbers to a composite tex output pdf file?
Page labels are added as array in the /Catalog of the PDF file. Since the PDF file is generated by ghostscript, it can be set by the pdfmark operator in a PostScript file and added to the input files ...
14
votes
Merging multiple pdf files without breaking hyperlinks
TLDR
Use
pdftk if want a command-line interface,
pdfsam if you want graphical user interface,
sejda if you want a web interface.
They are free (as in beer and speech) and available for most ...
10
votes
Accepted
Same absolute path works for \input but does not work for \include, why?
\input only needs read permission, but \include writes an aux file for each included file, so it needs write permission.
10
votes
Accepted
Citing and printing references from another tex file
tex1.tex being the paper, upon which bibtex is run should look like a normal document.
\documentclass{article}
\begin{document}
I'm citing~\cite{cite2} first and then~\cite{cite1}
% I could also ...
7
votes
Accepted
How to put nearly 10 images in a single row with multiple columns?
You don't seem to need to label the subcaptions, so a simple strategy will work; should the need of numbering the subcaptions, using a specific command will allow to easily modify its behavior.
\...
5
votes
One bibliography section per bib file (biblatex?)
(Answer adapted from Printing only one bib file. Thanks to @moewe for the original answer and @Ulrike Fischer for pointing it to me.)
One solution is:
Add a keyword to each entry coming from a given ...
5
votes
How to put nearly 10 images in a single row with multiple columns?
By using tikz-matrix, i have shown here 6 images in a row but you can extend it to ten images.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,positioning}
\begin{...
5
votes
If possible, how to include cut marks in PDF? (using watermark?)
You can draw arbitrary code on your pages, e.g.:
\documentclass{article}
\usepackage{pdfpages,tikz}
\begin{document}
\includepdf[
duplicatepages=4,
nup=1x2,
landscape,
pagecommand={\thispagestyle{...
5
votes
Accepted
mail merge and create multiple pdfs
After the first invocation, \stop is called and the execution is stopped. Therefore no additional documents are generated. But how can we fix the code?
We still need the documentclass and a way to ...
5
votes
Accepted
How can I automate file inclusion using arguments?
The following set of macros does the job, provided the file names have a common structure. The main command is
\multiinput{<prefix>}{<format>}{<list>}[<post action>]
In your ...
5
votes
Accepted
xr-hyper and cleveref unable to compile with make4ht
There are two problems. The first is that TeX4ht needs to load the aux file from main.tex. When it does this, it checks all the labels and modifies them so that they produce correct links to the main....
4
votes
Accepted
Incorrect crop of tikzpicture in standalone when using komaoptions
Beside using class options you can also reset the layout values to one expected by standalone after using the KOMA-keys:
\RequirePackage{luatex85}
\documentclass[
tikz,
border=0cm,
class=...
4
votes
How to put nearly 10 images in a single row with multiple columns?
It is easy with floatrow, and its (sub)floatrow environments:
\documentclass[11pt]{article}
\usepackage{geometry}
\usepackage{caption, subcaption}
\usepackage{lipsum}
\usepackage{graphicx}
\...
4
votes
Accepted
A single command to return control to the parent document
\endinput stops at the end of the line. Therefore if you have something like a \hspace after the \endinput it will be inserted:
\documentclass{article}
\usepackage{filecontents}
\setlength{\parindent}...
4
votes
Saving all tables in separate file
There is nothing special about tables, it's possible to have a file (say mytables.sty) in which each table is defined to be a command say \mytableA,\mytableB etc (just surround the normal table markup ...
4
votes
Cross-referencing with sentences? Is there any way for the LaTex to copy a certain segment from another .tex file?
Create a file textref.sty with the following contents:
\newcommand\save[2]{%
\@bsphack\protected@write\@auxout{}{\string\newtext{#1}{#2}}\@esphack
\newtext{#1}{#2}%
}
\newcommand\newtext[2]{\...
4
votes
Accepted
How do I set the appendix counter in a new book document?
You can set the counter for chapters to the number of appendices up to that point in every volume.
Volume One:
\documentclass{book}
\usepackage{blindtext}
\begin{document}
\tableofcontents
...
4
votes
Accepted
Combine .tex file with .aux files to produce a single self-contained .tex file
In your main file you can use
\begin{filecontents}{S1.aux}
... contents here
\end{filecontents}
\begin{filecontents}{S2.aux}
... contents here
\end{filecontents}
\documentclass{article}
\usepackage{xr}...
3
votes
Accepted
\input{} File does not exist
From the LaTeX 2019-10-01 release onwards explicit " quoting is not necessary so
\input{entries/2018/11/18 - This is another entry}
will work, but it is still true that it is better to avoid ...
3
votes
Accepted
Add prefix to AUX file of included parts
The name of the auxiliary files of files included by \ínclude are used in the internal command \@include only. Patching the two occurrences of #1.aux solves the issue. The following patch prefixes #1....
3
votes
Accepted
Page Numbering in Letter Environment has no desired effect with \usepackage{scrletter}
You need to save the page counter before the letter, and then restore it with \AtBeginLetter because KOMA-Script otherwise resets it when the letter starts. If you want the page number to print on the ...
3
votes
If possible, how to include cut marks in PDF? (using watermark?)
Why not use the crop package to produce bleed marks, and then render multiple pages on a single larger page (4 in 1 shown below).
\documentclass[a4paper]{article}
\usepackage[cam,cross]{crop}
\...
3
votes
Toggle optionally red color to multiple lines in align environment
If you are willing to use a slightly altered syntax inside of \note, that is \& instead of &, this might work:
\documentclass{article}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{...
3
votes
Accepted
latex conditional include input files
the paths are relative to the working directory of latex, not to the document so one possibility is to process the second document from the same working directory but use
pdflatex other-main/other-...
3
votes
Accepted
File extension *.pag when compiling document with pdflatex and bibtex
The .pag-file is created by the document class WileyNJD-v2.cls, it opens a file called \jobname.pag on line 1265, which contains some information on the page numbering.
It's save to add it to your ....
3
votes
Accepted
Cross-referencing with sentences? Is there any way for the LaTex to copy a certain segment from another .tex file?
The package zref might be your friend:
By means of zref you can implement your own \label-\ref-like cross-referencing-mechanisms, e.g., for retrieving and storing sentences. By means of zref's module ...
3
votes
Accepted
tikz figure from file
You can \usepackage{standalone}.
% File-name: main.tex
\documentclass{article}
\usepackage{tikz}
\usepackage{standalone}
\begin{document}
\includestandalone{input}
\end{document}
% File-name: input....
3
votes
Accepted
Unable to combine multiple documents into a single LaTex document
This solution relies on Peter Wilson's answer (the original developer) over the additional \endgroup in the \c@ladocument macro.
\documentclass{combine}
\usepackage{combinet}
\begin{filecontents*}{...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multiple-files × 152compiling × 15
input × 13
cross-referencing × 12
include × 12
overleaf × 9
subfiles × 9
graphics × 6
hyperref × 6
pdf × 6
auxiliary-files × 6
import × 6
table-of-contents × 5
bibliographies × 5
floats × 5
page-numbering × 5
pdfpages × 5
standalone × 5
combine × 5
tikz-pgf × 4
tables × 4
bibtex × 4
pdftex × 4
citing × 4
glossaries × 4