1

I got a weird phenomenon as shown in the picture below. The equation numbering is indented. enter image description here

I tried the same thing in a fresh document and it produces the result I am looking for. For the other one, I wrap the align environment in a custom environment which inserts a glossary but does not tinker with any lengths. I was thinking of just setting the length which governs the left indent to a negative value. I just couldn't find its name.

% Working MWE
\documentclass[leqno]{scrartcl}

\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{lipsum}
\setlength{\parindent}{0pt} %globales \noindent

\begin{document}

\section{Test test test}
\lipsum[1]
\begin{align}
f_{h,rech} = \frac{f_{h,prim}}{\eta_h}
\end{align}
\lipsum[1]

\end{document}

Custom environment definition is this:

\newenvironment{alignglos}%
{\stepcounter{alignglos}%
    \renewcommand{\sym}[2][]{\glsadd[##1]{sym2:##2}\gls*[##1]{sym:##2}}%
}%
{%
   \noindent
    \glstocfalse
            \renewcommand{\glossarysection}[2][]{}%
            \vspace{-3em}
            \printglossary[type=symbols2,style=alignglos]
            \vspace{-2em}
}

I tried two things to solve this:
1.) Applied solution from this thread: Left numbered equation inside list environment
2.) \setlength{\mathindent}{0pt}

Update 1: Indentation happens also outside my custom environment.
Update 2: The indented length equals exactly to \parindent which I have set to zero (\setlength\parindent{0pt})
Update 3: Something I've overlooked. I'm using the \appendix command. Only happens after I used it. Before that everything is fine.

Sensei
  • 515
  • 1
    Try to add comment signs at the end of the last few lines of your environment's definition, e.g. \vspace{-3em}%. – lockstep May 24 '13 at 07:57
  • No luck so far. I guess you want to make sure I have no whitespace after the commands? – Sensei May 24 '13 at 08:01
  • That was indeed the idea. Too bad it didn't work. – lockstep May 24 '13 at 08:02
  • Please edit your second example to be a complete document that shows the problem. – David Carlisle May 24 '13 at 08:06
  • @David Carlisle I would very much like to do so. But I can't pinpoint the problem yet. My document is derived from this post: http://tex.stackexchange.com/questions/114621/custom-glossary-environment-improvement. But the MWE over there doesn't show the problem either. I'm working on it. Maybe you could keep your suggestions coming none the less. – Sensei May 24 '13 at 08:28
  • 2
    @Sensei don't start from a minimal example, start from a copy of the document with the problem and just delete packages and text, checking each time that the problem is still there, until you can not delete any more, then post the result. – David Carlisle May 24 '13 at 08:48
  • @David Carlisle Thats what I'm trying to do. Strangely enough the same thing happens to aligned equations outside my custom environments meaning the problem is most likely caused by one of my other settings. But still, no luck so far. – Sensei May 24 '13 at 16:26
  • I think we really need a full non-working example in order to be able to help you. – Hendrik Vogt May 25 '13 at 10:00
  • Im trying, but my project has gotten really complex :-(. Will need some time for this one. I'm supposed to make some progress on my paper still. If all else fails I am just going to disable leqno – Sensei May 25 '13 at 12:25
  • 1
    @Sensei: 3 updates an no minimal working example. Don't set parindent=0pt. This should be avoided. However without a MWE your question is too localised. – Marco Daniel May 25 '13 at 13:48
  • Its not that I don't want to produce one, I simply can't replicate the problem. I invested several hours already attempting to create an MWE. With the updates I simply try to keep track of my findings and maybe some naively hoping someone might have an idea. I'm aware that MWEs are helpful to everybody but if it takes more time than to write the actual paper I give up. – Sensei May 26 '13 at 00:28

0 Answers0