Message de confirmation pour le passage des indications de ligne en exposant dans REB + ne plus supprimer les espaces fines insécables

This commit is contained in:
Bastien Dumont 2021-05-04 12:50:02 +02:00
parent 79d14bb4a9
commit cbbdeb4733
5 changed files with 90 additions and 95 deletions

View File

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotFunctions" script:language="StarBasic" script:moduleType="normal">REM ***** BASIC *****
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotFunctions" script:language="StarBasic">REM ***** BASIC *****
'************************************************************************
'* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
'*
'* This file is part of the ApresZotero library.
'*
'* ApresZotero is free software: you can redistribute it and/or modify
'* it under the terms of the GNU General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'*
'* ApresZotero is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU General Public License for more details.
'*
'* You should have received a copy of the GNU General Public License
'* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
'*
'************************************************************************
&apos;************************************************************************
&apos;* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
&apos;*
&apos;* This file is part of the ApresZotero library.
&apos;*
&apos;* ApresZotero is free software: you can redistribute it and/or modify
&apos;* it under the terms of the GNU General Public License as published by
&apos;* the Free Software Foundation, either version 3 of the License, or
&apos;* (at your option) any later version.
&apos;*
&apos;* ApresZotero is distributed in the hope that it will be useful,
&apos;* but WITHOUT ANY WARRANTY; without even the implied warranty of
&apos;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
&apos;* GNU General Public License for more details.
&apos;*
&apos;* You should have received a copy of the GNU General Public License
&apos;* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
&apos;*
&apos;************************************************************************
Option Compatible
Option Explicit

View File

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotGlobalOptions" script:language="StarBasic" script:moduleType="normal">REM ***** BASIC *****
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotGlobalOptions" script:language="StarBasic">REM ***** BASIC *****
'************************************************************************
'* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
'*
'* This file is part of the ApresZotero library.
'*
'* ApresZotero is free software: you can redistribute it and/or modify
'* it under the terms of the GNU General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'*
'* ApresZotero is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU General Public License for more details.
'*
'* You should have received a copy of the GNU General Public License
'* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
'*
'************************************************************************
&apos;************************************************************************
&apos;* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
&apos;*
&apos;* This file is part of the ApresZotero library.
&apos;*
&apos;* ApresZotero is free software: you can redistribute it and/or modify
&apos;* it under the terms of the GNU General Public License as published by
&apos;* the Free Software Foundation, either version 3 of the License, or
&apos;* (at your option) any later version.
&apos;*
&apos;* ApresZotero is distributed in the hope that it will be useful,
&apos;* but WITHOUT ANY WARRANTY; without even the implied warranty of
&apos;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
&apos;* GNU General Public License for more details.
&apos;*
&apos;* You should have received a copy of the GNU General Public License
&apos;* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
&apos;*
&apos;************************************************************************
Public Const nExponentCharSizePercentage As Integer = 33
Public Const nExponentCharHeightPercentage As Integer = 58

View File

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotRevues" script:language="StarBasic" script:moduleType="normal">REM ***** BASIC *****
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotRevues" script:language="StarBasic">REM ***** BASIC *****
'************************************************************************
'* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
'*
'* This file is part of the ApresZotero library.
'*
'* ApresZotero is free software: you can redistribute it and/or modify
'* it under the terms of the GNU General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'*
'* ApresZotero is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU General Public License for more details.
'*
'* You should have received a copy of the GNU General Public License
'* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
'*
'************************************************************************
&apos;************************************************************************
&apos;* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
&apos;*
&apos;* This file is part of the ApresZotero library.
&apos;*
&apos;* ApresZotero is free software: you can redistribute it and/or modify
&apos;* it under the terms of the GNU General Public License as published by
&apos;* the Free Software Foundation, either version 3 of the License, or
&apos;* (at your option) any later version.
&apos;*
&apos;* ApresZotero is distributed in the hope that it will be useful,
&apos;* but WITHOUT ANY WARRANTY; without even the implied warranty of
&apos;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
&apos;* GNU General Public License for more details.
&apos;*
&apos;* You should have received a copy of the GNU General Public License
&apos;* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
&apos;*
&apos;************************************************************************
Option Compatible
Option Explicit
@ -56,20 +56,16 @@ Sub REB
AbbrevAnnee_Philologique(True)
&apos; Numéros de lignes en exposant sans &quot;l. &quot;
oSearch.SearchString = sLineRefRegex
oSearch.SearchRegularExpression = TRUE
oResult = oDocument.findAll(oSearch)
For n = 0 To oResult.count - 1
oFound = oResult.getByIndex(n)
oFoundCursor = oFound.Text.createTextCursorByRange(oFound)
oFoundCursor.CharEscapement = nExponentCharSizePercentage
oFoundCursor.CharEscapementHeight = nExponentCharHeightPercentage
Next n
MsgBox(&quot;Vous allez d&apos;abord être interrogé·e pour vérifier que les&quot; &amp;_
&quot; références aux lignes sont correctement reconnues. Chaque fois&quot; &amp;_
&quot; que vous répondrez OUI, elles seront mises en exposant. Dans un&quot; &amp;_
&quot; second temps, les chaînes de caractères “, l. ” seront supprimées.&quot;,_
0, mJournal)
SetStringPartToExponent(oDocument, sLineRefRegex, sLineRefRegex)
ReplaceString(sLineRefRegex, &quot;$1&quot;, TRUE)
SetFolioToPluralForm(&quot;f. &quot;, &quot;ff. &quot;)
ReplaceString(&quot;&quot;, &quot; &quot;, FALSE) &apos; Replace narrow non breakable spaces (automatically generated by Zotero) by simple non breakable spaces.
ReplaceString(&quot; - &quot;, &quot;-&quot;, FALSE)
SetStringPartToExponent(oDocument, sRectoVersoRegex, &quot;[rv](-v)?&quot;)
@ -81,5 +77,4 @@ Sub REB
HandleItemsInBibliography(&quot;Titre Liste des abréviations&quot;)
end sub
</script:module>

View File

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotUtilities" script:language="StarBasic" script:moduleType="normal">REM ***** BASIC *****
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ApZotUtilities" script:language="StarBasic">REM ***** BASIC *****
'************************************************************************
'* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
'*
'* This file is part of the ApresZotero library.
'*
'* ApresZotero is free software: you can redistribute it and/or modify
'* it under the terms of the GNU General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'*
'* ApresZotero is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'* GNU General Public License for more details.
'*
'* You should have received a copy of the GNU General Public License
'* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
'*
'************************************************************************
&apos;************************************************************************
&apos;* Copyright 2021 by Bastien Dumont (bastien.dumont@posteo.net)
&apos;*
&apos;* This file is part of the ApresZotero library.
&apos;*
&apos;* ApresZotero is free software: you can redistribute it and/or modify
&apos;* it under the terms of the GNU General Public License as published by
&apos;* the Free Software Foundation, either version 3 of the License, or
&apos;* (at your option) any later version.
&apos;*
&apos;* ApresZotero is distributed in the hope that it will be useful,
&apos;* but WITHOUT ANY WARRANTY; without even the implied warranty of
&apos;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
&apos;* GNU General Public License for more details.
&apos;*
&apos;* You should have received a copy of the GNU General Public License
&apos;* along with ApresZotero. If not, see &lt;https://www.gnu.org/licenses/&gt;.
&apos;*
&apos;************************************************************************
Sub CountOccurrencesPerReference
Dim vSortedItemMap As Variant