What do we mean by Document reflow and do we have standard specifications for reflowing documents? - epub3

I want to learn more about Ebup 3 implementations. Epub files can be reflow is what they say but what is the exact meaning of reflow is not clear to me? Are there any standard specifications of document reflow ?

A "reflowable" book is one which doesn't use fixed layout pages: so page numbers can change depending on the font, font size, margins, and device a reader is on. For example: a reflow book on a large tablet will have fewer pages than the same book on a small phone: and the page numbers will obviously be different.
There are some great examples and tutorials for learning about ePub3 (the latest ePub spec) here: http://www.ibm.com/developerworks/web/library/x-richlayoutepub/index.html. There are absolutely specifications (set out by IDPF) for the ePub spec, the link above shows many of them...
Best of luck!

Related

How do HTML entities in the alt or title attribute of an image affect tool tips and audio user agents?

BACKGROUND
I was given text from a copywriter which contained a lot of © . So in Sublime Text Editor, I did a Search and replace with:
©
A lot of the text was already added to the images in titles and alt attributes. So the text in there was affected as well.
Previously on my own projects I would just strip out all legal items such as registered, trademark, and copyright symbols. Because I figured only the actual text mattered. But this project is for a company that has more compliance regulations, so I am taking into account things such as screen readers. The first thought that comes to my head in a screen reader would be that "copyright" would be spoken? is that correct? does it really even matter in this context?
So should I use the HTML entities?
I have so far in Google found
HTML title Attribute summarized at w3 schools. but no mention of HTML entities.
The global structure of an HTML document in the w3c recommendation documents that discusses the title tag. But no mention of HTML entities.
Using the HTML title attribute – updated had good insights on the title attribute, but again, no mention of html entities.
Any experience with this? or other suggestions for things to search? or will I be fine with just plain text
Generally speaking the screen readers should do an acceptable job with them. You can find an excellent summary of how JAWS handles this at http://accessibleculture.org/research-files/character-references/jaws-all.php. Not all of them are read correctly, but most are. I also tested that page with VoiceOver on OS X Yosemite and it seems to do a good job as well. So, I think you can use character entities as you normally would and expect decent (if not perfect) results with mainstream screen readers.

CMS WYSIWYG Editors - What techniques do you use to client-proof these types of pages?

This is a topic that may be considered something not necessarily "programming related"; however, I feel it is since I'm asking for specific techniques.
Essentially, as a web developer, I work with a variety of platforms that include a WYSIWYG editor in the backend (TinyMCE, WYGWAM, etc) and one of the selling points of such systems is that it becomes easier to manage your own content because of these tools.
In theory, sounds great, in practice, not so much.
It can be way too easy for a client to break a layout by using many of the advanced features of a WYSIWYG editor. They can start floating things, setting too much margin/padding, etc.
Generally, I have tried to build any of these types of pages with only some sensible default styles applied to a few of the most common tags, such as setting a font size, colors, some margins, and some text decorations.
I would like to know if anyone has used anything more advanced to essentially turn the output of:
$cms->getContent();
...or equivalent into something that is effectively sandboxed and operates entirely agnostic of any other style/layout elements being used.
As often as possible, I express to clients that they should purchase an HTML/CSS book for Dummies and read it so that they aren't deer in headlights when they click "code view" in a WYSIWYG. But I know they don't do this, nor do they hire anyone who has experience, and it ends up allowing a client more control than they should responsibly have.
Plus, it sucks when you are using their sites as work samples to show others knowing they have the ability to take your beautiful design and development and make it look like crap.
A few things:
I have a standard WYGWAM config that I reuse on new sites by importing the exp_wygwam_configs table.
I keep options very limited in the editors
Areas of the page delineated for images should use a File field, with an image resizer like CE Image used to insure proper size
Client training. Make videos with Camtasia or similar tool if you have to.
Use a custom stylesheet for WYGWAM that has a small subset of styles, so they can choose h2...h4, for example, but not h1 or h5.
After encountering a lot of issues with WYSIWYG editors (which, by the way, never reflect accurately what you "get" in the end), I now prefer to leave only the most basic formatting features in the editor's configuration. For example, take a look at stackoverflow's editor.
It's got the following features: bold, italic, link, quote, pictures, lists, and alignments. The only special feature here are code sample and html, which are targeted to this site's audience. Most of your client don't need them.
I think it's the best approach, because if you give your clients the feeling that they can do whatever they want in the page, but in the end, this content is filtered when the page is rendered, they are going to be really frustrated. Not to mention the fact that the site will be slowed by the filtering process and the need to put the filtered content in cache.
Sometimes the client indeed wants to have a special layout in a page, but I think that can be best done by customizing the CMS so that it fits the client need.

Algorithm for placing textual/non-textual content in a book layout

Hey guys I was looking for different approaches/algorithms for placing textual/non-textual content in a book layout having 2 sides. So essentially it should look like a user is reading a book & content placed in a 2 page layout.
If you guys have any directives or suggestions on how to go about doing this. Way to decide how many content items can fit into 2 pages, no overflow. Suppose a page is 425 px BY 600 px & we have 2 such pages fit side by side (dimensions are flexible).
Any pointers appreciated?
P.S. I know this is not a pure programming question per se but more of an algorithmic question. If so, please direct me where this question can be best asked.
EDIT 1
I want to use this algorithm in a website application & not in a standalone app, so please consider that.
EDIT 2
I would like to mention that the order of the content items is pre-decided.
If your goal is to display data in a book like format, then the easiest method would be to reuse an already existing toolkit for doing text layout. I think the best tool for this purpose would be LaTeX, which is an evolution of the original digital typesetting program.
In order to use it you will have to convert your data into the LaTeX format, which is relatively painless (I have done it several times with several types of data). In this document you can specify that you want a book format, how large the pages are, and much more. You can then render the text to pdf/ps and then display the two pages of a "book" side by side.
If what you are looking for is the actual algorithms to do it yourself, you might search around the TeX/LaTeX community for information.

