0

All is in the title, there is a blank line between (1a.i) and (1a.ii). This happens when the line is long to the point it would soon break. Here the geometry package is used to set margins, which may have some impact.

\documentclass[12pt,oneside]{article}
\usepackage{philex}
\usepackage[margin=2.5cm]{geometry}



\begin{document}

\lb{examples}{
    \lba{inforx-ex}{
        \lba{inx-ex}{La destruction de la ville par l'armée en quelques heures nous a stupéfaits.} % Here the line is perfect but there is an unwanted spacing afterwards, probably because of \\ inside the package.
        \lbz{forx-ex}{Le chef de service à ordonné la surveillance du patient par les internes durant plusieurs jours.}}}
    

\lb{examples}{
    \lba{inforx-ex}{
        \lba{inx-ex}{La destruction de la ville par l'armée en quelques heures nous a stupéfaits.\nobreak}
        \lbz{forx-ex}{Le chef de service à ordonné la surveillance du patient par les internes durant plusieurs jours.}}}
    
    
    \lb{examples}{
        \lba{inforx-ex}{
            \lba{inx-ex}{La destruction de la ville par l'armée en quelques heures nous a stupéfaits.\vspace{-0.5cm}} % Manual solution, but really a last resort.
            \lbz{forx-ex}{Le chef de service à ordonné la surveillance du patient par les internes durant plusieurs jours.}}}
    
    \end{document}

enter image description here

7
  • 1
    I took a local copy of philex.sty and used an editor to put % at the end of every line (regular expression " *$" to %) and the spurious line went so this is an issue with the package. but that local fix would avoid i Mar 8, 2022 at 18:18
  • I tried this regular expression in TexStudio or TexWorks but it doesn't work. Mar 8, 2022 at 19:13
  • 1
    it worked for me, but try the endlinechar setting that egreg suggests in his answer Mar 8, 2022 at 19:16
  • I'm afraid nothing works. I've edited the file with Notepad++, adding a % at the end of everyline, then replaced the original philex.sty with the new one, even deleted the aux file, but nothing changes. Same for \endlinechar=-1 Mar 8, 2022 at 19:31
  • 1
    ah I tried that first but you also need to fix the package and the package should be efurther fixed to ignore space at the end of the input line. I think it is really a duplicate of the other one but i can re-open Mar 8, 2022 at 20:58

1 Answer 1

0

Ok, the answer is here (thank you very much to David Carlisle).

Two steps here :

    1. The package "philex" needs fixing.
    1. The line must be protected by a %.
  1. Patching

A. The easy way

You can do an on-the-fly patching by typing the following lines when loading the package :

\endlinechar=-1  %This removes any special ending character by trying to insert the character whose catcode is "-1" (there is no character whose catcode is "-1", so it will just remove the original character).
\usepackage{philex}
\endlinechar=13 %This adds % at the end of the relevant lines.

B. The permanent, low-level way (not recommended) :

  • open the philex.sty file in Notepad++, then use "search and replace" with the following regular expression :

" *$" (the space is very important, and don't include the quotation marks).

  • Replace everything with %.
  1. Now the problem gets solved by just adding a % just after the curly bracket at the end of the problematic line, and this is it.

     \documentclass[12pt,oneside]{article}
    
    
         \endlinechar=-1
         \usepackage{philex}
         \endlinechar=13
    
             \begin{document}
    
             \lb{examples}{
                 \lba{inforx-ex}{
                     \lba{inx-ex}{La destruction de la ville par l'armée en quelques heures nous a stupéfaits.}%  This is the % that changes everything.
                     \lbz{forx-ex}{Le chef de service à ordonné la surveillance du patient par les internes durant plusieurs jours.}}}
    
                 \end{document}
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .