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
0 votes
1 answer
84 views

How can I styilize a descriptive list with a line between the label and the description?

I want my descriptive lists to look like... The source for that is (source)... \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{skins,hooks} \newcommand\fancybox[3]{% \tcbset{ mybox/...
user41177's user avatar
  • 167
0 votes
1 answer
28 views

How to restate an algorithm with the same algorithm number?

I'm trying to have two copies of the same algorithm, with the same number twice in a paper. The restatable environment is able to reproduce the algorithm but introduces a new algorithm number each ...
Zuza's user avatar
  • 103
5 votes
1 answer
174 views

Repeating text watermark in background?

I really like the secure look of old style secure backgrounds that repeat the name of the institution in light text as a way of validating it. This is not really used anymore for secure documents but ...
ezgranet's user avatar
  • 542
3 votes
1 answer
221 views

Restating a theorem environment created using \newtcbtheorem

The first post I saw telling me about the restatable environment: Recalling a theorem. Several questions have been asked about things like this: Making a restatable boxed theorem says to use \...
D.R's user avatar
  • 721
2 votes
2 answers
161 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 ...
M. Logic's user avatar
  • 3,961
1 vote
1 answer
73 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 ...
MyComputer's user avatar
1 vote
1 answer
55 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 ...
Joao Silva's user avatar
4 votes
3 answers
131 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 ...
projetmbc's user avatar
  • 13.4k
0 votes
1 answer
122 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 ...
Ask_Ay's user avatar
  • 3
2 votes
1 answer
217 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: \...
Dave Jarvis's user avatar
  • 11.4k
4 votes
1 answer
316 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 ...
Maiaux's user avatar
  • 227
3 votes
2 answers
73 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 ...
dmh's user avatar
  • 133
5 votes
1 answer
200 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 ...
Peter's user avatar
  • 465
4 votes
0 answers
87 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 ...
Stevoisiak's user avatar
4 votes
2 answers
164 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 ...
Michael Fraiman's 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 ...
Branden Ghena's user avatar
10 votes
1 answer
294 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 ...
Taxel's user avatar
  • 329
0 votes
1 answer
146 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
MarkoP's user avatar
  • 315
10 votes
2 answers
3k 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 ...
Fraïssé's user avatar
  • 3,069
6 votes
1 answer
468 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....
Watson's user avatar
  • 860
13 votes
3 answers
2k 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 ...
acombo's 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 ...
Stirling's user avatar
  • 1,419
14 votes
3 answers
422 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 ...
Anonymous's user avatar
  • 243
5 votes
0 answers
441 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. ...
user109801's user avatar
0 votes
1 answer
613 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{...
shahrina ismail's user avatar
0 votes
1 answer
193 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}} \...
David's user avatar
  • 1,934
4 votes
1 answer
199 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 ...
turanc's user avatar
  • 95
16 votes
6 answers
2k 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 ...
alfC's user avatar
  • 14.2k
1 vote
0 answers
215 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 ...
monoid's user avatar
  • 111
2 votes
1 answer
237 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 ...
laminin's user avatar
  • 297
9 votes
2 answers
4k 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 ...
Dohn Joe's user avatar
  • 1,892
4 votes
4 answers
4k 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 ...
Yossi Gil's user avatar
  • 15.8k
15 votes
3 answers
1k 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 ...
CutestPenguin's user avatar
3 votes
1 answer
114 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 ...
gertvdijk's user avatar
  • 280
4 votes
2 answers
879 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 ...
Matti's user avatar
  • 993
7 votes
1 answer
559 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 ...
user60435's user avatar
9 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 ...
Mike's user avatar
  • 93
2 votes
2 answers
573 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 ...
Clarinetist's user avatar
  • 1,530
7 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 \...
Ephraim Ncory's 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} ...
Serge's user avatar
  • 1,347
22 votes
4 answers
3k 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{...
Ephraim Ncory's user avatar
5 votes
4 answers
795 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 ...
user1160354's user avatar
10 votes
2 answers
438 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 ...
Trylks's user avatar
  • 569
5 votes
2 answers
1k 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 ...
deshmukh's user avatar
  • 2,425
3 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 ...
Kadir's user avatar
  • 1,537
0 votes
1 answer
304 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 ...
Dave Jarvis's user avatar
  • 11.4k
6 votes
1 answer
136 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 ...
Sean Allred's user avatar
  • 27.3k
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 ...
msmechanized's user avatar
  • 1,203
7 votes
1 answer
119 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. ...
rlh's 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{...
moyoumos's user avatar