I tried to create my own hand-made symbol by modifying the standard symbol "{".  It works... but not always. LaTeX barfs at me when my hand-made symbol is inside a caption environment in a figure.  \documentclass{report}  \newcommand{\bmark}{\raisebox{.53ex}{\rule{.2em}{.1ex}}} \newcommand{\bopen}{{\ooalign{\{\cr\hfil\bmark\hfil\cr}}}  \begin{document} \begin{figure} \caption{My caption. $\bopen$} \end{figure} \end{document}   How can I fix this? Is there a better way of doing this?
123956
I am trying to implement a custom version of the \ref command. I found out that in order for me being able to redefine this command I need to do so via \AtBeginDocument as otherwise my change seemed to get overwritten by something else.    It works now as expected except when using \ref inside a \caption which will produce the following error:  Argument of \@caption has an extra }. \caption{Test here \ref{sec:Section}} Paragraph ended before \@caption was complete. \caption{Test here \ref{sec:Section}}   Here is a MWE reproducing the problem:  \documentclass{article}  \usepackage{xstring}  \AtBeginDocument{%     \let\refCopy\ref     \renewcommand{\ref}[1]{%         \IfBeginWith{#1}{eq:}{             (\refCopy{#1})         }{         \refCopy{#1}     } } }  \setcounter{errorcontextlines}{999}  \begin{document}     \section{Section}     \label{sec:Section}      \begin{figure}         \caption{Test here \ref{sec:Section}}     \end{figure} \end{document}   If I remove my custom implementation of \ref the document compiles just fine.    What is causing this problem and how can I avoid it?
103836
I want to change the function of some commands consisting of only one letter, such as \e or \i, and make them abide by MY rules. (Mouhahaha!) I have done this before with other commands like \in or \=, but it seems that one-letter commands are special for some mysterious reason.  In particular, I'd like to make a new command \i to use it in math-mode, but this produces an error.  Here is just a part of my document:  \documentclass[12pt]{article}  %   % symbols \let\i\undefined \newcommand{\i}{\mathrm{i}}   % begin languages \usepackage[LGR,T1]{fontenc}   \begin{document}  $\i$ $i$ i  \end{document}   I get the error  Command \i invalid in math mode   The .pdf file is, nevertheless, produced and \i appears as the greek letter beta. I tried other ways (which now I cannot recall) that had \i to appear as a dotless i instead of beta.  And why don't I get the same error with \e that also has a predefined meaning?
99731
In the question , there was an answer to how to place additional sign over the equal sign. And my question is, what if I also want to have some symbol/text under the equal sign? Or if I want to use \stackrel to label my equal sign that follows an tab alignment character (&amp;=)?
92361
I am trying to insert the symbol in the title of the question, which I copied from a PDF article, but it appears as space in the output file. What is the corresponding LaTeX command?
118393
I'm trying to insert a figure into my LaTeX file using the following syntax:  \begin{figure}   \centering   \includegraphics [width=3in]{fig1.png}   \caption{Calculation of shortest path betweenness}   \label{Fig.3:Shortest path betweenness} \end{figure}   It worked for me before but this time I'm getting the following error:   LaTeX Error: \begin{figure} on input line xxx ended by \end{document}   Also, hovering over the red cross symbol indicating error in Eclipse, I see this message    paragraph ended before Gin@iii was completed.   It's obvious that I have the \end{figure} to end my \begin{figure} so I don't understand how I still get that error.  Can someone please tell me what the problem is?  Edit: Add more details for debugging. The problem went away if I remove '[width=3in]'. Here is the detail error:  pdflatex&gt; Runaway argument? pdflatex&gt; width=3in]{fig1.png} \caption {Caption} \label {Fig.1}  pdflatex&gt; ! Paragraph ended before \Gin@iii was complete. pdflatex&gt; &lt;to be read again&gt;  pdflatex&gt;                    \par  pdflatex&gt; l.40  pdflatex&gt;        pdflatex&gt;  pdflatex&gt; Underfull \vbox (badness 10000) has occurred while \output is active pdflatex&gt; (./document.bbl pdflatex&gt;  pdflatex&gt; Package natbib Warning: Empty `thebibliography' environment on input line 3.   Added sample code:  \documentclass[10pt,psfig,letterpaper,twocolumn]{article} \usepackage{geometry} \usepackage{graphics} \usepackage{setspace} \usepackage{natbib} \usepackage{verbatim} \usepackage[scaled=0.9]{helvet} \singlespacing \paperwidth 8.5in \paperheight 11in \oddsidemargin 0in \headsep 1.3cm  \geometry{left=0.75in,top=0.75in,right=0.75in,bottom=1in} \textwidth 7in  \textheight 9.25in \columnsep 0.4in \footskip 0in  \renewcommand{\bibname}{REFERENCE} \pagestyle{empty}  \begin{document} \bibliographystyle{acm}   \title{\fontfamily{phv}\selectfont{\huge{\bfseries{Title here}}}} \author{ {\fontfamily{ptm}\selectfont{\large{\bfseries{author name}}}}\thanks{contact info }}  \maketitle \thispagestyle{empty}  \section*{\fontfamily{phv}\selectfont{\normalsize{\bfseries{Section name}}}}  \begin{figure} \centering \includegraphics[width=3in]{fig1.png} \caption{Caption} \label{Fig.1} \end{figure}  \pagebreak[4] \vspace*{5.52in} \bibliography{ref} \end{document}
83071
This is a follow-up to .  Suppose you want to denote vectors by upright bold letters; then \mathbf{u} works fine, except that if it's a Greek letter you have to use \boldsymbol{\omega} instead.  Question: Is it possible to define a generic vector command in LaTeX which automatically chooses between \mathbf and \boldsymbol, so that one can write just \vect{u} and \vect{\omega} without having to treat the Greek symbols specially by hand?  (Just to be clear: \newcommand{\vect}[1]{\boldsymbol{#1}} is no good in this situation, since \boldsymbol{u} gives bold italic instead of roman.)
65674
I would like to make a list of symbols and abbreviations without using any special packages like nomencl and alike. What I would like is just left-aligned two columns once for the symbols and one for the abbreviations.   Should I start with the following?  \begin{flalign*} Symbol_1 &amp;: Meaning of Symbol_1 \\ Symbol_2 &amp;: Meaning of Symbol_2 : : \end{flalign*}   Would be very grateful for any help!
72027
Normally, most people use the symbol $\Box$ to represent the  (including the linked to Wikipedia page).  Recently I wanted to use \hat\Box and \tilde\Box, but they do not render very well.    What is the "best" way to create such symbols?    Aside: The above image is rendered using my local install of pdflatex: pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian). The symbols seem to render fine on some online services: e.g. "" produces    from   \begin{align*} \Box &amp;= \sum_a \partial^a\partial_a \,, &amp; \hat\Box &amp;= \sum_a \mathcal{D}^a\mathcal{D}_a \end{align*}
64234
A number of related questions have already been asked about this issue:       and even    But I'm still confused by the conflicting suggestions that have been given so far. So I'm trying again.  Which should be the preferred command to produce a displayed equation in my LaTeX documents?  So far the suggestions indicate that one should use \[ ... \], maybe \begin{equation*} ... \end{equation*}, or maybe even the gather* or align* environments from amsmath.  And one should definitely avoid using either $$...$$ or the eqnarray environment.  Now I have to say that, from a language perspective, I have a strong preference for the equation* environment because it is less cryptic than the \[ ... \] notation and it is  the most accurate.  So, is it fine to use equation*? Maybe only after loading amsmath? Or should the equation/equation* environment be redefined to something else so that spacing, package support, or whatever is improved?
18001
I run Arch Linux with texlive version 2019.52579-1. When I compile the LaTeX (Beamer) code below the table caption is "Figure: A simple table." That is, it includes "Figure:" instead of "Table:". The problem does not occur when the subfig package is not used or when the deprecated subfigure package is used instead. Suggestions are welcome. Thank you.   \documentclass{beamer}  \usepackage[utf8]{inputenc} \usetheme{default}  \usepackage{subfig}  \begin{document}  \begin{frame}{A simple frame}  \begin{table}  \caption{A simple table.} \begin{tabular}{ll} \hline a &amp; b \\ c &amp; d \\         \hline                  \end{tabular}  \end{table}  \end{frame}  \end{document}
53580
This is difficult for me to explain, but how do I put words over a symbol? For instance, I want to add words over an equal sign. Anyone know the command/syntax for that?  Also adding ^ doesn't cut it..., I want the text to appear ON TOP.
102451
In the enumerate environment, an item begins with "[Co]image is..."  LaTex interprets the square bracket as a customized bullet symbol. How can I write [ without this glitch?
11225
I have a question about making an ending symbol.  It is a LaTex-default that every proof environment has an ending symbol. I want to make every theorem-alike environment such as the example environment have also an ending symbol. But how to manually set this up? Specifically, I want to make all these environments ended by a square symbol.  \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} \newtheorem{cor}[thm]{Corollary} \newtheorem{pro}[thm]{Proposition} \newtheorem{assump}{Assumption} \newtheorem{axiom}{Axiom} \newtheorem*{conj}{Conjecture} \theoremstyle{definition} \newtheorem{defi}[thm]{Definition} \newtheorem{exam}{Example} \newtheorem{exer}{Exercise} \newtheorem*{rem}{Remark} \newtheorem*{notation}{Notation} \newtheorem*{note}{Note}   I am looking for, with gratitude, a comprehensive setup.
8276
Does any one know if I can do this figure in Latex?  I know I can make the cube by the following code but how I can put that plan in the middle and write those numbers below it? \begin{figure} \begin{center} \caption{A labeled cube} \begin{tikzpicture}\label{f1} \foreach \n/\x/\l/\p in{ 1/{( 0  , 0)}/{$3$}/below, 2/{( 4, 0)}/{$4$}/below, 3/{( .8, 1)}/{$7$}/south east, 4/{( 4.8, 1)}/{$8$}/right, 5/{( 0, 4)}/{$1$}/left, 6/{( 4, 4)}/{$2$}/south west, 7/{( 0.8, 4.8)}/{$5$}/above, 8/{( 4.8, 4.8)}/{$6$}/above } {         \node[inner sep=2pt,circle,draw,fill,label={\p:\l}] (\n) at \x {};     } \draw (1) -- (2) -- (6) -- (5) -- (1); \draw (5) -- (6) -- (8) -- (7) -- (5); \draw (2) -- (4) -- (8) -- (6) -- (2); \draw[dashed] (1) -- (3) -- (4); \draw[dashed] (3) -- (7); \end{tikzpicture} \end{center} \end{figure}
28119
What is the "best LaTeX practices" for writing absolute value symbols?  Are there any packages which provide good methods?  Some options include |x| and \mid x \mid, but I'm not sure which is best...
97899
Suppose I have a map A → B which is an isomorphism. I'd like to represent this as something that looks like \rightarrow with \simunder it. I could try \underset{}_{}, but is there already a ready made symbol?  I couldn't find the symbol using Detexify, nor in the comprehensive list of LaTeX symbols.
93308
I want to do the not independent sign in latex without having to install or define new commands (since I am using latexIT and I cannot load new packages).  Currently I use the following sign for independent:  X{\perp\!\!\!\perp}Y   What can I use for X not independent of Y?  I.e., something like this: ?