Questions tagged [stringstrings]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
54 views

Changing the colour of a result in a subtraction sum

I am trying to produce something like this pic, were the crossed out parts in the answer could be coloured white or not shown, to try and show the steps involved in the subtraction method. \...
  • 463
0 votes
1 answer
19 views

Adding colour to a subtraction code whilst borrowing, crossing out and answer

can anybody help me adding some colour to this code, for example the digits, cancel, borrow and answer all being different colours. \documentclass{article} \usepackage{stringstrings,stackengine} \...
  • 463
3 votes
2 answers
43 views

How can I use accented characters in Stringstrings commands?

I am french and I would like to manage accented characters when using Stringstrings commands. Here is a LaTeX Minimal Example to show you my issue : \documentclass[11pt]{article} \usepackage[T1]{...
2 votes
2 answers
225 views

removing the first character in a combination of strings and commands/tokens using \gobblechar of stringstrings

I'm working with the stringstrings package. It has a command called \gobblechar which removes the first character in a string or token. Kindly see my MWE below. it has been revised as per inputs from @...
0 votes
1 answer
66 views

\gobblechar command not working in stringstrings package?

I'm working with the stringstrings package. It has a command called \gobblechar which removes the first character in a string or token. Kindly see my MWE below. \documentclass{article} \usepackage{...
2 votes
2 answers
69 views

Why does \substring not work inside \equal?

Why does this code output "False": \documentclass{article} \usepackage{stringstrings} \usepackage{xifthen} \begin{document} \ifthenelse{\equal{\substring{ab}{1}{1}}{a}}{True}{False} \end{...
  • 753
4 votes
2 answers
170 views

Lettrine + string manipulation + some fonts = errors and weird issues

I am encountering some weird behavior and errors when manipulating strings inside of \lettrine arguments: the code either doesn't compile or produces unexpected results. On top of that, it is font-...
1 vote
1 answer
104 views

Automatically add parentheses if expression is composite

I'm trying to write a macro which automatically adds parentheses to an expression if the argument is composite. Specifically, I would like to define a command for the inner product of two vectors ...
0 votes
1 answer
442 views

Split string variable by spaces

I am updating a custom latex class but I am a newbie with Latex and I need to parse a command like that \author{First Middle Last} into a new one \author{Last}{First Middle}. I cannot provide the \...
  • 101
4 votes
3 answers
239 views

Macro to capitalize all letters and change breaks to underlines

I'm trying to make a macro that will take an input phrase, capitalize all letters, and replace all breaks with underlines: \ctest{one word} => ONE_WORD I've been trying to use the stringstrings ...
1 vote
1 answer
67 views

stringstrings package redefines math symbol(s)

I am loading stringstrings package in my document and the double vertical bar \| (in math mode) is printed as |0 (single vertical bar followed by zero). I checked the stringstrings.sty file and ...
  • 687
2 votes
2 answers
308 views

substring with calculated end position

I have a string and I would like to use only the first part of the string up to a specific position. So I wrote the \stringpart command using strinstrings' functions. The position of the searched ...
2 votes
3 answers
339 views

How to use stringstrings to include braces in to-string

Macrons in LaTeX are typset with '\=' preceeding the character, for example '\=o' creates an 'o' with a macron. I would like to use stringstrings to define a newcommand to replace all '/' characters ...
  • 41
5 votes
1 answer
3k views

Automating Title Capitalization in Sections, Subsections, etc

I'm trying to automate the capitalization of titles in sections, subsections, etc. Basically, I'd like to format every title with \capitalize from the stringstrings package. One approach I've tried is ...
  • 311
10 votes
2 answers
2k views

Title case an acronym

Sometimes in my document I wish to use an acronym. Sometimes I want the acronym to appear in title case (for example if it appears in a title).* *I need this to work in all environments, not ...
  • 267
2 votes
1 answer
377 views

Character replacement in unicode string

I need a command to replace (erase) the characters · and | from a string. Consider the following naive code: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \...
4 votes
2 answers
1k views

Replacing braces in strings

I know I should probably not want to, but say for the sake of discussion that I wanted to remove braces from a string for some purpose (background, now obsolete). From its package description, ...
  • 5,693
6 votes
4 answers
703 views

How to match last substring

I am working on displaying source code for which I pass a path to a macro. Now I am wondering if it is possible using xstring or stringstrings to match from after the last delimiter, i.e. / to the end ...
5 votes
2 answers
303 views

Format a variable in math mode dependent on its case

I have a special kind of variable in my equations which I want to be formatted dependent on its case (lower or upper). I already tried using the package stringstrings, but there seem to be problems ...
3 votes
2 answers
223 views

Trouble using convertchar and thestring inside a LaTeX command or table

I'm trying to generate page references inside a command that defines a row of a table, with the name of the label being referenced generated as a result of some string maniupulation using ...
3 votes
2 answers
759 views

Converting an underscored string to camelcase

I would like to take a string containing underscores and convert it to CamelCase. I am attempting to do this using the stringstrings package. Here is my code: \documentclass[11pt]{report} \usepackage{...
3 votes
1 answer
794 views

Remove two words

I'm writing a description of a method, where the title of each section is formatted like Step X: <step title>. Now, I want to reference the section as Step X ("<step title>"). I am aware ...
  • 2,862