6
votes
1answer
121 views

Why to use [T2A, T1] when [T2A] is enough?

I am writing some seminar in Cyrillic for university \documentclass[a4paper,14pt]{extarticle} \usepackage[T2A,T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{droid} ...
3
votes
1answer
716 views

\newenvironment where all text is typewriter (like \texttt)

I'd like to have an environment that encloses all its content into the typewriter font as \texttt{} does. However, I do not want to use \texttt{} but an own environment, e.g. \begin{allintypewriter} ...
2
votes
1answer
70 views

Suppress fontaxes warnings

I'm using MyriadPro. When compiling, I'm getting a lot of fontaxes warnings: Package fontaxes Warning: I don't know how to decode (fontaxes) family `cmr' on input line 632. I ...
6
votes
1answer
187 views

Macro to calculate \baselineskip for given font

I want to write a macro that returns the \baselineskip multiplied with a fixed value for a given font spec. That seems to be harder than I would imagine... after some fiddling I came up with this: ...
3
votes
1answer
94 views

Change \newcommand behaviour based on the environment

I'd like to define a command \Lm, such that if used in a maths environment it is replaced with \mathcal{L}, but when used outside of the maths environment it would be replaced with $\mathcal{L}$. This ...
7
votes
2answers
245 views

What does \s! do?

1st example: \starttypescript [\s!serif] [paratype] \definefontsynonym [ParatypeSerif-Regular] [\s!name:PTSerif-Regular] [\s!features=\s!default] \definefontsynonym [ParatypeSerif-Italic] ...
6
votes
4answers
417 views

UTF-8 (but not in current font) character in newcommand

I'm trying to define a new single-character LaTeX command (to insert a 1 pt space with \kern1pt) and want to use one of the characters obtained through the AltGr key on a US International keyboard ...
7
votes
1answer
850 views

cool package derivative and eulervm \mathbold fails with 'Missing control sequence inserted.'

Compiling \documentclass{article} \usepackage{cool} \usepackage{eulervm} \begin{document} $\D{a}{T}$ $\pderiv{a}{T}$ $\mathbold{T}$ $\D{a}{\mathbold{T}}$ $\pderiv{a}{\mathbold{T}}$ ...
5
votes
1answer
290 views

Getting incorrect underscores from macro in an lstlisting

I have a macro that I define as \newcommand{\versionPath}{5\textunderscore0\textunderscore7} to denote the word *5_0_7*, which I use in lstlisting's like this: \begin{lstlisting} ...
8
votes
2answers
371 views

What exactly does \DeclareOldFontCommand and \DeclareRobustCommand do?

In the article class appears the following code related with the font selection: \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} ...
7
votes
1answer
89 views

Detect markers in macro arguments

I'd like to find a way to define a command which would work like this \mycommand{This +is+ a +simple example+.} and give This is a simple example. i.e a command which looks for words ...
6
votes
3answers
594 views

New paragraph style for newbie

This question may have already been asked, but with all of my searching, I couldn’t find it. I am new to LaTeX and after a few rough starts, I am finding my way. I am using this tool to create ...
4
votes
1answer
537 views

textbf+UpperCase title

I would like to make a section title UpperCase+textbf, however, while trying to define it like this \makeatletter \renewcommand{\section}{ \@startsection {section}{1}{0mm} ...
18
votes
1answer
496 views

Why use \DeclareTextFontCommand vs. just \newcommand?

Why should I use \DeclareTextFontCommand vs. just \newcommand? In the answer to my previous question, @egreg said: With \DeclareTextFontCommand you get a robust command that will remain ...
2
votes
2answers
118 views

A macro that behaves like a font-changing command (affects the rest of the current group)

Many LaTeX packages provide an interface to modify the typesetting of certain elements with the standard "parameterless" font commands, such as \bfseries, \sffamily or \color{red}. All of these ...
5
votes
3answers
408 views

Turning font-changing macros into font-changing “switches”

I want to turn a font-changing macro into a "switch" (I found the term in this answer), making macros like \macro{Text to be changed} work within the brakets, like {\switch text to be changed}, ...
5
votes
1answer
222 views

Changing the font for a custom environment

I can't figure out how to embed a command like \textbf or something in a newly created environment, I have: \newenvironment{definition} {\begin{quote}} {\end{quote}} I want to customize my ...
1
vote
1answer
385 views

How to create newcommand with Sanskrit Fonts

How to change font size in verse environment? I am working with these fonts (i.e. Aksharyogini / Nakula / Sanskrit 2003) When i replace \bfseries with any one of these I get error, what am I doing ...
4
votes
1answer
171 views

Defining a command that distinguishes between greek and roman letters?

I'm using pdftex and I want to define a command for the typesetting of quantum mechanical operators that produces upright letters with a \hat accent. The problem is that the obvious solution ...
2
votes
1answer
623 views

Verbatim text can't be shown correctly in pdf

I try to change the font of verbatim text as below % Used by @verbatim ... @endverbatim \newenvironment{DoxyVerb}{% \verbatim% \fontencoding{OT1}\fontfamily{ptm}\fontseries{m}\fontshape{n}% ...
14
votes
5answers
11k views

\textbf{text} without increasing the length of the text

When using \textbf{text}, the length of text will be increased. Is there a way to make the text bold face without increasing its length? edit: Thanks to @Herbert and @Martin, here is a perfect ...
4
votes
1answer
222 views

How to use different font and shape characters properly in headers?

I'm using Kpfonts for the text of my documents, but I'd like to use the Computer Modern italic ampersand in my headings. To this end, I've defined a command \amp to insert the proper character. The ...
34
votes
3answers
4k views

Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?

I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font ...
28
votes
1answer
2k views

Why Different Commands for Seemingly Similar Tasks?

Take a look at the following list: \textit, \it, \emph, \itshape, \mathit \textbf, \bf, \bfseries, \mathbf ... One might say, for instance, that: \mathbf and \mathit are for math mode, while the ...
10
votes
3answers
2k views

How to use \bigtimes without pain

I've been fighting with mathabx lately and it's not really worth my time, so I tried switching to MnSymbol which also modifies some of my regular symbols. Is the best solution just to make my own ...
6
votes
3answers
2k views

How to create a newcommand for fontsize?

I am trying to create a command to modify fontsize with one parameter, it seems that the paramater is not expanding properly: \newcommand{\mycfs}[1]{\fontsize{#1pt}{1.2*#1pt}}
14
votes
3answers
1k views

Can I change the font and colour of a letter permanently?

For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, e ...
3
votes
3answers
453 views

Writing bold small caps with mathpazo package

The URW Palldio font (mathpazo package) does not provide bold small caps. To get round this issue, I'd want to make a macro to use small caps usually and normal caps in bold text. I tried this code: ...