rec.games.trading-cards.jyhad

Preservation of Formatting

15 messages from 6 participants · 01 July 2011 – 04 February 2012 · vekn.net/forum
the topic on the V:EKN forum

KevinM

Why does this software not preserve spacing and formatting? If I type something -- a deck, say -- into Notepad, and I intentionally put more than one space on a line, why does the board's software think it knows better than me and remove all those spaces? Kevin M., Prince of Las Vegas "Know your enemy and know yourself; in one-thousand battles you shall never be in peril." -- Sun Tzu, *The Art of War* "Contentment...Complacency...Catastrophe!" -- Joseph Chevalier Please visit VTESville daily! vtesville.myminicity.com/ Facebook: www.facebook.com/groups/129744447064017

Ankha

The root is planted deeply into the HTML language that ignores multiple spaces. The board ultimately uses HTML, even if it doesn't necessarily looks so. There are ways to insert multiple spaces, such as using code some space is required Prince of Paris, France Ratings Coordinator, Rules Director

jhattara

Ankha's answer pretty much covers it. It's a feature of HTML. All white space between two characters is converted into a single space. Also, as the board font is non-monospaced having a number of spaces in between wouldn't make the columns neatly spaced. Using embedded tables or [code] tags is required to align text into multiple columns. Jussi Hattara Webmaster Extraordinaire Finnish Politics!

KevinM

Ok, thanks for the answers, guys! Seems like it isn't worth the effort on my end to code a post, unless it's absolutely critical. Kevin M., Prince of Las Vegas "Know your enemy and know yourself; in one-thousand battles you shall never be in peril." -- Sun Tzu, *The Art of War* "Contentment...Complacency...Catastrophe!" -- Joseph Chevalier Please visit VTESville daily! vtesville.myminicity.com/ Facebook: www.facebook.com/groups/129744447064017

salem

use tabs instead of spaces? would that work? or would html stuff that too? -- salem

Pascal Bertrand

You can use these tags: Line1 Line2 This was nested tags.

Adonai

A tab is just white space to a browser, and gets shortened. UL doesn't work very well for a vampire disciplines/clan/title/etc. if you want them on the same line, like an ARDB or Secret Library output file. works on single line items. (except for the crappy white background) 1 anarch convert Caitiff:0 It doesn't work well on multiple line items though, it puts in a double line break. line one two tabs over line two two tabs over

Ankha

You can use a table. Crypt [12 vampires] Capacity min: 5 max: 10 average: 8.66667 2xAppius Claudius Corvus10 5 2xLuca Italicus10 archbishop4 2xLuna Giovanni10 1 vote5 2xGuillaume Giovanni9 4 2xPherydima8 bishop4 2xGianmaria Giovanni5 5 Prince of Paris, France Ratings Coordinator, Rules Director

Ankha

