Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [content-replication]

{content-replication} is about reusing content in several places in a document, or in several documents (other than in the {header-footer}, {table-of-contents} or lists of figures or tables).

1
vote
1answer
40 views

Repeat content of environment

Sometimes you want proofs of theorems to appear in an appendix. The appendix must then include the theorem claim exactly as it was stated in the main body of the paper add a proof to it. It would ...
3
votes
2answers
62 views

Can I partially re-use a table or build it up over chapters?

In my thesis I have a table that I want to build up over the course of a chapter. Specifically, I am presenting statistics about different datasets, including one that I created myself to address ...
4
votes
1answer
78 views

Restating a listing

I have a listing that I want to restate at some later point. How can I do this, without creating a new index for the restated listing? My best approach so far has been to put the listing twice, which ...
4
votes
0answers
70 views

Can a LaTeX formula output its own source code? [duplicate]

There was recently a featured question which about designing a t-shirt using a LaTeX-inspired design. On that question, there was one comment in particular which caught my attention. Perhaps you ...
4
votes
2answers
98 views

Creating a database containing numbered blocks of TeX-code

I want to create a database consisting of numbered blocks of TeX-code. In particular, I want to do sth like \mycommand{counterName}{Some text} and save a new entry somewhere, to use the Some Text ...
4
votes
2answers
313 views

Separating definition and placement of a figure

A common struggle I run into when writing papers is getting figures to land on the correct page. In practice this is often fixed by cutting the \begin{figure} ... \end{figure} and pasting it higher up ...
10
votes
1answer
206 views

Repeat last environment by command

I am creating a book with guitar chords using a customized version of the songbook package. As most songs use the same chorus multiple times, I created the very simple macro \refChorus which just ...
0
votes
1answer
81 views

Replicating a document format

Do you have an idea how to make a document such as the one in the link below? You can disregard what's written on the document. Link to Example Document
8
votes
2answers
717 views

How do you reprint a theorem, proposition, etc. in its entirety?

I would like to prove all my theorems in the appendix. To do that, I would like to remind the readers what the theorem is, by reprinting it in the appendix. However, I have not figured out a way to ...
5
votes
1answer
233 views

How to automatically repeat all the theorems, propositions, definitions?

Suppose that you have a bunch of theorems, propositions, definitions and lemmas, like Definition 1. A group is said to be … Lemma 2. Let … Then … Proof 2. […] Theorem 3. If … then … Proof 3....
13
votes
3answers
1k views

What is the best way to save values (like strings) for later use?

I'm fairly new to LaTeX and I'm struggling with something apparently simple, but for which I can't find a fair solution. The problem (simplified) is as follows (please take care terms used may not ...
3
votes
1answer
79 views

Automatically generating appendix containing full definitions and page references

I have a large document that contains a number of definitions. I would like to create an appendix that includes all of the definitions in one place for convenience. Ideally, the appendix should print ...
13
votes
2answers
383 views

Can I introduce a special environment which will reappear at the end?

