The tag has no wiki summary.

learn more… | top users | synonyms

48
votes
5answers
51k views

How to write hidden notes in a LaTeX file?

How can I write notes in a LaTeX file, that don't appear in the PDF file?
26
votes
3answers
453 views

truncate text from right to left

I would like to have a command that truncates text like 'An example sentence.' to '...ple sentence.'. When called like this \truncateToLeft{4cm}{An example sentence.} I have no idea how to ...
25
votes
3answers
9k views

How do I get transparent text?

I am trying to make a picture for the cover of my thesis using LaTeX. I have a background picture and I would like to have transparent (math) text on top of it, how do I achieve this? I have tried to ...
24
votes
7answers
2k views

How to split text into characters

I would like to define a function which splits an input text into its constituent letters, so I can process each letter individually (the background to this question is that I would like to put each ...
21
votes
8answers
544 views

Automatic species names in latex / command that does something differently the second time it is run

In academic publications it is a rule of thumb that the first time you give a species name, you write the genus and species in full...and the second time you can abbreviate the genus. First time: ...
16
votes
4answers
691 views

Selectively suppress generation of typeset output

Is it possible put TeX into a "mute" mode in which all typesetting is suppressed? \documentclass{article} \pagestyle{empty} \begin{document} \suppress This text will not be seen in the generated ...
14
votes
3answers
863 views

Extracting the contents of text in a specified environment into a new file

Imagine I have a complete latex file and I want to extract only the text that appears in a specified environment (i.e., within a custom hypothesis environment) For example: \begin{document} ... Lots ...
13
votes
3answers
825 views

Stretching text vertically

Is it possible to stretch text vertically? Like this:
13
votes
1answer
3k views

How can I add a subtitle to a section title?

I'd like to do this for some of my sections but not all. I'd also like to maintain the current spacing; for example, if the vspacing is 1cm from section title to body text (at 100% zoom), then I'd ...
12
votes
3answers
1k views

'Wordart' in (La)TeX

Would it be feasible to try to reproduce something like the image below in TeX? I just wanted to ask the advice of some experts before I invested too much time trying. I've already messed around with ...
12
votes
3answers
1k views

Difference between *.tex and *.txt Files

Is there any difference between the two file-formats? Do I see all the data, when I open a .tex file using a Standard Text-Editor in Windows? Do .tex files have some kind of meta-data or disguised ...
12
votes
3answers
1k views

Increasing the text size in tufte documents

I have typeset my lecture notes using the tufte latex style. The notes are around 60 pages long. This year I have a few students who require notes where the text size is larger than the default - I'd ...
12
votes
2answers
833 views

Is there is a package so you can add text with visual effects like “WordArt” from “Word”

I am elaborating a business card style for LaTeX but I found out that even if I have the style and margin for the cards I can not make it look "pretty" like other text editors without overusing ...
11
votes
1answer
3k views

Replacing a substring

I've got a string like this: aXYbXYc, and need to replace the XY substring with a right arrow: a $\to$ b $\to$ c. Is there any function (also provided by external packages) to help me do that?
11
votes
2answers
158 views

Text across two pages

I am making a small book and I want to put a phrase in both pages like the picture above, I want to keep the chapter title and page numbers. Could you give me a hand on this?
10
votes
3answers
3k views

Mirror effect in documents

The following example (links to pdf) in the TeX Showcase has no provided source. The book Fearless Symmetry by Ash and Gross seems to use a similar style. Where can I find hints for typesetting ...
9
votes
5answers
6k views

fully stretch text horizontally on page

Is there a way to fully stretch one line of text on the full width of the page, without manually setting the letter spacing, no matter how many characters on the line?
9
votes
2answers
160 views

How to obtain a text surrounded with begin and end commands

I want to obtain a text surrounded with begin and end commands, as the following. \begincommand Here any text is written. \endcommand \surroundedtext % this command is replaced with "Here any text ...
9
votes
1answer
1k views

How to exclude text portions by simply setting a variable or option?

I'm writing a document where some text portions are confidential and would therefore like to create an environment (e.g. confidential) which I can then exclude from the PDF by simply setting a ...
9
votes
1answer
111 views

Why spaces are ignored even in textual arguments within \ExplSyntaxOn… \ExplSyntaxOff?

I've seen workarounds for having the spaces recognized within \ExplSyntaxOn... \ExplSyntaxOff. But I wonder why spaces are unrecognized even for (LaTeX3) macros arguments undoubtedly expecting text, ...
8
votes
4answers
238 views

truncate text from left to right

I simply need to truncate a text string, which is just a sequence of characters without whitespace, therefore the linebreak won't work. I just need to decide the length of the string in centimeter, ...
8
votes
2answers
351 views

Multi-line curved text along vertical

I found this rendering from here on this site but with no explanation or working example to go with it. How do I do this? I'm pretty familiar with TikZ but I'm having trouble finding text that is ...
8
votes
3answers
314 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
1answer
7k views

Changing background color of text in Latex

How can I make change a text background in LaTeX? For example using Latex code \textsc{Extra Curricular Achievements}\\ I get However, I want the background of this heading to be changed so that ...
8
votes
2answers
394 views

How to illustrate a drawing with text and two decorations

How can I create a drawing like this: The stuff in red are only explications (with "middle" I meant middle of the drawing representing the spiral) and should not be drawn. Tikz would be best, since ...
8
votes
1answer
178 views

How to do multiple string replacements?

I want to escape URL paths to obtain the percent-escaping that is also applied e.g. by browsers. For this purpose I tried to do the following (out-commented lines are meant to show what I'm aiming ...
8
votes
1answer
80 views

Typeset just the first letter in a group

How can I typeset (print) just the first letter of a group of text? For instance, how does biblatex or bibtex determine the first initials of a name? MWE to get started: \documentclass[]{article} ...
7
votes
4answers
4k views

How to fit text in a box of given size?

Say I want to typeset small piece of text as a logo/motto/slogan or whatever. The text is not much longer than "Lorem Ipsum Dolor". I want this to fit tightly in a box of certain size (e.g. 7x2cm). ...
7
votes
2answers
596 views

Drawing a venn diagram with two nodes using Tikz?

How do I create a Venn Diagram with entities no larger than below, but with text scaled to fit; and circles in alignment horizontally? \documentclass[a4paper, 14pt]{article} \usepackage{tikz} ...
7
votes
2answers
1k views

Move TikZ cloud in a better position using beamer

I am trying to manipulate the exact position of a TikZ cloud but I am not sure if I'm doing any effort at all. As you see in the aforementioned picture the space between items is not beautiful. So ...
7
votes
1answer
2k views

indexed letters inside circles

I'm currently using this code \raisebox{.5pt}{\textcircled{\raisebox{-.9pt} {f}}} to get I'm trying to index the function f inside the box, with say $f_{n}$ but \textcircled doesn't seem to ...
7
votes
1answer
3k views

How to effectively compare latex files

I have two latex source files, one created by me and the other modified by a colleague. Introduced modifications, unfortunately, also regard line breaks and spacing (source text line breaks, not ...
7
votes
1answer
90 views

Transformed text as from a specific viewport

Is there a possibility to shear (any) LaTeX text or the output of a mathematical formula as it would be obtained as a result from looking at a different angle/viewport? I do not mean mere rotating of ...
7
votes
4answers
767 views

Representing linguistic text annotations in LaTeX

I'm writing a document describing the semantics of opinion phrases in English, and in order to do so, I'm annotating particular spans of text as having particular semantic functions within the ...
7
votes
1answer
96 views

How can one make border of text for a figure?

I want to take text and wrap it around as the border of a figure. That is, text on the top, wrapping to sideways text running down the right, wrapping to upside down text on the bottom, wrapping to ...
7
votes
1answer
576 views

Macro to extract (typeset) 'plain text' from a command?

Sorry to come back again with a similar post title (I had a post with this same title, then renamed it to PDF Metadata - Macro to extract (typeset) 'plain text' from a command?) - but I hope now the ...
7
votes
1answer
163 views

Text doesn't fit the box

I created the following picture with Inkspace and made export to tikz. The problem is that the text doesn't fit the boxes. And the arrows should be colored with a gradient, but it's not so important. ...
6
votes
2answers
802 views

“Pretty-printing” numbers with significant figures

I like to use LaTeX to display data in figures and tables. I've used arrayjobx.sty and fp.sty to extremely good effect to handle data that comes out of, e.g., Excel or other Windoze-world data ...
6
votes
1answer
597 views

Create sort of custom trapezoid text box

I want to create a sort of text box, path you maybe want to call it, using TikZ, which has the shape of a triangle. I then want the text follows the hypotenuse of the triangle. / / The text ...
6
votes
1answer
167 views

Automatically divide text between two tikz paths

I make a custom shape and I need to put a text inside it. But problem is that my text didn't fit the length of decorated path. So, I need a way to automatically divide text between two or three paths. ...
6
votes
2answers
93 views

Is it possible to add text underneath a part's title?

In a LaTeX report I'm working on, I have used \part{title of part} to organise the chapters into parts. This gives me distinct pages for each \part specified which is what I want. But if I try to add ...
6
votes
1answer
72 views

About mirroring a piece of text

I would like to produce a mirrored version of the Lorem ipsum text. How can I do this? If I use \reflectbox or \scalebox, everything ends up in a single line of text. This is my code: ...
6
votes
1answer
107 views

Change direction of a textbox, taking up space from above instead from below

I am designing a custom theme for my LaTeX presentations. This is my title page: Now when I have a longer title, this happens: Here's my code (according to this post): \defbeamertemplate*{title ...
6
votes
2answers
227 views

Vectorized Text Effects/Transformations: Stretching & Expanding (WordArt)

I'd like to apply a text transformation similar to what the Inkscape extension 'Modify Path -> Envelope' does within LaTeX: In-source documentation of the envelope extension: This extension ...
6
votes
1answer
280 views

\expandafter usage and plain TeX programming

Hello everybody out there using TeX, Actually, I wanted to write a LaTeX macro in plain TeX in order to include source code examples with individual modifications like stripping off comments and the ...
6
votes
2answers
573 views

Extracting Text Only from a Thesis [duplicate]

The question Extracting the contents of text in a specified environment into a new file (and answers therein) involve using the extract package to produce a LaTeX file that contains all the text ...
5
votes
3answers
153 views

align with text

I have some equations into the aligning environment and i want below them to write something. But in the same time also want those to be aligned. In particular Imagine that I want or i could do this ...
5
votes
2answers
483 views

Feeding arguments to xstring macros

In Footnotes with automatic final period, the comment was made to provide the possibility to add a period . to a footnote conditionally, based on whether the footnote already has a period or not. I ...
5
votes
2answers
184 views

Changing catcode for commercial at (@) inside a macro to get it matched in pattern.

This question is related to TikZ: pgfutil-common: pgfutil@in@ - how does it work? and is a result of coping with that problem. I've already read How to change #catcode in a macro, but it didn't help ...
5
votes
2answers
33 views

Move textregistered symbol more towards the top right

I have this as my code: \Huge\bfseries Cambridge IGCSE\textsuperscript{\small{\textregistered}} And this shows: To make it more aesthetically pleasing, how do I move the text registered symbol a ...