26k views

### What is the use of percent signs (%) at the end of lines?

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?
3k views

### When is it harmful to add percent character at end of lines in a \newcommand, or similar

Since egreg has graciously agreed to not comment at least for a day to When not to use \ensuremath for math macro? :-), I thought I would take advantage of that and post a question about another (non-...
10k views


3k views

### \newenvironment issues with environment comment

I am trying to setup the formatting for a LaTeX document (it's got the class memoir), so that it would be fairly simple to add to it in the future. Two of the features I'd like are: Be able to mark ...
4k views

### Remove space before colorbox

I've made the command \newcommand{\pink}[1]{\colorbox{red!20}{#1}} to highlight in pink. It works fine for words and sentences, but if I want to highlight a subpart of a word, e.g. laugh\pink{ing} ...
9k views

### Including all files within a directory [duplicate]

Possible Duplicate: How to iterate through the name of files in a folder Using \input{filename}, I can input a file canned "filename.tex". I have a directory containing all of the files I want to ...
964 views

### How can I avoid whitespace after a macro which takes arguments?

I have a macro that (simplified) is defined like this: \newcommand{\mymacro}[1]{ %use #1 \par\noindent% } I'd like to be able to use it like \mymacro{Arg 1} Beginning of paragraph ...
2k views

### hfill alignment doesn´t work

I used the code below to format some information but the last line before the red line is not right aligned. I can`t find the problem in the code. Any suggestion? Thanks. \documentclass[11pt,a4paper]{...
510 views

### Summary of TeX Capacity Limits

I seem to often run into capacity issues and have been upping the limits each time. There are several question on this site pertaining to these. However, there seems to be some conflicting information ...
486 views

### macro for custom indexing with conditionals and text recognition

I was unable to solve this by myself and by searching this wonderful site. The problem is with indexing. I still consider myself as a LaTeX newbie :) The situation: - I'm working on an english book ...
2k views

### Line Arrows for Tabular Integration Table

I've recently reviewed this question to try to make a table for Integration by parts: Tabular integration by parts I tried using the code sample from it but LaTeX gives me a rendering error with ...
2k views

### Unwanted spaces

The code given just after produces extra unwanted spaces indicated in the following picture. How can I fix it ? Sorry for the colors, this choices will be changed later when technical issues will be ...
507 views

### Macro to insert formatted text: def, let or what?

I want to insert formatting text with a single command (I know the text beforehand): {\addfontfeature{LetterSpace=20.0}Решение}\ How do I "bind" it to a macro? I tried: \def\sol#0 {{\...