I am writing a book-length document, and occasionally I have some text that I would like to automatically repeat at the end. For example, something like \begin{important_thing} \medskip {\bf Lorem ...
4
votes
0answers
197 views

How do you restate an algorithm?

I'm trying to restate/repeat/recall an algorithm in an appendix with the same numbering, etc., but I haven't found an easy way to do it. I'm using the algorithm environment and algorithm2e package. ...
0
votes
1answer
237 views

Recall a theorem in a different section of a chapter

I am aware that this question has been asked before and I did refer to the previous answers given unfortunately I keep getting errors when I compile. Here's my minimum preamble \usepackage{...
0
votes
1answer
142 views

How to get author name in the content for an abstract included in the article?

I am preparing one souvenir for the conference, which we are going to conduct in the next month.. I am including the contents in the following way.. \documentclass{article} \def\aut#1{\textbf{#1}} \...
3
votes
1answer
141 views

Is it possible to defer expansion of an object's contents until all content has been created?

I want to provide author-usable macros in my package to store data that will later appear in a table, but it would be nice to allow authors to define the data in that table at any time, even after the ...
14
votes
6answers
543 views

Transform existing text into blind text or gibberish keeping format (wireframing)

Suppose I have a document that took me a while to design and write. Now I want to show someone the overall format and length of the document but I don't want this person to read or even be distracted ...
1
vote
0answers
167 views

Collection of all definitions, theorems, etc. as flash cards

Is there a way to collect all definitions, theorems, corollary etc. at the end of an document as flash cards in din a6 in landscape? Without copying all the data again? So that the document contains ...
2
votes
1answer
149 views

How to have text inside round brackets on a line and also be added to a second index with predefined index search keys?

I've written a text with 200 quotes. One quote example: "Und wir haben die Liebe erkannt und geglaubt, die Gott zu uns hat. Gott ist Liebe, und wer in der Liebe bleibt, der bleibt in Gott und Gott in ...
8
votes
2answers
2k views

Using a figure again in document

I have drawn a schematic geometry an I want to describe the results of simulations I did with several configuration. So in Section XY I describe the simulations I did with a case set-up using the ...
4
votes
3answers
2k views

List of equations, including equation contents and caption

I would like to automatically generate a list of equations present in the document, which includes the equation itself. Here is a MWE: \documentclass{article} \def\caption#1{} \begin{document} First ...
13
votes
3answers
453 views

How to defer content to a later part of the document?

I want to create a collection of problems, each problem consisting of the problem itself, optional hints and optional solutions. I wanted to know what would be the best way to do it ? I could use ...
1
vote
0answers
99 views

Repeat a block of text in case of page break

I have an array which contains lots of data, and I would like to repeat the content of the far-left cell in case of new page. I am using \endhead in order to repeat the name of the columns, yet I have ...
3
votes
1answer
95 views

How can I quote (small) parts of my document in itself? [duplicate]

In my research I have large pieces of text of which I like to quote some parts of it, without having to copy/paste and have duplicate pieces. I know I can do that with \include, but the need to have ...
4
votes
2answers
520 views

Printing a sheet multiple times with list of names

How to print the same exam (can be multiple pages long) multiple times with a different student name on it? Something similar has been covered here. However, I want the name list to be separated only ...
7
votes
1answer
243 views

Defining a reusable string from within an environment

I write documents that rely heavily on the 'enumerate' environment. I'd like to turn any particular item from within that environment into a variable that I can use elsewhere. The idea is to ensure ...
7
votes
2answers
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 ...
2
votes
2answers
355 views

answers sometimes in test, sometimes in answer file [duplicate]

So this is going to sound strange, but I'm wondering if there is a clean way to do this. By the time I have a project done, I will have written two .tex files: one with questions, and another one ...
5
votes
2answers
740 views

Collecting contents of LaTeX environment

I have the following for collecting contents of an environment and printing them later, it works but for my real task i want to use the environ package because i need to be able to have access to \...
13
votes
1answer
654 views

Collect contents of lists at beginning of document

I would like to create a custom list environment that collects the contents of these lists and places it at the beginning of the document. \begin{objectives} \item See no evil. \end{objectives} ...
15
votes
2answers
970 views

Collecting contents of environment and store them for later retrieval

I want to store contents of an environment and add them to a macro or command I could easily retrieve them, but I do not want to use the collect package. Are there any alternatives? \documentclass{...
5
votes
4answers
530 views

Repeat and enumerate a part of document

I have 4 sets/groups of exam questions. I want to enumerate them from 1 to a number of persons. Because a number of students exceed 4 I must repeat the sets. If I had 40 students therefore I would ...
9
votes
2answers
279 views

Automate the description of the paper

Most or all papers have a final paragraph in the introduction that describes the sections that are present. I'd like to generate it automatically, I guess this should be possible because it is mostly ...
2
votes
1answer
268 views

Define reusable content — preferably in the body or else in the header

I am writing a document where name of a person A will appear at multiple places section A. Similarly, name of person B will appear at multiple places in section B, etc. Is there any way by which just ...
2
votes
1answer
611 views

Include excerpts from a document in another document

I have a manuscript and its revision report. I need to put some sentences of this manuscript to the revision report as excerpts. Instead of defining excerpts as macros or putting the excerpts in ...
0
votes
1answer
227 views

ConTeXt: Embed forward referenced figure

Background Looking to recreate the following fancy table of contents where a limited number of images in the ToC are selected at random from all the figures included in the document, without ...
6
votes
1answer
97 views

How can I 'double-dip' environment contents to an external file with expl3?

I'd like to capture the contents of a particular environment and copy them, verbatim (n- type expansion), to an external file already set up as an iow output stream. My first thought was to simply ...
4
votes
1answer
890 views

Library of reusable equations

I want to do something that sounds simple. I want to create an external file where I will store my equations. Then I would like to be able to these equations and input them in a document without ...
7
votes
1answer
101 views

How to use a string in an auxiliary file to update the header?

A document (typical of many) has a header which displays a timestamp in the form of a text string (“25 December 2013”). The timestamp string originates in a file "update" which is loaded with \input. ...
5
votes
1answer
505 views

Put from external file?

I need to write a command that read a line from a text file and expand to the content of this line, the next command read the next line and so on. ... \command{arg} ... \command{arg} ... \command{...
7
votes
3answers
588 views

Viva preparation document

In one of the doctoral thesis howto books (Rugg and Petrie, I think) the advice given is to prepare a document that summarises one page of your thesis per line of page. I'm interested in working with ...
8
votes
6answers
4k views

how to make text be copied to another part of a document?

I have a paragraph in one part of the .tex file that I want to be duplicated in another part of the .tex file. I could do ctrl-c, ctrl-v... as easy as that, but then if I modify one place, I will ...
14
votes
2answers
361 views

Filecontents and newenvironment issue

I need to write some inlined code on an external file, then load it with listings. I would like to define a new environment, but if I do, filecontents does not save the first line of code (see MWE): \...
33
votes
6answers
4k views

Is it possible to write all mathematical formulas in a separate file and add them in main file on-demand?

Consider this scenario: I have a report to write and I want to write all mathematical formulas in a separate file and then add them in the main report file on demand (i.e. include/import/add/call a ...
13
votes
2answers
5k views

Is it possible to re-insert a LaTeX equation by label?

Is it possible to re-insert an equation in LaTeX via referencing the original equation by label? I already know, it is possible to: reuse the original equation numbering via \tag{} as described here ...
54
votes
2answers
15k views

Recalling a theorem [duplicate]

Suppose I have some theorem in the paper Section 1 Theorem 1.1. Let ... And then later in the paper I want to recall the theorem by reprinting it Section 4 We recall Theorem 1.1: ...
20
votes
4answers
9k views

File input and output

Are there any LaTeX packages that can assist with reading and writing to files? I am trying to develop a solution to the following problem: 1) I am producing a long report regularly. Part of the ...