Re: Editing mathematics documents

2021-04-17 Thread Tony Mechelynck
On Sat, Apr 17, 2021 at 3:43 PM Julius Hamilton  wrote:
>
> I have a question related to editing documents inside Vim. If anyone might 
> have any tips, I'd really appreciate hearing them.
>
> I'd like to edit PDFs which contain mathematical symbols, not to publish the 
> papers myself, as I could with Latex, but just as a form of note-taking.
>
> I'm curious, could Vim open a PDF as raw textual data? Or is the source text 
> of a PDF sealed off, and inaccessible?
>
> And if it could, could it support mathematical formula? Not as a markup 
> language, but as a kind of textual object you could actually stick the cursor 
> into and manipulate a bit, such as extracting the top of a quotient and 
> putting it somewhere else, or an expression to the right of an integral 
> symbol, for example.
>
> Or, is there any tool that could do this? Perhaps Emacs?
>
> Thanks very much,
> Julius

IIUC PDF files are like books, not meant to be edited (which is one
reason while enterprises use them: to avoid text counterfeiting).
Again IIUC, it is possible to edit them by using the appropriate Adobe
tool, which is not for free, but even with this tool you may need to
know the edit password set by the file's creator.

OTOH, for simple mathematical formulæ (in ordinary text) you may want
to install Dr. Chip Campbell's math menu & keymap
http://www.drchip.org/astronaut/vim/#MATH ; and for complex formulæ
you may want to use one of the flavours of the Teχ language — maybe
XəTeχ which is Unicode-aware and can write PDF but IIUC not read it.
In HTML, I think you could also avail yourself of the MathML language
(which can be embedded in HTML), provided that the target browser(s)
can decipher that.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAJkCKXv_Hr4hbQrr_6bBkMZ2PGM675yMbbdJ0xYF129e0M2-YQ%40mail.gmail.com.


Editing mathematics documents

2021-04-17 Thread Julius Hamilton
I have a question related to editing documents inside Vim. If anyone might
have any tips, I'd really appreciate hearing them.

I'd like to edit PDFs which contain mathematical symbols, not to publish
the papers myself, as I could with Latex, but just as a form of note-taking.

I'm curious, could Vim open a PDF as raw textual data? Or is the source
text of a PDF sealed off, and inaccessible?

And if it could, could it support mathematical formula? Not as a markup
language, but as a kind of textual object you could actually stick the
cursor into and manipulate a bit, such as extracting the top of a quotient
and putting it somewhere else, or an expression to the right of an integral
symbol, for example.

Or, is there any tool that could do this? Perhaps Emacs?

Thanks very much,
Julius



On Sat, Apr 17, 2021, 15:30 Julius Hamilton  wrote:

> Thanks very much, really appreciate it.
>
> Would you mind providing a simple outline of a function which would
> terminate on some basic condition, such as, the next line is a blank
> newline? I will read those docs.
>
> I use Vim in Termux, an Android terminal emulator app. I don't know if I
> have buttons such as F9. I will investigate it. However, is there a way to
> check what non-F keys are free to be mapped to something? Thanks very much.
>
> Best regards,
> Julius
>
>
>
> On Fri, Apr 16, 2021, 19:27 Stan Brown  wrote:
>
>> On 2021-04-16 09:42, Julius Hamilton wrote:
>>
>> > At the beginning of a paragraph which has been separated mid-sentence
>> > onto separate lines, how might I automate the process of calling CTRL-J
>> > until all the separated lines in the paragraph have been combined into
>> > one line? Will Vim be able to call CTRL-J until a condition is met, for
>> > example, that the single line being built ends in a sentence (a period),
>> > or until the next line is a blank newline?
>>
>> The short answer is go to the top of the paragraph and press Shift+V,
>> then to the bottom and press Shift+J (not Ctrl+J). You can automate this
>> further by writing a function that would figure out the top and bottom
>> of the paragraph via whatever logic you build in. See :help :function.
>>
>> > Then, how might I automate the process of entering N newlines between
>> > every sentence? I.e., automating pressing ), i, enter a few times, then
>> > escape, for multiple sentences? I could create a shortcut to execute
>> > these commands and call it myself, or it could also repeat until the
>> > conditions above. How would I do either?
>>
>> Example, for N = 4:
>> :imap  
>> Type the actual < and > characters as shown. To use this, at the end of
>> typing your paragraph do not press Esc but press F9 (or whatever key you
>> mapped).
>>
>> If you sometimes want to insert N blank lines in already-written text,
>> add this:
>> :map  A
>> The previous map was active in insert mode; this one is active in normal
>> mode. It moves to the end of the current line ("A") in insert mode and
>> then appends the insert-mode version of F9.
>>
>> Once you've verified that these work as you wish, you can put them in
>> your $VIM/_vimrc file so that they will be executed whenever you start
>> Vim.
>>
>> > Also, how do I go back to where the cursor previously was, in case I
>> > accidentally move it?
>>
>> `` or ''
>> (One goes back to the _line_) where you were; the other goes back to the
>> exact position within the line.)
>>
>> --
>> Stan Brown
>> Tehachapi, CA, USA
>> https://BrownMath.com
>> https://OakRoadSystems.com
>>
>> --
>> --
>> You received this message from the "vim_use" maillist.
>> Do not top-post! Type your reply below the text you are replying to.
>> For more information, visit http://www.vim.org/maillist.php
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "vim_use" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to vim_use+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/vim_use/d9ee4264-13cb-eef7-be14-e0e68f9df155%40fastmail.fm
>> .
>>
>

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/CAGrXgp16fEb5sE%3DKTvZQcJt8awnQ0Hb%3DCi7CFMQ1uJhE1io1VQ%40mail.gmail.com.