Linked Questions

38
votes
8answers
9k views

No space following macro without argument [duplicate]

With a macro such as: \def\naive{na\"{\i}ve} I find that the space which I would hope to follow it, is absent. So, with the \naive approach I get the naïveapproach in the output. How do I ...
2
votes
2answers
2k views

Create Blank Space after special character at end of a word [duplicate]

I am writing part of a text where i need danish encoding/characters. The main language however is english. So i choose to add the special chars in textmode. I am facing now the problem that if a word ...
2
votes
1answer
2k views

Insert a space after a command: {}, vs \ , vs \space [duplicate]

I'm used to insert a space after a command by using the {}, e.g. \mycommand{} some other text, in order to circumvent the space-gobbling of commands. I'm wondering if it's best or what are the ...
2
votes
1answer
841 views

how to use tags or symbols in latex? [duplicate]

I am writing report using Latex software but I got stuck while using tags. consider a statement( for example): for any A ∈ Γ, B ⊆ A implies B ∈ Γ. The traditional (t, n) threshold secret sharing [...
2
votes
2answers
390 views

why is there no space after \sc when using it as a macro? [duplicate]

Here is a MWE that explains it: \documentclass{article} \newcommand{\scmacro}{{\sc macro}} \begin{document} why is there no space after \scmacro even though there is space in the document? \end{...
1
vote
0answers
937 views

New command without arguments in LaTeX [duplicate]

I'm using the devanagari package to typeset Hindi/Sanskrit alphabet in LaTeX. I have defined commands like \newcommand{\S}{{\dn saa}}, \newcommand{\R}{{\dn re}} etc. From a usage point of view, I ...
3
votes
0answers
879 views

How to insert a space after a substitution of a variable or a command? [duplicate]

I am trying to learn how to define commands (\newcommand) and variables (\def) in LaTeX. When I try: \def \new {$new$} or \newcommand{\new}{$new$} and substitute it in the text: \documentclass{...
1
vote
1answer
268 views

Spacing after alias [duplicate]

I'm not sure whether I am repeating an already existent question or not, but I'd like to know how to approach the following situation: I want to define a macro to be an alias to some word or fragment ...
2
votes
1answer
406 views

Space lost after \newcommand [duplicate]

I use the initialism "CE" a lot in my thesis, both in an out of equations. I find that the letters are too far spaced for my liking when used in an equation, so I use the \! command to reduce the ...
2
votes
1answer
184 views

Error in spacing when using custom command [duplicate]

Possible Duplicate: Space after LaTeX commands I`ve made a few very short commands, and they work, alas the spacing after them is wrong. \newcommand{\yaksen}{$y$-aksen} \newcommand{\xaksen}{$x$-...
0
votes
0answers
215 views

Declare macro for simple text snippets [duplicate]

I want to use something like this: \newcommand{\favouritealgorithm}{\texttt{Gaussian elimination}} so that My favourite algorithm is \favouritealgorithm written in C. produces My favourite ...
5
votes
0answers
143 views

How to define a macro which does not read the next token after itself? [duplicate]

In LaTeX, I would like to define \newcommand{\ACROeg}{e.\,g.} This is a sample sentence, \ACROeg it does not make much sense. but this yields This is a sample sentence, e.\,g.it does not make ...
0
votes
1answer
183 views

No space after the word when I defined a macro, bug? [duplicate]

I defined a macro but I found the word spacing is gone. Am I missing something? \documentclass[11pt, oneside]{article} \newcommand{\abc}{$abc$} \newcommand{\abcSpace}{$abc$ } \begin{document} Word ...
0
votes
1answer
152 views

Command with a space after it [duplicate]

Is it possible to define a command \MyCommand which does not swallow the next space (standard) but inserts a real space after itself only if the next symbol followed by it is a real space-symbol or CR?...
0
votes
1answer
146 views

How to keep chemical formulas on the same line using chemmacros? [duplicate]

I often refer to some chemicals often in my document (e.g. NH415NO3) and I keep getting line breaks in the middle of the chemical formula (e.g. if NH415NO3 comes at the end of a line, sometimes NH4 ...

15 30 50 per page