For those who use ARDB, you can modify the phpbb template (deck2phpbb.xsl) like this: (search for , [td] and ): <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" extension-element-prefixes="str"> <xsl:output method="text" encoding="iso-8859-1"/> <!-- Characters we'll support. We could add control chars 0-31 and 127-159, but we won't. --> <xsl:variable name="ascii"> !"#$%&amp;'()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:variable> <xsl:variable name="latin1"> ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ</xsl:variable> <!-- Characters that usually don't need to be escaped --> <xsl:variable name="safe">!*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable> <xsl:variable name="hex">0123456789ABCDEF</xsl:variable> <xsl:template match="/"> <xsl:text>[size=18][b]Deck Name : </xsl:text><xsl:value-of select="deck/name"/><xsl:text>[/b][/size]&#013;&#010;[b][u]Author :[/u][/b] </xsl:text><xsl:value-of select="deck/author"/><xsl:text>&#013;&#010;[b][u]Description :[/u][/b]&#013;&#010;</xsl:text> <xsl:value-of select="deck/description"/><xsl:text>&#013;&#010;&#013;&#010;&#013;&#010;[size=18][u]Crypt [</xsl:text><xsl:value-of select="deck/crypt/@size"/><xsl:text> vampires] Capacity min: </xsl:text><xsl:value-of select="deck/crypt/@min"/><xsl:text> max: </xsl:text><xsl:value-of select="deck/crypt/@max"/><xsl:text> average: </xsl:text><xsl:value-of select="deck/crypt/@avg"/><xsl:text>[/u][/size]&#013;&#010;</xsl:text> <xsl:text>[table]</xsl:text> <xsl:for-each select="/deck/crypt/vampire[not(name=preceding-sibling::vampire/name)]"> <xsl:sort select="@count" data-type="number" order="descending"/> <xsl:sort select="capacity" data-type="number" order="descending"/> <xsl:sort select="name"/> <xsl:variable name="xname" select="string(name)"/> <xsl:for-each select="/deck/crypt/vampire[name=$xname and not(adv=preceding-sibling::vampire[name=$xname]/adv)]"> <xsl:text>[tr][td]</xsl:text><xsl:call-template name="count-vampires"><xsl:with-param name="myname" select="string(name)" /><xsl:with-param name="myadv" select="string(adv)" /></xsl:call-template><xsl:text>x[/td][td][url=http://www.secretlibrary.info/?crypt=</xsl:text><xsl:call-template name="url-encode"><xsl:with-param name="str" select="string(name)"/></xsl:call-template><xsl:if test="adv!=''">%20(ADV)</xsl:if><xsl:text>] </xsl:text><xsl:value-of select="string(name)"/><xsl:choose><xsl:when test="adv != ''"><xsl:text> Adv </xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose><xsl:text> [/url][/td][td](</xsl:text><xsl:value-of select="capacity"/><xsl:text>)[/td][td]</xsl:text><xsl:call-template name="str:tokenize"><xsl:with-param name="string" select="string(disciplines)" /><xsl:with-param name="delimiters" select="' '"/></xsl:call-template><xsl:text>[/td][td]</xsl:text><xsl:value-of select="string(title)"/><xsl:text>[/td][td]</xsl:text><xsl:value-of select="string(clan)"/><xls:text>[/td][td]</xls:text>(group <xsl:value-of select="group"/><xsl:text>)[/td][/tr]&#013;&#010;</xsl:text> </xsl:for-each> </xsl:for-each> <xsl:text>[/table]</xsl:text> <xsl:text>&#013;&#010;&#013;&#010;[size=18][u]Library [</xsl:text><xsl:value-of select="deck/library/@size"/><xsl:text> cards][/u][/size]&#013;&#010;&#013;&#010;</xsl:text> <xsl:for-each select="/deck/library/card[not(type=preceding-sibling::card/type)]"> <xsl:sort select="type"/> <xsl:call-template name="LIBPART"> <xsl:with-param name="mytype" select="string(type)" /> </xsl:call-template> </xsl:for-each> <xsl:text>&#013;&#010;Crafted with : </xsl:text><xsl:value-of select="//deck/@generator"/><xsl:text>. [</xsl:text><xsl:value-of select="//deck/date"/><xsl:text>]&#013;&#010;</xsl:text> </xsl:template> <xsl:template name="LIBPART"> <xsl:param name="mytype"/> <xsl:if test="//card[type = $mytype]"> <xsl:text>[b][u]</xsl:text><xsl:value-of select="$mytype"/><xsl:text> [</xsl:text><xsl:value-of select="sum (//card[type = $mytype]/@count)"/><xsl:text>][/u][/b]&#013;&#010;</xsl:text> <xsl:for-each select="//card[(type=$mytype) and not(name=preceding-sibling::card/name)]"> <xsl:sort select="name"/> <xsl:text> </xsl:text><xsl:call-template name="count-cards"><xsl:with-param name="myname" select="string(name)" /></xsl:call-template><xsl:text>x [url=http://www.secretlibrary.info/?lib=</xsl:text><xsl:call-template name="url-encode"><xsl:with-param name="str" select="string(name)"/></xsl:call-template><xsl:text>] </xsl:text><xsl:value-of select="string(name)"/><xsl:text> [/url]&#013;&#010;</xsl:text> </xsl:for-each><xsl:text>&#013;&#010;</xsl:text> </xsl:if> </xsl:template> <xsl:template name="count-vampires"> <xsl:param name="myname"/> <xsl:param name="myadv"/> <xsl:value-of select="sum(//@count[../name=$myname and ../adv=$myadv])"/> </xsl:template> <xsl:template name="count-cards"> <xsl:param name="myname"/> <xsl:value-of select="sum(//@count[../name=$myname])"/> </xsl:template> <xsl:template name="longest-string"> <xsl:param name="nodes"/> <xsl:for-each select="$nodes"> </xsl:for-each> </xsl:template> <xsl:template name="url-encode"> <xsl:param name="str"/> <xsl:if test="$str"> <xsl:variable name="first-char" select="substring($str,1,1)"/> <xsl:choose> <xsl:when test="contains($safe,$first-char)"> <xsl:value-of select="$first-char"/> </xsl:when> <xsl:otherwise> <xsl:variable name="codepoint"> <xsl:choose> <xsl:when test="contains($ascii,$first-char)"> <xsl:value-of select="string-length(substring-before($ascii,$first-char)) + 32"/> </xsl:when> <xsl:when test="contains($latin1,$first-char)"> <xsl:value-of select="string-length(substring-before($latin1,$first-char)) + 160"/> </xsl:when> <xsl:otherwise> <xsl:message terminate="no">Warning: string contains a character that is out of range <xsl:value-of select="$first-char"/>! Substituting "?".</xsl:message> <xsl:text>63</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="hex-digit1" select="substring($hex,floor($codepoint div 16) + 1,1)"/> <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/> <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/> </xsl:otherwise> </xsl:choose> <xsl:if test="string-length($str) &gt; 1"> <xsl:call-template name="url-encode"> <xsl:with-param name="str" select="substring($str,2)"/> </xsl:call-template> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="str:tokenize"> <xsl:param name="string" select="''"/> <xsl:param name="delimiters" select="' '"/> <xsl:choose> <xsl:when test="not($string)"/> <xsl:when test="not($delimiters)"> <xsl:call-template name="str:_tokenize-characters"> <xsl:with-param name="string" select="$string"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="str:_tokenize-delimiters"> <xsl:with-param name="string" select="$string"/> <xsl:with-param name="delimiters" select="$delimiters"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="str:_tokenize-characters"> <xsl:param name="string"/> <xsl:if test="$string"> <token><xsl:value-of select="substring($string, 1, 1)"/></token> <xsl:call-template name="str:_tokenize-characters"> <xsl:with-param name="string" select="substring($string, 2)"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="str:_tokenize-delimiters"> <xsl:param name="string"/> <xsl:param name="delimiters"/> <xsl:variable name="delimiter" select="substring($delimiters, 1, 1)"/> <xsl:choose> <xsl:when test="not($delimiter)"> <xsl:choose> <xsl:when test="$string != ''"> <token>:<xsl:value-of select="$string"/>: </token> </xsl:when> <xsl:otherwise> <token><xsl:value-of select="$string"/></token> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="contains($string, $delimiter)"> <xsl:if test="not(starts-with($string, $delimiter))"> <xsl:call-template name="str:_tokenize-delimiters"> <xsl:with-param name="string" select="substring-before($string, $delimiter)"/> <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/> </xsl:call-template> </xsl:if> <xsl:call-template name="str:_tokenize-delimiters"> <xsl:with-param name="string" select="substring-after($string, $delimiter)"/> <xsl:with-param name="delimiters" select="$delimiters"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="str:_tokenize-delimiters"> <xsl:with-param name="string" select="$string"/> <xsl:with-param name="delimiters" select="substring($delimiters, 2)"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet> Prince of Paris, France Ratings Coordinator, Rules Director

