I am using the book class which (at least in my document) indents the first paragraph after a section. I tried to overcome this by redefining the section command as
but it has 2 problems.
1. It still leaves a thin space (equal to one character) at the begining of the first paragraph.
2. If I (accidentally) place a new line after \section command it again indents the paragraph.
Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum
yiorgosb wrote:I am using the book class which (at least in my document) indents the first paragraph after a section. […]
Since this is not the default behaviour, you should show this by a minimal example before trying to remedy. The below example doesn't show the described misbehaviour.
You were right. This example works well.
I found by trial and error the package causing the misbehavior.
It is the {xgreek} package which I had removed from the original example
as I didn't thought it could be the one causing the problem
since it is used specifically for the Greek language only.
Anyway, I post below an example including the "problematic" package.
Since I am only a novice Latex user I don't know how to find the particular line in the package that causes the problem.
Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum
Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum
yiorgosb wrote:[…] It is the {xgreek} package which I had removed from the original example as I didn't thought it could be the one causing the problem since it is used specifically for the Greek language only. […]
It's the object of building a minimal working example (MWE) to find out which part of the code causes a problem (if you follow the instructions). And it couldn't have done any harm if you would have told us that you compile with XeLaTeX.
Now that you found the culprit with the xgreek package, you should submit a bug report to the package maintainer. Don't forget to add a MWE to your report so that the maintainer instantly can comprehend the problem.
localghost wrote: And it couldn't have done any harm if you would have told us that you compile with XeLaTeX.
As I stated I am only a novice user and I don't know what matters and what does not.
My only purpose for excluding such info was not to burden you with useless (as seemed to me) lines of code.
Anyway, I apologize for the inconvenience. I'll follow your suggestion and file a bug.
So, coming back to the initial question.
Can I force with some way the first paragraph not to indent?
yiorgosb wrote:[…] As I stated I am only a novice user and I don't know what matters and what does not. My only purpose for excluding such info was not to burden you with useless (as seemed to me) lines of code. […]
Such things do not really depend on the level of experience. Here's just a short note from the list of avoidable mistakes [1].
localghost wrote:The problem depends on a certain processing, i. e. the compilation with pdfLaTeX. But this information is missing in the description of the problem.
It goes without saying that this also applies to the compilation with XeLaTeX.
yiorgosb wrote:[…] So, coming back to the initial question.
Can I force with some way the first paragraph not to indent?
Why not first wait for an answer of the maintainer? Perhaps he can offer a temporary patch until he releases the next version with the bug fixed.
Of course if you comment them in this file, your code will work fine with no first-paragraph indentation, but this is not a good solution, because the result will be different if you compile your file on another computer. So don't do it.
Unfortunately I'm totally unskilled in TeX programming and I don't know what to put in your .tex file to counter the effect, maybe a TeX guru can solve the problem now that it is clearly identified ? I would be interested in the solution too.
I'd like to know why the package author added these lines into the package code at all. The intended effect is also available with the indentfirst package and the »indentfirst« option for the titlesec package. And I'm surprised that the author considers these lines as "care for the basic rules of typography".