From cbbdeb473375ad879624632928c1c9d327dc33b1 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Tue, 4 May 2021 12:50:02 +0200 Subject: [PATCH] =?UTF-8?q?Message=20de=20confirmation=20pour=20le=20passa?= =?UTF-8?q?ge=20des=20indications=20de=20ligne=20en=20exposant=20dans=20RE?= =?UTF-8?q?B=20+=20ne=20plus=20supprimer=20les=20espaces=20fines=20ins?= =?UTF-8?q?=C3=A9cables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ApresZotero/ApZotFunctions.xba | 42 ++++++------- .../ApresZotero/ApZotGlobalOptions.xba | 42 ++++++------- .../LibreOffice/ApresZotero/ApZotRevues.xba | 59 ++++++++---------- .../ApresZotero/ApZotUtilities.xba | 42 ++++++------- Macros/LibreOffice/ApresZotero_LO.oxt | Bin 30247 -> 30222 bytes 5 files changed, 90 insertions(+), 95 deletions(-) diff --git a/Macros/LibreOffice/ApresZotero/ApZotFunctions.xba b/Macros/LibreOffice/ApresZotero/ApZotFunctions.xba index 9a78519..d1d71aa 100644 --- a/Macros/LibreOffice/ApresZotero/ApZotFunctions.xba +++ b/Macros/LibreOffice/ApresZotero/ApZotFunctions.xba @@ -1,26 +1,26 @@ -REM ***** BASIC ***** +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 <https://www.gnu.org/licenses/>. -'* -'************************************************************************ +'************************************************************************ +'* 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 <https://www.gnu.org/licenses/>. +'* +'************************************************************************ Option Compatible Option Explicit @@ -573,4 +573,4 @@ Sub ReplaceString(sToReplace As String, sReplacement As String, bIsRegex As Bool ThisComponent.replaceAll(oReplace) End Sub - + \ No newline at end of file diff --git a/Macros/LibreOffice/ApresZotero/ApZotGlobalOptions.xba b/Macros/LibreOffice/ApresZotero/ApZotGlobalOptions.xba index f5c62ea..40b2838 100644 --- a/Macros/LibreOffice/ApresZotero/ApZotGlobalOptions.xba +++ b/Macros/LibreOffice/ApresZotero/ApZotGlobalOptions.xba @@ -1,26 +1,26 @@ -REM ***** BASIC ***** +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 <https://www.gnu.org/licenses/>. -'* -'************************************************************************ +'************************************************************************ +'* 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 <https://www.gnu.org/licenses/>. +'* +'************************************************************************ Public Const nExponentCharSizePercentage As Integer = 33 Public Const nExponentCharHeightPercentage As Integer = 58 @@ -37,4 +37,4 @@ Public Const GreekFont As String = "IFAO-Grec Unicode" Public Const sBibliographyStyleName As String = "Bibliography 1" Public Const sRectoVersoRegex As String = "[0-9]+[rv](-v)?" Public Const sNumberOrIssueRegex As String = " nos? " ' last character is a non-breakable space - + \ No newline at end of file diff --git a/Macros/LibreOffice/ApresZotero/ApZotRevues.xba b/Macros/LibreOffice/ApresZotero/ApZotRevues.xba index cc980a5..0759e16 100644 --- a/Macros/LibreOffice/ApresZotero/ApZotRevues.xba +++ b/Macros/LibreOffice/ApresZotero/ApZotRevues.xba @@ -1,26 +1,26 @@ -REM ***** BASIC ***** +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 <https://www.gnu.org/licenses/>. -'* -'************************************************************************ +'************************************************************************ +'* 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 <https://www.gnu.org/licenses/>. +'* +'************************************************************************ Option Compatible Option Explicit @@ -56,20 +56,16 @@ Sub REB AbbrevAnnee_Philologique(True) ' Numéros de lignes en exposant sans "l. " - 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("Vous allez d'abord être interrogé·e pour vérifier que les" &_ + " références aux lignes sont correctement reconnues. Chaque fois" &_ + " que vous répondrez OUI, elles seront mises en exposant. Dans un" &_ + " second temps, les chaînes de caractères “, l. ” seront supprimées.",_ + 0, mJournal) + SetStringPartToExponent(oDocument, sLineRefRegex, sLineRefRegex) ReplaceString(sLineRefRegex, "$1", TRUE) SetFolioToPluralForm("f. ", "ff. ") - ReplaceString(" ", " ", FALSE) ' Replace narrow non breakable spaces (automatically generated by Zotero) by simple non breakable spaces. ReplaceString(" - ", "-", FALSE) SetStringPartToExponent(oDocument, sRectoVersoRegex, "[rv](-v)?") @@ -81,5 +77,4 @@ Sub REB HandleItemsInBibliography("Titre Liste des abréviations") end sub - - + \ No newline at end of file diff --git a/Macros/LibreOffice/ApresZotero/ApZotUtilities.xba b/Macros/LibreOffice/ApresZotero/ApZotUtilities.xba index e9f7431..335467c 100644 --- a/Macros/LibreOffice/ApresZotero/ApZotUtilities.xba +++ b/Macros/LibreOffice/ApresZotero/ApZotUtilities.xba @@ -1,26 +1,26 @@ -REM ***** BASIC ***** +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 <https://www.gnu.org/licenses/>. -'* -'************************************************************************ +'************************************************************************ +'* 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 <https://www.gnu.org/licenses/>. +'* +'************************************************************************ Sub CountOccurrencesPerReference Dim vSortedItemMap As Variant @@ -52,4 +52,4 @@ End Sub Next i End Sub - + \ No newline at end of file diff --git a/Macros/LibreOffice/ApresZotero_LO.oxt b/Macros/LibreOffice/ApresZotero_LO.oxt index f94c43d4086eddf04e11b7b9ff79c6ec4d30d762..f5bd6e49672ad78b30d7720c77699a600a3a0608 100644 GIT binary patch delta 3259 zcmZ9PWmppo+lEI-4;~suNe>Vip@^h(*QAHEq{K!K7>%?v0~I8t5s(fksi8DT4UldD z>3ARg@qNep-ha;fxbEY={-4FWI0?HrKwS+yd>R0NhzKxaP>=*{!}}MXhCN|_SgUAW zfd6;du{y*9{+sB>@NV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