5
votes
1answer
41 views

Formatting a comma separated list of values

I'm creating a set of mathematics worksheets, and I'd like to have an upside down "answer key" below a set of enumerated questions. Here is what I have at the moment: \usepackage{graphicx} Answers: ...
10
votes
2answers
450 views

Why are these commands considered as bad practice?

I was reading LaTeX: Do not use these commands, but the author didn't explain why they are bad. Could anyone help me understand. \\ (except inside a special environment like tabular, array, or ...
10
votes
3answers
304 views

Examples of list macros in plain TeX

I'm writing macros to typeset lists in plain TeX. Please can you suggest some examples of macros for numbered lists? I'd prefer examples from "living code", from CTAN packages and so on. But any kind ...
3
votes
2answers
71 views

How can I customize this code for signature line to fit a specific format?

Found a nice piece of code here dynamic signature/date line and modified it to this: \newcommand*{\DateAndSignature}[1]{% ..\newline \par\noindent\makebox[2.25in]{Musterstadt, den}{\hrulefill} ...
8
votes
1answer
118 views

\newcommand defined for declarative formatting works for \it but not \textit or \emph

I defined this \newcommand for binomial genus/species names, which should be in italics: \newcommand{\taxon}[1]{{\it #1}} For whatever reason, it only renders the relevant text in italics if I use ...
11
votes
3answers
684 views

Reusing LaTeX code to achieve a consistent layout

What is the best approach to reusing the same layout for numerous tables, paragraphs etc. which share the same structure but different content? Is the best method to use custom commands/macros?
6
votes
1answer
84 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 ...
13
votes
3answers
347 views

Remove formatting

I currently use latex newcommand to store (and format) "variables", like so: \newcommand{\someVariable}{\emph{value}} I do this for key words that I want to be formatted a certain way every time ...
4
votes
1answer
286 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} ...
10
votes
2answers
451 views

Replacing all dots in a document

I want to replace all dots in a LaTeX document with a call to a macro. Just doing a search and replace on '.' won't help as this will not replace the dots generated by LaTeX, e.g. in section numbers, ...
10
votes
5answers
185 views

Best way to have two kinds of formattings for my documents?

I would like to produce two kinds of formattings for my documents. The 1st formatting will use colors. This is typically for reading on a screen. The 2nd formatting will use gray colors for ...
5
votes
1answer
151 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 ...
8
votes
2answers
427 views

Change the behavior of carriage return

Define an enhance verse environment, where stroke Carriage return key once make a \\, twice make a \par, three times make a \medskip, four times and more make a \bigskip. An example would be: ...
1
vote
1answer
147 views

What is the best way to setup this statblock as a macro?

I'd like to get a macro setup for this statblock format. Basically, I will be converting an XML document containing the data for the instances within the document. This is a sample of the format I am ...
4
votes
2answers
1k views

Grey box code and lists

I've got that code from a website to make grey areas in my LaTeX document. % http://www.alfredklomp.com/programming/tex/macros/ \long\def\greybox#1{% \newbox\contentbox% \newbox\bkgdbox% ...
7
votes
2answers
825 views

Define an “escape underscore” environment

I am writing a text document in LaTeX where I need a lot a words with underscores: foo_bar_1, more_bar_2_long_expression_3. I know about the underscore package, but for some reason the [strings] ...
27
votes
6answers
881 views

How do I typeset morse code with LaTeX

I am writing an article regarding the history of the Morse code and I am having difficulties printing the dots and dashed (they get combined when the document is printed). Is it also possible to ...
25
votes
3answers
2k 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 ...
4
votes
1answer
69 views

Command for formatting a special term

How can write a new command which formats a certain 2-word-term always in a special font, all uppercase, with the line-height of the uppercase characters being the same as the line-height of down-case ...
4
votes
2answers
274 views

Position line in a resume

I am new to LaTeX, and I want to create a command that will display my previous positions formatted appropriately in a resume. The format I am looking for is this: 02.07.2009 - 02.07.2010 ...
12
votes
4answers
922 views

Replace . (period) by , (comma) in numbers

I pass a bunch of numbers into a custom command defined via \newcommand{\mycmd}[1]{...}: \mycmd{1.12} \mycmd{5.32} \mycmd uses the number to draw a certain figure. On top of that, I would like to ...
21
votes
1answer
1k 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 ...