mikhailklassen / research-diary-project

Use TeX/LaTeX to keep a research diary on your UNIX/Linux system, with useful tools and scripts to simplify the process.
34 stars 22 forks source link

Include some Example Entries #4

Open diego898 opened 11 years ago

diego898 commented 11 years ago

Hello,

Would it be possible to include a fully functioning example entry?

mikhailklassen commented 11 years ago

Hi Diego,

Thanks for your interest. I will try to post an example entry in the near future. In the meantime, you can check out a related project that I'm collaborating on. WriteLaTeX.com recently adopted my research diary stylefiles and you can now create diary entries online without needing to install a TeX interpreter and related packages.

I wrote about how to do this on their blog: https://www.writelatex.com/blog/14-writelatex-for-research

Thanks for your interest and please feel free to send me any questions or feedback.

Mikhail

diego898 commented 11 years ago

hey I did come across that and it led me here. I wanted to try and get something started on my own machine and use github as well and had some trouble. Perhaps some example walkthrough of creating/populating/compliging your first entry would be very helpful!

Thanks!

mikhailklassen commented 11 years ago

Hi Diego,

I've added an example entry to the repository and made a few other small fixes. I had noticed some bugs that caused it to fail compilation. It should be fixed now.

I run my research diary from within a Linux operating system. I make use of a bunch of shell scripts. I haven't tested them on Mac, and they wouldn't work on a PC. What operating system are you using?

I hope that these changes make the project more useful/accessible to you.

Best, Mikhail

diego898 commented 11 years ago

Great! Ill pull and give it a try.

I actually use all three OS daily, though my main research computer is a windows PC. On it though, Im running cygwin+zsh.

diego898 commented 11 years ago

Hm. Pulled a fresh copy down, and entered 2013/ and ran ./compile_today and received the following error:

$ ./compile_today                                                                          [13:39:35]
Compiling 2013-05-31.tex.
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)
entering extended mode
C:\Program Files\MiKTeX 2.9\miktex\bin\x64\dvips.exe: DVI file can't be opened: 2013-05-31.dvi: No such file or     directory
Error: /undefinedfilename in (2013-05-31.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push
  --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1
mikhailklassen commented 11 years ago

I did some more testing and I found the problem.

LaTeX doesn't support PNG graphics, so I supply the sample logo as an EPS and a PNG file. If you are using the PNG version, you need to compile using pdflatex instead of latex. ./compile_today was using latex by default. You can either change \logoPNG to \logoEPS in the example file, or you can compile your diary entry with the command

pdflatex 2013-05-31.tex

which produces 2013-05-31.pdf.

Hope this helps. Maybe I can figure out a clever way of having the compile_today script determine automatically which compiler is needed.

diego898 commented 11 years ago

Oh thats right! I forgot I read that in the I ran pdflatex as suggested but got this error.

$ pdflatex 2013-05-31.tex                                                                  [13:39:42]
This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)
entering extended mode
(C:\Users\diego\source\research-diary-project\2013\2013-05-31.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size11.clo"))
(C:\Users\diego\source\research-diary-project\2013\research_diary.sty

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.1 !
     <symlink> ■. . / s r c / r e s e a r c h _ d i a r y . s t y
? q
OK, entering \batchmode
mikhailklassen commented 11 years ago

Hmm, looks like it may be a little unhappy with the symlinked style file. Try copying research_diary.sty from the src directory into the 2013 directory and see if it will compile then. I don't have much experience working with LaTeX within Cygwin.

Best, Mikhail

diego898 commented 11 years ago

Hey! I went and updated research_diary.sty with relative paths to the images dir, and updated add_entry so it doesnt actually copy those files over. The problem could also be solved by windows hard links: mklink /H ../src/research_diary.sty research_diary.sty

So everything seems to be working great! Want to try running/updating compile_anthology to make a large PDF of all of the entries so I can run it weekly to have a weekly log of all PDFs. Thanks for the help!

mikhailklassen commented 11 years ago

Oh that's great. Thanks!

Perhaps I'll include add your notes to the readme in future, or make some adjustments so that it works better in a windows environment.

Best, Mikhail

Mikhail Klassen
PhD Candidate, Astrophysics
Dept. of Physics & Astronomy
McMaster University
klassm@mcmaster.ca

On Fri, Jun 14, 2013 at 12:08 AM, Diego Mesa <notifications@github.com>wrote:

> Hey! I went and updated research_diary.sty with relative paths to the
> images dir, and updated add_entry so it doesnt actually copy those files
> over. The problem could also be solved by windows hard links: mklink /H
> ../src/research_diary.sty research_diary.sty
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mikhailklassen/research-diary-project/issues/4#issuecomment-19438426>
> .
>