Batch turn plain text into endnotes/footnotes - libreoffice

In a document containing more than 2000 "manual" endnotes (= which are not formatted as such), I'm trying to batch turn plain text paragraphs into proper endnotes or, to be more precise (since the references already exist, thus empty endnotes as well) to sort of "paste" all manual endnotes' text into existing endnotes, based on numbering.
Here is the document pattern :
Lorem ipsum dolor sit amet1 (ref), consectetur adipiscing
elit2 (ref).
[1] Text endnote 1
[2] Text endnote 2
I've tried to play around with Alternate Find & Replace and Regular Expressions, but I could find a way. Couldn't find anything on forums either.

Related

How to dynamically add items in create pdf in flutter?

I'm trying to generate dynamic pdf, using pdf dependency in flutter. I want the pdf to be generated based on text content, current it is limiting to only one page and dynamically not creating a second page or dynamically increasing the size of pages. The following is my code.
var data = await rootBundle.load("fonts/OpenSans-Regular.ttf");
final ttf = pw.Font.ttf(data);
pdf.addPage(
pw.Page(
theme: pw.ThemeData.withFont(
base: ttf,
),
// pageFormat: PdfPageFormat.undefined,
build: (pw.Context context) {
return pw.Paragraph(
text:
"What is Lorem Ipsum?\nLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\n\nWhy do we use it?\nIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\n\nWhere does it come from?\nContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum,'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32.\nThe standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.;\n\nWhere can I get some?\nThere are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc."); // Center
},
),
);
final appDocDir = await getApplicationDocumentsDirectory();
final appDocPath = appDocDir.path;
final file = File(appDocPath + '/' + 'dummy.pdf');
print('Save as file ${file.path} ...');
await file.writeAsBytes(await pdf.save());
Please look at the following screenshot. Please help me ...
Try adding Multipage like this,
pdf.addPage(
pw.MultiPage(
...)
)
instead of
pdf.addPage(
pw.Page(
...)
)

How to amend select fields in document or PDF using SWIFT

Is there any way I can have a document or PDF stored on my swift application file and edit select predefined fields inside the document/pdf using swift code?
For example the document/pdf would contain the following fields i'd like to amend; [INPUT1], [INPUT2], [INPUT3]
"What is [INPUT1] Lorem Ipsum is simply dummy text of the printing
and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the [INPUT2], when an unknown printer
took a galley of type and scrambled it to make a type [INPUT3] book.
It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged."
In swift I would like to ask the user 3 questions and have their answers replace [INPUT1], [INPUT2], [INPUT3] respectively.
If not possible to edit word/pdf file is there any other way to achieve this while being able to keep the formatting of the text mentioned above while only changing the mentioned fields.
Thanks again for your help!
Look into implementing PDFKit and see this answer how to implement pdf editor
You have: https://developer.apple.com/documentation/pdfkit

Teach ispell multiple-word phrases

Can I teach ispell to accept specific phrases like et al., a priori or in vitro but to scold me when I use the words outside of these phrases, so that I don't use priori without the a before it?
UPDATE simply adding the phrase to the private dictionary does not work
BONUS get latex to print those phrases automatically in in italics (\emph)

Is there any way to generate "Lorem ipsum" in eclipse?

I'm into finding a way to generate Lorem ipsum in eclipse when creating views just for dummy texts. for example in Visual studio you can do it simply by typing lorem and press tab.
Is there any to do that in eclipse? any Idea?
In Android Studio, you can preview lorem ipsum TextViews with:
tools:text="#tools:sample/lorem/random"
You can also use this for Names, Cities, Zip codes, Avatars, and more.
see https://developer.android.com/studio/write/tool-attributes.html#toolssample_resources
I haven't encountered an Eclipse functionality to actually generate dummy text, but I do highly recommend this workaround (truth be told, I don't think you need different dummy text each time).
Create an Eclipe template. It's an xml file that looks like this:
<templates>
<template autoinsert="true" context="java" deleted="false" description="Dummy text" enabled="true" name="Lorem Ipsum">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</template>
</templates>
Go to Java -> Editor -> Templates and import the above file.
Now, when you write code and type lore (which represents the name attribute value of the template tag above), and hit CTRL+SPACE, then it will automatically insert the lorem ipsum text.
More Tips:
Add apostrophes to the ipsum text, so that it automatically generates a Java String
Add + signs to the ispum text, so that it breaks down the long string when inserted
Set the autoinsert attribute to false. Then you can see the ipsum description in the proposal
Set the name of the template to something like aaa_LoremIpsum. Then, in Eclipse, type aaa and press CTRL+SPACE. That way you can add many templates beginning with aaa, and select in Eclipse whichever you like.
I myself have templates for separating methods in a class. (e.g. aaa_1.StaticFields, aaa_2.InstanceFields, aaa_3.Constructors etc.)
They can help.
tools:text="#tools:sample/cities"
tools:text="#tools:sample/backgrounds/scenic"
tools:text= "#tools:sample/avatars"
tools:text="#tools:sample/full_names"
tools:text=”#tools:sample/lorem"
tools:text=”#tools:sample/lorem/random"
for other

Confluence macro for specifying a reference, source of the quotation, etc.?

Is there a way in Confluence for specifying a reference to a text passage — for example, to provide the source of the quoted text, in a similar way as is done on Wikipedia, so that it's rendered like this:
Lorem ipsum dolor sit amet1
[down the page]
1 Cicero
Ideally, the subscript "1" should be an internal hyperlink
I believe this plugin may help: https://marketplace.atlassian.com/plugins/com.adaptavist.confluence.footnotes
The footnotes plugin allows you to quickly and easily add footnote
references to your wiki pages.
You can:
Define Footnotes - Define any number of footnotes throughout your content
Display Footnotes - Display a table of footnotes anywhere in the page
Quickly move between content and footnotes with a click of the mouse
You can do it using anchors:
Pros:
It is native in Confluence
Cons:
It is a very manual procedure (no automatic numbering, etc.)