GeneralHow to print out '[' and '#' contained in documents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
microbit
Posts: 1
Joined: Sun Sep 08, 2013 11:33 pm

How to print out '[' and '#' contained in documents

Post by microbit »

I am sorry to ask such a stupid question. I am just beginning to learn LaTex. I try to print the '['and '#'out in my document, but I can not work it out. The text is like this: "[Q & P], #1, #2, #3." Wish to get help from some masters. THX!!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

How to print out '[' and '#' contained in documents

Post by nlct »

The open square bracket [ shouldn't cause a problem, unless it follows a command that can have an optional argument. The ampersand & and hash # are special characters and need to be escaped:

Code: Select all

[Q \& P], \#1, \#2, \#3.
Regards
Nicola Talbot
Post Reply