Skip to content

Conversation

@cysouw
Copy link
Contributor

@cysouw cysouw commented Jul 31, 2018

I read the book and found all kinds of small errors, which I have corrected here. Please have a look and when acceptable, let's make this version 2.0.2 :-).

Should we also push an update to langsci?

Michael

@cysouw cysouw requested a review from bambooforest July 31, 2018 14:02
Searching the web for ``install r and python'' returns numerous tutorials on how to set up your machine for scientific data analysis. Note that there is no single correct setup for a particular computer or operating system. Both Python and R are available for Windows, Mac, and Linux operating systems from the Python and R project websites. Another option is to use a so-called package manager, i.e.\ a software program that allows the user to manage software packages and their dependencies. On Mac, we use Homebrew,\footnote{\url{https://brew.sh/}} a simple-to-install (via the Terminal App) free and open source package management system. Follow the instructions on the Homebrew website and then use Homebrew to install R and Python (as well as other software packages such as Git and Jupyter Notebooks).

Alternatively for R, RStudio\footnote{\url{https://www.rstudio.com/}} provides a free and open source integrated development environment (IDE). This application can be downloaded and installed (for Mac, Windows and Unix) and it includes its own R installation and R libraries package manager. For developing in Python, we recommend the free community version of PyCharm,\footnote{\url{https://www.jetbrains.com/pycharm/}} an IDE which is available for Mac, Windows, and Unix.
Alternatively for R, RStudio\footnote{\url{https://www.rstudio.com/}} provides a free and open source integrated development environment (IDE). This application can be downloaded and installed (for Mac, Windows and Linux) and it includes its own R installation and R libraries package manager. For developing in Python, we recommend the free community version of PyCharm,\footnote{\url{https://www.jetbrains.com/pycharm/}} an IDE which is available for Mac, Windows, and Unix.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cysouw - but not Unix -> Linux at the end of the paragraph?

systems, a character is a general term for any self-contained element
in a writing system. A second interpretation is used as a conventional term for a unit in the Chinese writing
system \citep{Daniels1996}. In technical terminology, a \textsc{character}
system \citep{Daniels1996}. In technical terminology, a character}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cysouw there's an opening <}> here, which stops main.tex from compiling.

rectangle <▯>, question mark <?>, or the Unicode replacement character <�>.
The user's computer does not have the fonts
installed that map the desired glyphs to Unicode characters. Therefore the glyphs cannot be displayed.
The reason for such behaviour is that the user's computer does not have the fonts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cysouw - no British English spelling ("behaviour") -- it took me a long time to get the book consistently American English spelling :)

different code point. In the third example, the glyph is encoded in a
multiple-character sequence that is composed of two character code points. All
three sequences are \textsc{}, i.e.~they are strings that
three sequences are \textsc{canonical equivalent}, i.e.~they are strings that
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cysouw -> canonically equivalent

representation to another. This means that a software application may compose,
decompose or reorder characters as its developers desire; as long as the
resultant strings are to the original. This might lead to
resultant strings are canonical equivalent to the original. This might lead to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cysouw -> canonically equivalent

@bambooforest
Copy link
Member

@cysouw -- looks good! a few small comments in my review. please fix.

@cysouw
Copy link
Contributor Author

cysouw commented Aug 6, 2018

All fixed; Xelatex/Knitr compilation successful. I let you do the merge and the version change :-).

How does it work now to push these changes to the language science press?

@bambooforest
Copy link
Member

@cysouw looks good. I also update the PDF in the main directory and then push a new version tag and a new Zenodo release. I'm not sure about LSP -- we'll have to ask Nordhoff, who is on holiday at the moment.

@bambooforest
Copy link
Member

@cysouw -- I'm still not getting the latex to compile without error, specifically anywhere you use this type of construction (Undefined control sequence error):

\hlstd{}\hlslc{#\ get\ the\ paths\ to\ the\ R\ executables\ in\ bash}\hspace*{\fill}\

@cysouw
Copy link
Contributor Author

cysouw commented Aug 6, 2018

hmmm, I don't use that, it is knitr who is producing those sequences :-(.

Does it stop compilation at your side? because at my side it just completed compilation (though I didn't check all errors in the latex-log....). It also looks good in the resulting PDF here.

I used the TexLive-2018 version for Xelatex-compilation

@bambooforest
Copy link
Member

it knits fine, just fails to compile main.tex without being forced to in xelatex in TexShop using this installation.

http://www.tug.org/mactex/

i'll look into it, but also look at page 107 where one of the errors is occurring:

the alignment of the code is off:

get the paths to the R executables in bash

pathT=Rscript -e 'cat(system.file("exec/tokenize", package="qlcData"))'
pathW=Rscript -e 'cat(system.file("exec/writeprofile", package="qlcData"))'

make softlinks to the R executables in /usr/local/bin

you will have to enter your user's password!

sudo ln -is $pathT $pathW /usr/local/bin

could you please try to fix the alignment? not sure if the two issues are intertwined.

@cysouw
Copy link
Contributor Author

cysouw commented Aug 6, 2018

fixed the alignment.

I now see the errors in latex as well: however: the end result is exactly what I expected, so I would simply ignore the errors :-). It is probably related to how knitr deals with bash-code.

@bambooforest
Copy link
Member

@cysouw -- just a clarification please. where this fails to compile, these commands are meant for the user to run them (once) on the command line, or? e.g.

# get the paths to the R executables in bash
   pathT=`Rscript -e 'cat(system.file("exec/tokenize", package="qlcData"))'`
   pathW=`Rscript -e 'cat(system.file("exec/writeprofile", package="qlcData"))'`

in that sense isn't a bit weird to have a comment before them? that would suggest, at least to me, that these codes chunks are meant in a bash script, instead of commands that should be fired off from the terminal. if that's the case, we can just incorporate the command line comments into the text -- and have no problems with knitr and latex :) (sorry -- i really want this thing to compile without error.)

@cysouw
Copy link
Contributor Author

cysouw commented Aug 9, 2018

OK, try it again.

@bambooforest
Copy link
Member

Done. Thanks!

@bambooforest bambooforest merged commit 3511ff9 into master Aug 9, 2018
@bambooforest bambooforest deleted the post-release-updates branch August 9, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants