Posts

Showing posts with the label formatting

Syntax highlighting for code in blogger

Introduction: There is no straight forward or simple way to do syntax highlighting to share any code through blogger. But we can easily do that by using some third party service. One such service is highligtjs.org . Use the following steps for code highlighting. Solution: We have to work in html view rather than compose view of blogger. For syntax highlighting we have to first add JS script for importing CSS in the header of the html. To do that add the following line at the starting in the html view. <head> <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.2.0/build/styles/androidstudio.min.css"> <script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.2.0/build/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> </head> Then start writing inside the body html tag, as...

Changing page style defination of "fancyhdr" package.

In this post I will show how to change the definition of the page style (say empty) if you are using fancyhdr package. Just add the following type of code in the preamble of the document (before the \begin{document} ): \fancypagestyle{empty}{% \fancyhf{} % clear all header and footer fields \fancyfoot[R]{\bfseries \em \thepage } % except the center \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{1pt}} Here you can use all kind of fancyhdr package command to specify you options and formatting. Hope this will be helpful. Cheers APaul