What article discusses "Viewing code from 10000 feet"?

A few years ago I read an article about a neat way to analyze a large code-base.
The idea was to zoom out so far that patterns of indentation and block length are all that is really visible.
The author wrote about printing out code with very small fonts and looking at the results from 10 feet back. I believe the author also had some tools for reformatting code and producing images for this technique, in such a way that paper could be avoided.
I can't find the right search query to bring this up. Anyone have any ideas?
The text editor Sublime Text has a zoomed-out overview of your code on the left of the window, and can be used to scroll.
I've done this myself, that is print to paper with very small fonts and step back. If you want to avoid the paper route then perhaps you can print to PDF?
Or use and editor that can zoom in and out by changing font size. I use SciTE and Komodo Edit, both based on the Scintilla code editing engine and both allow me to hold down the ctrl key and use the mousewheel to change font size (just like web browsers).
With a bit of Google-fu I found references that this (ctrl+mousewheel) may also be implemented in Visual Studio and XCode. Can anyone confirm?
I think you are referring to Software Visualization? If you search for Code Visualizer, you maybe able to find a few products out there that does it but there are more focusing on aggregating the measurements information/metrics together for software comprehension and not necessary as a way to view or navigating to code only.
Some of the tools include Code city, code crawler or code visualizer. Michele Lanza and his team did some great work in this area in the recent years, however some only has support for certain language/platform so be mindful if they are going to be useful for you.
http://www.inf.usi.ch/faculty/lanza/
http://www.inf.usi.ch/phd/wettel/codecity.html
Could extract all the types, classes, etcetera, and put them into a tool such as graphviz and generate a graph.

User Interfaces - Colors and Layout

Although I'm specifically interested in web application information, I would also be somewhat curious about desktop application development as well. This question is driven by my work on my personal website as well as my job, where I have developed a few features, but left it to others to integrate into the look and feel of the site.
Are there any guides or rules of thumb for things like color schemes, layouts, formatting, etc? I want to ensure readability and clarity for visitors, but not be bland and dull at the same time.
As for my knowledge in this area - If you hand me a picture, I have enough knowledge to reproduce it on the screen, but if you ask me to design a new interface or redesign an existing one, I wouldn't know where to begin.
Usually, each operating System has user Interface Guidelines. For Windows, have a look here. (Edit: The links in that post are broken. But a Search for "User Interface Guidelines" on MSDN has articles about everything)
Apple has it's own as well. Also, you may want to keep accessibility in mind.
One tip to check if your colors have good contrast is taking a snapshot of it and converting to grayscale. If you can't read something, colors were surely bad choosen.
Plus, although it's not about user interfaces, Before & After Magazine can give you some pretty good hints about color, design and related topics. It even has got some free pdf's to download.
The book Designing Interfaces, by Jenifer Tidwell has a entire chapter on the subject (Chapter 9, excerpts accesible online).
The entire book is worth recommending.
For web UI, I'm going to go out on a limb here and say that the most important color in web design is white, or "light". This is the color on top of which you place dense tracts of content.
Dark text, light background, always, when it comes to your primary content areas.
And the most important rule in layouting is whitespace. Let the content breathe.
Following these two simple rules is worth more than most "user interface usability" guidelines.
And by the way, the MS user interface guidelines are (by and large) horrible. Read Jakob Nielsen, look at Apple design aesthetics, but stay away from the MS "neutral gray/blue crunchbox" 12-step Wizard 10pt text philosophy of UI.
(And I say that as a long-time MS GUI programmer)
I'm horrible at finding colors that look good together, so I cheat and use pictures from nature that are mostly the color I want (say, green) and then I use this website to pull out the main color scheme. Generally nature does a pretty good job of setting its own nice color schemes.
Use high contrast color combos; Black text on white background is the best example of a high contrast combo.
A bad combo is green text on red background. It's horrible for color blind people (like myself).
See what your site looks like to a color blind person: colorfilter.wickline.org
As for desktop applications: Whatever you do, do not use hand-picked colors. Stick with the named system colors such as "Window Background", "Menu Text", etc. Otherwise, people relying on OS accessibility features will be locked with your color choices (unable to choose a high-contrast theme, for instance) and to people who like to customize their desktop themes will think your application is fugly.
Here are some simple pointers for usability in your typography. These things mainly address readability and accessibility concerns.
DOs:
Use relative font sizing (em)
Identify language changes within a document using the LANG attribute
Black text on a white background
For headings, use H1, H2, etc. and nest them appropriately
Chunk up content and organize with headings that fit what your users are looking for
Write clear and simple copy
Align left, ragged right
Text-to-background color must be high contrast
DONTs:
Use "click here" or "more" as link text
Use underline for emphasis
More than 2 font-type families
Italics
Blocks of text using all caps
Use true red or true blue text on white background (chromatic aberration)

Resources