Nugroho's blog.

Thursday, March 14, 2019

Parsing a String to Get a certain Substring (Serial Number, Product Keys, etc)

I have a question from a new friend on my instagram

Basically, he needs only certain substring.

Here's my code to parse the string.

 

The main code is

s          := edit1.text;
p          := pos('ME',s);
edit2.text := copy(s,p+2,13);
.

Wednesday, September 27, 2017

Not Enough Disk Space to Install High Sierra?

Just move the installation file to flash drive.

It's on Application folder. Just drag it to flash drive.

Just make sure that it have ntfs or hfs or Mac OS Extended format. FAT will not be able to copy it since it's more than 4GB.



Monday, July 3, 2017

Adding a Comma between Author and Year on Biblatex?


Simple, just add this line at preamble.

\usepackage[style=authoryear]{biblatex}
\renewcommand{\nameyeardelim}{\addcomma\addspace}

.

Monday, June 12, 2017

Change '1st Edition' into 'Edisi 1' in LaTeX.

My LaTeX document on Indonesian language has had proper citation style on bibliography using biblatex; the ''disitasi pada halaman" instead of "cited on page".

Of course the new problem arise. Like this.




Look that I have "1st Edition" or "2nd Edition" here and there. It supposed to have "Edisi 1" or "Edisi 2" form respectively.

Okay, thats not new problem (it's the kind of the last minute problem before the show, :D ).

So I add this line at the preamble.
\DefineBibliographyStrings{english}{
 backrefpage = {disitasi pada halaman},
 backrefpages = {disitasi pada halaman-halaman},
 edition = {edisi},
 in = {dalam},
 and = {dan},
 urlseen = {diakses pada}
}
\DeclareFieldFormat{edition}{\ifinteger{#1}{\bibstring{edition}~\mkbibordedition{#1}}{#1\isdot}}
.

Looks good.

Change the "Cited on Page" Strings in LaTeX.

I have LaTeX document written in Indonesian and it's nice and yada yada. The minuscule problem is the bibliography. I used biblatex and it look like this.





The problem is "cited on page" and "cited on pages" string. It's supposed to be "disitasi pada halaman" and "disitasi pada halaman-halaman".

What I need is add this lines to preamble.

\DefineBibliographyStrings{english}{
 backrefpage={disitasi pada halaman},
 backrefpages={disitasi pada halaman-halaman}
}


And I got this, :)

All was well, :)



HyperRef and Bookmark Combo in LaTeX.


I use this preamble in order to show bookmarks on PDF generated from my .tex file.

This way, we could navigate through part, chapter, section and subsection (depending on our depth setting) using table of content sidebar of PDF reader.

code

\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=true,bookmarksdepth=3,pdftitle={Title},pdfauthor={Author}}
\usepackage{bookmark}
\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}
.

Thursday, June 8, 2017

BibLaTex Problem

Have you had this error?
$ biber main.aux
INFO - This is Biber 2.1
INFO - Logfile is 'main.aux.blg'
ERROR - Cannot find control file 'main.aux.bcf'! - did you pass the "backend=biber" option to BibLaTeX?
INFO - ERRORS: 1
Nugrohos-MacBook-Air:tesBibTex nugroho$ 

Me too.

The solution is simple, make sure the command is

$biber main

and not

$biber main.aux


323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)