writerside2pdf v1.0.0 Help

Tabs and Code

Calculating the sum of two numbers is a simple task. The following code snippet shows how to do it in different programming languages:

public class Sum { public static void main(String[] args) { System.out.println(sum(1, 2)); } public static int sum(int a, int b) { return a + b; } }
#include <iostream> int sum(int a, int b) { return a + b; } int main() { std::cout << sum(1, 2) << std::endl; }
using System; public class Program { public static void Main() { Console.WriteLine(Sum(1, 2)); } public static int Sum(int a, int b) { return a + b; } }

Very long code blocks

Make sure that very long code lines are correctly wrapped at roughly 120 characters as they will be scaled otherwise. The block below is an example of a very long line which will result in a code block with a very small font size.

public static <C, A extends Annotation> SerializationPrototype<C, A> createPrototypeWithInherited(Class<?> clazz, Class<A> annotationClass, Function<A, String> nameResolver) throws IllegalAccessException { return new SerializationPrototype<>(clazz, annotationClass, lookup, true, nameResolver); }

The correctly wrapped block however will look fine:

public static <C, A extends Annotation> SerializationPrototype<C, A> createPrototypeWithInherited ( Class<?> clazz, Class<A> annotationClass, Function<A, String> nameResolver ) throws IllegalAccessException { return new SerializationPrototype<>(clazz, annotationClass, lookup, true, nameResolver); }
Last modified: 17 January 2024