5. Data processing of the participants - SheilaOM/TFG GitHub Wiki
Latex special caracters
As I indicated in the previous section, the text of some participants' data have characters that Latex interprets as literals (#,$,%,&,_...), so they have to be treated.
What I have done is create a method CorrectCharacters that reviews all the given data of a participant. If in any of these data find one of the previously mentioned characters, add '' before the character (for example, if you find 'hello & goodbye' it will be 'hello \& goodbye'), so that Latex doesn't consider it as a literal character.
In this process there is an exception: these symbols don't modify them in the urls, because these don't are used in the Latex, but to download images and other content.
Link to commit of character processing
In this commit, I have also extracted from the DataOut method the code that downloads the images from a given url, and I have created a method called DownloadImage for it. In it, given the url, returns a string with the name of the image obtained.
Cutting of the 'description' field
Some descriptions are excessively long, which causes that in the pdf the information of the participants is in each way.
For this, I decided to cut the description of the participants that was too long to maximum 150 characters. This is done through the CutDescription method.
Resizing images
The images of the participants have different dimensions, so I have fixed that they all have the same height (5 cm), and that they are aligned vertically.
There are participants who don't have Twitter. Some of these leave the space blank, and others write something (which is not the twitter), so I check that what is in that field is a Twitter login.
How do I verify that it is a login: a Twitter login can't have spaces, that is, it is a single word, and it must also start with @.
In this way, if what I find in this field is not a Twitter login, I do not write anything.
4 participants per page
After observing the result in pdf, I think the best design is the one with 4 participants per page.
After each participant I add some line breaks to separate the diferents participants, except after the 4th participant of each page, where I add a page break.