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).

Filter by
Sorted by
Tagged with
2 votes
2 answers
62 views

Two tables of contents one in Chinese and another in English

I want to give two tables of contents one in Chinese and another in English in my ctexbook document class which is used most widely in writing Chinese book nowadays. Here we collect different ...
user avatar
  • 3,031
1 vote
1 answer
55 views

Separate declaration and placement of listings, figures, etc. Capturing and storing verbatim content in a token list

I'm trying to separate the definition and placement of figures, tables, listings, etc. I find them highly disruptive when editing the prose of my document. They often take up a large number of lines ...
user avatar
0 votes
0 answers
15 views

Compact content path (in footer) with hyperlinks

Is it possible to display every page’s “directory path” or full content location (preferably in the footer on every page)? My goal is to obtain a clickable path structure equal to the contents page on ...
user avatar
  • 1
1 vote
1 answer
43 views

Replacing a certain instance of text on a set of documents

So, I have a set of TeX documents compiled into a main file by the \include{} function. Every one of those documents has a common instance of text in them, and would like to know if it would be ...
user avatar
4 votes
3 answers
100 views

Saving the content of an environment suchas to use it somewhere else

I would like to save the content of an environment to use later with a macro at several places. Here is the real use case. I have an environment to draw "probability" trees. I want to save ...
user avatar
  • 11.5k
0 votes
1 answer
107 views

Trying to replicate this Chapter Style using titlesec

I have created this style for my section titles in Lyx using the option shaded background box and defining the text as "section *" , this is how it looks in Lyx (the pink color is just the ...
user avatar
  • 3
2 votes
1 answer
132 views

ConTeXt: Dynamically define macro using before/after options

Background Code generates a book's title and author within start/stop environments. I'd like to redefine the content from those environments as a macro that can be reused elsewhere. For example: \...
user avatar
  • 10.9k
3 votes
1 answer
209 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 ...
user avatar
  • 215
3 votes
2 answers
71 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 ...
user avatar
  • 133
5 votes
1 answer
161 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 ...
user avatar
  • 415
4 votes
0 answers
86 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 ...
user avatar
4 votes
2 answers
154 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 ...
user avatar
6 votes
2 answers
1k 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 ...
user avatar
10 votes
1 answer
274 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 ...
user avatar
  • 319
0 votes
1 answer
104 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
user avatar
  • 305
10 votes
2 answers
2k 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 ...
user avatar
  • 2,949
6 votes
1 answer
411 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....
user avatar
  • 747
13 votes
3 answers
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 ...
user avatar
  • 173
3 votes
1 answer
94 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 ...
user avatar
  • 1,419
14 votes
3 answers
421 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 ...
user avatar
  • 243
4 votes
0 answers
366 views

How do you restate an algorithm? [closed]

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. ...
user avatar
0 votes
1 answer
533 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{...
user avatar
0 votes
1 answer
174 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}} \...
user avatar
  • 1,872
3 votes
1 answer
185 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 ...
user avatar
  • 85
16 votes
6 answers
1k 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 ...
user avatar
  • 13.9k
1 vote
0 answers
200 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 ...
user avatar
  • 111
2 votes
1 answer
207 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 ...
user avatar
  • 279
9 votes
2 answers
3k 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 ...
user avatar
  • 1,842
4 votes
4 answers
3k 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 ...
user avatar
  • 15.2k
14 votes
3 answers
928 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 ...
user avatar
3 votes
1 answer
108 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 ...
user avatar
  • 280
4 votes
2 answers
731 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 ...
user avatar
  • 963
7 votes
1 answer
495 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 ...
user avatar
8 votes
3 answers
2k 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 ...
user avatar
  • 83
2 votes
2 answers
524 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 ...
user avatar
  • 1,490
6 votes
3 answers
1k 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 \...
user avatar
13 votes
1 answer
1k 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} ...
user avatar
  • 1,347
22 votes
4 answers
2k 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{...
user avatar
5 votes
4 answers
721 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 ...
user avatar
10 votes
2 answers
399 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 ...
user avatar
  • 559
5 votes
2 answers
949 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 ...
user avatar
  • 2,355
2 votes
1 answer
1k 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 ...
user avatar
  • 1,527
0 votes
1 answer
284 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 ...
user avatar
  • 10.9k
6 votes
1 answer
132 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 ...
user avatar
  • 26.7k
4 votes
1 answer
1k 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 ...
user avatar
  • 1,163
7 votes
1 answer
115 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. ...
user avatar
  • 71
5 votes
1 answer
1k 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{...
user avatar
7 votes
3 answers
871 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 ...
user avatar
  • 839
13 votes
7 answers
7k 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 have ...
user avatar
  • 8,958
14 votes
2 answers
538 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): \...
user avatar
  • 571