Questions tagged [text-manipulation]

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

Filter by
Sorted by
Tagged with
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{...
1
vote
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
116 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
92 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
146 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?
2
votes
0answers
23 views

How to write below textheight and above footer [duplicate]

MCQ Paper is mentioned below (Thanks to Erik) ; \documentclass[addpoints,answers,10pt]{exam} \setlength\textheight{15cm} \setlength{\footskip}{8.5cm} \providecommand{\myquestion}{% \question ...
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{...
9
votes
5answers
490 views

Text transforming functions

Generally, I tend to see LaTeX commands as subroutines rather than functions. I was wondering if LaTeX allows the definition of functions for, say, transforming text by replacing substrings. I ...
1
vote
1answer
796 views

General text/string manipulation from within LaTeX

Is there a way to easily code from within (La)TeX some text manipulation stuff, like "find" and "replace", so that I may automatize tedious manual labor ? (EDIT It was mentioned in the comments by ...
0
votes
0answers
22 views

Lowercase everything until end of group [duplicate]

What'd be the most efficient way of lowercasing everything from the point of the command invocation until the end of the group, that is, how should one define a command that acts like, for example, {\...
6
votes
2answers
691 views

Is there a modal command for MakeLowercase?

Analog to this question I've been wondering WHAT is to \lowercase as \bfseries is to \textbf? (... and for uppercase, or \MakeLowercase and MakeUppercase, etc., which also seem to be text-block ...
2
votes
3answers
908 views

How to raise or lower text?

How to do automatic raising text? 1pt-2pt-3pt ... 12pt Related to: https://www.tug.org/texshowcase/diminuendo.tex
1
vote
2answers
920 views

Converting a text file into a .tex file using C++

I have a text file which contains data like this: word: 'Swine'; conf: 92.03;pointsize:'48':,font_name:'Verdana_Bold',X1:'152', X2:'283', Y1: '166', Y2: '202 word: 'flu'; conf: 93.43;...
1
vote
1answer
64 views

My text starts to high up!

I am using and have for unknown reason my text starting to high up on new pages. I've searched and can't find the cause. Any ideas? Many thanks. \documentclass[8 pt, a4paper, leqno, oneside] {report}...
4
votes
3answers
12k views

How to add a text box in a plot with pgfplots?

I've done a plot with pgfplots with this code \begin{figure}[!ht] \resizebox{\textwidth}{!}{ \begin{tikzpicture} \begin{semilogyaxis}[scale only axis, xmin=-20, xmax=200, ymin=0.01, ymax=20, ...
2
votes
1answer
185 views

How to change arabic text alignment with polyglossia and memoir?

I am trying to typeset a book which is completely in arabic. I am using memoir with polyglossia? The result is fine, but the text is Fully Justified ? How can i change the text alignment either ...
5
votes
1answer
160 views

Define MakeUppercase list with XeLaTeX/LuaLaTeX

I do custom list for to make uppercase/lowercase for 8-bit TeX for Georgian and it works fine, but how to define it for XeLaTeX/LuaLaTeX? here is a similar question Applying MakeUppercase to non-...
0
votes
1answer
188 views

how can I highlight text with the following effect

how can I highlight text with the following effect? The darkness of the color indicates the importance of the text.
0
votes
1answer
35 views

Add centered text to a figure

I'm trying to add some text to a tikz figure using the \put command, something like: \put(-175,25){This text is too long} Yet, if the text is too long, I would like to add it in several lines and ...
1
vote
1answer
238 views

Align table and wrap text arround it

I'm trying to do something I'm not sure I can. So, let me explain. I have an enumerate environment. Inside of it, there are 5 images within an array and then a table. To the right of that table I ...
4
votes
1answer
96 views

Are context-sensitive species or abbreviation macros possible?

Thanks to this, automated abbreviation of species and some technical terms became understandable for me as a LaTeX beginner :-) My PhD supervisors (not LaTeX users) however, criticised that I used the ...
5
votes
1answer
971 views

Why does \IEEEPARstart have conflict with \textcolor?

MWE: \documentclass[journal,twoside]{IEEEtran} \usepackage{color} \usepackage{amsmath} \begin{document} \textcolor{red}{ \IEEEPARstart{L}orem ipsum dolor sit amet, consectetur adipiscing elit. ...
3
votes
5answers
3k views

How do I raise or lower the position of text?

Using minipage, I've split my header into \begin{minipage}{0.4\textwidth} \textsc{ \Huge{\textbf{MyNameHere}} }\\ \end{minipage} \begin{minipage}{0.6\textwidth} \begin{flushright} MyAddress\\ ...
1
vote
1answer
113 views

Line and text below

I'm looking a way to do yield the following result in LaTeX. As you can see, (action) is centered in the first clause of the text, and (result) is also centered in the second clause of the text.
1
vote
1answer
2k views

indentation as displayed in the editor

Each time I tab, the entire paragraph is indented right, in the Tex editor (TeXstudio), instead of just the start of the paragraph. How do I set the options of TeXstudio to not indent the whole ...
7
votes
4answers
5k views

How do I get text above and below text?

How would I do {text}_{i=1}^{i=n} with the written exactly above and below the text? Hope you can help!
1
vote
1answer
304 views

Changing the font size of rotatebox

How can we change the font size of the text appearing in the rotatebox? For example: \rotatebox{90}{test text} I would like to change the size of "test text".
2
votes
2answers
165 views

How to make equation text size to be normal

The letters in my equation are shrinking and I'm trying to revert that: I'd like them to appear as follows: If you notice you can see that the parenthesis' size on second image vary like 3 times ...
13
votes
7answers
2k views

Remove leading zeroes from an integer

In the documentclass I am writing, the user will input an integer such as \lessonnumber as an integer with possibly a number of leading zeroes, e.g. 4 as 04. At some places in the document I will need ...
0
votes
2answers
2k views

Italic or font change for a whole section

I would like to change the appearance of a whole section in a text with math content. I have for instance a half page with several equations in it which I would like to be differentiated from the rest ...
3
votes
1answer
178 views

In LaTeX, what is the most efficient way to search for an optional token in given input?

My question is inspired by this comment by Joseph Wright. Let's say we have input strings with varying character combinations, such as: ...
0
votes
0answers
281 views

textblock* on every page

I have following: \begin{textblock*}{15mm}(191mm,20mm) \begin{spacing}{6.2}\noindent\thin\color{black} {\fontsize{50}{60}\selectfont M\\ Y\\ T\\ E\\ ...
3
votes
2answers
190 views

How to tie TeX macros to text or another macro?

Is it possible to tie a TeX macro to some text (e.g. the next paragraph) or another macro? For your information, here is a more specific description of the problem: I am using a set-up macro \...
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 ...
1
vote
1answer
207 views

Problem with text position after inserted figure

I have following MWE: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[color=red,opacity=0.1,contents={}]{background} \usepackage{hyperref} \usepackage{indentfirst} \...
1
vote
1answer
520 views

Fill line with asterisks [duplicate]

I want to fill a line with asterisks just like as with \cdots or \ldots that can be used in tables, \leaders solution doesn't work well. I'm working in a fixed columns width table, where at the end ...
10
votes
1answer
18k views

Properly Positioning text in beamer using textpos

I am using textpos to control the position of text in a beamer frame. What I want to do, is to place some text on top of an image. I am using the package in absolute mode and I want to place the text ...
2
votes
2answers
273 views

Define command that either does \kill or \textcolor

I have some paragraphs in my thesis, that will stay in there until just before it is finished. They should be marked as non-important to my supervisor. Then I'd like to remove those paragraphs all at ...
9
votes
1answer
566 views

Convert all all-caps words to small caps

I'd like to turn all all-uppercase words, acronyms etc. into small caps, preferably automatically on the fly and without changing the source files. The ideal solution would also allow me to block some ...
6
votes
3answers
1k views

Automatic apostrophes for quotation marks

There are some other questions on this side addressing related issues, but I haven't found any which cover exactly my issue. I have a text (converted from XML) which uses the apostrophe ' with three ...
5
votes
2answers
1k 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 ...
2
votes
1answer
184 views

Move text / numbers to a new line

Let's say you have a few pages worth of text then numbers, ie name address phone number. Example : Name address 0123 4444 name address 0987 6754 name address 5674 5643 etc How can one create a rule ...
1
vote
1answer
175 views

Placing the text under a line in a multiline form

I am typing a form like the following: I want to make a command \newcommand\myform[1]{ *** #1 ***} that will produce the filled-in form with the argument substituted into it. For example, the ...
2
votes
2answers
495 views

A circular version of \underbrace or \widehat

I'm new to LaTeX and am searching for a function that acts like \underbrace or \widehat but is circular (I don't want the pointed middle part). Does such a function exist? I tried using Detexify but I ...
11
votes
1answer
210 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, e....
9
votes
4answers
2k 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, ...
1
vote
2answers
128 views

Latex equivalent of DECODE (check text and assign number) [closed]

I've four probable sentences in CSV file. Ex: sentence 1 here , one more sentence, one more sentence added, last sentence. In Latex; I want to print 1 if "sentence 1 here" is present. Something like ...
7
votes
2answers
2k 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 ...
11
votes
3answers
3k 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 ...