Questions tagged [text-manipulation]

about using TeX's programming capabilities to modify input text.

Filter by
Sorted by
Tagged with
29
votes
9answers
3k 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 ...
0
votes
2answers
37 views

Wrap text in table

I'm trying to convert my CV (originally assembled in word) into a Latex file, largely as a learning exercise. I just wondered if someone could help me wrap text as in my current version certain pieces ...
1
vote
1answer
49 views

Help drawing as text a number from a formula (For instance [ 1-\thepage)*70+\i ] )

Googling I found that it is common that \lineno does not work properly around displaymath with the ifacconf.cls template. I am trying to improve a workaround I found for peer review reference. ...
1
vote
0answers
29 views

Two Flowing Frames per Page [on hold]

I want to write a document where the history, geography, culture of a certain place is the main text. Together with that, I want to present a timeline of events but, rather than a separated topic or ...
23
votes
5answers
2k 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 ...
0
votes
0answers
25 views

Alignment inside in-line $$ math environment [duplicate]

I would like to be able to use (equation) alignment inside a simple in-line $...$ environment. Of course, normally nobody does this, when this is properly done with the standalone equation ...
0
votes
0answers
41 views

Matplotlib2tikz text size when scaling

I am using matplotlib with matplotlib2tikz to create my output. I am currently using the option to be flexible later on in TeX tikz_save('myfile.tikz', figureheight = '\\figureheight', figurewidth = '...
4
votes
2answers
186 views

How can i have text between brackets in equation with respect to some criterion?

I try to have something close to that Here is my try, \begin{equation} \begin{array}{cccc} \partial_t C & + \partial_x u C + \partial_x v C = & D_x \partial_{xx} C + D_y \partial_{yy} C + &...
4
votes
4answers
1k views

Text going to next line - how to keep on same line?

My cover for my thesis looks like this: The relevant MWE looks like this (I am using a template) \begin{minipage}{0.4\textwidth} \begin{flushleft} \large \emph{Author:}\\ John \textsc{Smith} % Your ...
0
votes
0answers
27 views

Inserting Latex commands automatically at certain places in text

I'm not sure if the following question has a solution (and if there is one if it is still in the scope of what one can achive with Latex) but I hope its alright to at least ask. I'm currently ...
0
votes
0answers
31 views

How can I put text in the left margin using enumerate

I'd like to use\begin{enumerate} to create a list of numbered problems, but I want to place text to left of the numeral, in the margin, like this: Any suggestions?
1
vote
1answer
229 views

How to add a superscript in text mode

I'm writing about C* algebras and I'm trying to write *-strings efficiently. I managed to define C* like this: \newcommand{\Cstar}{C\textsuperscript{*}} While I have to invoke it as \Cstar{} to ...
1
vote
1answer
71 views

A way to use textbf and textit at the same time with one command

Hello I have to make a document where I use a lot \textbf and \textit at the same time, so I tried to create a new command where it use both at the same time, but it gave me an error and I don't know ...
0
votes
1answer
115 views

\rightsquigarrow with the text above and below it [duplicate]

is it possible to write a text above and below the \rightsquigarrow? I am trying \xrightsquigarrow[\text{b}]{\text{a}}, but it is not working.
4
votes
1answer
470 views

Text edge and shadow with tikz

I have this code: \documentclass[twoside,fleqn]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage[most]{tcolorbox} \usepackage{tikz} \usetikzlibrary{...
4
votes
1answer
138 views

How to add multi-line text below a node in a tree in forest

I want to make a tree which has bulleted lists centered below the child nodes, like so: I've searched on TeX SE and found questions which describe putting labels below nodes, but it doesn't quite ...
0
votes
1answer
59 views

Disable word break

How can I disable word breaks in the whole document? I don't want any of my words broken and hyphenated across 2 lines. I have tried to use the package: \usepackage[none]{hyphenat} But then my ...
6
votes
2answers
1k 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
4answers
471 views

Make blocks of text invisible only if said so

Is there any command which allows me to make some blocks of text invisible only if initially I said so? I.e., I would like to mark some lines throughout the text that would only appear in the ...
0
votes
2answers
134 views

problem with text formatting \ itemize

I looked for a command to improve the equation item and I met this one. \usepackage{amsmath} newcommand{\itemEq}[1]{% \begingroup% \setlength{\abovedisplayskip}{0pt}% \...
3
votes
1answer
43 views

Make text fall of a line

As a joke in a songbook I'm editing I want to make a phrase "fall of the line", letter by letter. I do remember a long time ago to have seen something like this in WikiBooks but can't find it again. ...
3
votes
1answer
107 views

How to emulate this page style from the comic book Watchmen?

Basically, I want to create a page so that it looks like a "photograph" of a piece of paper (with text) over another piece of paper (also with text). Is this possible in LaTeX? If yes how? I have no ...
0
votes
1answer
93 views

A Single Command for Combining Text and Math?

I'm trying to add units to some quantities for my physics homework. Here's what I want: Normal Text Math Commands Allowed All Bold One command to accomplish the above For example, if I want to write ...
0
votes
2answers
81 views

problems with margins in textual minipages

I'm writing a restaurant menu and i have problems with the left margins of this page, in particular in the paragraph 'Wine'. If I omit \vfill, the code overlaps the two paragraphs but it puts them ...
18
votes
4answers
4k 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 ...
0
votes
1answer
209 views

Placing a Text over another Text in Beamer

How can I place a text on top of another text in beamer? I want something like this but over text while the original text becomes transparent.
3
votes
2answers
9k views

How can I change the font size of a fraction in an index?

I have, as part of an equation, the object a^{5} \left(\frac{b}{c}\right)^{\frac{2}{3}} The problem is that the 2 and 3 are very small (compared to the 5) and I would like all sub/superscripts to be ...
0
votes
0answers
18 views

How to adjust the distance between the title of the chapter and the text [duplicate]

How to adjust the distance between the title of the chapter and the text: From this: To this for example: \documentclass[a4paper,12pt,onecolumn]{report} \usepackage[utf8]{inputenc} \usepackage[...
21
votes
2answers
8k 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?
4
votes
2answers
255 views

Truncating multi-line text

We can use the truncate package to truncate a piece of text so that it fits e.g. in a 5cm wide box. However, the package can only handle one line of text. What if I have got a (possibly long) text ...
2
votes
1answer
107 views

Top & middle left alignment of text inside cell

How make top left alignment (yellow rectangle) and middle left alignment (red rectangle) of text inside cell? I've tried a lot different options, I think alignment should be specified directly in ...
5
votes
2answers
678 views

Top-Align Text in TikZ Node

I want the heading ("Meldebogen", "Anklage", "Beweisaufnahme", "Urteil") all on the same vertical height regardless of the content. I figured that simply top-aligning the text in every node would do ...
2
votes
1answer
51 views

Fontsize for text vs. math

Disclaimer: I am new to Latex, I apologize for the lack of specific and correct vocabulary to describe my question. I am building an equation sheet and have a question about font sizes. I would ...
2
votes
1answer
79 views

Latex reformat text structure

Say I have a file of abbreivations.txt &Estimated &Time of &Arrival &North, &East, &West, &South &Special &Weapons &And &Tactics &W&ireless &F&...
1
vote
0answers
47 views

Software to check grammatical errors in Latex text [duplicate]

Is there any software, like Grammarly, that enables one to check the grammar in the text while using latex. The problem with using Grammarly is that with formulas and mathematical notation, it becomes ...
0
votes
2answers
77 views

latex text manipulation of \ref ouput

For some reason I need to manipulate the output of the \ref command to match the patter of four digits without dots. For example: \title{A Very Simple \LaTeXe{} Template} \documentclass[12pt]{article}...
0
votes
1answer
54 views

How to selectively delete inner and outer parentheses simultaneously?

For example I want to retain only the content inside \text so that \[ \text{v} = \text{w} \] becomes \[ v = w \] How does one do this if there are hundreds of instances of \text{..} and I want ...
0
votes
1answer
57 views

Centre heading in 2 by 2 table

In my 2 by 2 table, I would like to position the headings 'Ashley' and Matt' so they are always centred with respect to the text adjacent columns. I have included a picture of the ideal position (red ...
1
vote
1answer
100 views

Tables containing lots of text

I would like to create a table for a large amount of text, following the style shown in the picture 1 (below). I have attempted to do this using tabularx but with little success. I have tried to ...
76
votes
2answers
91k 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 it ...
13
votes
3answers
2k 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 ...
8
votes
0answers
990 views

How to add/check missing punctuation marks (itemize/enumerate) automatically?

(An experiment) I'd like to present you one of the possible tasks (to be automated) I solve in my daily work: adding missing punctuation marks in the itemize and enumerate environments. I polish ...
7
votes
2answers
951 views

How to encircle a character inside a Latex formula?

I would like to encircle one character inside a LaTeX formula. An example is $f_1 = ...$ or $f_k = ...$, where I want to encircle the characters 1 and k. I've found some questions (question 1, ...
1
vote
1answer
138 views

How can I remove a section from tex file by it's name?

I have some tex file (e.g. malloc.tex) those contain some sectionss(section of manpages). From there I want to remove the COLOPHON section, because this is not actually man section. And as I merge all ...
1
vote
2answers
81 views

How to continue text in next line in framebox?

I have written text in the framebox but it does not continue in the next line rather it keeps on adding the next in the same line and the resulting text is outside the box. \documentclass[12pt]{...
2
votes
1answer
317 views

Problems with column width and text alignment using siunitx

I have problems with formatting a large table with summary statistics of variables. My variables have long names, which I would like to keep, but if there is no way, I can make shortcuts of their ...
6
votes
5answers
720 views

How to draw this Venn Diagram using PSTricks?

The code I wrote for it is - \documentclass{article} \usepackage{amsmath} \usepackage{pstricks} \usepackage{auto-pst-pdf} \usepackage{pst-node,pst-plot} \begin{document} \begin{pspicture}(-6,-6)(6,6) ...
2
votes
3answers
271 views

String multiplication possible in LaTeX as in Python?

I'd like to set a string multiplication in LaTeX in order to print n times a specific string or character. Just like in Python one would do : print('mystring' * 3) to get mystringmystringmystring. ...
27
votes
8answers
2k 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: ...
0
votes
1answer
345 views

How to make a new environment be verbatim inside \scalebox with listings package?

After @JPi answer on How to use \scalebox around my environment? and comment pointing to the question Verbatim in environ’s \BODY I tried: Writing the contents to a file Print it on verbatim mode, ...