Adonai

That seems to work very well, thank you! ARDB for the win! Deck Name : XZealot is Inspiring Author : Lasombra Description : Norm did Janni/Victor Pelletier Reckless Agitation/Parity Shift and almost won Day 2 of the North American Continental Championship. This isn't that deck, but I did steal the idea of an independent + prince / RA+PS deck. He went for a lot more combat that I feel is necessary in the local metagame, so I've changed that up completely. Nehemiah will help ensure a good hand for the current turn, moving unneeded cards to the bottom of the deck. How do you intend to oust? Large damage votes called at stealth. How do you intend to keep from being ousted? Gaining pool via Villein and Voter Captivation, and perhaps keeping a little from Parity Shift. What do you want your ready region to look like (ie, how many guys are you planning on getting out)? Nehemiah and Giangaleazzo, The Traitor are the preferred minions. Tobias could go Anarch if necessary to call the Reckless Agitations. What do you want your average turn to look like? Ideally, G & N will each call a vote, and ensure that it passes. What's your metagame like? How do your opponents play? Wildly varied. Anything from Horde Scobax to Anson/Anneke/Alexandra. What problems have you observed with the deck in play? Haven't played it yet. Considering taking it to a tournament in South Carolina on the 16th. Looking at lots of deck ideas that are new to me. Crypt [12 vampires] Capacity min: 4 max: 10 average: 7.75 3x Nehemiah (9) 2 votesTrue Brujah(g4) 3x Giangaleazzo, The Traitor (8) princeLasombra(g4) 2x Melinda Galbraith (10) cardinalLasombra(g4) 2x Tobias Smith (7) Lasombra(g3) 2x Leila Monroe (4) Lasombra(g4) Library [90 cards] Action [3] 3x Charming Lobby Action Modifier [20] 4x Bewitching Oration 5x Iron Glare 6x Shadow Play 5x Voter Captivation Ally [2] 1x Carlton Van Wyk (Hunter) 1x Mylan Horseed (Goblin) Combat [8] 8x Majesty Equipment [1] 1x Heart of Nizchetus Master [24] 1x Giant's Blood 1x Legendary Vampire 2x Lilith's Blessing 3x Obtenebration 1x Parthenon, The 1x Power Structure 1x Tabriz Assembly 8x Villein 6x Zillah's Valley Political Action [19] 1x Anarchist Uprising 1x Ancilla Empowerment 1x Cardinal Benediction 1x Conservative Agitation 1x Domain Challenge 2x Kine Resources Contested 1x Neonate Breach 5x Parity Shift 5x Reckless Agitation 1x Rumors of Gehenna Reaction [13] 7x Deflection 4x On the Qui Vive 2x Wake with Evening's Freshness Crafted with : Anarch Revolt Deck Builder. [Thu Jul 07 12:41:30 2011]

Ankha

Corrected the crypt link in my post. Prince of Paris, France Ratings Coordinator, Rules Director

Adonai

Can you attach the file instead?

Ankha

> Adonai wrote: > Can you attach the file instead? > I tried but couldn't upload a file using the "+ ADD FILE" button. Prince of Paris, France Ratings Coordinator, Rules Director

Adonai

Make it into a zip file first. There are only certain extensions allowed by the forum software. jpg, jpeg, gif, png, txt, rtf, pdf, zip, tar.gz, tgz

Adonai

Zipped up the file. Be sure it ends up in your {ARDB exe folder}\XSL subdirectory. Attachment deck2phpbb.zip not found (Windows zip file, anything can extract it.)