Linked Questions

1558 votes
7 answers
998k views

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there ...
Phil Miller's user avatar
  • 21.1k
76 votes
9 answers
36k views

I feel really stupid for asking this, but how do you form more complex if conditionals in TeX? I'm looking for something like: \ifnum\x=1 OR \ifnum\x=14 {do this} \else {do that} \fi I don't ...
gablin's user avatar
  • 17.5k
47 votes
4 answers
37k views

I'm currently using doxygen to generate some documentation for a project, and doxygen generate some LaTeX code that then can be used to generate a nice pdf. But let's say I would like to write ...
Johan's user avatar
  • 2,274
23 votes
5 answers
21k views

I'd like to concatenate several parts of math text into a single command, and i read a great solution here on this site, allowing me to create this working example of what i mean : \documentclass[...
Cristo's user avatar
  • 647
29 votes
1 answer
85k views

I would like to define one variable containing some text that can be changed locally. The following code gives one example of the featuring I'm looking for. \documentclass{article} \newcommand{\...
projetmbc's user avatar
  • 15.5k
-28 votes
2 answers
3k views

First, what is the proper terminology for a "string" in TeX/LaTeX that is an argument for a macro? e.g., \macro{somestring} Obviously somestring is a token, set of tokens, string, argument, etc. I ...
Uiy's user avatar
  • 6,250
14 votes
4 answers
9k views

How do I do a conditional 'if then else' statement, based on length of string being greater than (or less than, or equal) a specified value. For example, something Like \def\mystring{XYZ} \def\...
Nicholas Hamilton's user avatar
18 votes
1 answer
14k views

We all know filecontents.sty can do \documentclass{article} \usepackage{filecontents} \begin{document} Hello World \begin{filecontents}{dummy.txt} No one will read this if I don't use it ...
arney's user avatar
  • 2,083
6 votes
3 answers
11k views

I have three chapters which I combine into a thesis using pdfpages: as shown in this link Merging several papers This gets me 95% of what I need the only thing I still need is a table of contents ...
Bazman's user avatar
  • 857
8 votes
2 answers
10k views

Say I have a document structured as follows. main.tex + ch1 - ch.tex - s1.tex - s2.tex + ch2 - ch.tex - s1.tex - s2.tex Here, *.tex are LaTeX ...
Stirling's user avatar
  • 1,449
5 votes
1 answer
5k views

I have a number of latex files section1.tex, section2.tex, etc. Each of them should be able to be compiled individually to give a normal LaTeX document. I would like to write a file master.tex that ...
Stephen Flood's user avatar
8 votes
2 answers
651 views

I need to produce two document layouts using the same content. I'm going to be making heavy use of the input{} command to do this, but it is more complex than just this. I'm looking for suggestions ...
mankoff's user avatar
  • 2,984
6 votes
1 answer
3k views

I'm currently working on an experiment that involves re-typesetting a digitized physical book from OCRed images. For various reasons involving the workflow, the resulting project architecture is a "...
Bill Tozier's user avatar
7 votes
1 answer
1k views

I stumbled upon the following question: In the preamble of my main tex file for my thesis, I've included several other files with definitions for abbreviations which are in the same path as main.tex, ...
MostlyHarmless's user avatar
5 votes
2 answers
468 views

I have a somewhat large User's Guide for a code I've been working on with collaborators. Each chapter is in a subdirectory of the top directory, which includes the .tex file that grabs and stitches ...
cm2's user avatar
  • 828

15 30 50 per page