Tracking document history using Git? [duplicate] - document

This question already has an answer here:
Closed 12 years ago.
Possible Duplicate:
Creating a document for taking notes about a book using Git?
I have never used Git before. I am supposed to takes notes on a book in a document file and track the history of the document using Git. How would I do this? And what kind of document format should I use?

Regarding the document format, you have to keep in mind that one great feature of version control is that it can answer "what did I change between day X and day Y" by generating a so-called diff of your document. This pretty much only works if your document is in a plaintext sort of format, for example txt, html, tex, but not in a binary format such as doc, docx, odx. (Oh, it wil display changes alright, but it'll look like nothing you can ever understand as a human.)
If you need formatting, I'd probably recommend plain simple HTML or something like RST or markdown (which are easy formatting languages like the one used here) unless you already know LaTeX.

Related

Is there a way to collaborate with non-markdown users when developing DOCX documents with pandoc markdown?

Say I use markdown to write a memo, and convert it with pandoc to a DOCX, which my non-technically-inclined collaborator uses, and say the collaborator changes a few things while tracking changes.
Now I want to accept some changes and reject some others, then get the new version back into markdown to work on the next draft. But converting docx -> markdown with pandoc tends to be lossy--viewed as functions, the functions are not inverses; ToMarkdown(ToWord(md_file)) != md_file.
With this limitation, the pandoc/markdown workflow is basically a dead-end after draft 1. It's great to use vim and plaintext instead of Word for the first draft, but if there are a significant number of changes, then it's often just as much work to recover and verify them and correct unintentional losses in v2 of a markdown file from the collaborator's DOCX as it is just to put up with MS Word from the get-go.
Does anyone have a workaround for this situation that gets them to "v2" or higher using markdown / plaintext with minimal manual work in Word?
There is a long discussion at pandoc-discuss about the issue. The short answer is no, there is no support for to docx and back to md without losses.
That said, #mb21 mentions the --track-changes flag, which allows for a little bit more control, however you would have to incorporate changes manually.
The solution for your problem is either:
Convince collaborators to use md instead of Word, or;
Start using Authorea which uses pandoc in the background to generate the documents. You can even make it sinc with github, while your collaborator uses the webversion.
I have been experimenting with option 2, but it is super hard to convince most of the collaborators to move to an online interface.

Document format for writing homeworks in Vim

I'm a college student majoring in CS, and that means I spend a lot of time poking around in vim. I'm still a complete noob, but I love editing text in the terminal--it's more fun than writing documents has any right to be.
However, I'm curious if there's a basic, low-frills document format I can use (from within vim) to typeset my homework assignments. I'm familiar enough with LaTeX, and if it were possible I'd use it for everything, but it has two main disadvantages:
It takes a long time to write an entire LaTeX document, and
LaTeX doesn't handle code very well.
With that in mind, I'd like to know if some format exists which addresses both these needs and is still easy to hash out quickly from a terminal-based text editor. I use vim for literally everything else I write, so the need to keep LibreOffice Writer around just for homeworks seems a bit overbearing to me.
Thanks!
I would tend towards something light like Markdown, but the needed capabilities depend on what requirements you have for the output (formatting and styling).
I find the AsciiDoc project quite interesting. From their website:
AsciiDoc is a text document format for writing notes, documentation,
articles, books, ebooks, slideshows, web pages, blogs and UNIX man
pages. AsciiDoc files can be translated to many formats including
HTML, PDF, EPUB, man page. AsciiDoc is highly configurable: both the
AsciiDoc source file syntax and the backend output markups (which can
be almost any type of SGML/XML markup) can be customized and extended
by the user.
It even comes with a Vim syntax.

Serialized Printing Method

I am looking for a method by which I can print one document, and have a field that is incremented on each copy printed. I currently run linux, so bash in concert with several programs might be the way to go, but I'm just not sure where to start.
I have a document that is used for our business that currently is hand stamped for serialization... We would like to simply print them but cant find a method by which to increment a specific field. I would like to use either a PDF or an ODF/ODT for the document.
Thanks for any help you can give!
How is the document produced at the first place?
If you master that process, you could certainly add serialization at that level. For instance if using LibreOffice you could do that in LibreOffice. If using a text formatter (like LaTeX, Lout, ....) just emit the formatting instructions (e.g. the .tex or .lout source file) with some unique counting (perhaps simpler to do in some scripting language like Python or Ocaml).
Then run the relevant tool to get a .pdf file.

notepad++ how to convert to typing assistant like?

I was using notepad++ to create a report and its taking a quite a while for me to type and do so.
Well i had tried a software called typing assistant it was really good(except for the money part :D).
TO the Point :
is there any way tat i can link a dict(text file of words) and use notepad ++ as typing assistant please tell me if so i
can speed my report.
Cause i am a programmer too so i really like the keyword completion and stuff .But is there a way to use it for text ?
already tried Phrase Express -.-:
Takes long and its kinda for macro text and text completion don't work tat fast for me to tab and complete
if there's a question in the form like mine link me to tat :
i searched it and i didn't get it
Yes, you can set up your own custom auto-complete dictionaries in notepad++. You need to create an xml file with your language name and put it under the plugins/APIs directory in notepad++. Of course this assumes you know how to write xml. There's a formal description of how to implement this here.
I've never tried to create an auto-complete dictionary for plain text files, so I'm not sure if it's possible, but I have successfully created them for user-defined languages, which you could also do if you can't get it to work with text files.
I'm not sure if this question is really a duplicate, but here is a very similar one, which may help you in your research.

Efficient Way of Recording Page Numbers from a Search of a PDF

I have a list of ~1200 queries (part numbers) that are specified somewhere inside of a 100 page PDF. Pretty much what I need to do is take record of what pages each of the queries appear on, in the PDF. I can't think of a clever way of doing this. It should take me 5-20 hours to do this search by search, so if someone can give me a good idea before the 5 hour mark that would be great!
Assumed you can determine what a "query" is in your context programatically from the plain text (for example, by using regular expressions):
You could split your PDF into different files (1 file per page) using pdftk
http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
Then convert those files to text with a pdf-to-text utility like this one:
http://www.fileguru.com/PDF-To-TXT-Converter/download
or this one
http://www.pdf2text.com/
And finally write yourself a simple script using your favorite programming language to determine which of those files contains a "query" (whatever that looks like).

Resources