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 [text-manipulation]

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

0
votes
0answers
22 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
28 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
77 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
49 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
61 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
90 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 ...
6
votes
4answers
402 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
107 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
38 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. ...
0
votes
1answer
53 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 ...
3
votes
1answer
86 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
2answers
70 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 ...
0
votes
1answer
138 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.
0
votes
0answers
14 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[...
0
votes
1answer
78 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 ...
4
votes
2answers
199 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
75 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 ...
2
votes
1answer
46 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 ...
5
votes
2answers
548 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
77 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
1answer
53 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
52 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
89 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 ...
0
votes
2answers
72 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}...
7
votes
2answers
844 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
123 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
69 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
244 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
681 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
240 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. ...
0
votes
1answer
313 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, ...
0
votes
1answer
235 views

How to rename the comment or verbatim environment?

Based on the question How to rename or "copy" a latex environment I am tried to rename the comment environment to myenvironment: \documentclass[10pt,a5paper,twoside]{memoir} \usepackage[T1]...
3
votes
2answers
2k views

How to use \scalebox around my environment?

I tried putting scalebox{.2} while defining my new environment, but it is not being applied: \documentclass[10pt,a5paper,twoside]{memoir} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \...
2
votes
1answer
216 views

Replacing a substring from a command

I have a problem where I seem to be unable to replace a string that is the output of a command. In my document I call the \outerfunction with an argument that is actually a list of key/value pairs. (...
4
votes
3answers
184 views

Rewrite \url{https://example.com/path} to \href{https://example.com/path}{path} from macro

This document is cut down from a BibTeX-generated .bbl file: \documentclass{article} \usepackage{url} \usepackage{hyperref} \newcommand{\showDOI}[1]{\textsc{doi:}#1} \begin{document} \urldef\tempurl\...
0
votes
1answer
586 views

Remove a specific latex command from the text AND closing bracket behind it

How to remove a specific latex command from the text AND closing bracket behind it, but to keep the text inside the brackets/ senseless example: We \edit{Introduce a} model for analyzing \emph{data}...
0
votes
0answers
97 views

Recognize shape in image and get positional info of it

I am aware of the existence of the package wrapfig and features to shape text more sophisticatedly (also this). My question aims for some advanced tool to be used with them: Is there a workflow to ...
1
vote
0answers
43 views

Formatting section and subsection but not keywords

Problem: I got a section and subsection in a document. These could either be in upper- or lowercase. The subsequent keyword should always be in lowercase. Minimal Working Example (MWE): \...
3
votes
0answers
171 views

How to write a word within some text using Latex

is it possible in latex to write a word within some text either by introducing a white figure and then wrapping the text around it or some other maybe more clever way. I want something like this, ...
0
votes
1answer
556 views

Positioning text to the right

I want to position text further in the right in Beamer. For example I have a first line and I want the second line to begin somewhere in the middle below the second line. Till now I have been using ...
1
vote
0answers
111 views

Can't color text with \textoverline

When I add \textcolor to \textoverline, I get: Error: Undefined control sequence. I need to use color and textoverline for the same text. It is not working with me. Here is the code: \documentclass{...
3
votes
1answer
4k views

Wrap Text in Long Table - Improvement ideas

I've got a very long table top create with, at times, lots of text to wrap around within it. I'd rather not use a landscape orientation. So I created the following test, with the \ltxtable package. ...
1
vote
1answer
104 views

LetterSequence formatting when starting a paragraph

Ok so I know about the \lettrine package and using it to adjust the first letter of a paragraph. What I am interested in is adjusting the first three or four letters of the first word of a paragraph. ...
9
votes
2answers
2k views

Write text in TikZ Drawing

I need a small text under node 4, 0 and 3. Does anybody know how to do that? This is what I have \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{...
2
votes
1answer
1k views

How to adjust text dynamically to one Beamer frame?

I tried \resizebox{\textheight}{!}{} but not adjusting the content to the page height in the frame. I do it manually by \small{...}, \footnotesize{...} and \tiny{...} but it is too cumbersome. ...
1
vote
1answer
107 views

Partition the box'ed text items!

After the Let's get fancy: Text like tag?, I am thinking that it would be nice to have a sequence of boxes, let's say 5 in number and be able to partition them in the first 2 and the rest 3, for ...
1
vote
1answer
88 views

On the easier embedding of certain jokes on texts?

I just found the following in a facebook page Called "Academia Obscura": Which is a piece of the lyrics in Rick Astley: Never Gonna Give You Up. Obviously, this could be crafted with a wise and ...
2
votes
2answers
142 views

How to put a text at the end of the last sentence of a document with xelatex?

I have a lot of documents witch all have to share the same last text. But this text have to follow the last sentence immediately — without line break —. I try to modify the document environment but ...
10
votes
5answers
1k views

Let's get fancy: Text like tag?

How to make some text appear with a background like it appears in tags, for example the tags in Stackoverflow?