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 [active-characters]

The tag has no usage guidance.

1
vote
1answer
28 views

Babel shorthands not working with `beamer` class (quotation mark not recognized as active character)

For the German language the babel package defines a set of shorthand commands that I use quite often. They all start with a quotation mark (") which is redefined as an active character. In detail, I'm ...
3
votes
1answer
128 views

Character choice for csquotes active quotes

We all know csquotes and the multiple facilities it provides for displaying quotations and related content. One feature I'm particularly fond of are the active quotes, using \MakeAutoQuote. That's ...
0
votes
1answer
32 views

Use of \NoAutoSpacing inside a macro

I would like to locally deactivate the colon character (made active by babel package used with frenchb option). But it appears to not work within a macro: \documentclass{article} \usepackage[frenchb]{...
1
vote
1answer
39 views

glossaries and csquotes: how to use autoquotes in gls description?

I am trying to get csquotes's \MakeAutoQuote to work with glossaries - no luck so far. The defined autoquotes are simply not active anymore by the time the description is read. Here is the MWE: \...
5
votes
1answer
73 views

How can I fix active quote mark characters on update to TL 2018? [duplicate]

MWE: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{csquotes} \MakeAutoQuote{‘}{’} \MakeAutoQuote*{“}{”} \begin{document} Hylo \end{document} This code works fine with pdfLaTeX ...
4
votes
2answers
81 views

Code redefining ampersand stops working when put in command

I want to redefine & in a command. I tried to adapt this code that redefines ^ in an environment but couldn't make it work. \documentclass[]{article} \begin{document} \newcommand{\myampersand}{?}...
2
votes
1answer
87 views

Conflict of active strings in WinEdt

I am using WinEdt 10.2. I designed two active strings which do the following jobs. One active string automatically changes "\c?}" into "\mathcal{?}" if ? is a single uppercase letter and does nothing ...
1
vote
2answers
60 views

Remap single character within fontstyle definition

I have created a font from otf using autoinst to typeset some chord symbols in TeX. This font is designed (by its creator) to map character positions to certain musical symbols, like the small latin ...
1
vote
0answers
64 views

Deactivating an active character

How do I deactivate an active character? The following works without the activizations in the preamble, but not with them, in spite of my attempt to reset the catcode of : to 12. \documentclass{...
2
votes
1answer
148 views

How to map special characters in CSV to something else when processing via datatool

The datatool user guide mentions that certain special characters are automatically mapped to the typesetting equivalent when loading a database in raw mode (via \DTLloadrawdb). If you want to change ...
8
votes
1answer
162 views

LuaTeX analogue of \ifcsname for active characters

In pdfTeX or XeTeX the following code runs through active characters and eventually produces an error such as Invalid code (1114112) (but with 256 in pdfTeX). \catcode`*=13 % active \count0=32 \def\...
5
votes
1answer
240 views

Why is \active defined as \char13 (and not 13)?

In plain TeX, we have \chardef\active=13 \catcode`\~=\active I thought a catcode should be assigned a number between 0 and 15, but \active is \char13. So how does it work? Would \catcode`\~=13 also ...
12
votes
3answers
1k views

How to deactivate % as special character?

Background: I use LaTeX to display data that are automatically produced. I cannot manually change the raw data (since they are frequently updated). But this raw text contains LaTeX's special ...
3
votes
1answer
132 views

redefine caret ^ while using mathtools package

consider the following MWE: \documentclass{article} %\usepackage{mathtools} \newcommand\newCaret{X} \catcode`^=\active \let^=\newCaret \begin{document} $x^2$ \end{document} this works fine, ...
5
votes
2answers
115 views

How to make active characters work differently in mathmode and text mode?

Still learning about active characters, catcodes, mathcodes, and such. I know how to make *hello* produce bold in text mode and $x$ produce a bold $x$ in math mode. I also know how to make *{hello}...
8
votes
2answers
75 views

How can I conditionally designate an active quote in csquotes.cfg?

How can I conditionally designate an active quote in csquotes.cfg so that no error is produced if the same character is made into an active quote in the .cfg and the document's preamble? I have the ...
6
votes
1answer
208 views

How to use comma-separated argument list in Verbatim environment?

When I try this: \documentclass{article} \usepackage{fancyvrb} \usepackage{xcolor} \begin{document} \begin{Verbatim}[commandchars=\\\{\}] \textcolor[RGB]{255,0,0}{test} \end{Verbatim} \end{document} ...
7
votes
2answers
234 views

'Missing \begin{document}' when using the \lowercase trick

Mostly for fun, I'm trying to make % comments manipulatable using the \lowercase trick. For some reason, I'm getting a strange (to me) error: ERROR: LaTeX Error: Missing \begin{document}. --- TeX ...
3
votes
1answer
161 views

How avoid “\T1\ss ” as output from \immediate\write and get ß?

\usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[ansinew]{inputenc} ... \newwrite\outfile \immediate\openout\outfile=\jobname.txt % aßbc is a replacement for a long german text-block, ...
4
votes
1answer
119 views

LuaLaTeX : passing test condition n~=3 to lua as macro parameter problem

I try to pass lua test condition as latex macro parameter and have a problem in case of ~= with the next error message. How to avoid that. ! LuaTeX error [\directlua]:1: invalid escape sequence ...
6
votes
2answers
285 views

Replace digits by arbitrary symbols

I want to write some macro that replaces all digits in its argument by previously defined symbols or macros. I envision something like \overrideDigits{1234567890} which should expand to something ...
1
vote
1answer
381 views

Modify catcode in the preamble or in the \AtBeginDocument?

I want to modify the catcode of comma, with the following code \documentclass{article} \AtBeginDocument{% \catcode`\,=\active \protected\def,{...}% } \begin{document} a,b,c $a,b,c$. \end{document}...
2
votes
1answer
163 views

Argument until non-alphanumeric character

Not sure if this is possible or not... I would like to turn (say) + into a command with one argument without braces. This argument should be everything following the + up until the first non-...
2
votes
1answer
514 views

babel's active " making problems in math mode

MWE \documentclass[norsk]{beamer} \usepackage[utf8]{inputenc} \usepackage{babel} \usetheme{Warsaw} \begin{document} \begin{frame} ``forkaster hypotesen om at $P(\text{"mynt"})=0,5$''. \end{frame} ...
4
votes
1answer
134 views

How can I use the ampersand (&) as a delineator for tabs in LaTeX3 (expl3)/xparse syntax?

This idea evolved from the question: How can I get a count of the optional arguments with xparse? Problem I cannot get the ampersand to function as a delineator (for tab stops) inside the \...
3
votes
1answer
565 views

How to make hyperref work with bibitem keys containing a colon and using babel french option?

As seen in this thread, the \cite command bugs when the selected language is French and a bibitem key contains a :, which is an active character in babel french. Indeed, concerned hyperlinks always ...
1
vote
1answer
189 views

Error in some rare circumstances: babel with french option after listings, active character in moving argument, code in listing across pages

Edit: I have edited my question which initially wrongly focused on labels. This question is related to Code in \lstlisting breaks document (compile error). Let us consider the following MWE: \...
10
votes
1answer
304 views

Why does \def@#1\space not work?

The code \documentclass{article} \begin{document} \begingroup \catcode`@\active \def@#1\par{<#1>} @some text \endgroup \end{document} works flawlessly. Why not so when I replace it by the ...
21
votes
3answers
2k views

Use Markdown-style formatting for bold and italic

I rather like the system here where *...* is italic, **...** is bold, and ***...*** is bold italic. Is it possible to do that in (La)TeX? A MWE that implements the first one: \documentclass{article} ...